/* ===== Divi Fashions - Complete Stylesheet ===== */

/* --- CSS Variables --- */
:root {
  --primary: #1A1A2E;
  --primary-light: #2A2A4E;
  --accent: #E94560;
  --accent-hover: #d63b54;
  --accent-light: #fce4e8;
  --bg: #FAFAFA;
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --green: #10B981;
  --green-light: #D1FAE5;
  --yellow: #F59E0B;
  --yellow-light: #FEF3C7;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  --red: #EF4444;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,0.1), 0 10px 10px rgba(0,0,0,0.04);
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --transition: 0.2s ease;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1280px;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--gray-800);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: inherit; }
ul, ol { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

/* --- Animations --- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.fade-in { animation: fadeIn 0.4s ease forwards; }
.slide-up { animation: slideUp 0.5s ease forwards; }

/* --- Header --- */
.top-bar {
  background: var(--primary);
  color: var(--white);
  font-size: 12px;
  padding: 6px 0;
  text-align: center;
}
.top-bar a { color: var(--accent); margin-left: 8px; }

.header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 16px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  white-space: nowrap;
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }

.search-bar {
  flex: 1;
  max-width: 520px;
  position: relative;
}
.search-bar input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 2px solid var(--gray-200);
  border-radius: 50px;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--gray-50);
}
.search-bar input:focus { border-color: var(--accent); background: var(--white); }
.search-bar .search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-actions .icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
  font-size: 20px;
  color: var(--gray-600);
}
.header-actions .icon-btn:hover { background: var(--gray-100); color: var(--primary); }
.icon-btn .badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--accent);
  color: var(--white);
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--white); color: var(--primary); border: 2px solid var(--gray-200); }
.btn-secondary:hover { border-color: var(--primary); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-outline:hover { background: var(--accent); color: var(--white); }
.btn-dark { background: var(--primary); color: var(--white); }
.btn-dark:hover { background: var(--primary-light); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* --- Category Nav --- */
.category-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.category-nav::-webkit-scrollbar { display: none; }
.category-nav ul {
  display: flex;
  justify-content: center;
  gap: 0;
  max-width: var(--max-width);
  margin: 0 auto;
}
.category-nav li a {
  display: block;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
}
.category-nav li a:hover,
.category-nav li a.active {
  color: var(--accent);
}
.category-nav li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: var(--transition);
}
.category-nav li a:hover::after,
.category-nav li a.active::after { width: 60%; }

/* --- Hero Banner --- */
.hero {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 20px auto;
  max-width: var(--max-width);
}
.hero-carousel {
  display: flex;
  transition: transform 0.5s ease;
}
.hero-slide {
  min-width: 100%;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}
.hero-slide:nth-child(1) { background: linear-gradient(135deg, #1A1A2E 0%, #16213E 50%, #0F3460 100%); }
.hero-slide:nth-child(2) { background: linear-gradient(135deg, #E94560 0%, #d63b54 50%, #c42d46 100%); }
.hero-slide:nth-child(3) { background: linear-gradient(135deg, #0F3460 0%, #16213E 50%, #1A1A2E 100%); }
.hero-content {
  text-align: center;
  color: var(--white);
  z-index: 2;
}
.hero-content h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -1px;
}
.hero-content p { font-size: 18px; opacity: 0.9; margin-bottom: 24px; }
.hero-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  transition: var(--transition);
}
.hero-dots button.active { background: var(--white); width: 28px; border-radius: 5px; }
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  z-index: 3;
  transition: var(--transition);
}
.hero-arrow:hover { background: rgba(255,255,255,0.4); }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }

/* --- Sections --- */
.section {
  padding: 32px 0;
}
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  margin-top: 6px;
}
.section-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --- Horizontal Scroll --- */
.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.scroll-row::-webkit-scrollbar { height: 4px; }
.scroll-row::-webkit-scrollbar-track { background: transparent; }
.scroll-row::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.scroll-row .product-card { min-width: 200px; max-width: 220px; scroll-snap-align: start; }

/* --- Product Grid --- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

/* --- Product Card --- */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  animation: fadeIn 0.4s ease forwards;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }

.product-card .card-img {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
}
.product-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.product-card:hover .card-img img { transform: scale(1.05); }

.product-card .wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--gray-400);
  box-shadow: var(--shadow);
  transition: var(--transition);
  z-index: 2;
}
.product-card .wishlist-btn:hover,
.product-card .wishlist-btn.active { color: var(--accent); }
.product-card .wishlist-btn.active::after { content: ''; }

.product-card .discount-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}

.product-card .card-body {
  padding: 12px;
}
.product-card .card-brand {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}
.product-card .card-title {
  font-size: 13px;
  color: var(--gray-700);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}
.product-card .card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.product-card .price-now {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
}
.product-card .price-was {
  font-size: 13px;
  color: var(--gray-400);
  text-decoration: line-through;
}
.product-card .price-off {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}
.product-card .card-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  color: var(--gray-500);
}
.product-card .card-rating .stars {
  background: var(--green);
  color: var(--white);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 700;
}

/* Placeholder image with gradient */
.placeholder-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: var(--gray-300);
}
.placeholder-img.p1 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.placeholder-img.p2 { background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%); }
.placeholder-img.p3 { background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%); }
.placeholder-img.p4 { background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%); }
.placeholder-img.p5 { background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%); }
.placeholder-img.p6 { background: linear-gradient(135deg, #e0c3fc 0%, #8ec5fc 100%); }
.placeholder-img.p7 { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); }
.placeholder-img.p8 { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); }

/* --- Category Cards --- */
.category-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.category-card {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 160px;
  cursor: pointer;
  transition: var(--transition);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card .cat-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.category-card:nth-child(1) .cat-bg { background: linear-gradient(135deg, #1A1A2E, #16213E); }
.category-card:nth-child(2) .cat-bg { background: linear-gradient(135deg, #E94560, #c42d46); }
.category-card:nth-child(3) .cat-bg { background: linear-gradient(135deg, #0F3460, #1A1A2E); }
.category-card:nth-child(4) .cat-bg { background: linear-gradient(135deg, #533483, #1A1A2E); }
.category-card h3 { color: var(--white); font-size: 20px; font-weight: 700; }
.category-card p { color: rgba(255,255,255,0.7); font-size: 13px; }

/* --- Footer --- */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 48px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 32px;
}
.footer-brand .logo { color: var(--white); font-size: 24px; margin-bottom: 12px; display: inline-block; }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: 16px; }
.footer h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer ul li { margin-bottom: 8px; }
.footer ul li a { font-size: 14px; transition: var(--transition); }
.footer ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  max-width: var(--max-width);
  margin: 0 auto;
}

/* --- Product Detail Page --- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 24px 0;
}
.pd-gallery { position: relative; }
.pd-main-img {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 12px;
}
.pd-main-img img, .pd-main-img .placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-thumbs {
  display: flex;
  gap: 8px;
}
.pd-thumbs .thumb {
  width: 64px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  background: var(--gray-100);
}
.pd-thumbs .thumb.active,
.pd-thumbs .thumb:hover { border-color: var(--accent); }

.pd-info { padding-top: 8px; }
.pd-breadcrumb {
  font-size: 13px;
  color: var(--gray-400);
  margin-bottom: 12px;
}
.pd-breadcrumb a:hover { color: var(--accent); }
.pd-brand {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}
.pd-title {
  font-size: 16px;
  color: var(--gray-500);
  margin-bottom: 12px;
}
.pd-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}
.pd-rating .stars {
  background: var(--green);
  color: var(--white);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 13px;
}
.pd-rating .count { color: var(--gray-400); }

.pd-price-block {
  background: var(--gray-50);
  padding: 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}
.pd-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 4px;
}
.pd-price .now { font-size: 28px; font-weight: 800; color: var(--primary); }
.pd-price .was { font-size: 18px; color: var(--gray-400); text-decoration: line-through; }
.pd-price .off { font-size: 16px; font-weight: 600; color: var(--green); }
.pd-tax { font-size: 12px; color: var(--gray-400); }

.pd-sizes { margin-bottom: 20px; }
.pd-sizes h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.size-options { display: flex; gap: 8px; flex-wrap: wrap; }
.size-btn {
  width: 44px;
  height: 44px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.size-btn:hover { border-color: var(--accent); }
.size-btn.active { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.size-btn.disabled { opacity: 0.3; cursor: not-allowed; text-decoration: line-through; }

.pd-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}
.pd-actions .btn { flex: 1; padding: 14px; font-size: 15px; }

.pd-details {
  border-top: 1px solid var(--gray-200);
  padding-top: 20px;
}
.pd-details h4 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.pd-details table { width: 100%; font-size: 14px; }
.pd-details table td { padding: 8px 0; border-bottom: 1px solid var(--gray-100); }
.pd-details table td:first-child { color: var(--gray-500); width: 40%; }

.pd-vendor {
  margin-top: 20px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pd-vendor .vendor-info h5 { font-weight: 600; }
.pd-vendor .vendor-info p { font-size: 13px; color: var(--gray-500); }

/* --- Cart Page --- */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  padding: 24px 0;
}
.cart-items { display: flex; flex-direction: column; gap: 16px; }
.cart-item {
  display: flex;
  gap: 16px;
  background: var(--white);
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.cart-item-img {
  width: 100px;
  height: 120px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
}
.cart-item-info { flex: 1; }
.cart-item-info .brand { font-size: 12px; font-weight: 700; color: var(--gray-500); text-transform: uppercase; }
.cart-item-info .title { font-size: 14px; margin: 2px 0 4px; }
.cart-item-info .meta { font-size: 13px; color: var(--gray-400); margin-bottom: 8px; }
.cart-item-info .price { font-weight: 700; font-size: 16px; }
.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.qty-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-control button {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--gray-600);
  transition: var(--transition);
}
.qty-control button:hover { background: var(--gray-100); }
.qty-control .qty { width: 36px; text-align: center; font-weight: 600; font-size: 14px; border-left: 1px solid var(--gray-200); border-right: 1px solid var(--gray-200); padding: 6px 0; }
.cart-item .remove-btn { font-size: 13px; color: var(--gray-400); transition: var(--transition); }
.cart-item .remove-btn:hover { color: var(--red); }

.order-summary {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 80px;
  height: fit-content;
}
.order-summary h3 { font-size: 16px; font-weight: 700; margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); }
.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
}
.summary-row.total {
  border-top: 2px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 14px;
  font-size: 16px;
  font-weight: 700;
}
.summary-row .discount { color: var(--green); }
.summary-row .free { color: var(--green); font-weight: 600; }

.empty-cart {
  text-align: center;
  padding: 60px 20px;
}
.empty-cart .icon { font-size: 80px; margin-bottom: 16px; opacity: 0.3; }
.empty-cart h2 { font-size: 22px; margin-bottom: 8px; }
.empty-cart p { color: var(--gray-500); margin-bottom: 24px; }

/* --- Login Page --- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary) 0%, #16213E 100%);
  padding: 20px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
}
.auth-card .logo { text-align: center; font-size: 28px; margin-bottom: 8px; }
.auth-card .subtitle { text-align: center; color: var(--gray-500); font-size: 14px; margin-bottom: 28px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  background: var(--white);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }

.phone-input {
  display: flex;
  align-items: center;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: var(--transition);
}
.phone-input:focus-within { border-color: var(--accent); }
.phone-input .prefix {
  padding: 12px 14px;
  background: var(--gray-50);
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-600);
  border-right: 2px solid var(--gray-200);
  white-space: nowrap;
}
.phone-input input { border: none; padding: 12px 14px; flex: 1; }
.phone-input input:focus { box-shadow: none; }

.otp-inputs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px 0;
}
.otp-inputs input {
  width: 48px;
  height: 52px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition);
}
.otp-inputs input:focus { border-color: var(--accent); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  font-size: 13px;
  color: var(--gray-400);
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
}
.social-btn:hover { border-color: var(--gray-400); background: var(--gray-50); }
.social-btn img { width: 20px; height: 20px; }

/* --- Vendor Registration --- */
.vendor-page {
  max-width: 640px;
  margin: 0 auto;
  padding: 32px 16px;
}
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
}
.progress-bar::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gray-200);
  z-index: 0;
}
.progress-bar .step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 1;
  position: relative;
}
.progress-bar .step .circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-500);
  transition: var(--transition);
}
.progress-bar .step.active .circle { background: var(--accent); color: var(--white); }
.progress-bar .step.done .circle { background: var(--green); color: var(--white); }
.progress-bar .step span { font-size: 12px; color: var(--gray-400); font-weight: 600; }
.progress-bar .step.active span { color: var(--accent); }

.form-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}
.form-card h2 { font-size: 20px; margin-bottom: 4px; }
.form-card .form-desc { font-size: 14px; color: var(--gray-500); margin-bottom: 24px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-light); }
.upload-zone .icon { font-size: 40px; margin-bottom: 8px; color: var(--gray-400); }
.upload-zone p { font-size: 14px; color: var(--gray-500); }
.upload-zone small { font-size: 12px; color: var(--gray-400); }

.form-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 24px;
  gap: 12px;
}

/* --- Orders Page --- */
.orders-page { padding: 24px 0; }
.orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.order-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  background: var(--white);
  transition: var(--transition);
}
.filter-btn.active,
.filter-btn:hover { background: var(--primary); color: var(--white); border-color: var(--primary); }

.order-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.order-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-id { font-weight: 700; font-size: 14px; }
.order-date { font-size: 13px; color: var(--gray-400); }
.status-badge {
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.status-badge.delivered { background: var(--green-light); color: var(--green); }
.status-badge.shipped { background: var(--blue-light); color: var(--blue); }
.status-badge.processing { background: var(--yellow-light); color: var(--yellow); }
.status-badge.cancelled { background: #FEE2E2; color: var(--red); }

.order-items {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.order-item-thumb {
  width: 60px;
  height: 72px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--gray-100);
}
.order-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-100);
}
.order-total { font-weight: 700; font-size: 16px; }

/* --- Seller Dashboard --- */
.seller-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.seller-sidebar {
  background: var(--primary);
  padding: 20px 0;
  color: var(--white);
}
.seller-sidebar .logo {
  color: var(--white);
  font-size: 18px;
  padding: 0 20px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 16px;
}
.seller-sidebar nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: var(--transition);
}
.seller-sidebar nav a:hover,
.seller-sidebar nav a.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.seller-sidebar nav a .nav-icon { font-size: 18px; }

.seller-main { padding: 24px 32px; background: var(--bg); }
.seller-main h1 { font-size: 24px; margin-bottom: 24px; }

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .stat-change { font-size: 12px; color: var(--green); font-weight: 600; margin-top: 4px; }

.data-table {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.data-table thead { background: var(--gray-50); }
.data-table th {
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  text-align: left;
}
.data-table td { padding: 14px 16px; font-size: 14px; border-top: 1px solid var(--gray-100); }
.data-table tr:hover { background: var(--gray-50); }

/* --- Add Product Page --- */
.add-product-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 16px;
}
.add-product-layout h1 { font-size: 24px; margin-bottom: 24px; }

.image-upload-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 8px;
}
.image-upload-slot {
  aspect-ratio: 3/4;
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  color: var(--gray-400);
  position: relative;
  overflow: hidden;
}
.image-upload-slot:hover { border-color: var(--accent); background: var(--accent-light); }
.image-upload-slot .slot-icon { font-size: 28px; margin-bottom: 4px; }
.image-upload-slot.filled { border-style: solid; border-color: var(--green); }

.variant-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.variant-row .remove-var {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: var(--transition);
}
.variant-row .remove-var:hover { background: #FEE2E2; color: var(--red); }

.color-options {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.color-swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.color-swatch:hover,
.color-swatch.active { border-color: var(--primary); transform: scale(1.1); }

/* --- Reviews --- */
.review-card {
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
}
.review-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}
.review-name { font-weight: 600; font-size: 14px; }
.review-date { font-size: 12px; color: var(--gray-400); }
.review-text { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

/* --- Toast --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--primary);
  color: var(--white);
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

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

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* --- Hamburger Menu --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 200;
  padding: 20px;
  flex-direction: column;
  animation: fadeIn 0.2s ease;
}
.mobile-menu.open { display: flex; }
.mobile-menu .close-btn {
  align-self: flex-end;
  font-size: 28px;
  color: var(--gray-600);
  margin-bottom: 20px;
}
.mobile-menu nav a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--gray-100);
}

/* --- Page Title --- */
.page-title {
  font-size: 24px;
  font-weight: 700;
  padding: 20px 0;
}

/* --- Breadcrumb --- */
.breadcrumb {
  padding: 12px 0;
  font-size: 13px;
  color: var(--gray-400);
}
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 6px; }

/* --- Chart placeholder --- */
.chart-placeholder {
  background: var(--white);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 14px;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .seller-layout { grid-template-columns: 200px 1fr; }
  .seller-main { padding: 20px; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }
  .search-bar { display: none; }
  .header-inner { padding: 10px 16px; }

  .category-nav ul { justify-content: flex-start; padding: 0 8px; }
  .category-nav li a { padding: 10px 16px; font-size: 13px; }

  .hero-slide { height: 240px; padding: 24px; }
  .hero-content h1 { font-size: 26px; }
  .hero-content p { font-size: 14px; }
  .hero-arrow { width: 36px; height: 36px; font-size: 16px; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-card .card-body { padding: 10px; }
  .product-card .price-now { font-size: 14px; }
  .product-card .card-brand { font-size: 10px; }
  .product-card .card-title { font-size: 12px; }

  .category-cards { grid-template-columns: repeat(2, 1fr); }
  .category-card { height: 120px; }

  .product-detail { grid-template-columns: 1fr; gap: 20px; }
  .pd-price .now { font-size: 24px; }

  .cart-layout { grid-template-columns: 1fr; }
  .order-summary { position: static; }

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

  .seller-layout { grid-template-columns: 1fr; }
  .seller-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: 200;
    transition: left 0.3s ease;
  }
  .seller-sidebar.open { left: 0; }

  .form-row { grid-template-columns: 1fr; }
  .image-upload-grid { grid-template-columns: repeat(2, 1fr); }
  .variant-row { grid-template-columns: 1fr 1fr; }

  .order-filters { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }

  /* Mobile search bar */
  .mobile-search {
    display: block;
    padding: 8px 16px 12px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
  }
  .mobile-search input {
    width: 100%;
    padding: 10px 16px 10px 42px;
    border: 2px solid var(--gray-200);
    border-radius: 50px;
    font-size: 14px;
    outline: none;
    background: var(--gray-50);
  }
}

@media (max-width: 480px) {
  .hero-slide { height: 200px; }
  .hero-content h1 { font-size: 22px; }

  .pd-actions { flex-direction: column; }
  .pd-actions .btn { width: 100%; }

  .auth-card { padding: 28px 20px; }

  .stat-cards { grid-template-columns: 1fr; }
}

/* Desktop-only search shown on mobile */
@media (min-width: 769px) {
  .mobile-search { display: none; }
}
