/* ===== Tenza Retail - Temu-Inspired Design ===== */
:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --orange-light: #fff7ed;
  --orange-50: #fff7ed;
  --red: #e8380d;
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;
  --green: #16a34a;
  --yellow: #eab308;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--slate-50);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
  padding-bottom: 70px;
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 16px; }

/* Announcement Bar */
.announcement-bar {
  background: linear-gradient(90deg, var(--slate-900), var(--slate-800));
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
  overflow: hidden;
}
.announcement-inner { animation: marquee 20s linear infinite; white-space: nowrap; }
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
.announcement-text { color: var(--orange); }

/* Header */
.header {
  background: white;
  border-bottom: 1px solid var(--slate-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  max-width: 1320px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 18px;
}
.logo-text {
  font-weight: 800;
  font-size: 22px;
  color: var(--slate-900);
  letter-spacing: -0.5px;
}

/* Search Bar */
.search-bar {
  flex: 1;
  display: flex;
  max-width: 600px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 10px 48px 10px 16px;
  border: 2px solid var(--orange);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  background: var(--slate-50);
  transition: all 0.2s;
}
.search-input:focus {
  background: white;
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--orange);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.search-btn:hover { background: var(--orange-dark); }

/* Header Actions */
.header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.header-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--slate-700);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.header-btn:hover { color: var(--orange); background: var(--orange-50); }
.cart-btn { position: relative; }
.cart-count {
  position: absolute;
  top: -2px;
  right: 0;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Categories Nav */
.categories-nav {
  background: white;
  border-bottom: 1px solid var(--slate-100);
  overflow-x: auto;
  scrollbar-width: none;
}
.categories-nav::-webkit-scrollbar { display: none; }
.categories-scroll {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  white-space: nowrap;
}
.cat-pill {
  padding: 6px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--slate-200);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.cat-pill:hover, .cat-pill.active {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Hero Carousel */
.hero-carousel {
  position: relative;
  margin: 12px 16px;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
}
.hero-slide {
  background: linear-gradient(135deg, var(--orange), var(--red), #c2185b);
  padding: 40px 32px;
  color: white;
  min-height: 200px;
  display: flex;
  align-items: center;
  border-radius: var(--radius);
}
.hero-content { max-width: 500px; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.hero-title {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}
.hero-subtitle { font-size: 16px; opacity: 0.9; margin-bottom: 16px; }
.hero-cta {
  background: white;
  color: var(--orange-dark);
  border: none;
  padding: 10px 28px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.hero-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.hero-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 8px;
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
}
.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.hero-dot.active { background: white; width: 20px; border-radius: 4px; }

/* Quick Actions */
.quick-actions { padding: 16px 0; }
.quick-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 4px;
}
.quick-grid::-webkit-scrollbar { display: none; }
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  min-width: 72px;
  flex-shrink: 0;
}
.quick-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.quick-item:hover .quick-icon { transform: scale(1.08); }
.quick-item span { font-size: 11px; font-weight: 600; color: var(--slate-700); }

/* Section Headers */
.section { padding: 8px 0 16px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}
.section-title-group { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  gap: 6px;
}
.see-all {
  color: var(--orange);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.see-all:hover { text-decoration: underline; }

/* Countdown */
.countdown { display: flex; align-items: center; gap: 4px; }
.cd-label { font-size: 12px; color: var(--slate-500); margin-right: 4px; }
.cd-block {
  background: var(--slate-900);
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Horizontal Product Scroll (Flash Deals) */
.products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.products-scroll::-webkit-scrollbar { display: none; }
.products-scroll .product-card {
  min-width: 160px;
  max-width: 180px;
  flex-shrink: 0;
  scroll-snap-align: start;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (min-width: 900px) { .product-grid { grid-template-columns: repeat(4, 1fr); gap: 14px; } }
@media (min-width: 1200px) { .product-grid { grid-template-columns: repeat(5, 1fr); gap: 16px; } }

/* Product Card */
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--slate-100);
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.product-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--slate-100);
  overflow: hidden;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.product-card:hover .product-image img { transform: scale(1.05); }
.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--red);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.3px;
}
.product-badge.new { background: var(--green); }
.product-badge.hot { background: var(--orange); }
.product-wishlist {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: var(--slate-400);
}
.product-wishlist:hover { color: var(--red); background: white; }
.product-sold {
  position: absolute;
  bottom: 8px;
  left: 8px;
  right: 8px;
  height: 4px;
  background: rgba(255,255,255,0.5);
  border-radius: 2px;
  overflow: hidden;
}
.product-sold-bar {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.3s;
}
.product-info { padding: 10px; }
.product-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-800);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
  min-height: 36px;
}
.product-pricing { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--red);
}
.product-price-original {
  font-size: 12px;
  color: var(--slate-400);
  text-decoration: line-through;
}
.product-discount {
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-dark);
  background: var(--orange-light);
  padding: 1px 6px;
  border-radius: 4px;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.product-sold-text {
  font-size: 11px;
  color: var(--slate-400);
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--yellow);
}
.product-add-btn {
  width: 100%;
  padding: 8px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity 0.2s;
}
.product-add-btn:hover { opacity: 0.9; }

/* Sort Controls */
.sort-controls { display: flex; gap: 8px; }
.sort-select {
  padding: 6px 12px;
  border: 1.5px solid var(--slate-200);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate-700);
  background: white;
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--orange); }

/* Load More */
.load-more-wrap { text-align: center; padding: 20px 0; }
.load-more-btn {
  background: white;
  color: var(--orange);
  border: 2px solid var(--orange);
  padding: 10px 40px;
  border-radius: 24px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.load-more-btn:hover { background: var(--orange); color: white; }

/* Features Bar */
.features-bar {
  background: white;
  padding: 20px 0;
  margin: 8px 0;
  border-top: 1px solid var(--slate-100);
  border-bottom: 1px solid var(--slate-100);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
}
.feature-item strong { display: block; font-size: 13px; font-weight: 700; color: var(--slate-900); }
.feature-item span { display: block; font-size: 11px; color: var(--slate-500); }

/* Footer */
.footer {
  background: var(--slate-900);
  color: white;
  padding: 40px 0 20px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.footer-logo .logo-text { color: white; }
.footer-desc { font-size: 13px; color: var(--slate-400); line-height: 1.6; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--slate-200); }
.footer-col a {
  display: block;
  color: var(--slate-400);
  text-decoration: none;
  font-size: 13px;
  padding: 4px 0;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--orange); }
.footer-bottom {
  border-top: 1px solid var(--slate-800);
  padding-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--slate-500);
}

/* Cart Drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(380px, 90vw);
  background: white;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}
.cart-drawer.open { transform: translateX(0); }
.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-100);
}
.cart-header h3 { font-size: 16px; font-weight: 700; }
.cart-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--slate-100);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate-500);
}
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-empty {
  text-align: center;
  padding: 40px 0;
  color: var(--slate-400);
}
.cart-empty p { font-size: 15px; font-weight: 600; margin-top: 12px; color: var(--slate-500); }
.cart-empty span { font-size: 13px; }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}
.cart-item-image {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-100);
}
.cart-item-image img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name { font-size: 13px; font-weight: 500; margin-bottom: 4px; }
.cart-item-price { font-size: 15px; font-weight: 700; color: var(--red); }
.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}
.qty-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--slate-200);
  background: white;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-btn:hover { background: var(--slate-50); }
.cart-item-remove {
  background: none;
  border: none;
  color: var(--slate-400);
  font-size: 12px;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
  align-self: flex-start;
}
.cart-item-remove:hover { color: var(--red); }
.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--slate-100);
  background: var(--slate-50);
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 15px;
}
.cart-subtotal strong { font-size: 20px; color: var(--red); }
.checkout-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.checkout-btn:hover { opacity: 0.9; }
.cart-note {
  text-align: center;
  font-size: 11px;
  color: var(--slate-500);
  margin-top: 8px;
}

/* Auth Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  z-index: 301;
  background: white;
  border-radius: 20px;
  width: min(420px, 92vw);
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}
.modal.open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border: none;
  background: var(--slate-100);
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  color: var(--slate-500);
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-header { text-align: center; margin-bottom: 24px; }
.auth-header h2 { font-size: 20px; font-weight: 800; margin-top: 12px; }
.auth-header p { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--slate-700); }
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--slate-200);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,0.1); }
.auth-submit-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
}
.auth-submit-btn:hover { opacity: 0.9; }
.auth-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }
.auth-toggle { text-align: center; margin-top: 16px; font-size: 13px; color: var(--slate-500); }
.auth-toggle a { color: var(--orange); font-weight: 600; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }
.auth-message {
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.auth-message.error { display: block; background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.auth-message.success { display: block; background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }

/* Mobile Bottom Nav */
.mobile-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-around;
  padding: 6px 0 env(safe-area-inset-bottom, 8px);
  z-index: 99;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}
@media (min-width: 768px) { .mobile-nav { display: none; } body { padding-bottom: 0; } }
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--slate-400);
  font-size: 10px;
  font-weight: 600;
  padding: 4px 0;
  transition: color 0.2s;
}
.mobile-nav-item.active, .mobile-nav-item:hover { color: var(--orange); }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--slate-100) 25%, var(--slate-50) 50%, var(--slate-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* Responsive */
@media (max-width: 639px) {
  .header-btn span { display: none; }
  .logo-text { font-size: 18px; }
  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 14px; }
  .hero-slide { padding: 28px 20px; min-height: 160px; }
  .section-title { font-size: 16px; }
  .features-grid { gap: 8px; }
  .feature-item { padding: 4px; gap: 8px; }
  .feature-item svg { width: 22px; height: 22px; }
}

/* Flash deals section bg */
.flash-deals {
  background: linear-gradient(180deg, var(--orange-50), var(--slate-50));
  padding: 16px 0;
  margin: 0 -16px;
  padding-left: 16px;
  padding-right: 16px;
}

/* ===== Product Detail Modal ===== */
.product-detail-modal {
  width: min(820px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 0;
  border-radius: 20px;
}
.product-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 639px) {
  .product-detail-content { grid-template-columns: 1fr; }
}
.product-detail-image {
  position: relative;
  background: var(--slate-100);
  aspect-ratio: 1;
  overflow: hidden;
}
.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-detail-info {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pd-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--slate-900);
  line-height: 1.3;
}
.pd-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.pd-reviews {
  color: var(--slate-500);
  font-size: 13px;
}
.pd-pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.pd-pricing .product-price { font-size: 26px; }
.pd-description {
  font-size: 14px;
  color: var(--slate-500);
  line-height: 1.6;
}
.pd-stock {
  font-size: 13px;
  color: var(--slate-500);
}
.pd-in-stock { color: var(--green); font-weight: 600; }
.pd-out-stock { color: var(--red); font-weight: 600; }

/* Sizes */
.pd-size-section { margin-top: 4px; }
.pd-size-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 8px;
}
.pd-size-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.size-btn {
  min-width: 44px;
  height: 38px;
  border: 1.5px solid var(--slate-200);
  background: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0 12px;
}
.size-btn:hover { border-color: var(--orange); color: var(--orange); }
.size-btn.active {
  background: var(--orange);
  color: white;
  border-color: var(--orange);
}

/* Qty row */
.pd-qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pd-qty-row label {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-700);
}
.pd-qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
}

/* Actions */
.pd-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}
.pd-add-btn {
  flex: 1;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.pd-add-btn:hover { opacity: 0.9; }
.pd-tryon-btn {
  flex: 1;
  padding: 12px 20px;
  background: white;
  color: var(--orange);
  border: 2px solid var(--orange);
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.pd-tryon-btn:hover {
  background: var(--orange-50);
}

/* ===== Virtual Try-On Modal ===== */
.tryon-modal {
  width: min(900px, 96vw);
  max-height: 92vh;
  overflow-y: auto;
  padding: 24px;
}
.tryon-header {
  text-align: center;
  margin-bottom: 20px;
}
.tryon-header h2 { font-size: 22px; font-weight: 800; margin-top: 10px; }
.tryon-header p { font-size: 13px; color: var(--slate-500); margin-top: 4px; }
.tryon-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 639px) {
  .tryon-content { grid-template-columns: 1fr; }
}
.tryon-left, .tryon-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tryon-product-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--slate-50);
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
}
.tryon-product-preview img {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.tryon-product-preview p {
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-800);
}

/* Upload */
.tryon-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 20px;
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius);
  background: var(--slate-50);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  color: var(--slate-500);
}
.tryon-upload-label:hover {
  border-color: var(--orange);
  background: var(--orange-50);
  color: var(--orange);
}
.tryon-upload-label span { font-weight: 600; font-size: 14px; }
.tryon-upload-label small { font-size: 12px; color: var(--slate-400); }

.tryon-photo-preview {
  position: relative;
  text-align: center;
}
.tryon-photo-preview canvas {
  width: 100%;
  max-width: 400px;
  border-radius: var(--radius);
  border: 1px solid var(--slate-200);
  background: var(--slate-100);
}
.tryon-change-photo {
  margin-top: 8px;
  padding: 6px 16px;
  background: white;
  border: 1px solid var(--slate-200);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-500);
  cursor: pointer;
}
.tryon-change-photo:hover { color: var(--orange); border-color: var(--orange); }

/* Measurements */
.tryon-right h3 { font-size: 16px; font-weight: 700; color: var(--slate-900); }
.tryon-measure-note { font-size: 12px; color: var(--slate-400); margin-top: -8px; }
.tryon-measurements {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tryon-measure-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tryon-measure-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--slate-700);
  min-width: 60px;
}
.tryon-input-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  justify-content: flex-end;
}
.tryon-input {
  width: 72px;
  text-align: center;
  padding: 8px 6px;
  font-size: 14px;
}
.tryon-unit {
  font-size: 12px;
  color: var(--slate-400);
  font-weight: 600;
  min-width: 18px;
}

.tryon-recommend-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s;
}
.tryon-recommend-btn:hover { opacity: 0.9; }

/* Result */
.tryon-result {
  background: var(--slate-50);
  border: 2px solid var(--green);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.tryon-result-size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}
.tryon-result-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.tryon-result-value {
  font-size: 40px;
  font-weight: 900;
  color: var(--green);
  line-height: 1;
}
.tryon-result-details {
  text-align: left;
  margin-bottom: 12px;
}
.tryon-result-details p {
  font-size: 12px;
  color: var(--slate-500);
  padding: 3px 0;
  border-bottom: 1px solid var(--slate-100);
}
.tryon-result .pd-add-btn {
  margin-top: 8px;
}

/* ===== Checkout Modal ===== */
.checkout-modal {
  width: min(520px, 94vw);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
}
.checkout-steps {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 24px;
}
.checkout-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--slate-400);
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--slate-100);
  transition: all 0.2s;
}
.checkout-step.active {
  background: var(--orange-light);
  color: var(--orange);
}
.checkout-step.completed {
  background: #f0fdf4;
  color: var(--green);
}
.step-number {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  background: var(--slate-200);
  color: var(--slate-500);
}
.checkout-step.active .step-number {
  background: var(--orange);
  color: white;
}
.checkout-step.completed .step-number {
  background: var(--green);
  color: white;
}
.checkout-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--slate-800);
}
.form-row {
  display: flex;
  gap: 12px;
}
.form-half {
  flex: 1;
}
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.payment-option {
  cursor: pointer;
}
.payment-option input[type="radio"] {
  display: none;
}
.payment-option-content {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--slate-200);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--slate-700);
  transition: all 0.2s;
}
.payment-option input:checked + .payment-option-content {
  border-color: var(--orange);
  background: var(--orange-light);
  color: var(--orange-dark);
}
.payment-info-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 10px;
  font-size: 13px;
  color: var(--slate-600);
  margin-bottom: 16px;
  line-height: 1.5;
}
.payment-info-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--slate-400);
}
.checkout-nav-btns {
  display: flex;
  gap: 10px;
  margin-top: 16px;
}
.checkout-back-btn {
  padding: 12px 20px;
  background: var(--slate-100);
  color: var(--slate-700);
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.checkout-back-btn:hover {
  background: var(--slate-200);
}
.review-section {
  position: relative;
  padding: 12px 0;
  border-bottom: 1px solid var(--slate-100);
}
.review-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-400);
  margin-bottom: 4px;
}
.review-detail {
  font-size: 13px;
  color: var(--slate-700);
  line-height: 1.5;
}
.review-edit {
  position: absolute;
  top: 12px;
  right: 0;
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  text-decoration: none;
}
.review-edit:hover {
  text-decoration: underline;
}
.review-items {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.review-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate-700);
}
.review-item-name {
  flex: 1;
}
.review-item-qty {
  color: var(--slate-400);
  margin: 0 8px;
}
.review-item-price {
  font-weight: 600;
}
.review-totals {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px solid var(--slate-200);
}
.review-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--slate-600);
  padding: 4px 0;
}
.review-total-final {
  font-size: 16px;
  font-weight: 800;
  color: var(--slate-900);
  padding-top: 8px;
  margin-top: 4px;
  border-top: 1px solid var(--slate-200);
}
.review-total-final span:last-child {
  color: var(--red);
}
.checkout-place-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
@media (max-width: 480px) {
  .checkout-modal { padding: 20px; }
  .form-row { flex-direction: column; gap: 0; }
  .checkout-steps { gap: 4px; }
  .checkout-step span:not(.step-number) { display: none; }
}

/* ===== User Dropdown Menu ===== */
.user-menu-wrapper {
  position: relative;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--slate-200);
  min-width: 220px;
  z-index: 500;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s;
}
.user-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.user-dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--slate-100);
}
.user-dropdown-header strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--slate-900);
}
.user-dropdown-header span {
  display: block;
  font-size: 12px;
  color: var(--slate-500);
  margin-top: 2px;
}
.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--slate-700);
  text-decoration: none;
  transition: all 0.15s;
}
.user-dropdown-item:hover {
  background: var(--slate-50);
  color: var(--orange);
}
.user-dropdown-item.logout {
  color: #ef4444;
}
.user-dropdown-item.logout:hover {
  background: #fef2f2;
  color: #dc2626;
}
.user-dropdown-divider {
  height: 1px;
  background: var(--slate-100);
  margin: 4px 0;
}

/* ===== Vendor Grid ===== */
.vendors-section {
  padding: 16px 0 8px;
}
.vendor-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  scrollbar-width: none;
}
.vendor-grid::-webkit-scrollbar { display: none; }
.vendor-empty-msg {
  color: var(--slate-400);
  font-size: 14px;
  text-align: center;
  padding: 20px;
  width: 100%;
}
.vendor-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  background: white;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius);
  cursor: pointer;
  min-width: 120px;
  flex-shrink: 0;
  transition: all 0.2s;
}
.vendor-card:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.vendor-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-light), var(--slate-100));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.vendor-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vendor-logo span {
  font-size: 20px;
  font-weight: 800;
  color: var(--orange);
}
.vendor-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
  text-align: center;
}
.vendor-platform {
  font-size: 11px;
  color: var(--slate-400);
}

/* ===== Page Sections (Wishlist, Orders, etc.) ===== */
.page-section {
  min-height: 60vh;
}
.page-container {
  padding: 20px 0 40px;
}
.page-header {
  margin-bottom: 24px;
}
.page-back-btn {
  background: none;
  border: none;
  color: var(--orange);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  display: block;
}
.page-back-btn:hover {
  text-decoration: underline;
}
.page-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--slate-900);
}
.page-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
}
.page-empty-state svg {
  margin-bottom: 16px;
}
.page-empty-state h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 8px;
}
.page-empty-state p {
  font-size: 14px;
  color: var(--slate-500);
  margin-bottom: 20px;
}
.page-action-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--orange);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.page-action-btn:hover { opacity: 0.9; }
.page-action-btn.small {
  padding: 6px 14px;
  font-size: 12px;
}
.page-action-btn.outline {
  background: white;
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}
.page-action-btn.outline:hover {
  background: var(--slate-50);
}

/* Wishlist */
.wishlist-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.wishlist-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
}
.wishlist-item-image {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--slate-100);
}
.wishlist-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wishlist-item-info {
  flex: 1;
  min-width: 0;
}
.wishlist-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}
.wishlist-item-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 8px;
}
.wishlist-item-actions {
  display: flex;
  gap: 8px;
}
.product-wishlist.wishlisted {
  color: var(--red);
  background: white;
}

/* Order Cards */
.order-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
  margin-bottom: 12px;
  overflow: hidden;
}
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-100);
}
.order-card-header strong {
  font-size: 14px;
}
.order-date {
  font-size: 12px;
  color: var(--slate-500);
  margin-left: 8px;
}
.order-card-items {
  padding: 12px 16px;
}
.order-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 13px;
  color: var(--slate-700);
}
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--slate-100);
  font-size: 14px;
}
.status-badge.status-pending { background: #fef3c7; color: #d97706; }
.status-badge.status-processing { background: #fff7ed; color: #f97316; }
.status-badge.status-shipped { background: #dbeafe; color: #2563eb; }
.status-badge.status-delivered { background: #dcfce7; color: #16a34a; }
.status-badge.status-cancelled { background: #fef2f2; color: #ef4444; }
.status-badge.status-confirmed { background: #dcfce7; color: #16a34a; }
.status-badge.status-payment_pending { background: #fff7ed; color: #f97316; }
.status-badge.status-payment_failed { background: #fef2f2; color: #ef4444; }
.status-badge.status-payment_expired { background: #f1f5f9; color: #64748b; }

/* Order Tracking */
.tracking-search {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
  padding: 20px;
  margin-bottom: 20px;
}
.tracking-input-row {
  display: flex;
  gap: 10px;
}
.tracking-input-row .form-input {
  flex: 1;
}
.tracking-result {
  margin-bottom: 20px;
}
.tracking-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 20px 0;
}
.tracking-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.tracking-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--slate-200);
  border: 3px solid var(--slate-200);
  transition: all 0.3s;
}
.tracking-step.active .tracking-dot {
  background: var(--green);
  border-color: #bbf7d0;
}
.tracking-step span {
  font-size: 11px;
  font-weight: 600;
  color: var(--slate-400);
  text-transform: capitalize;
}
.tracking-step.active span {
  color: var(--green);
}
.tracking-line {
  flex: 1;
  height: 3px;
  background: var(--slate-200);
  margin: 0 -4px;
  margin-bottom: 24px;
}
.tracking-line.active {
  background: var(--green);
}
.tracking-order-row {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 10px 16px;
  background: white;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-100);
  margin-bottom: 6px;
  font-size: 13px;
}
.tracking-order-row code {
  font-weight: 600;
  color: var(--slate-800);
}

/* Info Pages (Shipping, Returns, Contact) */
.info-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 768px) { .info-cards { grid-template-columns: 1fr; } }
.info-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--slate-100);
  padding: 24px;
}
.info-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--slate-900);
}
.info-card p {
  font-size: 14px;
  color: var(--slate-600);
  line-height: 1.6;
  margin-bottom: 6px;
}
.info-card a {
  color: var(--orange);
  text-decoration: none;
  font-weight: 600;
}
.info-card a:hover { text-decoration: underline; }
.info-list {
  list-style: none;
  padding: 0;
}
.info-list li {
  font-size: 14px;
  color: var(--slate-600);
  padding: 6px 0;
  border-bottom: 1px solid var(--slate-100);
}
.info-list li:last-child { border-bottom: none; }

/* Contact Page Grid */
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
}
@media (max-width: 768px) { .contact-page-grid { grid-template-columns: 1fr; } }
.contact-details {
  margin-top: 16px;
}
.contact-detail-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--slate-700);
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

/* Notification Animation */
@keyframes slideDown {
  from { transform: translateX(-50%) translateY(-20px); opacity: 0; }
  to { transform: translateX(-50%) translateY(0); opacity: 1; }
}
