/* ============================================================
   NexaStore - Main Stylesheet
   Design: Deep navy/electric violet, Space Grotesk display
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary: #6c63ff;
  --primary-dark: #5048d4;
  --primary-light: #8b84ff;
  --accent: #ff6584;
  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;
  --navy: #1a1a2e;
  --navy-mid: #16213e;
  --navy-light: #0f3460;
  --text: #1f2937;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  --border: #e5e7eb;
  --border-light: #f3f4f6;
  --bg: #fafafa;
  --bg-white: #ffffff;
  --card-shadow: 0 4px 24px rgba(108,99,255,.08);
  --card-hover: 0 8px 40px rgba(108,99,255,.18);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --transition: all .22s ease;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
input, textarea, select, button { font-family: inherit; }

/* ── Container ─────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ── Top Bar ───────────────────────────────────────────────── */
.top-bar {
  background: var(--navy);
  color: rgba(255,255,255,.8);
  padding: 8px 0;
  font-size: 13px;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar-links { display: flex; gap: 20px; }
.top-bar-links a { color: rgba(255,255,255,.8); transition: var(--transition); }
.top-bar-links a:hover { color: var(--primary-light); }

/* ── Header ────────────────────────────────────────────────── */
.site-header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.header-inner { display: flex; align-items: center; gap: 20px; padding: 16px 24px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--navy) !important; font-family: var(--font-display); font-weight: 700; font-size: 22px; white-space: nowrap; }
.logo-icon { color: var(--primary); font-size: 28px; line-height: 1; }
.logo-text { background: linear-gradient(135deg, var(--navy), var(--primary)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.header-search { flex: 1; max-width: 480px; display: flex; border: 2px solid var(--border); border-radius: 100px; overflow: hidden; transition: var(--transition); }
.header-search:focus-within { border-color: var(--primary); }
.header-search input { flex: 1; padding: 10px 18px; border: none; outline: none; font-size: 14px; background: transparent; }
.header-search button { padding: 10px 18px; background: var(--primary); color: white; border: none; cursor: pointer; font-size: 16px; transition: var(--transition); }
.header-search button:hover { background: var(--primary-dark); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.action-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text) !important; transition: var(--transition); font-size: 12px; position: relative; }
.action-btn:hover { background: var(--border-light); color: var(--primary) !important; }
.action-icon { font-size: 20px; position: relative; }
.cart-badge { position: absolute; top: -8px; right: -8px; background: var(--accent); color: white; border-radius: 100px; min-width: 18px; height: 18px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px; }
.hamburger { display: none; background: none; border: none; font-size: 24px; cursor: pointer; padding: 8px; }

/* ── Navigation ────────────────────────────────────────────── */
.main-nav { background: var(--navy); }
.nav-inner { display: flex; align-items: center; gap: 0; }
.main-nav a { color: rgba(255,255,255,.85); padding: 13px 18px; display: block; font-size: 14px; font-weight: 500; transition: var(--transition); }
.main-nav a:hover, .main-nav a.active { color: var(--primary-light); background: rgba(108,99,255,.1); }
.nav-dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--bg-white); min-width: 220px; border-radius: var(--radius-sm); box-shadow: var(--card-hover); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: var(--transition); z-index: 100; border: 1px solid var(--border); }
.nav-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { color: var(--text) !important; padding: 10px 18px; font-size: 14px; border-bottom: 1px solid var(--border-light); }
.dropdown-menu a:last-child { border: none; }
.dropdown-menu a:hover { background: var(--border-light); color: var(--primary) !important; }

/* ── Flash messages ────────────────────────────────────────── */
.flash { padding: 12px 20px; margin: 12px 0; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; }
.flash-success { background: #dcfce7; color: #15803d; border-left: 4px solid var(--success); }
.flash-error { background: #fee2e2; color: #dc2626; border-left: 4px solid var(--error); }
.flash-warning { background: #fef9c3; color: #92400e; border-left: 4px solid var(--warning); }
.flash-info { background: #eff6ff; color: #1d4ed8; border-left: 4px solid #3b82f6; }

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 50%, #0d2137 100%);
  color: white; padding: 90px 0 80px; position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 70% 50%, rgba(108,99,255,.25) 0%, transparent 65%);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; background: rgba(108,99,255,.2); border: 1px solid rgba(108,99,255,.4); color: var(--primary-light); padding: 6px 16px; border-radius: 100px; font-size: 13px; font-weight: 600; margin-bottom: 24px; }
.hero h1 { font-family: var(--font-display); font-size: clamp(32px,4.5vw,58px); font-weight: 700; line-height: 1.1; margin-bottom: 22px; }
.hero h1 span { color: var(--primary-light); }
.hero p { font-size: 17px; color: rgba(255,255,255,.78); line-height: 1.7; margin-bottom: 36px; max-width: 480px; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(10px); transition: var(--transition); }
.hero-card:hover { transform: translateY(-4px); background: rgba(108,99,255,.15); }
.hero-card-icon { font-size: 32px; margin-bottom: 10px; }
.hero-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.hero-card p { font-size: 12px; color: rgba(255,255,255,.6); }
.hero-stats { display: flex; gap: 32px; margin-top: 24px; }
.hero-stat strong { display: block; font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--primary-light); }
.hero-stat span { font-size: 13px; color: rgba(255,255,255,.6); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 26px; border-radius: 100px; font-weight: 600; font-size: 15px; cursor: pointer; transition: var(--transition); border: 2px solid transparent; text-decoration: none; }
.btn-primary { background: var(--primary); color: white !important; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,99,255,.4); }
.btn-outline { background: transparent; border-color: rgba(255,255,255,.4); color: white !important; }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-outline-dark { background: transparent; border-color: var(--primary); color: var(--primary) !important; }
.btn-outline-dark:hover { background: var(--primary); color: white !important; }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-danger { background: var(--error); color: white !important; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: white !important; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled, .btn.loading { opacity: .6; cursor: not-allowed; }

/* ── Section styles ────────────────────────────────────────── */
.section { padding: 72px 0; }
.section-alt { background: var(--border-light); }
.section-header { text-align: center; margin-bottom: 52px; }
.section-eyebrow { color: var(--primary); font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 12px; display: block; }
.section-title { font-family: var(--font-display); font-size: clamp(26px,3.5vw,40px); font-weight: 700; color: var(--navy); line-height: 1.2; margin-bottom: 14px; }
.section-subtitle { color: var(--text-muted); font-size: 17px; max-width: 580px; margin: 0 auto; }

/* ── Product Cards ─────────────────────────────────────────── */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.product-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
  display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--card-hover); transform: translateY(-4px); border-color: rgba(108,99,255,.25); }
.product-img { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--border-light); }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .product-img img { transform: scale(1.06); }
.product-badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; gap: 6px; }
.badge { padding: 4px 10px; border-radius: 100px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.badge-featured { background: var(--primary); color: white; }
.badge-sale { background: var(--accent); color: white; }
.badge-digital { background: #0ea5e9; color: white; }
.badge-new { background: var(--success); color: white; }
.product-actions { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 8px; opacity: 0; transform: translateX(10px); transition: var(--transition); }
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.product-action-btn { width: 36px; height: 36px; background: white; border: 1px solid var(--border); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; transition: var(--transition); box-shadow: 0 2px 8px rgba(0,0,0,.1); }
.product-action-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.product-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.product-category { font-size: 11px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-bottom: 6px; }
.product-name { font-family: var(--font-display); font-size: 16px; font-weight: 600; color: var(--navy); margin-bottom: 8px; line-height: 1.4; }
.product-name a { color: inherit !important; }
.product-name a:hover { color: var(--primary) !important; }
.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 12px; }
.stars { color: #f59e0b; font-size: 13px; }
.rating-count { font-size: 12px; color: var(--text-light); }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border-light); }
.product-price { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: var(--navy); }
.product-price .original { font-size: 14px; color: var(--text-light); text-decoration: line-through; font-weight: 400; margin-left: 6px; }
.add-to-cart-btn { padding: 9px 16px; background: var(--primary); color: white !important; border: none; border-radius: 100px; font-size: 13px; font-weight: 600; cursor: pointer; transition: var(--transition); }
.add-to-cart-btn:hover { background: var(--primary-dark); transform: scale(1.03); }

/* ── Category Cards ────────────────────────────────────────── */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px; }
.category-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px 18px; text-align: center; transition: var(--transition); cursor: pointer; }
.category-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow); transform: translateY(-3px); }
.category-card a { color: var(--text) !important; display: block; }
.category-icon { font-size: 36px; margin-bottom: 12px; }
.category-name { font-weight: 600; font-size: 14px; color: var(--navy); margin-bottom: 4px; }
.category-count { font-size: 12px; color: var(--text-light); }

/* ── Why us / Features ─────────────────────────────────────── */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 28px; }
.feature-card { padding: 28px; border-radius: var(--radius); background: var(--bg-white); border: 1px solid var(--border); text-align: center; }
.feature-card:hover { border-color: var(--primary); box-shadow: var(--card-shadow); }
.feature-icon { width: 64px; height: 64px; background: linear-gradient(135deg, rgba(108,99,255,.1), rgba(108,99,255,.2)); border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 18px; }
.feature-title { font-family: var(--font-display); font-weight: 600; font-size: 17px; margin-bottom: 8px; color: var(--navy); }
.feature-desc { color: var(--text-muted); font-size: 14px; line-height: 1.6; }

/* ── Cart / Checkout ───────────────────────────────────────── */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.cart-table th, .cart-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--border-light); }
.cart-table th { background: var(--border-light); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; }
.cart-table tr:last-child td { border: none; }
.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-product img { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius-sm); flex-shrink: 0; }
.cart-product-info strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.cart-qty-input { width: 65px; padding: 6px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: center; font-size: 15px; }
.order-summary { background: var(--bg-white); border-radius: var(--radius); padding: 28px; box-shadow: var(--card-shadow); border: 1px solid var(--border); position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 15px; border-bottom: 1px solid var(--border-light); }
.summary-row:last-of-type { border: none; }
.summary-total { font-weight: 700; font-size: 18px; color: var(--navy); }

/* ── Payment Methods ───────────────────────────────────────── */
.payment-methods { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.payment-method { border: 2px solid var(--border); border-radius: var(--radius-sm); padding: 16px 20px; cursor: pointer; transition: var(--transition); position: relative; }
.payment-method.active { border-color: var(--primary); background: rgba(108,99,255,.04); }
.payment-method.disabled { opacity: .5; cursor: not-allowed; }
.payment-method label { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.payment-method.disabled label { cursor: not-allowed; }
.payment-icon { font-size: 24px; }
.payment-info strong { display: block; font-weight: 600; font-size: 15px; }
.payment-info small { color: var(--text-muted); font-size: 12px; }
.payment-unavailable { position: absolute; top: 10px; right: 14px; background: var(--warning); color: white; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 700; }

/* ── Bitcoin Section ───────────────────────────────────────── */
.btc-payment-box { background: #fffbeb; border: 2px solid #f59e0b; border-radius: var(--radius); padding: 24px; margin-top: 20px; }
.btc-payment-box h4 { color: #92400e; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.btc-address-box { background: white; border: 1px solid #f59e0b; border-radius: var(--radius-sm); padding: 14px; font-family: monospace; font-size: 13px; word-break: break-all; margin: 10px 0; }
.btc-amount { font-size: 22px; font-weight: 700; color: #f59e0b; }
.btc-steps { margin-top: 14px; }
.btc-steps li { padding: 6px 0; font-size: 14px; color: var(--text); padding-left: 20px; position: relative; }
.btc-steps li::before { content: counter(step); counter-increment: step; position: absolute; left: 0; color: var(--primary); font-weight: 700; }
.btc-steps { counter-reset: step; }
.btc-timer { display: flex; align-items: center; gap: 8px; margin-top: 14px; color: #92400e; font-size: 13px; font-weight: 600; }
.qr-code { text-align: center; margin: 14px 0; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form-label.required::after { content: ' *'; color: var(--error); }
.form-control { width: 100%; padding: 11px 16px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 15px; transition: var(--transition); outline: none; background: var(--bg-white); color: var(--text); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(108,99,255,.1); }
.form-control.error { border-color: var(--error); }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--error); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-check { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.form-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }

/* ── Auth pages ────────────────────────────────────────────── */
.auth-page { min-height: 100vh; background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.auth-card { background: white; border-radius: var(--radius-lg); padding: 44px 40px; width: 100%; max-width: 440px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.auth-logo { text-align: center; margin-bottom: 32px; }
.auth-title { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--navy); text-align: center; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-muted); font-size: 14px; margin-bottom: 28px; }

/* ── Breadcrumb ────────────────────────────────────────────── */
.breadcrumb { padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 32px; }
.breadcrumb ul { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li:last-child { color: var(--text); font-weight: 500; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 40px; }
.pagination a, .pagination span { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; transition: var(--transition); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination span.current { background: var(--primary); color: white; border-color: var(--primary); }

/* ── Newsletter section ────────────────────────────────────── */
.newsletter-section { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); padding: 56px 0; }
.newsletter-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.newsletter-text h3 { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: white; margin-bottom: 6px; }
.newsletter-text p { color: rgba(255,255,255,.8); font-size: 15px; }
.newsletter-form { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; position: relative; }
.newsletter-form input { padding: 13px 22px; border: none; border-radius: 100px; font-size: 15px; width: 320px; outline: none; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.newsletter-form button { padding: 13px 28px; background: var(--navy); color: white; border: none; border-radius: 100px; font-weight: 600; cursor: pointer; transition: var(--transition); white-space: nowrap; }
.newsletter-form button:hover { background: #000; }
.newsletter-msg { width: 100%; font-size: 13px; padding: 4px 0; }
.newsletter-msg.success { color: #dcfce7; }
.newsletter-msg.error { color: #fca5a5; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer { background: var(--navy); color: rgba(255,255,255,.75); padding: 60px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand .logo { color: white !important; margin-bottom: 14px; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-logo .logo-text { background: linear-gradient(135deg, white, var(--primary-light)); -webkit-background-clip: text; background-clip: text; }
.social-links { display: flex; gap: 14px; margin-top: 18px; }
.social-links a { width: 38px; height: 38px; background: rgba(255,255,255,.08); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.8) !important; font-weight: 700; transition: var(--transition); }
.social-links a:hover { background: var(--primary); }
.footer-col h4 { color: white; font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul a { color: rgba(255,255,255,.65); font-size: 14px; transition: var(--transition); }
.footer-col ul a:hover { color: var(--primary-light); }
.payment-badges { display: flex; gap: 10px; margin-top: 18px; }
.payment-badges span { padding: 6px 12px; background: rgba(255,255,255,.08); border-radius: var(--radius-sm); font-size: 13px; font-weight: 600; color: white; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }

/* ── Customer Dashboard ────────────────────────────────────── */
.dashboard-layout { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.dashboard-sidebar { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; position: sticky; top: 100px; }
.sidebar-profile { padding: 24px; text-align: center; background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: white; }
.sidebar-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; margin: 0 auto 12px; overflow: hidden; }
.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-name { font-weight: 700; font-size: 16px; }
.sidebar-email { font-size: 12px; opacity: .75; margin-top: 2px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 13px 20px; color: var(--text); font-size: 14px; font-weight: 500; border-bottom: 1px solid var(--border-light); transition: var(--transition); }
.sidebar-nav a:hover, .sidebar-nav a.active { color: var(--primary); background: rgba(108,99,255,.05); }
.sidebar-nav a .nav-icon { font-size: 18px; width: 24px; text-align: center; }
.dashboard-content { }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 18px; margin-bottom: 28px; }
.stat-card { background: var(--bg-white); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; text-align: center; }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* ── Order status badges ───────────────────────────────────── */
.status-badge { padding: 4px 12px; border-radius: 100px; font-size: 12px; font-weight: 600; }
.status-pending { background: #fef9c3; color: #92400e; }
.status-paid, .status-completed, .status-delivered { background: #dcfce7; color: #15803d; }
.status-processing, .status-shipped { background: #dbeafe; color: #1d4ed8; }
.status-cancelled, .status-refunded { background: #fee2e2; color: #dc2626; }
.status-payment_pending { background: #ffedd5; color: #c2410c; }

/* ── Tables ────────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; background: var(--bg-white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--card-shadow); }
.data-table th { background: var(--border-light); padding: 14px 18px; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); font-weight: 600; text-align: left; }
.data-table td { padding: 14px 18px; font-size: 14px; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
.data-table tr:last-child td { border: none; }
.data-table tr:hover td { background: #fafbff; }

/* ── Product detail ────────────────────────────────────────── */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.product-gallery { }
.gallery-main img { width: 100%; border-radius: var(--radius); object-fit: cover; max-height: 420px; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.gallery-thumbs img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; }
.gallery-thumbs img.active { border-color: var(--primary); }
.product-detail-info h1 { font-family: var(--font-display); font-size: clamp(22px,3vw,32px); font-weight: 700; color: var(--navy); margin-bottom: 14px; line-height: 1.2; }
.product-detail-price { font-size: 32px; font-weight: 700; color: var(--primary); margin: 16px 0; }
.product-detail-price .original { font-size: 20px; color: var(--text-light); text-decoration: line-through; font-weight: 400; margin-left: 10px; }
.qty-selector { display: flex; align-items: center; gap: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; width: fit-content; }
.qty-btn { width: 40px; height: 42px; background: var(--border-light); border: none; font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.qty-btn:hover { background: var(--primary); color: white; }
.qty-input { width: 60px; height: 42px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 16px; font-weight: 600; outline: none; }

/* ── Admin styles ──────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar { width: 260px; background: var(--navy); color: white; flex-shrink: 0; position: fixed; top: 0; bottom: 0; overflow-y: auto; z-index: 100; }
.admin-logo { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.1); font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.admin-logo span { color: var(--primary-light); }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 20px; color: rgba(255,255,255,.75); font-size: 14px; font-weight: 500; transition: var(--transition); }
.admin-nav a:hover, .admin-nav a.active { color: white; background: rgba(108,99,255,.25); }
.admin-nav .nav-section { padding: 16px 20px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.4); font-weight: 600; }
.admin-main { margin-left: 260px; flex: 1; display: flex; flex-direction: column; }
.admin-topbar { background: white; border-bottom: 1px solid var(--border); padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 50; }
.admin-content { padding: 28px; flex: 1; }
.page-title { font-family: var(--font-display); font-size: 24px; font-weight: 700; color: var(--navy); }
.admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px,1fr)); gap: 20px; margin-bottom: 28px; }
.admin-stat { background: white; border-radius: var(--radius); padding: 24px; border: 1px solid var(--border); display: flex; align-items: center; gap: 18px; box-shadow: var(--card-shadow); }
.admin-stat-icon { width: 54px; height: 54px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }
.admin-stat-icon.purple { background: rgba(108,99,255,.12); }
.admin-stat-icon.green { background: rgba(34,197,94,.12); }
.admin-stat-icon.orange { background: rgba(245,158,11,.12); }
.admin-stat-icon.blue { background: rgba(59,130,246,.12); }
.admin-stat-value { font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; }
.admin-stat-label { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ── Alerts ────────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: 14px; border-left: 4px solid; }
.alert-success { background: #dcfce7; color: #15803d; border-color: var(--success); }
.alert-danger { background: #fee2e2; color: #dc2626; border-color: var(--error); }
.alert-warning { background: #fef9c3; color: #92400e; border-color: var(--warning); }
.alert-info { background: #eff6ff; color: #1d4ed8; border-color: #3b82f6; }

/* ── Empty states ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 56px; margin-bottom: 16px; }
.empty-state h3 { font-size: 20px; font-weight: 600; margin-bottom: 8px; color: var(--navy); }
.empty-state p { color: var(--text-muted); margin-bottom: 22px; }

/* ── Page header ───────────────────────────────────────────── */
.page-hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%); color: white; padding: 56px 0 44px; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(28px,4vw,44px); font-weight: 700; margin-bottom: 10px; }
.page-hero p { color: rgba(255,255,255,.75); font-size: 16px; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-visual { display: none; }
  .cart-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail { grid-template-columns: 1fr; }
  .dashboard-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .header-search { order: 3; width: 100%; max-width: none; }
  .header-actions .action-label { display: none; }
  .hamburger { display: block; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-inner { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: 14px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
  .dropdown-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: rgba(255,255,255,.05); }
  .dropdown-menu a { color: rgba(255,255,255,.75) !important; }
  .form-row { grid-template-columns: 1fr; }
  .newsletter-inner { flex-direction: column; text-align: center; }
  .newsletter-form input { width: 100%; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .admin-sidebar { transform: translateX(-100%); transition: var(--transition); }
  .admin-sidebar.open { transform: translateX(0); }
  .admin-main { margin-left: 0; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 48px 0; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .hero { padding: 56px 0; }
  .auth-card { padding: 28px 22px; }
}

/* ── Utilities ─────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--error); }
.fw-bold { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.gap-4 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-100 { width: 100%; }
.card { background: var(--bg-white); border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: var(--card-shadow); }
.divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid rgba(108,99,255,.3); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
