/* ================================================================
   AS FASHION — Main Stylesheet
   Theme: Ink & Camel — premium editorial fashion-retail identity
   Dark mode: [data-theme="dark"]
   ================================================================ */

/* ── Google Fonts ────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

/* ── Light Theme (default) ──────────────────────────────────── */
:root {
  --bg:           #ffffff;
  --bg-2:         #f7f4ee;
  --bg-3:         #efe8dc;
  --surface:      #ffffff;
  --surface-2:    #f7f4ee;
  --border:       #e6e0d3;
  --border-2:     #d2c8b4;

  --text:         #1c1814;
  --text-2:       #5e5648;
  --text-3:       #9a8f7c;
  --text-inv:     #ffffff;

  --primary:      #a2703f;
  --primary-dark: #7d5730;
  --primary-light:#f4ebdd;
  --primary-ring: rgba(162,112,63,0.25);

  --ink:          #16130f;
  --ink-dark:     #000000;

  --btn-bg:       var(--ink);
  --btn-bg-hover: var(--ink-dark);
  --btn-text:     #ffffff;

  --success:      #4d6b4a;
  --success-bg:   #eef3ec;
  --warning:      #a5690f;
  --warning-bg:   #fbf1e2;
  --danger:       #a5322a;
  --danger-bg:    #fbeae8;
  --info:         #3b6b78;
  --info-bg:      #e9f2f4;
  --purple:       #6a5a8c;
  --purple-bg:    #efecf5;

  --shadow-xs:    0 1px 2px rgba(22,19,15,0.06);
  --shadow-sm:    0 1px 3px rgba(22,19,15,0.1), 0 1px 2px rgba(22,19,15,0.06);
  --shadow:       0 4px 6px rgba(22,19,15,0.08), 0 2px 4px rgba(22,19,15,0.06);
  --shadow-md:    0 10px 15px rgba(22,19,15,0.1), 0 4px 6px rgba(22,19,15,0.05);
  --shadow-lg:    0 20px 25px rgba(22,19,15,0.1), 0 10px 10px rgba(22,19,15,0.04);
  --shadow-xl:    0 25px 50px rgba(22,19,15,0.14);
  --shadow-blue:  0 4px 14px rgba(162,112,63,0.3);

  --radius-sm:    2px;
  --radius:       3px;
  --radius-lg:    4px;
  --radius-xl:    6px;
  --radius-full:  9999px;

  --font:         'Manrope', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;

  --nav-h:        191px;
  --max-w:        1280px;
  --transition:   0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-s: 0.35s cubic-bezier(0.4,0,0.2,1);
}

/* ── Dark Theme ─────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:           #14120e;
  --bg-2:         #1e1a13;
  --bg-3:         #2a2418;
  --surface:      #1a1611;
  --surface-2:    #211c15;
  --border:       #322b1f;
  --border-2:     #443a29;

  --text:         #f2ece0;
  --text-2:       #b9ac96;
  --text-3:       #7c7160;

  /* AS Fashion dark mode: brighter camel for contrast against ink bg */
  --primary:      #cc9c62;
  --primary-dark: #b9853f;
  --primary-light:#2a2115;
  --primary-ring: rgba(204,156,98,0.25);
  --shadow-blue:  0 4px 14px rgba(0,0,0,0.5);

  --btn-bg:       var(--primary);
  --btn-bg-hover: var(--primary-dark);
  --btn-text:     #16130f;

  --success-bg:   #16241a;
  --warning-bg:   #241a08;
  --danger-bg:    #260f0d;
  --info-bg:      #0e2024;
  --purple-bg:    #1c1728;

  --shadow-xs:    0 1px 2px rgba(0,0,0,0.3);
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow:       0 4px 6px rgba(0,0,0,0.4);
  --shadow-md:    0 10px 15px rgba(0,0,0,0.4);
  --shadow-lg:    0 20px 25px rgba(0,0,0,0.5);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-anchor: none; }
body {
  overflow-anchor: none;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition-s), color var(--transition-s);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-2); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
::selection { background: var(--primary); color: white; }

/* ── Layout ────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page { min-height: calc(100vh - var(--nav-h)); padding-top: var(--nav-h); }

/* ── Typography ────────────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { line-height: 1.25; letter-spacing: -0.01em; }
.display { font-family: var(--font-display); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  transition: all var(--transition);
  cursor: pointer; white-space: nowrap; border: 1px solid transparent;
}
.btn-primary { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); box-shadow: var(--shadow-xs); }
.btn-primary:hover { background: var(--btn-bg-hover); border-color: var(--btn-bg-hover); box-shadow: var(--shadow-blue); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border-2); }
.btn-outline:hover { background: var(--bg-2); border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-2); color: var(--text); }
.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: 0.8rem; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 0.95rem; }
.btn-xl { padding: 16px 36px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-icon { width: 38px; height: 38px; padding: 0; justify-content: center; border-radius: var(--radius); }
.btn-icon-sm { width: 30px; height: 30px; padding: 0; justify-content: center; border-radius: var(--radius-sm); }

.whatsapp-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 62px;
  height: 62px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #25d366;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(37, 211, 102, 0.18);
  font-size: 1.4rem;
  z-index: 999;
  transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-float i {
  font-size: 1.5rem;
}

.whatsapp-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 45px rgba(37, 211, 102, 0.25);
}

.whatsapp-float:active {
  transform: translateY(0);
}

@media(max-width:768px) {
  .whatsapp-float { right: 16px; bottom: 16px; width: 54px; height: 54px; }
  .whatsapp-float i { font-size: 1.35rem; }
}

/* ── Form ──────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.8rem; font-weight: 500; color: var(--text-2); }
.form-input, .form-select, .form-textarea {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  padding: 9px 14px; font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-select {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 36px;
}
.form-textarea { resize: vertical; min-height: 90px; }
.input-wrap { position: relative; }
.input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 0.85rem; pointer-events: none; }
.input-wrap .form-input { padding-left: 38px; }
.input-eye { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 0.85rem; cursor: pointer; transition: color var(--transition); }
.input-eye:hover { color: var(--text); }

/* ── Cards ─────────────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.card-body { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 1rem; font-weight: 600; }

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.72rem; font-weight: 600; white-space: nowrap;
}
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-purple  { background: var(--purple-bg);  color: var(--purple); }
.badge-neutral { background: var(--bg-3);       color: var(--text-2); }

/* ── Spinner ────────────────────────────────────────────────── */
.spinner { width: 40px; height: 40px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.spinner-sm { width: 18px; height: 18px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Loader page ────────────────────────────────────────────── */
.page-loader { min-height: 50vh; display: flex; align-items: center; justify-content: center; }

/* ── Section headings ───────────────────────────────────────── */
.sec-heading { text-align: center; margin-bottom: 48px; }
.sec-overline { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.sec-title { font-family: var(--font-display); font-size: clamp(1.8rem,3.5vw,2.6rem); font-weight: 600; color: var(--text); }
.sec-sub { margin-top: 12px; font-size: 1rem; color: var(--text-2); max-width: 520px; margin-left: auto; margin-right: auto; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
@keyframes slideLeft { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes scaleIn { from { opacity:0; transform:scale(0.95); } to { opacity:1; transform:scale(1); } }
@keyframes popIn   { from { transform:scale(0); } to { transform:scale(1); } }
.anim-fadeup { animation: fadeUp .5s ease both; }
.anim-fadein { animation: fadeIn .4s ease both; }
[data-delay="1"] { animation-delay:.1s; }
[data-delay="2"] { animation-delay:.2s; }
[data-delay="3"] { animation-delay:.3s; }
[data-delay="4"] { animation-delay:.4s; }

/* ── Navbar ─────────────────────────────────────────────────── */
#navbar {
  position: fixed; top:0; left:0; right:0; z-index:900;
  height: var(--nav-h);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: all var(--transition-s);
}
[data-theme="dark"] #navbar {
  background: #0f172a;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; gap: 24px; }
.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-icon {
  width: 36px; height: 36px; background: var(--primary); color: white;
  border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 1rem; font-family: var(--font-display);
  box-shadow: var(--shadow-blue);
}
.nav-logo-text { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.nav-logo-text span { color: var(--primary); }
/* NOTE: old .nav-link / .nav-link.active rules removed from here — they
   collided with the real navbar's .nav-link class (rendered by
   renderNavbar() in components.js) and were silently painting the active
   link's background with var(--primary-light). In light mode that's a
   near-white blue so it was invisible; in dark mode var(--primary-light)
   resolves to dark navy, which is why only the active "Home" link turned
   solid dark when dark mode was toggled. The current navbar's own CSS +
   dark-mode rules now live inside components.js. */
.nav-actions { display: flex; align-items: center; gap: 8px; }
/* Cart badge */
.cart-wrap { position: relative; }
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--danger); color: white;
  font-size: 0.6rem; font-weight: 700; border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  animation: popIn .2s cubic-bezier(.34,1.56,.64,1);
}
/* Theme toggle */
.theme-toggle {
  width: 38px; height: 38px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); background: var(--bg-2); border: 1px solid var(--border);
  transition: all var(--transition); font-size: 0.9rem; cursor: pointer;
}
.theme-toggle:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
/* User menu */
.user-menu { position: relative; }
.user-avatar-btn {
  width: 36px; height: 36px; border-radius: var(--radius-full);
  background: var(--primary); color: white;
  font-size: 0.85rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--primary-light); cursor: pointer;
  transition: all var(--transition);
}
.user-avatar-btn:hover { box-shadow: var(--shadow-blue); }
.user-dropdown {
  position: absolute; top: calc(100%+10px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); min-width: 200px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  animation: scaleIn .15s ease; transform-origin: top right;
  display: none;
}
.user-dropdown.open { display: block; }
.user-drop-head { padding: 14px 16px; border-bottom: 1px solid var(--border); }
.user-drop-name { font-weight: 600; font-size: 0.9rem; }
.user-drop-email { font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }
.drop-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; font-size: 0.875rem; color: var(--text-2);
  transition: all var(--transition); cursor: pointer; width: 100%; text-align: left;
}
.drop-item:hover { background: var(--bg-2); color: var(--text); }
.drop-item.danger { color: var(--danger); }
.drop-item.danger:hover { background: var(--danger-bg); }
.drop-item i { width: 16px; font-size: 0.8rem; }
/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; width: 30px; cursor: pointer; }
.hamburger span { display: block; width: 100%; height: 2px; background: var(--text-2); border-radius: 2px; transition: all .3s; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity:0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* Mobile menu */
.mobile-nav {
  display: none; flex-direction: column;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 12px; gap: 4px;
  position: fixed; top: var(--nav-h); left: 0; right: 0; z-index: 899;
  box-shadow: var(--shadow-md);
  max-height: 0; overflow: hidden; transition: max-height .35s ease;
}
.mobile-nav.open { max-height: 500px; }
.mobile-nav a, .mobile-nav button {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 500; color: var(--text-2);
  transition: all var(--transition); width: 100%; text-align: left; cursor: pointer;
}
.mobile-nav a:hover, .mobile-nav button:hover { background: var(--bg-2); color: var(--primary); }
.mobile-nav .danger { color: var(--danger); }
.mobile-nav .danger:hover { background: var(--danger-bg); }

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  background: var(--bg-2); border-top: 1px solid var(--border);
  margin-top: 80px;
}
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding: 60px 0; }
.footer-brand p { font-size: 0.875rem; color: var(--text-3); line-height: 1.7; margin: 16px 0; max-width: 260px; }
.footer-socials { display: flex; gap: 8px; }
.social-btn {
  width: 34px; height: 34px; border-radius: var(--radius);
  border: 1px solid var(--border); color: var(--text-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; transition: all var(--transition);
}
.social-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
.footer-col h4 { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-2); margin-bottom: 16px; }
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 0.875rem; color: var(--text-3); transition: color var(--transition); }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; padding: 20px 0; border-top: 1px solid var(--border); gap: 16px; }
.footer-bottom p { font-size: 0.8rem; color: var(--text-3); }
.payment-icons { display: flex; gap: 12px; font-size: 1.5rem; color: var(--text-3); }
.payment-icons i:hover { color: var(--primary); transition: color var(--transition); }

/* ── Toast ──────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 9999; display: flex; flex-direction: column; gap: 10px;
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px;
  box-shadow: var(--shadow-lg); min-width: 280px; max-width: 360px;
  pointer-events: all; animation: slideLeft .3s ease both;
  transition: opacity .3s ease;
}
.toast.removing { opacity: 0; }
.toast-icon { width: 28px; height: 28px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 0.85rem; flex-shrink: 0; margin-top: 1px; }
.toast.success .toast-icon { background: var(--success-bg); color: var(--success); }
.toast.error   .toast-icon { background: var(--danger-bg);  color: var(--danger); }
.toast.info    .toast-icon { background: var(--info-bg);    color: var(--info); }
.toast.warning .toast-icon { background: var(--warning-bg); color: var(--warning); }
.toast-body { flex:1; }
.toast-title { font-size: 0.875rem; font-weight: 600; }
.toast-msg   { font-size: 0.8rem; color: var(--text-2); margin-top: 2px; }
.toast-close { color: var(--text-3); font-size: 0.8rem; cursor: pointer; padding: 2px; transition: color var(--transition); }
.toast-close:hover { color: var(--text); }

/* ── Product Card ───────────────────────────────────────────── */
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all var(--transition-s); cursor: pointer;
  animation: fadeUp .5s ease both;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--primary); }
.pc-img-wrap { position: relative; aspect-ratio:3/4; overflow:hidden; background: var(--bg-3); }
.pc-img-wrap img { width:100%; height:100%; object-fit:cover; transition: transform .6s ease; }
.product-card:hover .pc-img-wrap img { transform: scale(1.05); }
.pc-badge { position:absolute; top:12px; left:12px; }
.pc-actions {
  position:absolute; bottom:12px; left:12px; right:12px;
  display:flex; gap:8px;
  opacity:0; transform:translateY(8px); transition: all var(--transition);
}
.product-card:hover .pc-actions { opacity:1; transform:translateY(0); }
.pc-info { padding: 16px; }
.pc-cat { font-size:0.7rem; font-weight:600; letter-spacing:.1em; text-transform:uppercase; color:var(--primary); margin-bottom:6px; display:block; }
.pc-name { font-size:.95rem; font-weight:600; color:var(--text); margin-bottom:8px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pc-stars { display:flex; align-items:center; gap:3px; font-size:.65rem; color:#f59e0b; margin-bottom:8px; }
.pc-stars .far { color:var(--border-2); }
.pc-stars span { color:var(--text-3); font-size:.7rem; margin-left:4px; }
.pc-price { display:flex; align-items:baseline; gap:8px; }
.pc-price .price { font-size:1.05rem; font-weight:700; color:var(--text); }
.pc-price .sale { font-size:1.05rem; font-weight:700; color:var(--primary); }
.pc-price .orig { font-size:.8rem; color:var(--text-3); text-decoration:line-through; }

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

/* ── Pagination ─────────────────────────────────────────────── */
.pagination { display:flex; align-items:center; justify-content:center; gap:6px; margin-top:40px; flex-wrap:wrap; }
.page-btn { width:36px; height:36px; border-radius:var(--radius); border:1px solid var(--border); background:var(--surface); color:var(--text-2); font-size:.875rem; display:flex; align-items:center; justify-content:center; cursor:pointer; transition:all var(--transition); }
.page-btn:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-light); }
.page-btn.active { background:var(--primary); color:white; border-color:var(--primary); font-weight:600; }
.page-btn:disabled { opacity:.4; cursor:not-allowed; }

/* ── Modal ──────────────────────────────────────────────────── */
.modal-bg { position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:800; display:flex; align-items:center; justify-content:center; padding:20px; backdrop-filter:blur(4px); animation:fadeIn .2s ease; }
.modal { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-xl); width:100%; max-width:560px; max-height:90vh; overflow-y:auto; box-shadow:var(--shadow-xl); animation:scaleIn .2s ease; }
.modal.modal-lg { max-width:780px; }
.modal-head { display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--surface); z-index:1; }
.modal-title { font-size:1rem; font-weight:700; }
.modal-body { padding:24px; }
.modal-foot { display:flex; justify-content:flex-end; gap:10px; padding:16px 24px; border-top:1px solid var(--border); }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap { border:1px solid var(--border); border-radius:var(--radius-lg); overflow:auto; }
table { width:100%; border-collapse:collapse; font-size:.875rem; }
thead tr { background:var(--bg-2); border-bottom:1px solid var(--border); }
th { padding:10px 16px; text-align:left; font-size:.72rem; font-weight:600; letter-spacing:.08em; text-transform:uppercase; color:var(--text-2); white-space:nowrap; }
tbody tr { border-bottom:1px solid var(--border); transition:background var(--transition); }
tbody tr:last-child { border-bottom:none; }
tbody tr:hover { background:var(--bg-2); }
td { padding:12px 16px; vertical-align:middle; }

/* ── Alert ──────────────────────────────────────────────────── */
.alert { display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border-radius:var(--radius-lg); border:1px solid; font-size:.875rem; }
.alert-info    { background:var(--info-bg);    color:var(--info);    border-color:rgba(8,145,178,.2); }
.alert-success { background:var(--success-bg); color:var(--success); border-color:rgba(5,150,105,.2); }
.alert-warning { background:var(--warning-bg); color:var(--warning); border-color:rgba(217,119,6,.2); }
.alert-danger  { background:var(--danger-bg);  color:var(--danger);  border-color:rgba(220,38,38,.2); }

/* ── Divider ────────────────────────────────────────────────── */
hr { border:none; border-top:1px solid var(--border); }

/* ── Util ───────────────────────────────────────────────────── */
.text-center { text-align:center; }
.text-right  { text-align:right; }
.text-sm     { font-size:.875rem; }
.text-xs     { font-size:.75rem; }
.text-muted  { color:var(--text-3); }
.text-2      { color:var(--text-2); }
.text-primary{ color:var(--primary); }
.text-success{ color:var(--success); }
.text-danger { color:var(--danger); }
.text-warning{ color:var(--warning); }
.fw-600      { font-weight:600; }
.fw-700      { font-weight:700; }
.d-flex      { display:flex; }
.align-center{ align-items:center; }
.justify-between { justify-content:space-between; }
.gap-2       { gap:8px; }
.gap-3       { gap:12px; }
.gap-4       { gap:16px; }
.mt-2        { margin-top:8px; }
.mt-4        { margin-top:16px; }
.mb-4        { margin-bottom:16px; }
.hidden      { display:none !important; }

/* ── Responsive ─────────────────────────────────────────────── */
@media(max-width:1024px) { .products-grid{grid-template-columns:repeat(3,1fr);} }
@media(max-width:768px) {
  .products-grid{grid-template-columns:repeat(2,1fr); gap:14px;}
  .nav-links,.nav-actions .btn{display:none;}
  .hamburger{display:flex;}
  .mobile-nav{display:flex;}
  .footer-top{grid-template-columns:1fr 1fr; gap:32px;}
  .footer-bottom{flex-direction:column; text-align:center;}
  #toast-container{bottom:16px; right:16px; left:16px;}
  .toast{min-width:auto; max-width:100%;}
}
@media(max-width:480px) {
  .products-grid{grid-template-columns:1fr;}
  .container{padding:0 16px;}
  .footer-top{grid-template-columns:1fr;}
}

/* ── Sale / Discount Styles ──────────────────────────────────── */
.pc-badge.sale-badge {
  background: #dc2626 !important;
  color: #fff !important;
  font-weight: 700;
  letter-spacing: .06em;
}
.pc-price.sale-price { color: #dc2626; }
.pc-price-wrap { display: flex; flex-direction: column; gap: 1px; }
.pc-orig-price {
  font-size: .75rem;
  color: #9ca3af;
  text-decoration: line-through;
  font-weight: 400;
}

/* ── Product card size fix (bigger, not too big) ── */
.product-card .pc-img-wrap { aspect-ratio: 3/4; }
.product-card .pc-info { padding: 12px 14px 16px; }
.product-card .pc-name { font-size: .88rem; line-height: 1.4; min-height: 2.5em; }
.product-card .pc-price { font-size: .95rem; font-weight: 600; }
.product-card .pc-cat { font-size: .6rem; }

/* ── Global container max-width ── */
.container { max-width: 1280px; }

/* ── Product detail sale price ── */
.detail-sale-price { color: #dc2626; font-size: 1.6rem; font-weight: 700; }
.detail-orig-price { font-size: 1rem; color: #9ca3af; text-decoration: line-through; }
.detail-discount-badge {
  display: inline-flex; align-items: center;
  background: #fef2f2; color: #dc2626;
  border: 1px solid #fecaca;
  padding: 4px 10px; border-radius: 4px;
  font-size: .78rem; font-weight: 700;
  margin-left: 8px;
}
