/* ============ 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 span {
  font-size: 14px;
  font-weight: 500;
  display: block;
  margin-top: 8px;
}

.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: 20px 16px; }
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 24px; }
.checkout-form, .checkout-summary {
  background: #fff;
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.checkout-form label, .checkout-form .row2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #555;
  font-weight: 500;
  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] {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
}
.payment-options { display: flex; flex-direction: column; gap: 10px; }
.payment-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
}
.payment-option:has(input:checked) {
  border-color: var(--primary);
  background: #eef3fd;
}
.checkout-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.checkout-item img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 4px;
}
.co-title { font-size: 13px; font-weight: 500; }
.co-qty { font-size: 12px; color: #888; }
.co-price { margin-left: auto; font-weight: 700; font-size: 14px; }

/* ==================================================
   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 / FILTERS
   ================================================== */
.category-page { padding: 20px 16px; }
.category-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
}
.filters-sidebar {
  background: #fff;
  padding: 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.filter-block {
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.filter-block:last-child { border: none; }
.filter-block h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  color: #555;
}
.price-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.price-inputs input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
}
.price-hint { font-size: 12px; color: #888; }
.filter-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}

/* ==================================================
   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-grid { grid-template-columns: 1fr; }
  .filters-sidebar { position: static; max-height: none; }
}

/* ==================================================
   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; }
