/* ============================================
   COMPONENTS.CSS - Reusable UI Components
============================================ */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-weight: var(--font-weight-medium);
  font-size: var(--text-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-default);
  position: relative;
  overflow: hidden;
  outline: none;
  white-space: nowrap;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
}

.btn-xl {
  padding: var(--space-lg) var(--space-2xl);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
}

.btn-full {
  width: 100%;
}

/* Button Variants */
.btn-primary {
  background-color: var(--color-rich-brown);
  color: var(--color-cream);
  border: 2px solid var(--color-rich-brown);
}

.btn-primary:hover {
  background-color: var(--color-dark-brown);
  border-color: var(--color-dark-brown);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: var(--color-gold);
  color: var(--color-dark-brown);
  border: 2px solid var(--color-gold);
}

.btn-secondary:hover {
  background-color: var(--color-dark-gold);
  border-color: var(--color-dark-gold);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--color-rich-brown);
  color: var(--color-rich-brown);
}

.btn-outline:hover {
  background-color: var(--color-rich-brown);
  color: var(--color-cream);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background-color: transparent;
  border: 2px solid transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background-color: var(--bg-accent);
  color: var(--color-rich-brown);
}

/* Button Groups */
.btn-group {
  display: inline-flex;
  gap: 0;
  border-radius: var(--border-radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.btn-group .btn {
  border-radius: 0;
  border: none;
  border-right: 1px solid var(--border-color);
}

.btn-group .btn:last-child {
  border-right: none;
}

.btn-group .btn:hover {
  position: relative;
  z-index: 1;
}

/* ===== CARDS ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  transition: all var(--transition-default);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-terracotta);
}

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  color: var(--color-dark-brown);
}

.card-body {
  padding: var(--space-lg);
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

/* Product Card */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background-color: var(--bg-secondary);
  position: relative;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
}

.product-title {
  font-size: var(--text-lg);
  font-weight: var(--font-weight-semibold);
  margin: var(--space-md) 0 var(--space-sm);
  color: var(--color-dark-brown);
  line-height: 1.4;
}

.product-title a {
  color: inherit;
  text-decoration: none;
}

.product-title a:hover {
  color: var(--color-terracotta);
}

.product-store {
  font-size: var(--text-sm);
  color: var(--color-terracotta);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-sm);
}

.product-store a {
  color: inherit;
}

.product-store a:hover {
  color: var(--color-rich-brown);
}

.product-price {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-rich-brown);
  margin: var(--space-sm) 0;
}

.product-meta {
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--text-light);
}

.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-gold);
}

.product-stock {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-medium);
}

.product-stock.in-stock {
  background-color: rgba(39, 174, 96, 0.1);
  color: #27ae60;
}

.product-stock.low-stock {
  background-color: rgba(243, 156, 18, 0.1);
  color: #f39c12;
}

.product-stock.out-of-stock {
  background-color: rgba(231, 76, 60, 0.1);
  color: #e74c3c;
}



/* ===== STORE CARDS ===== */
.store-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-default);
}

.store-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-terracotta);
}

.store-card-header {
  position: relative;
  height: 160px;
  background-color: var(--bg-secondary);
  overflow: hidden;
}

.store-card-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-card-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.store-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-card-description {
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}




/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-family: var(--font-primary);
  font-size: var(--text-base);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: all var(--transition-default);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-terracotta);
  box-shadow: 0 0 0 3px rgba(198, 151, 107, 0.1);
}

.form-control::placeholder {
  color: var(--text-light);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235A4A42' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  background-size: 16px;
  padding-right: var(--space-2xl);
}

.form-check {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.form-check-input {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-check-input:checked {
  background-color: var(--color-terracotta);
  border-color: var(--color-terracotta);
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(198, 151, 107, 0.1);
}

.form-check-label {
  cursor: pointer;
  color: var(--text-secondary);
}

.form-text {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-sm);
  color: var(--text-light);
}

.form-error {
  color: #e74c3c;
  font-size: var(--text-sm);
  margin-top: var(--space-xs);
}

.form-error .form-control {
  border-color: #e74c3c;
}

/* ===== ALERTS & MESSAGES ===== */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius);
  margin-bottom: var(--space-lg);
  border-left: 4px solid transparent;
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
}

.alert-success {
  background-color: rgba(39, 174, 96, 0.1);
  border-left-color: #27ae60;
  color: #155724;
}

.alert-success .alert-icon {
  color: #27ae60;
}

.alert-error {
  background-color: rgba(231, 76, 60, 0.1);
  border-left-color: #e74c3c;
  color: #721c24;
}

.alert-error .alert-icon {
  color: #e74c3c;
}

.alert-warning {
  background-color: rgba(243, 156, 18, 0.1);
  border-left-color: #f39c12;
  color: #856404;
}

.alert-warning .alert-icon {
  color: #f39c12;
}

.alert-info {
  background-color: rgba(52, 152, 219, 0.1);
  border-left-color: #3498db;
  color: #0c5460;
}

.alert-info .alert-icon {
  color: #3498db;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

.badge-primary {
  background-color: var(--color-rich-brown);
  color: var(--color-cream);
}

.badge-secondary {
  background-color: var(--color-gold);
  color: var(--color-dark-brown);
}

.badge-terracotta {
  background-color: var(--color-terracotta);
  color: var(--color-cream);
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.badge-success {
  background-color: #27ae60;
  color: white;
}

.badge-warning {
  background-color: #f39c12;
  color: white;
}

.badge-danger {
  background-color: #e74c3c;
  color: white;
}

/* ===== RATING STARS ===== */
.rating {
  display: inline-flex;
  gap: 2px;
  align-items: center;
}

.star {
  position: relative;          /* <-- add this */
  color: var(--color-soft-gray);
  font-size: 1.2rem;
  transition: color var(--transition-fast);
}


.star.filled {
  color: var(--color-gold);
}

.star.half::before {
  content: '★';
  position: absolute;
  width: 50%;
  overflow: hidden;
  color: var(--color-gold);
}

.rating-value {
  font-weight: var(--font-weight-bold);
  color: var(--color-dark-brown);
  margin-left: var(--space-xs);
}

.rating-count {
  color: var(--text-light);
  font-size: var(--text-sm);
  margin-left: var(--space-xs);
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  margin: var(--space-2xl) 0;
}

.page-item {
  list-style: none;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--border-radius);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-default);
}

.page-link:hover {
  background-color: var(--bg-accent);
  color: var(--color-rich-brown);
  border-color: var(--color-terracotta);
}

.page-item.active .page-link {
  background-color: var(--color-terracotta);
  color: var(--color-cream);
  border-color: var(--color-terracotta);
}

.page-item.disabled .page-link {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: var(--bg-secondary);
}

/* ===== TABLES ===== */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
}

.table th,
.table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-brown);
  background-color: var(--bg-secondary);
}

.table tr:hover {
  background-color: var(--bg-accent);
}

.table-striped tr:nth-child(even) {
  background-color: var(--bg-secondary);
}

.table-bordered {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border-color);
}

/* ===== MODALS ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(41, 20, 15, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: var(--space-lg);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-default);
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background-color: var(--bg-primary);
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform var(--transition-default);
}

.modal.active .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-weight-semibold);
  margin: 0;
  color: var(--color-dark-brown);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  color: var(--color-terracotta);
  background-color: var(--bg-accent);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

/* ===== LOADING INDICATORS ===== */
.loading {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-secondary);
  border-radius: 50%;
  border-top-color: var(--color-gold);
  animation: spin 1s ease-in-out infinite;
}

.loading-sm {
  width: 20px;
  height: 20px;
  border-width: 2px;
}

.loading-lg {
  width: 60px;
  height: 60px;
  border-width: 4px;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(250, 250, 250, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* ===== AVATARS ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--font-weight-bold);
  color: var(--color-dark-brown);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-sm);
}

.avatar-lg {
  width: 60px;
  height: 60px;
  font-size: var(--text-xl);
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--text-2xl);
}

/* ===== TOOLTIPS ===== */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip-text {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-xs) var(--space-sm);
  background-color: var(--color-dark-brown);
  color: var(--color-cream);
  font-size: var(--text-xs);
  border-radius: var(--border-radius-sm);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  margin-bottom: var(--space-xs);
  z-index: 1000;
}

.tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: var(--color-dark-brown) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  opacity: 1;
  visibility: visible;
}

/* ===== ACCORDION ===== */
.accordion {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--border-color);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  width: 100%;
  padding: var(--space-lg);
  background-color: var(--bg-primary);
  border: none;
  text-align: left;
  font-weight: var(--font-weight-semibold);
  color: var(--color-dark-brown);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background-color: var(--bg-accent);
}

.accordion-icon {
  transition: transform var(--transition-default);
}

.accordion-item.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  padding: 0 var(--space-lg);
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition-default);
}

.accordion-item.active .accordion-content {
  padding: var(--space-lg);
  max-height: 1000px;
}

/* ===== TABS ===== */
.tabs {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-lg);
}

.tab-list {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  overflow-x: auto;
}

.tab-button {
  padding: var(--space-sm) var(--space-lg);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-weight: var(--font-weight-medium);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.tab-button:hover {
  color: var(--color-rich-brown);
}

.tab-button.active {
  color: var(--color-rich-brown);
  border-bottom-color: var(--color-terracotta);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.3s ease-out;
}

/* ===== DECORATIVE PATTERNS ===== */
.african-pattern-top {
  position: relative;
}

.african-pattern-top::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    var(--color-gold) 0%, 
    var(--color-terracotta) 33%, 
    var(--color-rich-brown) 66%, 
    var(--color-gold) 100%);
  border-radius: 2px;
}

.african-pattern-border {
  border: 2px solid transparent;
  background-clip: padding-box, border-box;
  background-origin: padding-box, border-box;
  background-image: 
    linear-gradient(var(--color-cream), var(--color-cream)), 
    repeating-linear-gradient(45deg, 
      var(--color-gold) 0px, 
      var(--color-gold) 2px, 
      transparent 2px, 
      transparent 8px,
      var(--color-terracotta) 8px,
      var(--color-terracotta) 10px,
      transparent 10px,
      transparent 16px);
  border-radius: var(--border-radius-lg);
}

.pattern-dots {
  background-image: radial-gradient(var(--color-gold) 1px, transparent 1px);
  background-size: 10px 10px;
  background-position: 0 0;
}

.pattern-lines {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    var(--color-light-gold) 10px,
    var(--color-light-gold) 20px
  );
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
  margin: var(--space-2xl) 0;
}

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-light);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: var(--space-lg);
  color: var(--color-soft-gray);
}

.empty-state-title {
  font-size: var(--text-2xl);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.empty-state-description {
  max-width: 400px;
  margin: 0 auto var(--space-xl);
}

/* ===== PROGRESS BARS ===== */
.progress {
  height: 8px;
  background-color: var(--bg-secondary);
  border-radius: var(--border-radius-full);
  overflow: hidden;
  margin: var(--space-md) 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-terracotta));
  border-radius: var(--border-radius-full);
  transition: width 0.3s ease;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
  }
  
  .modal-content {
    max-width: 100%;
    margin: var(--space-md);
  }
  
  .table {
    display: block;
    overflow-x: auto;
  }
}

@media (max-width: 480px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    border-right: none;
    border-bottom: 1px solid var(--border-color);
  }
  
  .btn-group .btn:last-child {
    border-bottom: none;
  }
}


/* =========================
   Horizontal scroll containers
   ========================= */
.horizontal-scroll,
.featured-carousel {
    display: flex;
    gap: 1rem;               /* spacing between cards */
    overflow-x: auto;
    padding-bottom: 1rem;
    scroll-behavior: smooth;
}

/* Scrollbar styling for featured-carousel (WebKit) */
.featured-carousel::-webkit-scrollbar {
    height: 8px;
}

.featured-carousel::-webkit-scrollbar-thumb {
    background-color: var(--color-gold);
    border-radius: 4px;
}

.featured-carousel::-webkit-scrollbar-track {
    background-color: var(--color-light-grey);
}

/* =========================
   Product and Store Cards
   ========================= */
.product-card,
.featured-card {
    flex: 0 0 280px;              /* fixed width for horizontal scroll */
    background-color: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Images inside cards */
.product-card img,
.featured-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}


/* =========================
   Buttons
   ========================= */
.btn-featured {
    margin-top: 1rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    font-weight: 600;
    border-radius: var(--border-radius-md);
    background-color: var(--color-gold);
    color: var(--color-dark-brown);
    transition: all 0.2s;
}

.btn-featured:hover {
    background-color: var(--color-dark-brown);
    color: var(--color-gold);
}

/* =========================
   Optional carousel arrows
   ========================= */
.carousel-wrapper {
    position: relative;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-gold);
    color: var(--color-dark-brown);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn.prev-btn {
    left: -16px;
}

.carousel-btn.next-btn {
    right: -16px;
}

/* =========================
   Responsive
   ========================= */
@media (max-width: 768px) {
    .product-card,
    .featured-card {
        flex: 0 0 150px;
        max-height: 250px;
    }

    /* Exception: form pages must not be clipped */
    .add-product-page .product-card,
    .edit-page .product-card {
        flex: none;
        max-height: none;
        overflow: visible;
        height: auto;
    }
}

.rating-bar {
    height: 8px;
    background-color: #e5e7eb; /* light gray background */
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background-color: #f59e0b; /* gold fill */
    width: 0%; /* default width, will be overridden inline */
    transition: width 0.3s ease;
}

