/* ===== Shop Hero ===== */
.shop-hero {
  padding: 140px 0 60px;
  background: linear-gradient(135deg, var(--brown-dark) 0%, var(--brown) 100%);
  text-align: center;
}

.shop-hero .section-tag {
  color: var(--cream-dark);
  border: 1.5px solid rgba(253, 245, 230, 0.3);
  padding: 8px 20px;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 16px;
}

.shop-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--cream);
  margin-bottom: 16px;
}

.shop-hero p {
  font-size: 1.1rem;
  color: rgba(253, 245, 230, 0.85);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== Active Nav ===== */
.nav-active {
  color: var(--brown) !important;
}

.nav-active::after {
  width: 100% !important;
}

/* ===== Shop Filters ===== */
.shop-filters-section {
  background: var(--white);
  padding: 24px 0;
  border-bottom: 1px solid var(--cream-dark);
  position: sticky;
  top: 76px;
  z-index: 100;
}

.shop-toolbar {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream-light);
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  flex: 0 0 280px;
  transition: var(--transition);
  color: var(--text-light);
}

.search-box:focus-within {
  border-color: var(--brown);
  box-shadow: 0 0 0 3px rgba(92, 61, 46, 0.1);
}

.search-box input {
  border: none;
  background: transparent;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  color: var(--text);
  outline: none;
  width: 100%;
}

.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 1;
}

.filter-tab {
  padding: 8px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--cream-dark);
  border-radius: 50px;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.filter-tab:hover {
  border-color: var(--brown-light);
  color: var(--brown);
}

.filter-tab.active {
  background: var(--brown);
  color: var(--cream);
  border-color: var(--brown);
}

/* ===== Shop Section ===== */
.shop-section {
  padding-top: 48px;
  min-height: 50vh;
}

/* ===== Products Grid ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(92, 61, 46, 0.06);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

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

.product-image {
  position: relative;
  aspect-ratio: 3/2;
  background: var(--cream-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image-placeholder {
  font-size: 2rem;
  opacity: 0.9;
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 50px;
  background: var(--brown);
  color: var(--cream);
}

.product-badge.new {
  background: #2E7D32;
}

.product-badge.popular {
  background: var(--brown-accent);
}

.product-info {
  padding: 14px 16px;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brown-light);
  margin-bottom: 6px;
}

.product-name {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.product-vendor {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 12px;
}

.product-vendor span {
  font-weight: 600;
  color: var(--brown);
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brown-dark);
}

.product-price .price-currency {
  font-size: 0.8rem;
  font-weight: 500;
}

.add-to-cart-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--brown);
  color: var(--cream);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.add-to-cart-btn:hover {
  background: var(--brown-dark);
  transform: translateY(-1px);
}

.add-to-cart-btn svg {
  flex-shrink: 0;
}

/* ===== Size Selector ===== */
.size-selector {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.size-btn {
  padding: 4px 10px;
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1.5px solid var(--cream-dark);
  border-radius: 4px;
  background: var(--white);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.size-btn:hover,
.size-btn.active {
  border-color: var(--brown);
  color: var(--brown);
  background: var(--cream-light);
}

/* ===== No Results ===== */
.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-light);
}

.no-results svg {
  margin-bottom: 16px;
  opacity: 0.4;
}

.no-results h3 {
  font-size: 1.2rem;
  color: var(--brown-dark);
  margin-bottom: 8px;
}

/* ===== Cart Toggle ===== */
.cart-toggle {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  position: relative;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--brown-accent);
  color: var(--white);
  border-radius: 50px;
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 400px;
  max-width: 90vw;
  height: 100vh;
  background: var(--white);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right 0.35s ease;
  box-shadow: -4px 0 30px rgba(0, 0, 0, 0.15);
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--cream-dark);
}

.cart-header h3 {
  font-size: 1.2rem;
  color: var(--brown-dark);
}

.cart-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  padding: 4px;
  transition: var(--transition);
}

.cart-close:hover {
  color: var(--brown);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--cream-dark);
}

.cart-item-image {
  width: 64px;
  height: 64px;
  background: var(--cream-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--brown-dark);
  margin-bottom: 4px;
}

.cart-item-meta {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.cart-item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-item-price {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--brown-dark);
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid var(--cream-dark);
  border-radius: 6px;
  overflow: hidden;
}

.quantity-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--cream-light);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown);
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--cream-dark);
}

.quantity-value {
  width: 32px;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.cart-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 0;
  margin-left: 12px;
  transition: var(--transition);
}

.cart-remove:hover {
  color: #c62828;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-light);
  padding: 40px;
}

.cart-empty svg {
  opacity: 0.3;
}

.cart-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--cream-dark);
  background: var(--cream-light);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1rem;
}

.cart-subtotal span:last-child {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brown-dark);
}

.cart-note {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 10px;
}

/* ===== Product Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1300;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.product-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 600px;
  max-width: 92vw;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  z-index: 1400;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.product-modal.open {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--white);
  border: none;
  cursor: pointer;
  color: var(--text-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  color: var(--brown);
}

.modal-image {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--cream-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.modal-details {
  padding: 32px;
}

.modal-details .product-category {
  margin-bottom: 8px;
}

.modal-details .product-name {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.modal-details .product-price {
  font-size: 1.4rem;
  margin-bottom: 6px;
}

.modal-commission-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 20px;
  font-style: italic;
}

.modal-description {
  font-size: 0.95rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.modal-vendor-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--cream-light);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
}

.modal-vendor-avatar {
  width: 44px;
  height: 44px;
  background: var(--brown);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.modal-vendor-details strong {
  display: block;
  font-size: 0.9rem;
  color: var(--brown-dark);
}

.modal-vendor-details span {
  font-size: 0.8rem;
  color: var(--text-light);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions .btn {
  flex: 1;
  text-align: center;
}

/* ===== How Grid ===== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.how-card {
  text-align: center;
  padding: 32px 24px;
}

.how-number {
  width: 56px;
  height: 56px;
  background: var(--cream);
  color: var(--brown);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 auto 20px;
  border: 2px solid var(--brown);
}

.how-card h3 {
  font-size: 1.1rem;
  color: var(--brown-dark);
  margin-bottom: 12px;
}

.how-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Benefits Grid ===== */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.benefit-card {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(92, 61, 46, 0.06);
  transition: var(--transition);
}

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

.benefit-icon {
  width: 56px;
  height: 56px;
  background: var(--cream);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  margin-bottom: 20px;
}

.benefit-card h3 {
  font-size: 1.1rem;
  color: var(--brown-dark);
  margin-bottom: 10px;
}

.benefit-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
}

/* ===== Commission ===== */
.commission-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: start;
}

.commission-card {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.commission-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.commission-header h3 {
  font-size: 1.2rem;
  color: var(--brown-dark);
}

.commission-rate {
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--brown);
}

.commission-card > p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.7;
  margin-bottom: 24px;
}

.commission-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.commission-details li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
}

.commission-details svg {
  flex-shrink: 0;
  color: #2E7D32;
}

.commission-example {
  background: var(--white);
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 2px solid var(--cream-dark);
}

.commission-example h4 {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 20px;
}

.example-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--cream-dark);
}

.example-total {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brown-dark);
  border-bottom: none;
  padding-top: 16px;
}

.example-note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 16px;
  line-height: 1.5;
}

/* ===== Vendor Form ===== */
.vendor-form-wrapper {
  max-width: 720px;
  margin: 0 auto;
}

.vendor-form {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.form-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--cream-dark);
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 20px;
  padding-bottom: 0;
}

.form-section h4 {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--brown-dark);
  margin-bottom: 20px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brown);
  cursor: pointer;
}

.form-agreement {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--cream-light);
  border-radius: var(--radius-sm);
}

.form-agreement .checkbox-label {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
}

/* ===== Logo Placeholder ===== */
.logo-placeholder {
  width: 40px;
  height: 40px;
  background: var(--brown);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.1rem;
}

/* ===== Added-to-cart Animation ===== */
@keyframes addedPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.cart-count.pulse {
  animation: addedPulse 0.4s ease;
}

.add-to-cart-btn.added {
  background: #2E7D32;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: 1fr 1fr;
  }
  .commission-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--cream-dark);
    box-shadow: var(--shadow-lg);
  }

  .nav-links.active {
    display: flex;
  }

  .shop-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    flex: 1;
  }

  .filter-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .filter-tab {
    white-space: nowrap;
    flex-shrink: 0;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .how-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .vendor-form {
    padding: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-details {
    padding: 24px;
  }

  .modal-actions {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .add-to-cart-btn {
    width: 100%;
    justify-content: center;
  }

  .shop-filters-section {
    position: static;
  }
}
