/* PureO Bangladesh — Premium CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --primary: #0e6b3f;
  --primary-dark: #0a5230;
  --primary-light: #1a8f54;
  --primary-pale: #e6f4ed;
  --accent: #1a56db;
  --accent-dark: #1e40af;
  --gold: #b8620a;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface2: #f8f8f6;
  --border: #e8e8e4;
  --text: #111110;
  --text2: #3a3a38;
  --text3: #6b6b68;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #1a56db;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow: 0 2px 8px rgba(0,0,0,.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,.1);
  --shadow-xl: 0 8px 32px rgba(0,0,0,.12);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'DM Sans', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --nav-h: 60px;
  --bottom-nav-h: 72px;
  --sidebar-w: 260px;
  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  --clr-sidebar-bg: #0f172a;
  --clr-sidebar-hover: #1e293b;
  --clr-sidebar-active: #0e6b3f;
}

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

html { scroll-behavior: smooth; font-size: 16px; -webkit-tap-highlight-color: transparent; }

body {
  background: #ffffff;
  font-family: var(--font);
  background: var(--bg);
  color: var(--clr-sidebar-bg);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ─── Typography ─── */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--clr-sidebar-bg); }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
p  { color: var(--text2); line-height: 1.75; }
a  { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ─── Selection ─── */
::selection { background: var(--primary); color: #fff; }

/* ─── Layout ─── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 960px; margin: 0 auto; padding: 0 24px; }
.container-xs { max-width: 640px; margin: 0 auto; padding: 0 24px; }
.grid { display: grid; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; } .gap-4 { gap: 32px; }

/* ─── Cards ─── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow); }
.card-body {
  background: #ffffff; padding: 20px; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 700; }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius); font-family: var(--font);
  font-size: .9rem; font-weight: 700; cursor: pointer; border: none;
  transition: all var(--transition); white-space: nowrap; text-decoration: none;
  position: relative; overflow: hidden;
}
.btn::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,.1); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(14,107,63,.35); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 6px 20px rgba(14,107,63,.45); }
.btn-accent  { background: var(--accent);  color: #fff; box-shadow: 0 4px 14px rgba(46,196,182,.35); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-ghost  { background: transparent; color: var(--text2); }
.btn-ghost:hover { background: var(--surface2); color: var(--clr-sidebar-bg); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success{ background: var(--success); color: #fff; }
.btn-warning{ background: var(--warning); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }

/* ─── Forms ─── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-weight: 600; font-size: .875rem; margin-bottom: 6px; color: var(--clr-sidebar-bg); }
.form-control {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-family: var(--font); font-size: .9rem;
  color: var(--clr-sidebar-bg); background: var(--surface); transition: all var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,107,63,.12); }
.form-control::placeholder { color: var(--text3); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text3); margin-top: 4px; }
.form-error { font-size: .78rem; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Input with icon */
.input-group { position: relative; }
.input-group .form-control { padding-left: 40px; }
.input-group .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); pointer-events: none; }

/* ─── Badges ─── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
}
.badge-primary  { background: var(--primary-pale); color: var(--primary); }
.badge-success  { background: #ECFDF5; color: var(--success); }
.badge-warning  { background: #FFFBEB; color: var(--warning); }
.badge-danger   { background: #FEF2F2; color: var(--danger); }
.badge-info     { background: #EFF6FF; color: var(--info); }
.badge-accent   { background: #F0FDFA; color: var(--accent); }
.badge-gray     { background: var(--surface2); color: var(--text2); }

/* ─── Alerts ─── */
.alert {
  padding: 14px 18px; border-radius: var(--radius-sm); font-size: .9rem; font-weight: 600;
  display: flex; align-items: flex-start; gap: 10px; border: 1.5px solid;
  animation: slideDown .3s ease;
}
.alert-success { background: #ECFDF5; color: var(--success); border-color: #A7F3D0; }
.alert-danger   { background: #FEF2F2; color: var(--danger);  border-color: #FECACA; }
.alert-warning  { background: #FFFBEB; color: var(--warning); border-color: #FDE68A; }
.alert-info     { background: #EFF6FF; color: var(--info);    border-color: #BFDBFE; }

/* ─── Tables ─── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead { background: var(--surface2); }
th { padding: 12px 16px; text-align: left; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: var(--text2); }
td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: middle; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface2); }

/* ─── Modals ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(4px);
  z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border-radius: var(--radius-lg); max-width: 580px; width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-xl);
  transform: translateY(30px) scale(.97); transition: transform var(--transition-spring);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-body   { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }
.modal-close  { background: none; border: none; cursor: pointer; color: var(--text3); padding: 4px; border-radius: 6px; transition: all var(--transition); }
.modal-close:hover { background: var(--surface2); color: var(--clr-sidebar-bg); }

/* ─── Navigation ─── */
.topbar { display: none !important; }

.navbar {
  position: sticky; top: 0; z-index: 200; height: var(--nav-h);
  background: rgba(255,255,255,.96); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.navbar.scrolled { box-shadow: var(--shadow-sm); }
.navbar-inner {
  display: flex; align-items: center; gap: 20px; width: 100%; min-height: var(--nav-h);
}
.navbar-brand { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.navbar-logo { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--primary); letter-spacing: -0.02em; }
.navbar-logo-img { height: 36px; width: auto; object-fit: contain; }
.navbar-nav { display: flex; align-items: center; gap: 4px; list-style: none; flex-shrink: 0; margin: 0; padding: 0; }
.navbar-nav a { padding: 8px 14px; border-radius: var(--radius-sm); color: var(--text2); font-weight: 500; font-size: .9rem; transition: all var(--transition); white-space: nowrap; }
.navbar-nav a:hover, .navbar-nav a.active { background: var(--primary-pale); color: var(--primary); }
.navbar-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; margin-left: auto; }
.nav-icon-btn { width: 40px; height: 40px; padding: 0; }
.nav-account-btn { display: flex; align-items: center; gap: 8px; padding: 6px 10px; }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.nav-avatar-fallback { display: inline-flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; font-weight: 700; font-size: .85rem; }
.nav-account-name { font-weight: 600; font-size: .875rem; }
.nav-auth-btn { white-space: nowrap; }
#mobile-search-btn { display: none; }

.search-bar.nav-search {
  flex: 1; max-width: 420px; min-width: 0; position: relative; margin: 0 auto;
}
.search-bar input {
  width: 100%; height: 40px; padding: 0 16px 0 40px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font);
  background: var(--surface2); transition: all var(--transition); outline: none;
}
.search-bar input:focus { background: var(--surface); border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,107,63,.12); }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text3); display: flex; pointer-events: none; }
.mobile-search-panel { padding: 10px 0; background: var(--surface); border-bottom: 1px solid var(--border); }
.mobile-search-panel .container { position: relative; }
.mobile-search-panel input { width: 100%; height: 40px; padding: 0 16px 0 40px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface2); }
.cart-badge { position: relative; }
.cart-badge-count {
  position: absolute; top: -5px; right: -5px; background: var(--primary); color: #fff;
  font-size: .6rem; font-weight: 800; border-radius: 99px; min-width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface);
}
.search-results-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); z-index: 300; max-height: 360px; overflow-y: auto;
}
.search-result-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; transition: background var(--transition); }
.search-result-item:hover { background: var(--surface2); }
.search-result-item img { width: 44px; height: 44px; object-fit: cover; border-radius: 8px; }

/* ─── Bottom Navigation (mobile/tablet) ─── */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  height: var(--bottom-nav-h); background: var(--surface);
  border-top: 1px solid var(--border); padding: 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,.08);
}
.bottom-nav-items { display: flex; height: 100%; }
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text3); font-size: .65rem; font-weight: 700; text-transform: uppercase;
  text-decoration: none; transition: all var(--transition); position: relative; cursor: pointer;
  border: none; background: none; padding: 0;
}
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active .bnav-icon { transform: translateY(-3px); }
.bottom-nav-item .bnav-icon { font-size: 1.4rem; transition: transform var(--transition-spring); }
.bottom-nav-item .bnav-dot {
  position: absolute; top: 8px; right: calc(50% - 12px); width: 8px; height: 8px;
  background: var(--primary); border-radius: 99px; border: 2px solid var(--surface);
}

/* ─── Product Card ─── */
.product-card {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border); transition: all var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); border-color: transparent; }
.product-card-img { position: relative; aspect-ratio: 1; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-slow); }
.product-card:hover .product-card-img img { transform: scale(1.07); }
.product-card-badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 4px; }
.product-card-actions { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 6px; opacity: 0; transition: opacity var(--transition); }
.product-card:hover .product-card-actions { opacity: 1; }
.product-card-action-btn {
  width: 34px; height: 34px; background: var(--surface); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; border: none; cursor: pointer;
  box-shadow: var(--shadow); color: var(--text2); transition: all var(--transition);
  transform: translateX(10px); transition: all var(--transition);
}
.product-card:hover .product-card-action-btn { transform: translateX(0); }
.product-card-action-btn:hover { background: var(--primary); color: #fff; }
.product-card-body {
  background: #ffffff; padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-card-cat { font-size: .72rem; color: var(--text3); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.product-card-name { font-weight: 700; font-size: .95rem; color: var(--clr-sidebar-bg); margin-bottom: 8px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card-price { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.product-card-price-main { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.product-card-price-old { font-size: .85rem; color: var(--text3); text-decoration: line-through; }
.product-card-rating { display: flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--warning); margin-bottom: 6px; }
.product-card-footer { padding: 12px 14px; border-top: 1px solid var(--border); }

/* ─── Hero Slider ─── */
.hero-slider { position: relative; overflow: hidden; border-radius: var(--radius-xl); }
.hero-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease;
  background: linear-gradient(135deg, #0f172a 0%, #0e6b3f 100%);
  display: flex; align-items: center;
}
.hero-slide.active { opacity: 1; position: relative; }
.hero-slide-content { padding: 48px 56px; color: #fff; max-width: 560px; }
.hero-slide-content h1 { font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 900; line-height: 1.1; margin-bottom: 16px; color: #fff; }
.hero-slide-content p { color: rgba(255,255,255,.8); font-size: 1.1rem; margin-bottom: 28px; }
.hero-dots { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dot { width: 8px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.4); border: none; cursor: pointer; transition: all var(--transition); }
.hero-dot.active { width: 24px; background: #fff; }

/* ─── Sections ─── */
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-family: var(--font-display); position: relative; display: inline-block; }
.section-title h2::after { content: ''; position: absolute; bottom: -8px; left: 0; right: 0; height: 3px; background: var(--primary); border-radius: 99px; }
.section-title p { color: var(--text2); margin-top: 16px; font-size: 1rem; }

/* ─── Product Grid ─── */
.products-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.products-grid-5 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ─── Category Grid ─── */
.categories-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.category-card {
  border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1;
  position: relative; cursor: pointer; text-decoration: none;
  display: block; transition: transform var(--transition);
}
.category-card:hover { transform: scale(1.04); }
.category-card img { width: 100%; height: 100%; object-fit: cover; }
.category-card-overlay {
  position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.1) 60%);
  display: flex; align-items: flex-end; padding: 16px;
}
.category-card-name { color: #fff; font-weight: 800; font-size: 1rem; }

/* ─── Checkout Steps ─── */
.checkout-steps { display: flex; align-items: center; margin-bottom: 32px; }
.checkout-step { flex: 1; display: flex; align-items: center; }
.checkout-step-circle {
  width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .875rem;
  flex-shrink: 0; transition: all var(--transition); background: var(--surface); color: var(--text3);
}
.checkout-step.active .checkout-step-circle { background: var(--primary); border-color: var(--primary); color: #fff; }
.checkout-step.done .checkout-step-circle { background: var(--success); border-color: var(--success); color: #fff; }
.checkout-step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.checkout-step.done .checkout-step-line { background: var(--success); }
.checkout-step-label { font-size: .78rem; font-weight: 700; color: var(--text3); text-align: center; display: block; margin-top: 4px; }
.checkout-step.active .checkout-step-label, .checkout-step.done .checkout-step-label { color: var(--clr-sidebar-bg); }

/* ─── Admin Sidebar ─── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w); background: var(--clr-sidebar-bg); color: #fff;
  display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0;
  z-index: 150; transition: transform var(--transition);
  overflow-y: auto; overflow-x: hidden;
  border-right: 1px solid rgba(255,255,255,.06);
}
.admin-sidebar::-webkit-scrollbar { width: 4px; }
.admin-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); }
.sidebar-brand { padding: 20px 20px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand-name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.sidebar-brand-tag { font-size: .65rem; color: rgba(255,255,255,.4); letter-spacing: 1px; text-transform: uppercase; }
.sidebar-nav { padding: 12px 0; flex: 1; }
.sidebar-group { padding: 8px 16px 4px; font-size: .65rem; font-weight: 700; color: rgba(255,255,255,.3); text-transform: uppercase; letter-spacing: 1px; }
.sidebar-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; color: rgba(255,255,255,.65); font-size: .875rem; font-weight: 600;
  text-decoration: none; transition: all var(--transition); border-radius: 0; cursor: pointer;
  border-left: 3px solid transparent; border: none; width: 100%; background: none;
  text-align: left; font-family: var(--font);
}
.sidebar-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-item.active { background: rgba(14,107,63,.18); color: #fff; border-left: 3px solid var(--clr-sidebar-active); }
.sidebar-item .sidebar-badge { margin-left: auto; background: var(--primary); color: #fff; font-size: .6rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; }
.sidebar-chevron { margin-left: auto; transition: transform var(--transition); font-size: .75rem; }
.sidebar-item.open .sidebar-chevron { transform: rotate(90deg); }
.sidebar-sub { overflow: hidden; max-height: 0; transition: max-height .35s ease; }
.sidebar-sub.open { max-height: 400px; }
.sidebar-sub-item { display: block; padding: 8px 16px 8px 44px; color: rgba(255,255,255,.5); font-size: .83rem; font-weight: 600; text-decoration: none; transition: all var(--transition); }
.sidebar-sub-item:hover { color: rgba(255,255,255,.9); }
.sidebar-sub-item.active { color: var(--primary); }

/* ─── Admin Main ─── */
.admin-main { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; }
.admin-topbar {
  height: 64px; background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 100;
}
.admin-content { flex: 1; padding: 24px; }
.admin-page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.admin-page-title h1 { font-size: 1.5rem; }

/* ─── Stat Cards ─── */
.stat-card {
  background: var(--surface); border-radius: var(--radius); padding: 20px;
  border: 1px solid var(--border); display: flex; align-items: center; gap: 16px;
  transition: all var(--transition);
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.stat-icon-red   { background: var(--primary-pale); color: var(--primary); }
.stat-icon-green { background: #ECFDF5; color: var(--success); }
.stat-icon-blue  { background: #EFF6FF; color: var(--info); }
.stat-icon-gold  { background: #FFFBEB; color: var(--warning); }
.stat-icon-accent{ background: #F0FDFA; color: var(--accent); }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--clr-sidebar-bg); line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text3); font-weight: 600; margin-top: 2px; }
.stat-change { font-size: .75rem; font-weight: 700; display: flex; align-items: center; gap: 3px; margin-top: 4px; }
.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ─── Charts placeholder ─── */
.chart-container { position: relative; }

/* ─── Animations ─── */
@keyframes fadeIn    { from { opacity:0; }            to { opacity:1; } }
@keyframes slideDown { from { transform:translateY(-12px); opacity:0; } to { transform:translateY(0); opacity:1; } }
@keyframes slideUp   { from { transform:translateY(12px); opacity:0; }  to { transform:translateY(0); opacity:1; } }
@keyframes pop       { 0% { transform:scale(.6); } 70% { transform:scale(1.2); } 100% { transform:scale(1); } }
@keyframes spin      { to { transform:rotate(360deg); } }
@keyframes pulse     { 0%,100% { opacity:1; } 50% { opacity:.5; } }
@keyframes shimmer   { 0% { background-position:-1000px 0; } 100% { background-position:1000px 0; } }
@keyframes float     { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes wiggle    { 0%,100% { transform:rotate(-3deg); } 50% { transform:rotate(3deg); } }

.animate-fade-in   { animation: fadeIn var(--transition) both; }
.animate-slide-up  { animation: slideUp .4s ease both; }
.animate-float     { animation: float 3s ease-in-out infinite; }
.loading-spinner   { width: 20px; height: 20px; border: 2.5px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }

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

/* Transition delays for stagger */
.delay-1 { animation-delay: .1s; } .delay-2 { animation-delay: .2s; } .delay-3 { animation-delay: .3s; } .delay-4 { animation-delay: .4s; } .delay-5 { animation-delay: .5s; }

/* ─── Sidebar Overlay (mobile) ─── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 140; }

/* ─── Toast ─── */
.toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--clr-sidebar-bg); color: #fff; padding: 12px 20px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600; box-shadow: var(--shadow-lg); max-width: 320px;
  display: flex; align-items: center; gap: 10px; animation: slideUp .3s ease;
  border-left: 4px solid var(--primary);
}
.toast-success { border-left-color: var(--success); }
.toast-danger  { border-left-color: var(--danger); }
.toast-warning { border-left-color: var(--warning); }

/* ─── Dropdown ─── */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface);
  border: 1.5px solid var(--border); border-radius: var(--radius); min-width: 200px;
  box-shadow: var(--shadow-lg); z-index: 500; opacity: 0; pointer-events: none;
  transform: translateY(-8px); transition: all var(--transition);
}
.dropdown.open .dropdown-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--clr-sidebar-bg); font-size: .875rem; font-weight: 600; text-decoration: none; cursor: pointer; transition: background var(--transition); border: none; background: none; width: 100%; text-align: left; font-family: var(--font); }
.dropdown-item:hover { background: var(--surface2); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-divider { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ─── Pagination ─── */
.pagination { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px; height: 36px; border-radius: var(--radius-sm); border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text2); font-weight: 700; font-size: .875rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  text-decoration: none; transition: all var(--transition); font-family: var(--font);
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; pointer-events: none; }

/* ─── Filter Sidebar ─── */
.filter-sidebar { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; position: sticky; top: calc(var(--nav-h) + 16px); }
.filter-group { margin-bottom: 24px; }
.filter-group-title { font-weight: 800; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; color: var(--clr-sidebar-bg); }

/* ─── Rating Stars ─── */
.stars { display: inline-flex; gap: 2px; }
.star { color: var(--warning); font-size: 1rem; }
.star.empty { color: var(--border); }

/* ─── Cart Drawer ─── */
.cart-drawer {
  position: fixed; right: 0; top: 0; bottom: 0; width: 400px; max-width: 95vw;
  background: var(--surface); z-index: 500; box-shadow: var(--shadow-xl);
  transform: translateX(100%); transition: transform var(--transition);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-drawer-body {
  background: #ffffff; flex: 1; overflow-y: auto; padding: 16px; }
.cart-drawer-footer { padding: 20px; border-top: 1px solid var(--border); }
.cart-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 70px; height: 70px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 700; font-size: .875rem; color: var(--clr-sidebar-bg); line-height: 1.3; }
.cart-qty-control { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.cart-qty-btn { width: 26px; height: 26px; border-radius: var(--radius-sm); border: 1.5px solid var(--border); background: var(--surface2); cursor: pointer; display: flex; align-items: center; justify-content: center; font-weight: 800; transition: all var(--transition); }
.cart-qty-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ─── Order Status ─── */
.order-timeline { position: relative; padding-left: 20px; }
.order-timeline::before { content: ''; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: var(--border); }
.order-timeline-item { position: relative; padding-bottom: 20px; padding-left: 20px; }
.order-timeline-dot { position: absolute; left: -20px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--border); border: 2px solid var(--surface); transition: background var(--transition); }
.order-timeline-item.done .order-timeline-dot { background: var(--success); }
.order-timeline-item.active .order-timeline-dot { background: var(--primary); box-shadow: 0 0 0 4px rgba(14,107,63,.2); }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
  .sidebar-overlay.open { opacity: 1; pointer-events: all; }
  .bottom-nav { display: flex; }
  .admin-content { padding-bottom: calc(var(--bottom-nav-h) + 16px); }
}

@media (max-width: 768px) {
  :root { --nav-h: 60px; }
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .navbar-nav, .topbar { display: none; }
  .search-bar { display: none; }
  .search-bar.mobile-open { display: block; position: fixed; top: var(--nav-h); left: 0; right: 0; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 201; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-slide-content { padding: 28px 24px; }
  .hero-slide-content h1 { font-size: 1.8rem; }
  .cart-drawer { width: 100%; }
  .admin-topbar { padding: 0 16px; }
  .admin-content { padding: 16px; }
  .stat-card { padding: 14px; }
  .bottom-nav { display: flex; }
  body {
  background: #ffffff; padding-bottom: var(--bottom-nav-h); }
  .modal { border-radius: var(--radius) var(--radius) 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: 100%; margin: 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
}

@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card-body {
  background: #ffffff; padding: 10px; }
  .btn-lg { padding: 12px 20px; font-size: .9rem; }
}

/* ─── Dark mode aware colors (CSS only) ─── */
@media (prefers-color-scheme: dark) {
  /* Opt-in via class only */
}

/* ─── Print ─── */
@media print {
  .navbar, .bottom-nav, .admin-sidebar, .admin-topbar { display: none !important; }
  .admin-main { margin-left: 0 !important; }
}

/* ─── Utility ─── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted   { color: var(--text3); }
.fw-bold { font-weight: 700; } .fw-black { font-weight: 900; }
.mt-1{margin-top:8px;}.mt-2{margin-top:16px;}.mt-3{margin-top:24px;}.mt-4{margin-top:32px;}
.mb-1{margin-bottom:8px;}.mb-2{margin-bottom:16px;}.mb-3{margin-bottom:24px;}.mb-4{margin-bottom:32px;}
.p-1{padding:8px;}.p-2{padding:16px;}.p-3{padding:24px;}.p-4{padding:32px;}
.rounded{border-radius:var(--radius);}.rounded-full{border-radius:var(--radius-full);}
.w-full{width:100%;}.h-full{height:100%;}
.overflow-hidden{overflow:hidden;}.relative{position:relative;}.absolute{position:absolute;}
.pointer{cursor:pointer;}.no-select{user-select:none;}
.divider{border:none;border-top:1px solid var(--border);margin:16px 0;}
.aspect-1{aspect-ratio:1;}.aspect-video{aspect-ratio:16/9;}
.img-cover{object-fit:cover;width:100%;height:100%;}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.two-lines{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}

/* ─── Progress bar ─── */
.progress { height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.progress-bar.success { background: var(--success); }

/* ─── Tabs ─── */
.tabs { display: flex; gap: 4px; background: var(--surface2); border-radius: var(--radius-sm); padding: 4px; }
.tab-btn { flex: 1; padding: 8px 16px; border: none; background: none; border-radius: var(--radius-sm); font-family: var(--font); font-weight: 700; font-size: .875rem; cursor: pointer; color: var(--text2); transition: all var(--transition); white-space: nowrap; }
.tab-btn.active { background: var(--surface); color: var(--clr-sidebar-bg); box-shadow: var(--shadow-sm); }
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn .2s ease; }

/* ─── Range Input ─── */
input[type=range] { -webkit-appearance: none; width: 100%; height: 4px; background: var(--border); border-radius: 99px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; background: var(--primary); border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 3px rgba(14,107,63,.2); }

/* ─── Checkbox / Radio ─── */
.check-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; font-size: .875rem; }
.check-label input[type=checkbox], .check-label input[type=radio] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ─── Image zoom ─── */
.zoom-img-container { overflow: hidden; cursor: zoom-in; }
.zoom-img-container img { transition: transform var(--transition-slow); }
.zoom-img-container:hover img { transform: scale(1.08); }

/* ─── Watermark / no-image ─── */
.no-img { background: var(--surface2); display: flex; align-items: center; justify-content: center; color: var(--text3); font-size: 2rem; }

/* ─── Sale badge ─── */
.sale-badge { background: var(--primary); color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-full); }
.new-badge  { background: var(--accent);  color: #fff; font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: var(--radius-full); }

/* ─── Admin Charts ─── */
.chart-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 20px; }
.chart-title { font-weight: 800; font-size: 1rem; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }

/* ─── Multistep form ─── */
.step-wizard { background: var(--surface); border-radius: var(--radius-lg); border: 1px solid var(--border); overflow: hidden; }
.step-wizard-header { background: linear-gradient(135deg, var(--clr-sidebar-bg) 0%, #2d2d44 100%); padding: 24px 28px; }
.step-wizard-steps { display: flex; gap: 0; }
.step-wizard-step { flex: 1; text-align: center; position: relative; }
.step-wizard-step-circle { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.15); color: rgba(255,255,255,.6); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .8rem; margin: 0 auto 6px; border: 2px solid rgba(255,255,255,.2); transition: all var(--transition); }
.step-wizard-step.active .step-wizard-step-circle { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(14,107,63,.3); }
.step-wizard-step.done .step-wizard-step-circle { background: var(--success); border-color: var(--success); color: #fff; }
.step-wizard-step-line { position: absolute; top: 16px; left: 50%; right: -50%; height: 2px; background: rgba(255,255,255,.15); }
.step-wizard-step:last-child .step-wizard-step-line { display: none; }
.step-wizard-step.done .step-wizard-step-line { background: var(--success); }
.step-wizard-step-label { color: rgba(255,255,255,.5); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.step-wizard-step.active .step-wizard-step-label { color: #fff; }
.step-wizard-body {
  background: #ffffff; padding: 28px; }
.step-panel { display: none; }
.step-panel.active { display: block; animation: fadeIn .25s ease; }
.step-wizard-footer { padding: 16px 28px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ─── Tablet specific ─── */
@media (min-width: 769px) and (max-width: 1024px) {
  body {
  background: #ffffff; padding-bottom: var(--bottom-nav-h); }
  .bottom-nav { display: flex; }
  .navbar-nav { display: none; }
  .search-bar { max-width: 280px; }
}

/* ─── Star input for reviews ─── */
.star-input { cursor: pointer; color: var(--border); font-size: 1.5rem; transition: color .15s; }
.star-input.active, .star-input.selected { color: var(--warning); }

.announce-bar a { color: #9dffd4; text-decoration: underline; }
.navbar { background: rgba(255,255,255,.92); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border); }
