/* ============ ShoppingSathi Styles ============ */

:root {
  --primary: #2874f0;
  --secondary: #fb641b;
  --accent: #ff9f00;
  --success: #388e3c;
  --danger: #ff6161;
  --text: #212121;
  --text-light: #878787;
  --bg: #f1f3f6;
  --card-bg: #fff;
  --border: #e0e0e0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
  --radius: 8px;
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }

/* ==================================================
   HEADER — logo | search | actions (right-aligned)
   ================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--primary);
  box-shadow: var(--shadow-md);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 10px 20px;
  min-height: 62px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  font-style: italic;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo span { color: var(--accent); }

.search-bar {
  flex: 1 1 auto;
  position: relative;
  max-width: 640px;
  display: flex;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}
.search-btn {
  padding: 0 16px;
  background: #fff;
  display: flex;
  align-items: center;
}
.search-btn svg { width: 22px; height: 22px; fill: var(--primary); }

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  box-shadow: var(--shadow-md);
  max-height: 400px;
  overflow-y: auto;
  display: none;
  z-index: 10;
}
.search-suggestions.active { display: block; }
.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
}
.suggestion-item:hover { background: var(--bg); }

/* ---- RIGHT-SIDE ACTIONS (the key part) ---- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;   /* PUSHES TO THE RIGHT */
  flex-shrink: 0;
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  transition: background 0.2s;
  position: relative;
  min-width: 40px;
  height: 48px;
  text-decoration: none;
  line-height: 1.1;
  gap: 2px;
}
.action-btn:hover { background: rgba(255,255,255,0.15); }
.action-btn svg {
  width: 20px;
  height: 20px;
  fill: #fff;
  flex-shrink: 0;
}
.action-btn > span:not(.cart-count) {
  font-size: 12px;
  white-space: nowrap;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: calc(50% - 22px);
  background: var(--accent);
  color: var(--text);
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* Category nav (below header) */
.category-nav {
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav ul {
  display: flex;
  list-style: none;
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 16px;
  white-space: nowrap;
}
.category-nav a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  color: var(--text);
}
.category-nav a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ==================================================
   CAROUSEL
   ================================================== */
.hero { padding: 16px 0; }
.carousel {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
  height: 380px;
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  padding: 40px;
  color: #fff;
}
.carousel-slide h2 { font-size: 42px; margin-bottom: 12px; }
.carousel-slide p { font-size: 18px; }
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  box-shadow: var(--shadow-md);
  z-index: 2;
}
.carousel-btn.prev { left: 16px; }
.carousel-btn.next { right: 16px; }
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.carousel-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
}
.carousel-dots .dot.active {
  background: #fff;
  width: 28px;
  border-radius: 5px;
}

/* ==================================================
   SECTIONS
   ================================================== */
section { margin-bottom: 24px; }
.categories-grid, .deals-section, .products-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
h2 { font-size: 22px; margin-bottom: 16px; }

.grid-categories {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
.category-card {
  text-align: center;
  padding: 16px;
  border-radius: var(--radius);
  transition: var(--transition);
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.category-card .cat-icon {
  font-size: 32px;
  line-height: 1;
  text-align: center;
  transition: transform 0.2s;
}
.category-card:hover .cat-icon {
  transform: scale(1.1);
}
.category-card span {
  font-size: 13px;
  font-weight: 500;
  display: block;
  margin-top: 6px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-header h2 { margin: 0; }
.sort-options select {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: #fff;
}

.product-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.product-scroll .product-card { min-width: 200px; }
.products-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* ==================================================
   PRODUCT CARD
   ================================================== */
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.product-image {
  position: relative;
  padding-top: 100%;
  background: #fafafa;
  overflow: hidden;
}
.product-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.wishlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.wishlist-btn svg { fill: var(--text-light); }
.wishlist-btn.active svg { fill: var(--danger); }
.discount-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--success);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.product-info {
  padding: 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.product-title {
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
.rating-badge {
  background: var(--success);
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: 600;
}
.rating-count { color: var(--text-light); }
.product-price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.price-current { font-size: 18px; font-weight: 700; }
.price-original {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 13px;
}
.price-discount {
  color: var(--success);
  font-size: 13px;
  font-weight: 600;
}
.add-to-cart {
  background: var(--primary);
  color: #fff;
  padding: 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 14px;
  margin-top: auto;
}
.add-to-cart:hover { background: #1a5fd0; }

/* ==================================================
   PAGINATION
   ================================================== */
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
  flex-wrap: wrap;
}
.pagination a {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-weight: 500;
  font-size: 14px;
  transition: var(--transition);
}
.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #eef3fd;
}
.pagination a.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  font-weight: 700;
}
.pagination .dots { color: var(--text-light); padding: 0 4px; }
.pagination-info {
  text-align: center;
  font-size: 13px;
  color: var(--text-light);
  margin-top: 12px;
}

/* ==================================================
   PRODUCT DETAIL
   ================================================== */
.product-detail {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
  box-shadow: var(--shadow-sm);
}
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.product-detail-image img {
  max-height: 500px;
  object-fit: contain;
  margin: 0 auto;
}
.product-detail-info h1 { font-size: 24px; margin-bottom: 12px; }
.product-detail-info .product-price { font-size: 22px; margin: 16px 0; }
.product-detail-info p { margin: 16px 0; color: #555; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 12px 32px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
}

/* ==================================================
   TOAST
   ================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

/* ==================================================
   FOOTER
   ================================================== */
.footer {
  background: #172337;
  color: #fff;
  margin-top: 40px;
  padding: 40px 0 0;
}
.footer-content {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}
.footer-col h4 {
  color: var(--text-light);
  margin-bottom: 12px;
  font-size: 13px;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  color: #fff;
  font-size: 13px;
  padding: 4px 0;
  opacity: 0.85;
}
.footer-bottom {
  text-align: center;
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 32px;
  font-size: 13px;
  color: var(--text-light);
}

/* ==================================================
   CART PAGE
   ================================================== */
.cart-empty { text-align: center; padding: 60px 20px; color: #666; }
.cart-list {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 20px;
}
.cart-item {
  display: grid;
  grid-template-columns: 90px 1fr auto auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
}
.cart-item:last-child { border-bottom: none; }
.cart-item:hover { background: #fafafa; }
.cart-thumb {
  width: 90px;
  height: 90px;
  object-fit: contain;
  border-radius: 6px;
  background: #fafafa;
}
.cart-info { min-width: 0; }
.cart-title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-price { color: var(--text-light); font-size: 14px; }
.cart-qty {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.cart-qty button {
  width: 34px;
  height: 34px;
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
  background: #fff;
}
.cart-qty button:hover { background: #eef3fd; }
.cart-qty .qty-value {
  min-width: 36px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  padding: 0 8px;
}
.cart-line-total {
  font-size: 16px;
  font-weight: 700;
  min-width: 90px;
  text-align: right;
  white-space: nowrap;
}
.cart-remove {
  width: 34px;
  height: 34px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.cart-remove:hover { background: #ffe5e5; }
.cart-summary {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
  margin-left: auto;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 15px;
  border-bottom: 1px dashed var(--border);
}
.summary-row:last-of-type { border-bottom: none; }
.summary-total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 14px;
  border-top: 2px solid var(--text);
  border-bottom: none !important;
  margin-top: 8px;
}
.checkout-btn { width: 100%; margin-top: 16px; padding: 14px; font-size: 16px; }

/* ==================================================
   AUTH
   ================================================== */
.auth-wrap { max-width: 440px; margin: 40px auto; padding: 0 16px; }
.auth-form {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form h1 { font-size: 24px; margin-bottom: 8px; text-align: center; }
.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  color: #555;
  gap: 6px;
  font-weight: 500;
}
.auth-form input {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40,116,240,0.15);
}
.auth-form .btn-primary { padding: 12px; font-size: 15px; margin-top: 8px; }
.auth-form p { text-align: center; font-size: 14px; color: #666; }
.auth-form p a { color: var(--primary); font-weight: 600; }
.auth-errors {
  background: #ffe5e5;
  color: #c00;
  padding: 12px;
  border-radius: 6px;
  font-size: 14px;
}

/* ==================================================
   CHECKOUT
   ================================================== */
.checkout-page {
  padding: 24px 16px 40px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}

.checkout-form,
.checkout-summary {
  background: #fff;
  padding: 24px 28px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  border: 1px solid #eef1f6;
}

/* Form headings */
.checkout-form h2 {
  font-size: 17px;
  color: #172337;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f6;
  font-weight: 700;
}
.checkout-summary h2 {
  font-size: 17px;
  color: #172337;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f6;
  font-weight: 700;
}

/* Form fields */
.checkout-form label,
.checkout-form .row2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
  margin-bottom: 14px;
}
.checkout-form .row2 {
  flex-direction: row;
  gap: 12px;
}
.checkout-form .row2 label {
  flex: 1;
  margin-bottom: 0;
}
.checkout-form input[type=text],
.checkout-form input[type=email],
.checkout-form input[type=tel],
.checkout-form textarea {
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.checkout-form input:focus,
.checkout-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}

/* Payment options */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e6ef;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
}
.payment-option:hover {
  border-color: #b8cdf0;
  background: #f7faff;
}
.payment-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef3fd;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.1);
}
.payment-option input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

/* Order summary items */
.checkout-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f6;
}
.checkout-item:last-of-type {
  border-bottom: none;
}
.checkout-item img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 6px;
  background: #fafafa;
  flex-shrink: 0;
}
.checkout-item > div {
  flex: 1;
  min-width: 0;
}
.co-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.co-qty {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}
.co-price {
  margin-left: auto;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Summary rows */
.checkout-summary .summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  color: #555;
}
.checkout-summary .summary-total {
  font-size: 18px;
  font-weight: 700;
  color: #172337;
  padding-top: 14px;
  margin-top: 8px;
  border-top: 2px solid #e0e6ef;
  border-bottom: none;
}

/* Place Order button */
.checkout-btn {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
  font-weight: 700;
}

/* ==================================================
   CHECKOUT — Mobile
   ================================================== */
@media (max-width: 768px) {
  .checkout-page {
    padding: 16px 12px 32px;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .checkout-form,
  .checkout-summary {
    padding: 18px 16px;
    border-radius: 10px;
  }

  .checkout-form h2,
  .checkout-summary h2 {
    font-size: 15px;
    margin-bottom: 12px;
  }

  /* Stack .row2 fields vertically on mobile */
  .checkout-form .row2 {
    flex-direction: column;
    gap: 0;
  }
  .checkout-form .row2 label {
    margin-bottom: 14px;
  }

  .checkout-form input[type=text],
  .checkout-form input[type=email],
  .checkout-form input[type=tel],
  .checkout-form textarea {
    font-size: 16px;   /* prevents iOS zoom on focus */
    padding: 12px 14px;
  }

  /* Payment options get more tap area */
  .payment-option {
    padding: 14px;
    font-size: 14px;
  }

  /* Item images smaller, text tighter */
  .checkout-item img {
    width: 48px;
    height: 48px;
  }
  .co-title { font-size: 12px; }
  .co-price { font-size: 14px; }

  /* Summary sticks above the fold when scrolling on tall forms */
  .checkout-summary {
    position: relative;   /* not sticky — avoids overlapping issues */
  }

  /* Prominent Place Order button */
  .checkout-btn {
    padding: 15px;
    font-size: 15px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .checkout-form,
  .checkout-summary {
    padding: 14px 12px;
  }
  .co-title { font-size: 11px; }
  .co-price { font-size: 13px; }
  .checkout-item img {
    width: 42px;
    height: 42px;
  }
}

/* ==================================================
   ORDER SUCCESS
   ================================================== */
.order-success { padding: 40px 16px; }
.success-box {
  max-width: 700px;
  margin: 0 auto;
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-md);
}
.success-box h1 { color: var(--success); margin: 12px 0; }
.order-number {
  display: inline-block;
  background: #eef3fd;
  color: var(--primary);
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  margin: 16px 0 24px;
  font-size: 16px;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: left;
  margin: 24px 0;
}
.order-detail-grid h3 {
  font-size: 14px;
  color: #666;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.order-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.order-item img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  border-radius: 4px;
}

/* ==================================================
   MY ORDERS
   ================================================== */
.order-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.order-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.order-num { font-weight: 700; font-size: 15px; }
.order-date { font-size: 13px; color: #888; }
.order-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.status-pending   { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d4edda; color: #155724; }
.status-shipped   { background: #cce5ff; color: #004085; }
.status-delivered { background: #d1ecf1; color: #0c5460; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.order-total { font-weight: 700; font-size: 16px; }

/* ============ Category Page — Enhanced ============ */
.category-page { padding: 20px 16px; }

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #888;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.breadcrumb a { color: #2874f0; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .crumb-current { color: #212121; font-weight: 600; }

.category-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
}

/* Sidebar */
.filters-sidebar {
  background: #fff;
  padding: 18px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}
.filters-header h3 {
  font-size: 15px;
  margin: 0;
  color: #172337;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.clear-filters-link {
  font-size: 12px;
  color: #ff6161;
  font-weight: 600;
  text-decoration: none;
}
.clear-filters-link:hover { text-decoration: underline; }

.filter-block {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #eee;
}
.filter-block:last-of-type { border-bottom: none; }
.filter-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: #555;
  font-weight: 700;
}

.subcat-link {
  display: block;
  padding: 8px 10px;
  font-size: 14px;
  color: #212121;
  border-radius: 4px;
  margin-bottom: 2px;
  text-decoration: none;
  transition: background 0.15s;
}
.subcat-link:hover {
  background: #eef3fd;
  color: #2874f0;
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.price-inputs input {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.price-inputs input:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}
.price-inputs span { color: #888; font-weight: 600; }
.price-hint { font-size: 12px; color: #888; }

.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}
.filter-check input { cursor: pointer; flex-shrink: 0; }
.filter-check span { flex: 1; }
.filter-check small { color: #999; font-size: 12px; }

.apply-btn {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  margin-top: 4px;
}
.reset-link {
  display: block;
  text-align: center;
  margin-top: 10px;
  font-size: 13px;
  color: #666;
  text-decoration: none;
}
.reset-link:hover { color: #ff6161; }

/* Main content */
.category-main { min-width: 0; }

.category-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  background: #fff;
  padding: 14px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.category-header-row h1 { font-size: 20px; margin: 0 0 4px; }
.result-count { font-size: 13px; color: #888; }
.sort-inline { display: flex; align-items: center; gap: 8px; }
.sort-inline label { font-size: 13px; color: #666; font-weight: 600; }
.sort-inline select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}
.sort-inline select:focus {
  outline: none;
  border-color: #2874f0;
}

/* Active filter chips */
.active-chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.chips-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #666;
  font-weight: 700;
}

@media (max-width: 640px) {
  .category-header-row { padding: 12px 14px; }
  .category-header-row h1 { font-size: 17px; }
  .sort-inline { width: 100%; }
  .sort-inline select { flex: 1; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ==================================================
   USER MENU / DROPDOWN
   ================================================== */
.user-menu { position: relative; }

.user-btn {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px !important;
  cursor: pointer;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border-radius: 22px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  height: 40px !important;
  min-width: auto !important;
  transition: background 0.2s;
  margin-right: 4px;
  border: none;
}
.user-btn:hover { background: rgba(255,255,255,0.22); }

.user-btn .avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #172337;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.user-btn .user-name {
  font-weight: 600;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-btn .chev { opacity: 0.8; transition: transform 0.2s; }
.user-menu.open .user-btn .chev { transform: rotate(180deg); }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
  padding: 6px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 1200;
}
.user-menu.open .user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.avatar-lg {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #1a5fd0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.dropdown-user-info { min-width: 0; }
.dropdown-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-email {
  font-size: 12px;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-divider { height: 1px; background: #eee; margin: 4px 0; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  color: var(--text);
  font-size: 14px;
  transition: background 0.15s;
}
.dropdown-item:hover { background: #f5f7fa; color: var(--primary); }
.dropdown-item svg { flex-shrink: 0; opacity: 0.7; }
.dropdown-item:hover svg { opacity: 1; }
.logout-item { color: var(--danger); }
.logout-item:hover { background: #fff2f2; color: #c00; }

.wish-count { background: var(--danger) !important; color: #fff !important; }

/* ==================================================
   MOBILE — 768px
   ================================================== */
@media (max-width: 768px) {
  .header-top {
    gap: 10px;
    padding: 8px 12px;
    min-height: 56px;
  }
  .logo { font-size: 18px; }

  .search-bar { max-width: none; }

  .header-actions { gap: 2px; margin-left: auto; }

  .action-btn {
    min-width: 20px;
    padding: 4px 6px;
    height: 44px;
  }
  .action-btn > span:not(.cart-count) { font-size: 10px; }
  .action-btn svg { width: 18px; height: 18px; }

  .cart-count {
    right: calc(50% - 16px);
    top: 0;
    font-size: 9px;
    min-width: 14px;
    height: 14px;
  }

  .user-btn {
    padding: 4px 8px !important;
    height: 36px !important;
    gap: 6px;
  }
  .user-btn .user-name { display: none; }
  .user-btn .avatar { width: 24px; height: 24px; font-size: 12px; }
  .user-dropdown { right: 0; min-width: 240px; }

  .carousel-inner { height: 220px; }
  .carousel-slide { padding: 20px; }
  .carousel-slide h2 { font-size: 24px; }
  .carousel-slide p { font-size: 14px; }
  .carousel-btn { width: 36px; height: 36px; font-size: 22px; }

  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-categories { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  h2 { font-size: 18px; }
  .categories-grid, .deals-section, .products-section { padding: 14px; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .toast-container { bottom: 12px; right: 12px; left: 12px; }

  .checkout-grid { grid-template-columns: 1fr; }
  .order-detail-grid { grid-template-columns: 1fr; }
  .success-box { padding: 24px; }

  .category-card .cat-icon {
  font-size: 26px;
}
.category-card span {
  font-size: 11px;
  margin-top: 4px;
}
.category-card {
  padding: 10px 6px;
}
}

/* ==================================================
   MOBILE — 640px (cart)
   ================================================== */
@media (max-width: 640px) {
  .cart-item {
    grid-template-columns: 70px 1fr auto;
    grid-template-areas:
      "thumb info remove"
      "thumb qty  total";
    row-gap: 10px;
  }
  .cart-thumb { grid-area: thumb; width: 70px; height: 70px; }
  .cart-info { grid-area: info; }
  .cart-qty { grid-area: qty; }
  .cart-line-total { grid-area: total; font-size: 15px; min-width: 0; }
  .cart-remove { grid-area: remove; justify-self: end; }
  .cart-title { font-size: 14px; }
  .cart-summary { max-width: 100%; }
}

/* ==================================================
   MOBILE — 480px
   ================================================== */
@media (max-width: 480px) {
  .pagination a {
    min-width: 20px;
    height: 32px;
    font-size: 13px;
    padding: 0 8px;
  }
  .pagination { gap: 4px; }
}

@media (max-width: 380px) {
  .action-btn > span:not(.cart-count) { display: none; }
  .action-btn { min-width: 20px; padding: 4px; }
  .user-dropdown { right: -40px; }
}
.auth-notice {
  background: #eef3fd;
  color: #2874f0;
  border-left: 4px solid #2874f0;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.4;
}
/* Category nav with dropdowns */
.category-nav ul { position: relative; }
.category-nav .cat-item { position: relative; }
.category-nav .cat-item.has-children > a .caret {
  font-size: 10px;
  margin-left: 4px;
  opacity: 0.6;
}
.category-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #fff;
  list-style: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 0 0 6px 6px;
  padding: 6px 0;
  z-index: 100;
  flex-direction: column;
  gap: 0;
}
.category-nav .cat-item:hover .submenu { display: block; }
.category-nav .submenu li { white-space: nowrap; }
.category-nav .submenu a {
  padding: 10px 16px;
  font-size: 13px;
  border-bottom: none;
  display: block;
}
.category-nav .submenu a:hover {
  background: #eef3fd;
  color: var(--primary);
}
.flash {
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}
.flash-success {
  background: #d4edda;
  color: #155724;
  border-left: 4px solid #388e3c;
}
.flash-success::before { content: '✅'; font-size: 16px; }

.flash-error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #ff6161;
}
.flash-error::before { content: '⚠️'; font-size: 16px; }
/* Seller links in footer */
.footer-sell-link {
  color: #ff9f00 !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}
.footer-sell-link:hover {
  text-decoration: underline;
  color: #ffb733 !important;
}

/* Optional: full-width "Sell on ShopVerse" banner above the footer */
.sell-banner {
  background: linear-gradient(135deg, #2874f0, #1a5fd0);
  color: #fff;
  padding: 30px 20px;
  text-align: center;
  margin-top: 40px;
}
.sell-banner h3 { font-size: 22px; margin-bottom: 8px; }
.sell-banner p { font-size: 14px; opacity: 0.9; margin-bottom: 16px; }
.sell-banner a {
  display: inline-block;
  background: #ff9f00;
  color: #172337;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 15px;
}
.sell-banner a:hover { background: #ffb733; }
/* ============ Seller Pending Approval Page ============ */
.seller-pending-wrap {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(180deg, #f1f3f6 0%, #e9eef7 100%);
}

.seller-pending-card {
  background: #fff;
  max-width: 560px;
  width: 100%;
  border-radius: 16px;
  padding: 48px 40px 40px;
  box-shadow: 0 12px 40px rgba(40, 116, 240, 0.12),
              0 2px 8px rgba(0, 0, 0, 0.06);
  text-align: center;
  position: relative;
}

.seller-pending-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #2874f0, #ff9f00);
}

.pending-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff5e0, #ffe6b3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  box-shadow: 0 6px 20px rgba(255, 159, 0, 0.25);
  animation: pending-pulse 2s ease-in-out infinite;
}

@keyframes pending-pulse {
  0%, 100% { transform: scale(1);   box-shadow: 0 6px 20px rgba(255, 159, 0, 0.25); }
  50%      { transform: scale(1.05); box-shadow: 0 8px 28px rgba(255, 159, 0, 0.4); }
}

.seller-pending-card h1 {
  font-size: 26px;
  color: #172337;
  margin: 0 0 12px;
  font-weight: 700;
}

.pending-lead {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 28px;
}

.pending-lead .shop-name {
  color: #2874f0;
  font-weight: 700;
}

/* Step timeline */
.pending-timeline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin: 0 0 28px;
  position: relative;
  padding: 0 12px;
}
.pending-timeline::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: #e0e6ef;
  z-index: 0;
}
.step {
  flex: 1;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e0e6ef;
  color: #888;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  border: 3px solid #fff;
}
.step.done .step-dot {
  background: #388e3c;
  color: #fff;
}
.step.active .step-dot {
  background: #ff9f00;
  color: #fff;
  animation: pending-pulse 2s ease-in-out infinite;
}
.step-label {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.step.done  .step-label { color: #388e3c; }
.step.active .step-label { color: #d97706; }

/* Info rows */
.pending-info {
  background: #f7f9fc;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 28px;
  text-align: left;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 14px;
  flex-wrap: wrap;
}
.info-row + .info-row { border-top: 1px dashed #e0e6ef; }
.info-label { color: #666; }
.info-value { color: #172337; font-weight: 600; }

/* Buttons */
.pending-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}
.pending-btn {
  display: inline-block;
  text-decoration: none;
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  border-radius: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.pending-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(40, 116, 240, 0.3);
}
.pending-link {
  font-size: 14px;
  color: #878787;
  font-weight: 500;
}
.pending-link:hover { color: #ff6161; }

.pending-help {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eef1f6;
  font-size: 13px;
  color: #888;
}
.pending-help a { color: #2874f0; font-weight: 600; }

/* Mobile */
@media (max-width: 480px) {
  .seller-pending-card { padding: 36px 24px 32px; }
  .seller-pending-card h1 { font-size: 22px; }
  .pending-icon { width: 72px; height: 72px; font-size: 36px; }
  .step-label { font-size: 10px; }
  .step-dot { width: 30px; height: 30px; font-size: 12px; }
  .info-row { font-size: 13px; }
}
.dropdown-item.seller-item {
  background: #f0f7ff;
  color: #2874f0 !important;
  font-weight: 600;
}
.dropdown-item.seller-item:hover { background: #e1eeff; }

.dropdown-item.admin-item {
  color: #d97706 !important;
  font-weight: 600;
}
.dropdown-item.admin-item:hover { background: #fff7ed; }
.role-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.seller-badge {
  background: #ff9f00;
  color: #172337;
}
.admin-badge {
  background: #ff6161;
  color: #fff;
}

@media (max-width: 768px) {
  .role-badge { display: none; }
}
.product-seller {
  display: inline-block;
  background: #f0f7ff;
  color: #2874f0;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  margin: 12px 0;
}
.seller-link {
  font-weight: 700;
  color: #2874f0;
  text-decoration: none;
}
.seller-link:hover { text-decoration: underline; }
/* Seller admin tabs */
.seller-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: #fff;
  padding: 6px;
  border-radius: 8px;
  width: fit-content;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.seller-tabs a {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.seller-tabs a:hover { background: #f5f7fa; color: #2874f0; }
.seller-tabs a.active { background: #2874f0; color: #fff; }

/* ============ Seller Products Filter Bar ============ */
.products-filters {
  background: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  margin-bottom: 20px;
}
.products-filters .filter-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
}
.products-filters .filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.products-filters .filter-group label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
}
.products-filters input,
.products-filters select {
  padding: 9px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
.products-filters input:focus,
.products-filters select:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}
.products-filters .filter-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

@media (max-width: 1100px) {
  .products-filters .filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-filters .filter-actions { grid-column: 1 / -1; justify-content: flex-end; }
}
@media (max-width: 640px) {
  .products-filters .filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .products-filters .filter-actions { grid-column: 1 / -1; }
  .products-filters .filter-actions button,
  .products-filters .filter-actions a { flex: 1; text-align: center; }
}
/* Price range inline inputs */
.price-inputs-inline {
  display: flex;
  align-items: center;
  gap: 6px;
}
.price-inputs-inline input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}
.price-inputs-inline span {
  color: #888;
  font-weight: 600;
  flex-shrink: 0;
}

/* Widen filter grid to fit 6 columns comfortably */
.products-filters .filter-row {
  grid-template-columns: 1.3fr 1fr 1fr 1.2fr 1fr 1fr auto;
}

@media (max-width: 1280px) {
  .products-filters .filter-row {
    grid-template-columns: repeat(3, 1fr);
  }
  .products-filters .filter-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .products-filters .filter-row {
    grid-template-columns: 1fr 1fr;
  }
  .products-filters .filter-actions { grid-column: 1 / -1; }
  .products-filters .filter-actions button,
  .products-filters .filter-actions a { flex: 1; text-align: center; }
}

/* Make SKU/slug code text not wrap */
.admin-table td code {
  white-space: nowrap;
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
/* Active category highlight */
.category-nav .cat-item.active > a {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 700;
}

.category-nav .submenu a.active {
  color: var(--primary);
  background: #eef3fd;
  font-weight: 700;
}
/* ============================================================
   Mobile Filter Drawer
   ============================================================ */

/* Desktop: hide mobile-only elements */
.filters-mobile-trigger,
.filters-overlay,
.filters-mobile-header,
.filters-mobile-footer {
  display: none;
}

/* Sidebar active filters (below the form) */
.sidebar-active-filters {
  margin-bottom: 16px;
   
}
.sidebar-active-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.sidebar-active-header h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #555;
  font-weight: 700;
  margin: 0;
}
.clear-all-link {
  font-size: 12px;
  color: #ff6161;
  font-weight: 700;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
}
.clear-all-link:hover {
  background: #fff2f2;
  text-decoration: underline;
}
.sidebar-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eef3fd;
  color: #2874f0;
  padding: 5px 10px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.chip a {
  color: #2874f0;
  font-weight: 700;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
}
.chip a:hover { color: #ff6161; }

/* ============================================================
   Mobile layout ≤900px — sidebar becomes slide-up sheet
   ============================================================ */
@media (max-width: 900px) {

  /* Show mobile-only elements */
  .filters-mobile-trigger { display: flex; }
  .filters-mobile-header  { display: flex; }
  .filters-mobile-footer  { display: block; }

  /* Trigger button */
  .filters-mobile-trigger {
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2874f0;
    color: #fff;
    border: none;
    padding: 12px 18px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40,116,240,0.25);
    margin: 0 16px 12px;
    width: calc(100% - 32px);
    position: relative;
    font-family: inherit;
  }
  .filters-mobile-trigger:active { transform: scale(0.98); }
  .filter-count-badge {
    position: absolute;
    right: 14px;
    background: #ff9f00;
    color: #172337;
    font-size: 11px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
  }

  /* Overlay */
  .filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.25s;
    display: none;
  }
  .filters-overlay.open {
    display: block;
    opacity: 1;
  }

  /* Turn sidebar into bottom sheet */
  .filters-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 88vh;
    overflow-y: auto;
    border-radius: 20px 20px 0 0;
    padding: 20px 20px 16px;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.2);
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    background: #fff;
    max-width: 100%;
  }
  .filters-sidebar.open {
    transform: translateY(0);
  }

  /* Grab handle */
  .filters-sidebar::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: -8px auto 16px;
  }

  /* Mobile-only filter header */
  .filters-mobile-header {
    justify-content: space-between;
    align-items: center;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
  }
  .filters-mobile-header h3 {
    font-size: 17px;
    margin: 0;
    font-weight: 700;
  }
  .filters-close-btn {
    background: #f5f5f5;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .filters-close-btn:hover { background: #eee; color: #ff6161; }

  /* Hide the desktop "Filters" header on mobile */
  .filters-sidebar .filters-header { display: none; }

  /* Hide the desktop Apply button on mobile */
  .filters-sidebar .apply-btn { display: none; }

  /* Show the mobile footer with "Show Results" */
  .filters-mobile-footer {
    position: sticky;
    bottom: -16px;
    padding: 12px 0 4px;
    background: #fff;
    border-top: 1px solid #eee;
    margin-top: 12px;
  }
  .filters-mobile-footer .btn-primary {
    width: 100%;
    padding: 12px;
    font-size: 15px;
  }

  /* Products area comes first (though the sheet is fixed anyway) */
  .category-grid { grid-template-columns: 1fr; }
  .category-main { order: 1; }

  /* Compact chips on mobile */
  .sidebar-active-filters { margin-top: 12px; padding-top: 12px; }
  .sidebar-chip-list { gap: 5px; }
  .chip { font-size: 11px; padding: 4px 8px; }
}
/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-hero {
  background: linear-gradient(135deg, #2874f0 0%, #1a5fd0 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}
.about-hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
  font-weight: 700;
}
.about-hero .lead {
  font-size: 18px;
  opacity: 0.95;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

.about-content {
  padding: 40px 16px;
  max-width: 1100px;
}

.about-section {
  margin-bottom: 40px;
}
.about-section h2 {
  font-size: 26px;
  color: #172337;
  margin-bottom: 16px;
  font-weight: 700;
}
.about-section p {
  font-size: 16px;
  color: #555;
  line-height: 1.7;
}

/* Stats row */
.about-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #f0f7ff, #e6f0ff);
  border-radius: 12px;
}
.stat-box {
  text-align: center;
  padding: 16px;
}
.stat-number {
  font-size: 36px;
  font-weight: 800;
  color: #2874f0;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px;
  color: #666;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.feature-card {
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(40,116,240,0.1);
  border-color: #d0e0f7;
}
.feature-icon {
  font-size: 36px;
  margin-bottom: 12px;
}
.feature-card h3 {
  font-size: 17px;
  color: #172337;
  margin-bottom: 8px;
  font-weight: 700;
}
.feature-card p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* CTA sections */
.cta-section {
  background: linear-gradient(135deg, #fff7e6, #ffe9b8);
  border-radius: 16px;
  padding: 40px 32px;
  text-align: center;
}
.cta-section h2 { color: #92400e; }
.cta-section p {
  max-width: 560px;
  margin: 0 auto 20px;
  color: #78350f;
}
.cta-btn {
  display: inline-block;
  text-decoration: none;
  padding: 14px 32px;
  font-size: 16px;
}

.contact-cta {
  text-align: center;
  padding: 40px 20px;
  background: #f7f9fc;
  border-radius: 16px;
}
.contact-cta h2 { margin-bottom: 10px; }
.contact-cta p { margin-bottom: 20px; }
.contact-cta .btn-primary { text-decoration: none; display: inline-block; }

@media (max-width: 640px) {
  .about-hero { padding: 40px 16px; }
  .about-hero h1 { font-size: 28px; }
  .about-hero .lead { font-size: 15px; }
  .about-section h2 { font-size: 20px; }
  .stat-number { font-size: 28px; }
  .cta-section { padding: 28px 20px; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-hero {
  background: linear-gradient(135deg, #2874f0 0%, #1a5fd0 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
}
.contact-hero h1 {
  font-size: 42px;
  margin-bottom: 12px;
  font-weight: 700;
}
.contact-hero .lead {
  font-size: 17px;
  opacity: 0.95;
  max-width: 600px;
  margin: 0 auto;
}

.contact-content {
  padding: 40px 16px;
  max-width: 1200px;
}

/* Info cards row */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 24px 20px;
  text-align: center;
  border: 1px solid #eef1f6;
  transition: transform 0.2s, box-shadow 0.2s;
}
.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(40,116,240,0.08);
  border-color: #d0e0f7;
}
.contact-icon {
  font-size: 32px;
  margin-bottom: 10px;
}
.contact-card h3 {
  font-size: 15px;
  color: #172337;
  margin-bottom: 8px;
  font-weight: 700;
}
.contact-card p {
  font-size: 14px;
  color: #2874f0;
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-card .contact-note {
  color: #888 !important;
  font-size: 12px !important;
  font-weight: 400 !important;
}

/* Form + side */
.contact-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 32px;
  align-items: start;
}
.contact-form-wrap {
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.contact-form-wrap h2 {
  font-size: 22px;
  margin-bottom: 20px;
  color: #172337;
}

.contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.contact-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 11px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  margin-bottom: 16px;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}
.contact-submit {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  border-radius: 6px;
}
.contact-privacy {
  text-align: center;
  font-size: 12px;
  color: #888;
  margin-top: 12px;
}

.contact-success {
  text-align: center;
  padding: 40px 20px;
  background: #d4edda;
  border-radius: 12px;
  color: #155724;
}
.contact-success h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.contact-success p { font-size: 15px; }

/* Side */
.contact-side {
  background: #fff;
  padding: 28px;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}
.contact-side h3 {
  font-size: 17px;
  color: #172337;
  margin-bottom: 16px;
  font-weight: 700;
}
.faq-item {
  padding: 12px 0;
  border-bottom: 1px solid #eef1f6;
}
.faq-item:last-of-type { border-bottom: none; }
.faq-item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #172337;
  padding: 4px 0;
  list-style: none;
  position: relative;
  padding-right: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 18px;
  color: #2874f0;
  font-weight: 700;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: '−';
}
.faq-item p {
  font-size: 13px;
  color: #666;
  line-height: 1.6;
  margin-top: 8px;
  padding-right: 12px;
}
.faq-item a { color: #2874f0; font-weight: 600; }

.contact-hours {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px dashed #eef1f6;
}
.contact-hours h4 {
  font-size: 14px;
  color: #172337;
  margin-bottom: 10px;
  font-weight: 700;
}
.contact-hours p {
  font-size: 13px;
  color: #555;
  margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .contact-hero { padding: 40px 16px; }
  .contact-hero h1 { font-size: 28px; }
  .contact-hero .lead { font-size: 15px; }
  .contact-form-wrap { padding: 20px; }
  .contact-form .form-row { grid-template-columns: 1fr; gap: 12px; }
  .contact-side { padding: 20px; }
  .contact-card { padding: 18px 16px; }
}
/* ============================================================
   LEGAL PAGES (Privacy / Terms)
   ============================================================ */
.legal-page {
  padding-bottom: 60px;
}

.legal-hero {
  background: linear-gradient(135deg, #2874f0 0%, #1a5fd0 100%);
  color: #fff;
  padding: 50px 20px;
  text-align: center;
}
.legal-hero h1 {
  font-size: 38px;
  margin-bottom: 8px;
  font-weight: 700;
}
.legal-hero .legal-meta {
  font-size: 14px;
  opacity: 0.9;
}

.legal-content {
  padding: 40px 16px;
  max-width: 1200px;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  align-items: start;
}

/* Table of contents */
.legal-toc {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky;
  top: 90px;
}
.legal-toc h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  margin-bottom: 14px;
  font-weight: 700;
}
.legal-toc ol {
  list-style: none;
  padding-left: 0;
  counter-reset: toc;
}
.legal-toc li {
  counter-increment: toc;
  margin-bottom: 8px;
}
.legal-toc li a {
  font-size: 13px;
  color: #333;
  display: block;
  padding: 6px 8px;
  border-left: 3px solid transparent;
  border-radius: 4px;
  transition: all 0.15s;
  line-height: 1.4;
}
.legal-toc li a::before {
  content: counter(toc) ". ";
  color: #2874f0;
  font-weight: 700;
  margin-right: 4px;
}
.legal-toc li a:hover {
  background: #eef3fd;
  color: #2874f0;
  border-left-color: #2874f0;
}

/* Body */
.legal-body {
  background: #fff;
  padding: 40px 44px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  line-height: 1.75;
  font-size: 15px;
  color: #333;
}
.legal-body section {
  margin-bottom: 36px;
  scroll-margin-top: 90px;
}
.legal-body section:last-child { margin-bottom: 0; }
.legal-body h2 {
  font-size: 20px;
  color: #172337;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eef1f6;
  font-weight: 700;
}
.legal-body h3 {
  font-size: 16px;
  color: #172337;
  margin: 20px 0 10px;
  font-weight: 700;
}
.legal-body p {
  margin-bottom: 14px;
}
.legal-body ul {
  padding-left: 22px;
  margin-bottom: 16px;
}
.legal-body ul li {
  margin-bottom: 8px;
  line-height: 1.65;
}
.legal-body a {
  color: #2874f0;
  font-weight: 600;
  text-decoration: none;
}
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: #172337; }

.legal-contact {
  list-style: none !important;
  padding-left: 0 !important;
}
.legal-contact li {
  padding: 8px 0;
  font-size: 15px;
}

/* Mobile */
@media (max-width: 900px) {
  .legal-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .legal-toc {
    position: static;
    padding: 20px;
  }
  .legal-toc ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
  }
}
@media (max-width: 640px) {
  .legal-hero { padding: 36px 16px; }
  .legal-hero h1 { font-size: 26px; }
  .legal-body { padding: 24px 20px; }
  .legal-body h2 { font-size: 17px; }
  .legal-body { font-size: 14px; }
  .legal-toc ol { grid-template-columns: 1fr; }
}
/* ============================================================
   SELLER GUIDE PAGE
   ============================================================ */

/* Hero */
.sg-hero {
  background: linear-gradient(135deg, #2874f0 0%, #1a5fd0 100%);
  color: #fff;
  padding: 60px 20px 70px;
  overflow: hidden;
}
.sg-hero-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}
.sg-tag {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  color: #fff;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.sg-hero h1 {
  font-size: 40px;
  line-height: 1.2;
  margin-bottom: 16px;
  font-weight: 800;
}
.sg-lead {
  font-size: 17px;
  opacity: 0.95;
  line-height: 1.6;
  margin-bottom: 28px;
  max-width: 520px;
}
.sg-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}
.sg-btn-primary {
  background: #ff9f00 !important;
  color: #172337 !important;
  padding: 14px 28px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  border-radius: 6px !important;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 14px rgba(255,159,0,0.4);
}
.sg-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,159,0,0.5);
}
.sg-btn-secondary {
  background: transparent;
  color: #fff;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 6px;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.sg-btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}
.sg-hero-stats {
  display: flex;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.sg-hero-stats > div {
  display: flex;
  flex-direction: column;
}
.sg-hero-stats strong {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 4px;
}
.sg-hero-stats span {
  font-size: 12px;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Hero illustration */
.sg-hero-illustration {
  position: relative;
  height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sg-hero-emoji {
  font-size: 120px;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.2));
  animation: sgFloat 4s ease-in-out infinite;
}
@keyframes sgFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.sg-hero-bubble {
  position: absolute;
  background: #fff;
  color: #172337;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  animation: sgFloat 4s ease-in-out infinite;
}
.sg-bubble-1 { top: 10%; left: 0; animation-delay: 0.3s; }
.sg-bubble-2 { top: 45%; right: 0; animation-delay: 0.8s; }
.sg-bubble-3 { bottom: 10%; left: 15%; animation-delay: 1.2s; }


.sg-section-header {
  text-align: center;
  margin-bottom: 20px;
}
.sg-section-header h2 {
  font-size: 30px;
  color: #172337;
  margin-bottom: 4px;
  font-weight: 800;
}
.sg-section-header p {
  color: #666;
  font-size: 15px;
}

/* Steps timeline */
.sg-steps {
  max-width: 720px;
  margin: 0 auto;
  position: relative;
}
.sg-step {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
  position: relative;
}
.sg-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 52px;
  bottom: -28px;
  width: 2px;
  background: linear-gradient(180deg, #2874f0, #d0e0f7);
}
.sg-step-num {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2874f0, #1a5fd0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(40,116,240,0.35);
}
.sg-step-body {
  background: #fff;
  padding: 18px 22px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  flex: 1;
}
.sg-step-body h3 {
  font-size: 17px;
  color: #172337;
  margin-bottom: 6px;
  font-weight: 700;
}
.sg-step-body p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* Benefits */
.sg-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.sg-benefit {
  background: #fff;
  padding: 28px 24px;
  border-radius: 12px;
  border: 1px solid #eef1f6;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.sg-benefit:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(40,116,240,0.1);
  border-color: #d0e0f7;
}
.sg-benefit-icon {
  font-size: 40px;
  margin-bottom: 14px;
  line-height: 1;
}
.sg-benefit h3 {
  font-size: 17px;
  color: #172337;
  margin-bottom: 8px;
  font-weight: 700;
}
.sg-benefit p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

/* Fees */
.sg-fees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.sg-fee-card {
  background: #fff;
  padding: 28px 24px;
  border-radius: 12px;
  border: 2px solid #eef1f6;
  text-align: center;
  transition: border-color 0.2s;
}
.sg-fee-card:hover { border-color: #d0e0f7; }
.sg-fee-highlight {
  background: linear-gradient(135deg, #eef3fd, #e0ecff);
  border-color: #2874f0;
}
.sg-fee-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 700;
  margin-bottom: 10px;
}
.sg-fee-value {
  font-size: 32px;
  font-weight: 800;
  color: #2874f0;
  line-height: 1;
  margin-bottom: 10px;
}
.sg-fee-highlight .sg-fee-value { color: #388e3c; }
.sg-fee-note {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

/* Requirements */
.sg-requirements {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}
.sg-req-item {
  display: flex;
  gap: 14px;
  background: #fff;
  padding: 18px 20px;
  border-radius: 10px;
  border: 1px solid #eef1f6;
  align-items: flex-start;
}
.sg-req-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #d4edda;
  color: #155724;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}
.sg-req-item strong {
  display: block;
  font-size: 14px;
  color: #172337;
  margin-bottom: 4px;
}
.sg-req-item p {
  font-size: 13px;
  color: #666;
  margin: 0;
}

/* FAQ */
.sg-faq {
  max-width: 800px;
  margin: 0 auto;
}
.sg-faq-item {
  background: #fff;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid #eef1f6;
  overflow: hidden;
  transition: border-color 0.2s;
}
.sg-faq-item[open] {
  border-color: #d0e0f7;
  box-shadow: 0 4px 14px rgba(40,116,240,0.06);
}
.sg-faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15px;
  font-weight: 700;
  color: #172337;
  list-style: none;
  position: relative;
  padding-right: 50px;
  transition: background 0.15s;
}
.sg-faq-item summary::-webkit-details-marker { display: none; }
.sg-faq-item summary::after {
  content: '+';
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #2874f0;
  font-weight: 700;
  line-height: 1;
  transition: transform 0.2s;
}
.sg-faq-item[open] summary::after {
  content: '−';
}
.sg-faq-item summary:hover { background: #f7f9fc; }
.sg-faq-item p {
  padding: 0 22px 20px;
  font-size: 14px;
  color: #555;
  line-height: 1.7;
  margin: 0;
}
.sg-faq-item p a { color: #2874f0; font-weight: 600; }

/* CTA */
.sg-cta {
  background: linear-gradient(135deg, #fff7e6, #ffe9b8);
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
}
.sg-cta h2 {
  font-size: 28px;
  color: #92400e;
  margin-bottom: 10px;
  font-weight: 800;
}
.sg-cta p {
  font-size: 15px;
  color: #78350f;
  margin-bottom: 20px;
}
.sg-cta-help {
  margin-top: 12px !important;
  font-size: 14px !important;
  color: #78350f !important;
}
.sg-cta-help a {
  color: #2874f0;
  font-weight: 700;
  text-decoration: none;
}
.sg-cta-help a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 900px) {
  .sg-hero-inner {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .sg-hero-illustration {
    height: 200px;
  }
  .sg-hero-emoji { font-size: 90px; }
}
@media (max-width: 640px) {
  .sg-hero { padding: 40px 16px 50px; }
  .sg-hero h1 { font-size: 26px; }
  .sg-lead { font-size: 15px; }
  .sg-hero-stats { gap: 20px; }
  .sg-hero-stats strong { font-size: 18px; }
  .sg-hero-bubble { font-size: 11px; padding: 6px 10px; }
  
  .sg-section-header h2 { font-size: 22px; }
  .sg-step-num { width: 42px; height: 42px; font-size: 17px; }
  .sg-step:not(:last-child)::before { left: 20px; top: 46px; }
  .sg-step-body { padding: 14px 16px; }
  .sg-step-body h3 { font-size: 15px; }
  .sg-fee-value { font-size: 26px; }
  .sg-cta { padding: 32px 20px; }
  .sg-cta h2 { font-size: 22px; }
  .sg-faq-item summary { padding: 14px 18px; font-size: 14px; padding-right: 44px; }
  .sg-faq-item summary::after { right: 18px; font-size: 20px; }
  .sg-faq-item p { padding: 0 18px 16px; font-size: 13px; }
}
/* Seller registration — wider form with sections */
.seller-reg-wrap {
  max-width: 520px;
}

.auth-form .auth-sub {
  text-align: center;
  color: #666;
  font-size: 14px;
  margin-top: -4px;
  margin-bottom: 8px;
}

.auth-form .form-section-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #2874f0;
  font-weight: 700;
  margin-top: 16px;
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid #eef1f6;
}
.auth-form .form-section-title:first-of-type {
  margin-top: 4px;
}

.auth-form .field-hint {
  font-size: 12px;
  color: #888;
  font-weight: 400;
  margin-top: -2px;
}

.auth-form textarea {
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
  min-height: 80px;
}
.auth-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(40,116,240,0.15);
}
/* ============================================================
   SELLER PROFILE PAGE
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

/* Left side */
.profile-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.profile-logo-card {
  background: #fff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-align: center;
}
.profile-logo-wrap {
  margin: 0 auto 16px;
  width: 100px;
  height: 100px;
}
.profile-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid #eef3fd;
  box-shadow: 0 4px 16px rgba(40,116,240,0.15);
}
.profile-logo-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #2874f0, #1a5fd0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  text-transform: uppercase;
}
.profile-logo-card h2 {
  font-size: 18px;
  margin: 0 0 4px;
  color: #172337;
  font-weight: 700;
}
.profile-email {
  font-size: 13px;
  color: #888;
  margin-bottom: 12px;
  word-break: break-all;
}
.profile-badge-row {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.profile-slug {
  font-size: 11px;
  background: #f5f7fa;
  color: #666;
  padding: 4px 10px;
  border-radius: 12px;
  font-family: monospace;
}
.profile-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border-top: 1px solid #eef1f6;
  padding-top: 16px;
}
.profile-stat-row > div {
  text-align: center;
}
.profile-stat-row strong {
  display: block;
  font-size: 18px;
  color: #2874f0;
  margin-bottom: 2px;
  font-weight: 800;
}
.profile-stat-row span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #888;
  font-weight: 700;
}

/* ============================================================
   DANGER ZONE (collapsible, at the bottom of profile page)
   ============================================================ */
.danger-zone {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 2px dashed #e5e5e5;
  max-width: 100%;
}

/* Toggle link */
.danger-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  padding: 14px 16px;
  border-radius: 8px;
  color: #888;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-align: left;
}
.danger-toggle:hover {
  background: #fafafa;
  color: #c00;
}
.danger-toggle-icon {
  font-size: 16px;
  opacity: 0.7;
}
.danger-toggle-chevron {
  margin-left: auto;
  font-size: 14px;
  transition: transform 0.2s;
}

/* Content (hidden by default, shows when toggled) */
.danger-content {
  margin-top: 12px;
  animation: fadeSlideDown 0.25s ease;
}
@keyframes fadeSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.danger-inner {
  background: #fff5f5;
  border: 1px solid #ffd5d5;
  border-radius: 10px;
  padding: 24px;
}
.danger-inner h3 {
  font-size: 15px;
  color: #c00;
  margin-bottom: 10px;
  font-weight: 700;
}
.danger-inner > p {
  font-size: 13px;
  color: #7a2020;
  line-height: 1.6;
  margin-bottom: 16px;
}

.danger-warning {
  background: #fff;
  border-left: 3px solid #ff6161;
  padding: 14px 18px;
  border-radius: 6px;
  font-size: 13px;
  color: #555;
  margin-bottom: 20px;
}
.danger-warning strong {
  display: block;
  margin-bottom: 8px;
  color: #c00;
  font-size: 13px;
}
.danger-warning ul {
  margin: 0;
  padding-left: 20px;
}
.danger-warning ul li {
  margin-bottom: 4px;
  line-height: 1.5;
}

/* Outline red button (not solid — safer visual) */
.btn-danger-outline {
  background: transparent;
  color: #c00;
  border: 2px solid #ff6161;
  padding: 10px 22px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.btn-danger-outline:hover {
  background: #ff6161;
  color: #fff;
}

/* Mobile */
@media (max-width: 900px) {
  .danger-zone {
    margin-top: 32px;
    padding-top: 24px;
  }
  .danger-inner { padding: 18px; }
  .danger-warning { padding: 12px 14px; }
}

/* Legacy cleanup — remove old .profile-danger styles if they exist */
.profile-danger { display: none; }
.btn-danger {
  background: #ff6161;
  color: #fff;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: none;
  font-family: inherit;
  width: 100%;
  transition: background 0.15s;
}
.btn-danger:hover { background: #e02e2e; }

/* Right side */
.profile-main { min-width: 0; }
.profile-form {
  background: #fff;
  border-radius: 12px;
  padding: 8px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.profile-block {
  padding: 24px 28px;
  border-bottom: 1px solid #eef1f6;
}
.profile-block:last-of-type { border-bottom: none; }
.profile-block h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2874f0;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #eef1f6;
}

.profile-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
  font-weight: 600;
  margin-bottom: 14px;
}
.profile-form input,
.profile-form textarea,
.profile-form select {
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  width: 100%;
}
.profile-form input:disabled {
  background: #f5f5f5;
  color: #888;
  cursor: not-allowed;
}
.profile-form input:focus,
.profile-form textarea:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}
.profile-form textarea {
  resize: vertical;
  min-height: 70px;
  line-height: 1.5;
}
.profile-form .form-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.profile-form .form-row2 label { margin-bottom: 0; }

.profile-hint {
  font-size: 12px;
  color: #888;
  margin-top: 8px;
}
.current-logo-note {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}
.current-logo-note a { color: #2874f0; font-weight: 600; }

.profile-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 20px 28px;
  background: #f7f9fc;
  border-radius: 0 0 12px 12px;
}
.profile-actions .btn-primary {
  padding: 12px 28px;
  font-size: 15px;
  border-radius: 6px;
}
.btn-secondary-link {
  background: transparent;
  color: #666;
  padding: 12px 20px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-secondary-link:hover { background: #eef1f6; color: #333; }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
.modal-backdrop.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-box {
  background: #fff;
  border-radius: 14px;
  padding: 32px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-box h2 {
  font-size: 22px;
  color: #c00;
  margin-bottom: 12px;
  font-weight: 700;
}
.modal-box > p {
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  margin-bottom: 12px;
}
.modal-list {
  padding-left: 22px;
  margin-bottom: 16px;
}
.modal-list li {
  font-size: 14px;
  color: #333;
  margin-bottom: 6px;
  line-height: 1.5;
}
.modal-note {
  background: #fff5f5;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 13px !important;
  color: #7a2020 !important;
  border-left: 4px solid #ff6161;
  margin-bottom: 20px !important;
}
.modal-confirm-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
  margin-bottom: 20px;
}
.modal-confirm-label code {
  background: #f5f5f5;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 700;
  color: #c00;
  font-size: 13px;
  font-family: monospace;
  word-break: break-all;
  display: inline-block;
  margin-top: 4px;
}
.modal-confirm-label input {
  padding: 10px 14px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
  text-align: center;
}
.modal-confirm-label input:focus {
  outline: none;
  border-color: #ff6161;
  box-shadow: 0 0 0 3px rgba(255,97,97,0.15);
}
.modal-confirm-label input:focus {
  outline: none;
  border-color: #ff6161;
  box-shadow: 0 0 0 3px rgba(255,97,97,0.15);
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}
.btn-danger-solid {
  background: #ff6161;
  color: #fff;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.btn-danger-solid:hover:not(:disabled) { background: #e02e2e; }
.btn-danger-solid:disabled {
  background: #ddd;
  color: #999;
  cursor: not-allowed;
}

/* Mobile */
@media (max-width: 900px) {
  .profile-grid { grid-template-columns: 1fr; }
  .profile-form .form-row2 { grid-template-columns: 1fr; gap: 0; }
  .profile-form .form-row2 label { margin-bottom: 14px; }
  .profile-block { padding: 20px; }
  .profile-actions { padding: 16px 20px; flex-wrap: wrap; }
  .profile-actions .btn-primary { flex: 1; min-width: 140px; }
  .modal-box { padding: 24px; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions button { width: 100%; }
}
/* ============================================================
   SOLD BY CARD (product page)
   ============================================================ */
.sold-by-card {
  background: #fff;
  border: 1px solid #e5e9ef;
  border-radius: 12px;
  padding: 18px 20px;
  margin: 20px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: border-color 0.2s;
}
.sold-by-card.mode-pickup {
  border-color: #ff9f00;
  background: linear-gradient(180deg, #fffbf0 0%, #fff 100%);
}
.sold-by-card.mode-delivery {
  border-color: #d0e0f7;
  background: linear-gradient(180deg, #f7fbff 0%, #fff 100%);
}

/* Header */
.sold-by-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef1f6;
  flex-wrap: wrap;
}
.sold-by-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 700;
}
.fulfillment-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.delivery-badge {
  background: #e0ecff;
  color: #1a5fd0;
}
.pickup-badge {
  background: #ffe9b8;
  color: #92400e;
}

/* Body — logo + info */
.sold-by-body {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.seller-logo-img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  flex-shrink: 0;
}
.seller-logo-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2874f0, #1a5fd0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(40,116,240,0.25);
}

.seller-info-block {
  flex: 1;
  min-width: 0;
}
.seller-shop-name {
  font-size: 16px;
  font-weight: 700;
  color: #172337;
  margin-bottom: 8px;
  word-break: break-word;
}
.seller-address,
.seller-phone {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 6px;
}
.seller-address .info-icon,
.seller-phone .info-icon {
  flex-shrink: 0;
  font-size: 14px;
}
.seller-phone a {
  color: #2874f0;
  font-weight: 600;
  text-decoration: none;
}
.seller-phone a:hover { text-decoration: underline; }

/* WhatsApp button */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  margin-top: 14px;
  box-shadow: 0 3px 12px rgba(37,211,102,0.3);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.wa-btn:hover {
  background: #1ebe5b;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37,211,102,0.4);
}
.wa-btn svg { flex-shrink: 0; }

/* Pickup note */
.pickup-note {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff7e6;
  border-left: 4px solid #ff9f00;
  border-radius: 6px;
  font-size: 13px;
  color: #78350f;
  line-height: 1.55;
}
.pickup-note strong { color: #92400e; }

/* Mobile */
@media (max-width: 640px) {
  .sold-by-card { padding: 16px; margin: 16px 0; }
  .sold-by-header { gap: 8px; }
  .sold-by-body { gap: 12px; }
  .seller-logo-img,
  .seller-logo-placeholder { width: 48px; height: 48px; font-size: 19px; }
  .seller-shop-name { font-size: 15px; }
  .wa-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 18px;
  }
}
.fulfillment-status-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: #fff;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 20px;
  border-left: 4px solid #2874f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.fulfillment-status-banner .fs-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.fulfillment-status-banner strong {
  display: block;
  color: #172337;
  margin-bottom: 4px;
  font-size: 15px;
}
.fulfillment-status-banner p {
  font-size: 13px;
  color: #666;
  line-height: 1.55;
  margin: 0;
}
/* Fulfillment mode selector (radio cards) */
.fulfillment-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.fulfillment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e6ef;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
  font-weight: 400;
  margin-bottom: 0 !important;
}
.fulfillment-option:hover {
  border-color: #b8cdf0;
  background: #f7faff;
}
.fulfillment-option.selected,
.fulfillment-option:has(input:checked) {
  border-color: #2874f0;
  background: #eef3fd;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.1);
}
.fulfillment-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.fulfillment-icon {
  font-size: 26px;
  line-height: 1;
  flex-shrink: 0;
}
.fulfillment-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.fulfillment-body strong {
  font-size: 14px;
  color: #172337;
  font-weight: 700;
}
.fulfillment-body span {
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
@media (max-width: 640px) {
  .fulfillment-selector { grid-template-columns: 1fr; }
}
/* ============================================================
   PRODUCT GALLERY
   ============================================================ */
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-gallery-main {
  position: relative;
  background: #fff;
  border: 1px solid #eef1f6;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}
.product-gallery-main img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}
.product-gallery-main:hover img {
  transform: scale(1.03);
}

.zoom-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  border: 1px solid #e0e6ef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2874f0;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.15s, background 0.15s;
  z-index: 2;
}
.zoom-btn:hover {
  transform: scale(1.08);
  background: #fff;
}

/* Thumbnails row */
.product-gallery-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px;
  scrollbar-width: thin;
}
.gallery-thumb {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  border-radius: 8px;
  border: 2px solid #eef1f6;
  background: #fff;
  padding: 4px;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumb:hover {
  border-color: #b8cdf0;
  transform: translateY(-2px);
}
.gallery-thumb.active {
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.15);
}
.gallery-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.image-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
  animation: lbFade 0.2s ease;
}
.image-lightbox.open { display: flex; }

@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-image-wrap {
  width: 90vw;
  height: 90vh;
  overflow: auto;
  cursor: zoom-in;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  /* Hide scrollbars until zoomed */
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.lightbox-image-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.lightbox-image-wrap::-webkit-scrollbar-track {
  background: transparent;
}
.lightbox-image-wrap::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

.lightbox-image-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  transition: max-width 0.3s ease, max-height 0.3s ease, transform 0.3s ease;
  will-change: transform;
}

/* When zoomed — image becomes larger than the container, scroll works */
.lightbox-image-wrap.zoomed {
  cursor: zoom-out;
  align-items: flex-start;
  justify-content: flex-start;
}
.lightbox-image-wrap.zoomed img {
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  min-width: 200%;   /* 2× zoom */
  transform: none;
  cursor: zoom-out;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 32px;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  z-index: 2;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  background: rgba(0,0,0,0.5);
  padding: 6px 16px;
  border-radius: 20px;
}

/* Hide nav if only one image */
.image-lightbox.single .lightbox-nav { display: none; }
.image-lightbox.single .lightbox-counter { display: none; }

/* Mobile */
@media (max-width: 640px) {
  .product-gallery-thumbs {
    gap: 8px;
  }
  .gallery-thumb {
    width: 60px;
    height: 60px;
  }
  .image-lightbox { padding: 20px; }
  .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 24px; }
  .lightbox-nav { width: 42px; height: 42px; font-size: 26px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}

/* ============================================================
   Extra image slots in edit forms
   ============================================================ */
.extra-image-slot:last-of-type { margin-bottom: 0 !important; }
/* ============================================================
   PINCODE CHECK WIDGET
   ============================================================ */
.pincode-check {
  background: #f7f9fc;
  border: 1px solid #e5e9ef;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 16px 0;
}
.pincode-check-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #172337;
  margin-bottom: 12px;
}
.pincode-icon { font-size: 16px; }

.pincode-input-row {
  display: flex;
  gap: 8px;
}
.pincode-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: monospace;
  letter-spacing: 1px;
  min-width: 0;
}
.pincode-input-row input:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.12);
}
.pincode-input-row button {
  padding: 10px 20px;
  background: #2874f0;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}
.pincode-input-row button:hover { background: #1a5fd0; }

.pincode-result {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}
.pincode-result.success {
  background: #d4edda;
  color: #155724;
  border-left: 3px solid #388e3c;
}
.pincode-result.error {
  background: #f8d7da;
  color: #721c24;
  border-left: 3px solid #ff6161;
}
.pincode-result.info {
  background: #eef3fd;
  color: #1a5fd0;
  border-left: 3px solid #2874f0;
}
.pincode-result.info strong { color: #1a5fd0; }
.pincode-result.info small { color: #666; font-weight: 400; }
.pincode-result.loading {
  background: #eef3fd;
  color: #2874f0;
  border-left: 3px solid #2874f0;
}
.pincode-hint {
  font-size: 11px;
  color: #888;
  margin-top: 8px;
}

/* Checkout pincode status */
.pincode-checkout-status {
  font-size: 12px;
  font-weight: 600;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  display: none;
}
.pincode-checkout-status:not(:empty) { display: block; }
.pincode-checkout-status.success {
  background: #d4edda;
  color: #155724;
}
.pincode-checkout-status.error {
  background: #f8d7da;
  color: #721c24;
}
.pincode-checkout-status.loading { color: #2874f0; }

/* Fulfillment + coverage selector (seller profile) */
.coverage-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}
.coverage-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #e0e6ef;
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
  transition: border-color 0.15s, background 0.15s;
  margin-bottom: 0 !important;
}
.coverage-option:hover { border-color: #b8cdf0; background: #f7faff; }
.coverage-option:has(input:checked) {
  border-color: #2874f0;
  background: #eef3fd;
  box-shadow: 0 0 0 3px rgba(40,116,240,0.1);
}
.coverage-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.coverage-icon { font-size: 24px; line-height: 1; flex-shrink: 0; }
.coverage-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.coverage-body strong { font-size: 14px; color: #172337; font-weight: 700; }
.coverage-body span { font-size: 12px; color: #666; line-height: 1.4; }

@media (max-width: 640px) {
  .coverage-selector { grid-template-columns: 1fr; }
  .pincode-input-row button { padding: 10px 16px; font-size: 13px; }
}
.checkout-page > h1 {
  font-size: 22px;
  color: #172337;
  margin: 0 0 16px;
  font-weight: 700;
}
@media (max-width: 640px) {
  .checkout-page > h1 { font-size: 18px; margin-bottom: 12px; }
}
/* ============================================================
   CUSTOMER PROFILE PAGE
   ============================================================ */
.customer-profile-grid {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.customer-profile-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.customer-avatar-card {
  background: #fff;
  padding: 28px 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  text-align: center;
}
.customer-avatar {
  width: 90px;
  height: 90px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2874f0, #1a5fd0);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 800;
}
.customer-avatar-card h2 {
  font-size: 18px;
  color: #172337;
  margin: 0 0 4px;
  font-weight: 700;
}
.customer-email {
  font-size: 13px;
  color: #888;
  margin-bottom: 12px;
  word-break: break-all;
}

.customer-stats-card {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.customer-stat {
  text-align: center;
}
.customer-stat strong {
  display: block;
  font-size: 16px;
  color: #2874f0;
  font-weight: 800;
  margin-bottom: 2px;
}
.customer-stat span {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.customer-quick-links {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.customer-quick-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  font-size: 14px;
  color: #333;
  border-radius: 8px;
  text-decoration: none;
}
.customer-quick-links a:hover {
  background: #f5f7fa;
  color: #2874f0;
}

.customer-profile-main { min-width: 0; }
.customer-profile-form {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
}

@media (max-width: 768px) {
  .customer-profile-grid {
    grid-template-columns: 1fr;
  }
}
/* ============================================================
   CUSTOMER PROFILE — form fields
   ============================================================ */
.customer-profile-form .profile-block {
  padding: 24px 28px;
  border-bottom: 1px solid #eef1f6;
}
.customer-profile-form .profile-block:last-of-type {
  border-bottom: none;
}
.customer-profile-form .profile-block h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #2874f0;
  font-weight: 700;
  margin: 0 0 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef1f6;
}

/* Each field: label above, input below */
.customer-profile-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 18px;
}

/* Text inputs, email, tel */
.customer-profile-form input[type="text"],
.customer-profile-form input[type="email"],
.customer-profile-form input[type="tel"],
.customer-profile-form input[type="password"],
.customer-profile-form select,
.customer-profile-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #212121;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.customer-profile-form input:focus,
.customer-profile-form select:focus,
.customer-profile-form textarea:focus {
  outline: none;
  border-color: #2874f0;
  box-shadow: 0 0 0 3px rgba(40, 116, 240, 0.12);
}

/* Read-only / disabled inputs */
.customer-profile-form input:disabled {
  background: #f5f7fa;
  color: #888;
  cursor: not-allowed;
  border-color: #e5e9ef;
}

/* Small helper text under a field */
.customer-profile-form .profile-hint {
  font-size: 11px;
  color: #888;
  font-weight: 400;
  margin-top: -2px;
}

/* Actions bar (Save / Change Password) */
.customer-profile-form .profile-actions {
  padding: 20px 28px;
  background: #f7f9fc;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  border-top: 1px solid #eef1f6;
}
.customer-profile-form .profile-actions .btn-primary {
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 6px;
}
.customer-profile-form .btn-secondary-link {
  background: transparent;
  color: #666;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.customer-profile-form .btn-secondary-link:hover {
  background: #eef1f6;
  color: #333;
}

/* Mobile */
@media (max-width: 640px) {
  .customer-profile-form .profile-block {
    padding: 20px 16px;
  }
  .customer-profile-form .profile-actions {
    padding: 16px;
  }
  .customer-profile-form input[type="text"],
  .customer-profile-form input[type="email"],
  .customer-profile-form input[type="tel"] {
    font-size: 16px;   /* prevents iOS zoom */
  }
}
/* Product Action Buttons (Add to Cart + Buy Now) */
.product-actions-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  width: 100%;
}

/* 1. Product Detail Page Buttons */
.product-actions-row .btn-secondary {
  flex: 1;
  background: #ff9f00; /* Vibrant Yellow-Orange */
  color: #fff;
  padding: 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(255, 159, 0, 0.3); /* Glow effect */
}
.product-actions-row .btn-secondary:hover {
  background: #f39400;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(255, 159, 0, 0.4);
}

.product-actions-row .btn-primary {
  flex: 1;
  background: #2874f0; /* Strong Trust Blue */
  color: #fff;
  padding: 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 16px;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 10px rgba(40, 116, 240, 0.3); /* Glow effect */
}
.product-actions-row .btn-primary:hover {
  background: #1a5fd0;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(40, 116, 240, 0.4);
}

/* Mobile: Stack buttons vertically if screen is very small */
@media (max-width: 480px) {
  .product-actions-row {
    flex-direction: column;
  }
}

/* =========================================
   CART PAGE - Buttons Styling Fix
   ========================================= */

/* Desktop Grid Layout (Image, Info, Qty, Total, Actions) */
.cart-item {
  grid-template-columns: 90px 1fr auto auto 90px; /* 5 columns */
  align-items: center;
}

/* Container for Heart and Trash buttons */
.cart-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
}

/* Unified button style for both Heart and Trash */
.cart-btn-action {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #e0e6ef;
  transition: background 0.15s, border-color 0.15s;
  cursor: pointer;
}

/* Hover effects */
.cart-btn-action:hover {
  background: #f7f9fc;
  border-color: #b8cdf0;
}
.cart-btn-action.cart-btn-delete:hover {
  background: #ffe5e5;
  border-color: #ff6161;
}

/* =========================================
   MOBILE CART VIEW FIX
   ========================================= */
@media (max-width: 640px) {
  /* Update mobile grid to place actions properly */
  .cart-item {
    grid-template-columns: 70px 1fr auto;
    grid-template-areas:
      "thumb info actions"
      "thumb qty  total";
    row-gap: 12px;
    align-items: start;
  }
  
  .cart-actions {
    grid-area: actions;
    align-self: flex-start;
    justify-content: flex-end;
  }
  
  .cart-line-total {
    grid-area: total;
    align-self: flex-end;
    text-align: right;
  }
  
  .cart-qty {
    grid-area: qty;
    align-self: flex-end;
  }
}
/* =========================================
   TABLE RESPONSIVE FIX (Desktop & Mobile)
   ========================================= */

.table-responsive {
  width: 100%;
  overflow-x: auto !important; 
  -webkit-overflow-scrolling: touch;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.table-responsive .admin-table {
  width: 100%; /* Stretches fully on desktop */
  min-width: 800px; /* Forces scrolling on mobile */
  margin-bottom: 0;
  box-shadow: none; 
  border-collapse: collapse;
}

/* Prevent form/buttons from wrapping weirdly */
.table-responsive .admin-table form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: nowrap;
}

/* Styled scrollbar for mobile */
.table-responsive::-webkit-scrollbar {
  height: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}
/* Modern Gradient Button */
.card-btn-gradient {
  width: 100%;
  margin-top: auto;
  background: linear-gradient(135deg, #ff9f00, #fb641b);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 3px 8px rgba(251, 100, 27, 0.3);
}
.card-btn-gradient:hover {
  background: linear-gradient(135deg, #fb641b, #d94e0a);
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(251, 100, 27, 0.4);
}