/* LiveOptical — Frontend CSS */

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

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #64748b;
  --success: #16a34a;
  --warning: #ca8a04;
  --danger: #dc2626;
  --text: #1e293b;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --bg: #f8fafc;
  --white: #fff;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  /* theme-overridable */
  --nav-bg: #1e293b;
  --nav-text: #cbd5e1;
  --nav-text-hover: #ffffff;
  --hero-from: #1e40af;
  --hero-to: #7c3aed;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--text); background: var(--bg); line-height: 1.6; }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
/* Inside site-body, max-width centering is already handled */
.site-main .container { max-width: none; margin: 0; }

/* Buttons */
.btn { display: inline-block; padding: .5rem 1.25rem; border-radius: var(--radius); border: none; cursor: pointer; font-size: .9rem; font-weight: 500; transition: background .15s; text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--secondary); color: #fff; }
.btn-secondary:hover { opacity: .9; color: #fff; text-decoration: none; }
.btn-block { display: block; width: 100%; text-align: center; margin-bottom: .5rem; }
.btn-large { padding: .75rem 2rem; font-size: 1rem; }
.btn-add-cart { background: var(--primary); color: #fff; border: none; padding: .4rem .8rem; border-radius: var(--radius); cursor: pointer; width: 100%; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; padding: 0; }
.btn-remove { background: none; border: none; color: var(--danger); font-size: 1.2rem; cursor: pointer; }
.btn-mirror { background: #f1f5f9; border: 1px solid var(--border); color: var(--text); }
.btn-mirror:hover { background: var(--border); }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ═══════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════ */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-top { padding: .85rem 0; border-bottom: 1px solid var(--border); }
.header-top .container { display: flex; align-items: center; gap: 1.5rem; }
.logo { font-size: 1.5rem; font-weight: 700; color: var(--text); letter-spacing: -.02em; }
.logo span { color: var(--primary); }
.header-search { flex: 1; display: flex; }
.header-search input {
  flex: 1;
  padding: .55rem 1rem;
  border: 1px solid #cbd5e1;
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
  font-size: .9rem;
  outline: none;
  transition: border-color .15s;
}
.header-search input:focus { border-color: var(--primary); }
.header-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: .55rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  transition: background .15s;
}
.header-search button:hover { background: var(--primary-dark); }
.header-actions { display: flex; align-items: center; gap: 1rem; font-size: .875rem; white-space: nowrap; }
.header-actions a { color: var(--secondary); }
.header-actions a:hover { color: var(--primary); text-decoration: none; }
.cart-btn {
  background: var(--primary);
  color: #fff !important;
  border: none;
  padding: .45rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 600;
  font-family: inherit;
  transition: background .15s;
}
.cart-btn:hover { background: var(--primary-dark); text-decoration: none; }

/* ═══════════════════════════════════════════════
   TOP NAVIGATION — horizontal multi-level dropdown
═══════════════════════════════════════════════ */
.main-nav {
  background: var(--nav-bg);
  position: relative;
  z-index: 99;
  border-bottom: 3px solid var(--primary);
}
.main-nav .container { display: flex; padding: 0 1rem; }
.top-nav-list { list-style: none; display: flex; margin: 0; padding: 0; }

/* Top-level nav items */
.top-nav-item { position: relative; }
.top-nav-item > a {
  display: flex;
  align-items: center;
  gap: .35rem;
  padding: .85rem 1.2rem;
  color: #e2e8f0;
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;        /* overlap nav border-bottom */
  transition: color .15s, border-color .15s;
}
.top-nav-item > a:hover {
  color: #fff;
  border-bottom-color: #fff;
  text-decoration: none;
}
/* Down-arrow indicator for items with children */
.top-nav-item.has-dropdown > a::after {
  content: '▾';
  font-size: .7rem;
  opacity: .7;
  line-height: 1;
}

/* ── First-level dropdown panel ── */
.top-nav-item .dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 3px);   /* clear the nav border */
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: 3px solid var(--primary);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 8px 24px rgba(0,0,0,.12), 0 2px 6px rgba(0,0,0,.06);
  list-style: none;
  margin: 0;
  padding: .4rem 0;
  z-index: 200;
}
.top-nav-item:hover > .dropdown { display: block; }

/* Dropdown list items */
.top-nav-item .dropdown li { position: relative; }
.top-nav-item .dropdown li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem 1.1rem;
  color: #374151;
  font-size: .85rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .1s, color .1s, border-color .1s;
}
.top-nav-item .dropdown li a:hover {
  background: #eff6ff;
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}
/* Right-arrow on items that have a fly-out */
.top-nav-item .dropdown li.has-dropdown > a::after {
  content: '›';
  font-size: 1rem;
  color: #9ca3af;
  line-height: 1;
}
.top-nav-item .dropdown li.has-dropdown > a:hover::after { color: var(--primary); }

/* ── Second-level fly-out panel ── */
.top-nav-item .dropdown .dropdown-right {
  display: none;
  position: absolute;
  top: -4px;
  left: calc(100% + 1px);
  min-width: 220px;
  background: #fff;
  border: 1px solid #d1d5db;
  border-top: 3px solid var(--primary);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 6px 8px 24px rgba(0,0,0,.12);
  list-style: none;
  margin: 0;
  padding: .4rem 0;
  z-index: 201;
}
.top-nav-item .dropdown li.has-dropdown:hover > .dropdown-right { display: block; }

/* ═══════════════════════════════════════════════
   FLASH MESSAGES
═══════════════════════════════════════════════ */
.flash-messages { padding-top: 1rem; }

/* ═══════════════════════════════════════════════
   SITE BODY LAYOUT — sidebar + content
═══════════════════════════════════════════════ */
.site-body {
  display: flex;
  align-items: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 1.25rem;
}
.site-sidebar {
  width: 215px;
  flex-shrink: 0;
  padding: 1.25rem 0 2rem;
}
.site-main { flex: 1; min-width: 0; min-height: 70vh; }

/* ═══════════════════════════════════════════════
   SIDE NAVIGATION — collapsible category tree
═══════════════════════════════════════════════ */
.side-nav-box {
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* Box title bar */
.side-nav-title {
  background: var(--nav-bg);
  color: #94a3b8;
  padding: .7rem 1rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Root-level list */
.side-nav { list-style: none; margin: 0; padding: 0; }

/* Every nav item */
.side-nav-item { border-bottom: 1px solid #e5e7eb; }
.side-nav-item:last-child { border-bottom: none; }

/* Row = link + optional toggle */
.side-nav-row {
  display: flex;
  align-items: stretch;
  min-height: 38px;
}

/* Category link */
.side-nav-link {
  flex: 1;
  display: flex;
  align-items: center;
  padding: .5rem .9rem;
  color: #374151;
  font-size: .875rem;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s, border-color .12s;
}
.side-nav-link:hover {
  background: #eff6ff;
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}

/* Toggle button — chevron arrow */
.side-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  background: none;
  border: none;
  border-left: 1px solid #e5e7eb;
  color: #9ca3af;
  cursor: pointer;
  font-size: .65rem;
  transition: background .12s, color .12s, transform .2s;
  padding: 0;
}
/* Right-pointing triangle as chevron */
.side-nav-toggle::before { content: '▶'; }
.side-nav-toggle:hover { background: #f1f5f9; color: var(--primary); }
/* Rotate to down-pointing when open */
.side-nav-item.is-open > .side-nav-row > .side-nav-toggle { transform: rotate(90deg); color: var(--primary); }

/* Child list — hidden by default */
.side-nav-children {
  list-style: none;
  margin: 0;
  padding: 0;
  display: none;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.side-nav-item.is-open > .side-nav-children { display: block; }

/* Child items */
.side-nav-children > .side-nav-item { border-bottom: 1px solid #eef0f2; }
.side-nav-children > .side-nav-item:last-child { border-bottom: none; }
.side-nav-children .side-nav-link {
  padding-left: 1.6rem;
  font-size: .825rem;
  color: #4b5563;
}
.side-nav-children .side-nav-toggle { border-left-color: #eef0f2; }

/* Grandchild items */
.side-nav-children .side-nav-children { background: #f1f5f9; border-top: none; }
.side-nav-children .side-nav-children .side-nav-item { border-bottom: 1px solid #e9ecef; }
.side-nav-children .side-nav-children .side-nav-link {
  padding-left: 2.4rem;
  font-size: .8rem;
  color: #6b7280;
}

/* Footer */
.site-footer { background: var(--text); color: #94a3b8; margin-top: 4rem; padding: 3rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer-col h4 { color: var(--white); margin-bottom: .75rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: .25rem; }
.footer-col a { color: #94a3b8; }
.footer-col a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #334155; padding-top: 1rem; text-align: center; font-size: .8rem; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%); color: #fff; padding: 5rem 0; text-align: center; }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; }
.hero p { font-size: 1.2rem; margin-bottom: 2rem; opacity: .9; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; margin: 2rem 0; }
.product-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.product-card:hover { transform: translateY(-2px); }
.product-image { aspect-ratio: 4/3; overflow: hidden; background: var(--bg); }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-info { padding: 1rem; }
.product-info h3 { font-size: .95rem; margin-bottom: .25rem; }
.product-info .brand { font-size: .8rem; color: var(--text-muted); text-transform: uppercase; }
.pricing { display: flex; align-items: baseline; gap: .5rem; }
.price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.list-price { font-size: .9rem; color: var(--text-muted); text-decoration: line-through; }
.savings { font-size: .8rem; color: var(--success); }
.product-actions { padding: .75rem 1rem; border-top: 1px solid var(--border); display: flex; gap: .5rem; }
.badge { display: inline-block; padding: .2rem .5rem; border-radius: 4px; font-size: .75rem; font-weight: 600; }
.badge-featured { background: #fef3c7; color: #92400e; }

/* Categories */
.categories-section, .featured-products, .news-section { padding: 3rem 0; }
.categories-section h2, .featured-products h2, .news-section h2 { margin-bottom: 1.5rem; font-size: 1.5rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.category-card { background: var(--white); border-radius: var(--radius); padding: 1.5rem 1rem; text-align: center; box-shadow: var(--shadow); color: var(--text); }
.category-card:hover { background: var(--primary); color: #fff; text-decoration: none; }

/* Virtual Mirror Promo */
.virtual-mirror-promo { background: var(--white); padding: 3rem 0; }
.mirror-promo-content { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.mirror-promo-text h2 { font-size: 1.8rem; margin-bottom: 1rem; }
.mirror-promo-text p { color: var(--text-muted); margin-bottom: 1.5rem; }

/* News */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.news-card { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.news-card h3 { margin-bottom: .5rem; }
.news-card small { color: var(--text-muted); }

/* Category Page */
.category-header { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0 1rem; }
.category-header h1 { font-size: 1.5rem; }
.category-controls { display: flex; align-items: center; gap: 1rem; font-size: .875rem; color: var(--text-muted); }
.category-controls select { padding: .4rem; border-radius: var(--radius); border: 1px solid var(--border); }
.category-description { margin-bottom: 1rem; color: var(--text-muted); line-height: 1.6; }
/* Subcategory chips */
.subcategory-bar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.subcategory-chip { display: inline-block; padding: .3rem .9rem; border: 1px solid var(--border); border-radius: 2rem; font-size: .8rem; color: var(--text); background: var(--white); }
.subcategory-chip:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
/* Filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-bottom: 1rem; font-size: .85rem; }
.filter-label { color: var(--text-muted); margin-right: .25rem; }
.filter-chip { display: inline-block; padding: .2rem .75rem; border: 1px solid var(--border); border-radius: 2rem; color: var(--text); background: var(--white); cursor: pointer; }
.filter-chip:hover, .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); text-decoration: none; }
.filter-chip-clear { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }
.filter-chip-clear:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
/* Empty state */
.empty-state { text-align: center; padding: 3rem 0; color: var(--text-muted); }
.empty-state p { margin-bottom: 1rem; }
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.pagination a { display: inline-block; padding: .4rem .8rem; border: 1px solid var(--border); border-radius: var(--radius); }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Product Detail */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 2rem 0; }
.main-image img { width: 100%; border-radius: var(--radius); }
.image-thumbs { display: flex; gap: .5rem; margin-top: .5rem; }
.thumb { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius); cursor: pointer; border: 2px solid var(--border); }
.thumb:hover { border-color: var(--primary); }
.product-details-info .brand { font-size: .85rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: .25rem; }
.product-details-info h1 { font-size: 1.8rem; margin-bottom: .5rem; }
.product-pricing { margin: 1rem 0; font-size: 1.4rem; }
.product-specs { background: var(--bg); padding: 1rem; border-radius: var(--radius); margin: 1rem 0; font-size: .9rem; }
.product-specs div { padding: .25rem 0; }
.option-group { margin-bottom: 1rem; }
.option-group label { display: block; font-weight: 600; margin-bottom: .25rem; }
.option-group select { width: 100%; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); }
.variation-selectors { margin-bottom: 1rem; }
.variation-group { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.variation-group label { min-width: 90px; font-size: .95rem; }
.variation-group select { flex: 1; max-width: 260px; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem; }
.qty-field { display: flex; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.qty-field input { width: 80px; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius); }
.add-to-cart-form { margin-top: 1rem; }
.product-tabs { padding: 2rem 0; }
.tab-nav { display: flex; gap: 0; border-bottom: 2px solid var(--border); margin-bottom: 1.5rem; }
.tab-btn { background: none; border: none; padding: .75rem 1.5rem; cursor: pointer; font-size: .95rem; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab-btn.active { border-bottom-color: var(--primary); color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.review { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.review-header { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; }
.rating { color: #f59e0b; }
.review-form { margin-top: 2rem; padding: 1.5rem; background: var(--bg); border-radius: var(--radius); }
.review-form h3 { margin-bottom: 1rem; }
.related-products { padding: 2rem 0; }
.related-products h2 { margin-bottom: 1rem; }
.product-specification { padding: 0 0 2rem; }
.product-specification h2 { margin-bottom: 1rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table tr:nth-child(odd) { background: var(--bg); }
.spec-table td { padding: .65rem 1rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.spec-table .spec-label { width: 30%; font-weight: 600; color: var(--text-muted); }
.spec-table .spec-value p:first-child { margin-top: 0; }
.spec-table .spec-value p:last-child { margin-bottom: 0; }

/* Cart */
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 2rem; padding: 2rem 0; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.cart-table th { background: var(--bg); }
.cart-product { display: flex; align-items: center; gap: 1rem; }
.cart-product img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius); }
.cart-product input[type=number] { width: 70px; padding: .4rem; border: 1px solid var(--border); border-radius: var(--radius); }
.cart-summary { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); align-self: start; }
.summary-row, .summary-total { display: flex; justify-content: space-between; margin-bottom: .75rem; }
.summary-total { font-size: 1.1rem; border-top: 2px solid var(--border); padding-top: .75rem; margin-top: .75rem; }
.empty-cart { text-align: center; padding: 4rem 0; }
/* Qty stepper (cart page + mini-cart) */
.qty-control { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn { background: none; border: none; width: 32px; height: 32px; cursor: pointer; font-size: 1rem; color: var(--secondary); display: flex; align-items: center; justify-content: center; transition: background .1s; }
.qty-btn:hover { background: var(--bg); }
.qty-value { min-width: 36px; text-align: center; font-size: .9rem; font-weight: 500; padding: 0 .25rem; }
/* Coupon row */
.coupon-row { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
/* cart-btn is styled in the Header section above */

/* Checkout */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; padding: 2rem 0; }
.checkout-section { background: var(--white); padding: 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.checkout-section h2 { font-size: 1.1rem; margin-bottom: 1rem; border-bottom: 1px solid var(--border); padding-bottom: .5rem; }
.checkout-summary { background: var(--white); padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); align-self: start; position: sticky; top: 80px; }
.checkout-summary h3 { margin-bottom: 1rem; }
.checkout-item { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); font-size: .9rem; }
.checkout-total { display: flex; justify-content: space-between; margin-top: 1rem; font-size: 1rem; }
/* Progress steps */
.checkout-steps { display: flex; align-items: center; gap: .5rem; padding: 1.25rem 0 .25rem; font-size: .85rem; }
.checkout-steps .step { color: var(--primary); font-weight: 600; }
.checkout-steps .step-sep { color: var(--text-muted); }
/* Payment options */
.payment-option { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem; border: 2px solid var(--border); border-radius: var(--radius); cursor: pointer; margin-bottom: .75rem; transition: border-color .15s; }
.payment-option input { margin-top: .2rem; }
.payment-option.selected { border-color: var(--primary); background: #eff6ff; }
.payment-option-content { flex: 1; }
.payment-icons img { height: 24px; margin-right: .5rem; }
/* Card fields block */
.card-fields-wrap { background: var(--bg); border-radius: var(--radius); padding: 1rem; margin-top: .75rem; }
/* Test card notice */
.test-card-notice { background: #fef9c3; border: 1px solid #fde047; border-radius: 6px; padding: .6rem .9rem; font-size: .85rem; color: #713f12; margin-bottom: 1rem; }
/* Terms + submit */
.checkout-terms { margin: 1rem 0; display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }

/* User Account */
.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; padding: 2rem 0; }
.account-sidebar ul { list-style: none; }
.account-sidebar ul li { border-bottom: 1px solid var(--border); }
.account-sidebar ul li a { display: block; padding: .75rem; color: var(--text); }
.account-sidebar ul li a:hover, .account-sidebar ul li a.active { color: var(--primary); background: #eff6ff; text-decoration: none; }
.account-sidebar h3 { font-size: 1.1rem; margin-bottom: .75rem; }
.auth-form { max-width: 420px; margin: 3rem auto; background: var(--white); padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.auth-form h1 { margin-bottom: 1.5rem; }
.auth-links { margin-top: 1rem; text-align: center; font-size: .9rem; display: flex; flex-direction: column; gap: .5rem; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: .25rem; font-weight: 500; font-size: .9rem; }
.form-group input[type=text],
.form-group input[type=email],
.form-group input[type=password],
.form-group input[type=number],
.form-group input[type=tel],
.form-group input[type=search],
.form-group select,
.form-group textarea { width: 100%; padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem; }
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }

/* Tables */
.orders-table { width: 100%; border-collapse: collapse; }
.orders-table th, .orders-table td { padding: .75rem; text-align: left; border-bottom: 1px solid var(--border); }
.orders-table th { background: var(--bg); font-size: .85rem; }

/* Breadcrumb */
.breadcrumb { padding: 1rem 0; font-size: .85rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }

/* Order Complete */
.order-complete { text-align: center; padding: 4rem 1rem; max-width: 600px; margin: 0 auto; }
.success-icon { font-size: 4rem; color: var(--success); }
.order-summary-box { background: var(--bg); padding: 1.5rem; border-radius: var(--radius); text-align: left; margin: 2rem 0; }
.order-item-row, .order-total-row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px solid var(--border); }
.next-steps { display: flex; gap: 1rem; justify-content: center; }

/* Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); }
.modal-content { position: relative; z-index: 1; background: var(--white); border-radius: var(--radius); padding: 2rem; max-width: 900px; width: 95%; max-height: 90vh; overflow: auto; box-shadow: 0 25px 50px rgba(0,0,0,.25); }

/* Virtual Mirror */
.mirror-wrapper { display: grid; grid-template-columns: 1fr 340px; gap: 1.5rem; }
.face-container { position: relative; width: 100%; max-width: 400px; }
.face-container .face img { width: 100%; border-radius: var(--radius); }
.frame-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.frame-overlay img { width: 60%; position: absolute; top: 30%; left: 20%; }
.input-tabs { display: flex; margin-bottom: 1rem; border-bottom: 2px solid var(--border); }
.input-tab { background: none; border: none; padding: .5rem 1rem; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.input-tab.active { border-bottom-color: var(--primary); color: var(--primary); }
.input-panel { display: none; }
.input-panel.active { display: block; }
.sample-face-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .25rem; }
.sample-face-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.sample-face-grid img:hover, .sample-face-grid img.active { border-color: var(--primary); }
.gender-toggle { display: flex; gap: .5rem; margin-bottom: .75rem; }
.gender-btn { padding: .25rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); background: none; cursor: pointer; }
.gender-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.frame-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .75rem; }
.frame-grid img { width: 100%; border-radius: 4px; cursor: pointer; border: 2px solid transparent; background: var(--bg); }
.frame-grid img:hover, .frame-grid img.active { border-color: var(--primary); }

/* Static page */
.static-page { max-width: 780px; margin: 2rem auto; }
.static-page h1 { margin-bottom: 1rem; }
.page-lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.page-body { line-height: 1.8; }
.page-body h2, .page-body h3 { margin: 1.5rem 0 .5rem; }
.page-body p { margin-bottom: 1rem; }
.page-body ul, .page-body ol { margin: .5rem 0 1rem 1.5rem; }
.page-body li { margin-bottom: .25rem; }

/* Status badges */
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger  { background: #fee2e2; color: #991b1b; }
.badge-secondary { background: #f1f5f9; color: #475569; }

@media (max-width: 768px) {
  .category-layout, .product-detail, .cart-layout, .checkout-layout,
  .account-layout, .mirror-promo-content, .mirror-wrapper { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .header-top .container { flex-wrap: wrap; }
  .header-search { order: 3; flex-basis: 100%; }
}
