/* ============================================================
   MATERIAALSHOP — Webshop Design (research-based)
   ============================================================ */

:root {
  --bg:          #f3f4f6;
  --bg-card:     #ffffff;
  --bg-elevated: #ffffff;
  --bg-input:    #eef0f4;
  --text:        #111827;
  --text-2:      #6b7280;
  --text-3:      #9ca3af;
  --border:      #e5e7eb;
  --border-2:    #d1d5db;
  --accent:      #2563eb;
  --accent-h:    #1d4ed8;
  --accent-soft: #eff6ff;
  --success:     #059669;
  --warn:        #d97706;
  --danger:      #dc2626;
  --radius:      10px;
  --radius-sm:   6px;
  --shadow-sm:   0 1px 2px rgba(0,0,0,.06), 0 1px 3px rgba(0,0,0,.08);
  --shadow:      0 2px 8px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.05);
  --shadow-lg:   0 4px 20px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  --announce-h:  38px;
  --nav-h:       64px;
  --subnav-h:    44px;
  --transition:  .18s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg:          #0f1117;
  --bg-card:     #1a1d24;
  --bg-elevated: #22262f;
  --bg-input:    #22262f;
  --text:        #f3f4f6;
  --text-2:      #9ca3af;
  --text-3:      #6b7280;
  --border:      #2d3139;
  --border-2:    #3d4251;
  --accent:      #3b82f6;
  --accent-h:    #60a5fa;
  --accent-soft: rgba(59,130,246,.14);
  --success:     #10b981;
  --warn:        #f59e0b;
  --danger:      #f87171;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.4);
  --shadow:      0 2px 8px rgba(0,0,0,.5);
  --shadow-lg:   0 4px 20px rgba(0,0,0,.6);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
ul { list-style: none; }

/* ---------- Layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
@media (max-width: 640px) { .container { padding: 0 12px; } }

/* ========================================================
   ANNOUNCEMENT BAR
   ======================================================== */
#announce-bar {
  height: var(--announce-h);
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 500;
  gap: 0;
  overflow: hidden;
  position: relative;
  z-index: 1002;
}
.announce-items {
  display: flex;
  align-items: center;
  gap: 32px;
  white-space: nowrap;
}
.announce-item { display: flex; align-items: center; gap: 6px; opacity: .95; }
.announce-sep { opacity: .4; }
@media (max-width: 640px) {
  .announce-items { gap: 20px; }
  .announce-item:nth-child(3),
  .announce-item:nth-child(5) { display: none; }
}

/* ========================================================
   NAVIGATION
   ======================================================== */
#navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.nav-top {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.nav-logo { display: flex; align-items: center; flex-shrink: 0; }
.nav-logo img { height: 34px; width: auto; }

/* Search bar — prominent, center */
.search-bar {
  flex: 1;
  max-width: 560px;
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: 8px;
  height: 44px;
  transition: border-color .15s, box-shadow .15s;
  overflow: hidden;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: var(--bg-card);
}
.search-bar input {
  flex: 1; height: 100%;
  padding: 0 14px;
  border: none; outline: none; background: none;
  font-size: .9rem; color: var(--text);
}
.search-bar input::placeholder { color: var(--text-3); }
.search-btn {
  width: 46px; height: 100%; flex-shrink: 0;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: white; cursor: pointer;
  transition: background var(--transition);
}
.search-btn:hover { background: var(--accent-h); }

.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

.icon-btn {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: var(--bg-card);
  transition: all var(--transition);
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: white;
  border-radius: 50%; width: 17px; height: 17px;
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; font-weight: 800;
  border: 2px solid var(--bg-card);
}
.cart-badge.bump { animation: bump .2s ease; }
@keyframes bump { 0%,100%{transform:scale(1)} 50%{transform:scale(1.4)} }

/* Sub-nav (category bar) */
.nav-sub {
  height: var(--subnav-h);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 20px;
  gap: 0;
  max-width: 1280px;
  margin: 0 auto;
}
.nav-sub::-webkit-scrollbar { display: none; }

.nav-sub-link {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; height: 100%;
  font-size: .85rem; font-weight: 500;
  color: var(--text-2);
  white-space: nowrap; cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  flex-shrink: 0;
}
.nav-sub-link:hover { color: var(--text); border-bottom-color: var(--border-2); }
.nav-sub-link.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 768px) {
  .nav-sub { display: none; }
  .hamburger { display: flex; }
  .search-bar { max-width: none; }
}

/* ========================================================
   HERO
   ======================================================== */
.hero-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 60%, #1d4ed8 100%);
  overflow: hidden;
  position: relative;
}

.hero-section::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0; height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}
[data-theme="dark"] .hero-section::after {
  background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 40px;
  align-items: center;
  padding: 64px 0 80px;
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
  position: relative; z-index: 1;
}

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.9);
  padding: 5px 13px;
  border-radius: 4px;
  font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(1.9rem, 3.5vw, 3rem);
  font-weight: 800; line-height: 1.12;
  letter-spacing: -.03em;
  color: #ffffff;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 1rem; color: rgba(255,255,255,.75);
  line-height: 1.7; margin-bottom: 28px;
  max-width: 420px;
}

.hero-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }

.btn-white {
  background: #ffffff; color: var(--accent);
  font-weight: 700; border: none;
}
.btn-white:hover { background: #f0f9ff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.15); }

.btn-ghost-white {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.3);
}
.btn-ghost-white:hover { background: rgba(255,255,255,.18); color: #fff; }

.hero-usps {
  display: flex; gap: 20px; flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.hero-usp {
  display: flex; align-items: center; gap: 7px;
  font-size: .82rem; color: rgba(255,255,255,.8); font-weight: 500;
}
.hero-usp-icon { font-size: .95rem; }

.hero-visual {
  display: flex; justify-content: center; align-items: center;
  position: relative;
}
.hero-img-wrap {
  width: 100%; max-width: 440px;
  background: rgba(255,255,255,.08);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.12);
  padding: 40px;
  display: flex; align-items: center; justify-content: center;
  aspect-ratio: 1;
}
.hero-img-wrap img {
  width: 80%; height: 80%;
  object-fit: contain;
  filter: drop-shadow(0 16px 40px rgba(0,0,0,.25));
}

.hero-badge {
  position: absolute;
  background: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  font-size: .78rem;
  animation: heroFloat 4s ease-in-out infinite;
}
.hero-badge strong { display: block; font-weight: 700; color: #111; font-size: .82rem; }
.hero-badge span { color: #6b7280; }
.hero-badge-icon { font-size: 1.3rem; }
.hero-badge.tl { top: 8%; left: -5%; animation-delay: 0s; }
.hero-badge.br { bottom: 12%; right: -5%; animation-delay: 2s; }
@keyframes heroFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-7px)} }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding: 40px 20px 64px; gap: 32px; }
  .hero-desc { max-width: 100%; }
  .hero-btns { justify-content: center; }
  .hero-usps { justify-content: center; }
  .hero-visual { order: -1; }
  .hero-badge { display: none; }
  .hero-img-wrap { max-width: 280px; padding: 28px; }
}

/* ========================================================
   TRUST STRIP
   ======================================================== */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 0;
}
@media (max-width: 768px) { .trust-strip { grid-template-columns: repeat(2, 1fr); } }

.trust-item {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid var(--border);
  transition: background var(--transition);
}
.trust-item:last-child { border-right: none; }
.trust-item:hover { background: var(--bg); }

.trust-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 8px; background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}
.trust-title { font-size: .875rem; font-weight: 700; color: var(--text); }
.trust-desc  { font-size: .75rem; color: var(--text-2); margin-top: 1px; }

/* ========================================================
   SECTIONS
   ======================================================== */
.section { padding: 48px 0; }
.section-sm { padding: 28px 0; }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px; gap: 12px;
}
.section-title-wrap {}
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 12px; }
.section-title { font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.section-sub { font-size: .85rem; color: var(--text-2); margin-top: 3px; }

/* ========================================================
   CATEGORY GRID
   ======================================================== */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 14px;
}
@media (max-width: 900px)  { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .cat-grid { grid-template-columns: 1fr 1fr; } }

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}
.cat-card:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-2px); }

.cat-card-img {
  aspect-ratio: 2.5 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 3.5rem;
  position: relative;
  overflow: hidden;
  padding: 20px;
}
.cat-card-img img {
  height: 70%; width: auto; max-width: 80%;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cat-card:hover .cat-card-img img { transform: scale(1.08); }

.cat-card-body { padding: 12px 14px 14px; border-top: 1px solid var(--border); }
.cat-card-name { font-weight: 700; font-size: .93rem; margin-bottom: 3px; }
.cat-card-sub  { font-size: .75rem; color: var(--text-2); }
.cat-card-arrow {
  position: absolute; top: 12px; right: 12px;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: .75rem;
  opacity: 0; transition: opacity var(--transition);
}
.cat-card:hover .cat-card-arrow { opacity: 1; }

/* Category chips (for shop filter) */
.categories-scroll {
  display: flex; gap: 8px; overflow-x: auto;
  padding-bottom: 4px; scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.cat-chip {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 100px;
  border: 1px solid var(--border); background: var(--bg-card);
  font-size: .82rem; font-weight: 500;
  white-space: nowrap; cursor: pointer; flex-shrink: 0;
  transition: all var(--transition);
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); }
.cat-chip.active { background: var(--accent); color: white; border-color: var(--accent); }
.cat-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* ========================================================
   PRODUCT GRID & CARDS
   ======================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  display: flex; flex-direction: column;
  transition: box-shadow var(--transition), border-color var(--transition);
  position: relative;
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--border-2);
}

.product-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  position: relative; overflow: hidden;
}
.product-img-wrap img {
  width: 80%; height: 80%;
  object-fit: contain;
  transition: transform .3s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

.badge {
  position: absolute; top: 8px; left: 8px;
  border-radius: 4px;
  font-size: .65rem; font-weight: 800;
  padding: 2px 7px; letter-spacing: .03em; text-transform: uppercase;
}
.badge-sale     { background: var(--danger); color: white; }
.badge-new      { background: var(--accent); color: white; }
.badge-featured { background: #f59e0b; color: white; }

.wishlist-btn {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; border-radius: 6px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); transition: all var(--transition);
  opacity: 0;
}
.product-card:hover .wishlist-btn { opacity: 1; }
.wishlist-btn:hover, .wishlist-btn.active { color: #ef4444; border-color: #fca5a5; }
.wishlist-btn.active { opacity: 1; }

.product-info {
  padding: 12px 14px 14px;
  display: flex; flex-direction: column; flex: 1;
  border-top: 1px solid var(--border);
}

.product-category {
  font-size: .68rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; margin-bottom: 4px;
}
.product-name {
  font-size: .9rem; font-weight: 600; line-height: 1.4;
  margin-bottom: 6px; flex: 1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-rating { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.stars { color: #f59e0b; font-size: .78rem; }
.rating-count { font-size: .7rem; color: var(--text-3); }

.product-price-row {
  display: flex; align-items: baseline; gap: 6px; margin-bottom: 10px;
}
.price { font-size: 1.15rem; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.price-sale { color: var(--danger); }
.price-orig { font-size: .78rem; color: var(--text-3); text-decoration: line-through; }

.add-btn {
  width: 100%;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: white;
  font-size: .82rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  transition: all var(--transition);
  border: none;
}
.add-btn:hover { background: var(--accent-h); transform: translateY(-1px); }
.add-btn.added { background: var(--success); }
@keyframes addedPop { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

/* ========================================================
   PROMO BANNER
   ======================================================== */
.promo-banner {
  background: linear-gradient(120deg, #1e3a5f 0%, #2563eb 100%);
  border-radius: var(--radius);
  padding: 40px 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; overflow: hidden; position: relative;
}
.promo-banner::before {
  content: ''; position: absolute;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(255,255,255,.05); right: -80px; top: -80px;
}
.promo-title { font-size: 1.6rem; font-weight: 800; color: white; margin-bottom: 6px; position: relative; z-index: 1; }
.promo-desc  { font-size: .9rem; color: rgba(255,255,255,.75); position: relative; z-index: 1; }
@media (max-width: 640px) { .promo-banner { flex-direction: column; text-align: center; padding: 28px 24px; } }

/* ========================================================
   SHOP PAGE
   ======================================================== */
.shop-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 900px) { .shop-layout { grid-template-columns: 1fr; } }

.filter-sidebar {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  position: sticky; top: calc(var(--nav-h) + 12px);
}
.filter-group { margin-bottom: 20px; }
.filter-group:last-child { margin-bottom: 0; }
.filter-group-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 10px; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; font-size: .87rem; }
.filter-option input { accent-color: var(--accent); width: 14px; height: 14px; }
.price-range { display: flex; gap: 8px; margin-top: 6px; }
.price-input { flex: 1; padding: 7px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); font-size: .82rem; }
.price-input:focus { outline: none; border-color: var(--accent); }

.shop-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.result-count { font-size: .875rem; color: var(--text-2); }
.result-count strong { color: var(--text); font-weight: 700; }
.sort-select { padding: 7px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); font-size: .85rem; cursor: pointer; }
.sort-select:focus { outline: none; border-color: var(--accent); }

/* ========================================================
   PRODUCT DETAIL
   ======================================================== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 768px) { .product-detail { grid-template-columns: 1fr; gap: 28px; } }

.detail-img-main {
  background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border);
  padding: 40px; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.detail-img-main img { width: 80%; height: 80%; object-fit: contain; transition: transform .35s; }
.detail-img-main:hover img { transform: scale(1.05); }

.detail-category { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin-bottom: 8px; }
.detail-title { font-size: 1.7rem; font-weight: 800; letter-spacing: -.025em; line-height: 1.2; margin-bottom: 10px; }
.detail-rating { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.rating-stars { color: #f59e0b; }
.rating-score { font-weight: 700; }
.rating-reviews { font-size: .85rem; color: var(--text-2); }

.detail-price-block { margin-bottom: 20px; }
.detail-price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.detail-price-sale { color: var(--danger); }
.detail-price-orig { font-size: .95rem; color: var(--text-3); text-decoration: line-through; margin-left: 8px; }
.detail-save { font-size: .78rem; font-weight: 600; color: var(--success); background: rgba(5,150,105,.1); padding: 2px 8px; border-radius: 4px; display: inline-block; margin-top: 4px; }
.detail-desc { font-size: .93rem; color: var(--text-2); line-height: 1.75; margin-bottom: 20px; }

.qty-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.qty-ctrl { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); overflow: hidden; }
.qty-btn { width: 36px; height: 40px; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--text-2); transition: all var(--transition); }
.qty-btn:hover { background: var(--bg); color: var(--text); }
.qty-val { width: 42px; text-align: center; font-weight: 700; font-size: 1rem; background: none; border: none; outline: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); height: 40px; }
.stock-info { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--success); margin-bottom: 16px; }
.detail-actions { display: flex; gap: 10px; margin-bottom: 24px; }
.detail-specs { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.spec-row { display: flex; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-key { flex: 0 0 40%; padding: 9px 14px; font-size: .82rem; font-weight: 600; color: var(--text-2); background: var(--bg); border-right: 1px solid var(--border); }
.spec-val { flex: 1; padding: 9px 14px; font-size: .82rem; }

/* ========================================================
   CART SIDEBAR
   ======================================================== */
#cart-sidebar {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 400px; max-width: 95vw;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  z-index: 2000;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
#cart-sidebar.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.cart-title { font-size: 1.05rem; font-weight: 700; }
.cart-count-pill { background: var(--accent-soft); color: var(--accent); padding: 2px 8px; border-radius: 100px; font-size: .72rem; font-weight: 700; }
.cart-body { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.cart-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); text-align: center; padding: 32px; }
.cart-empty-icon { font-size: 2.5rem; opacity: .3; }

.cart-item { display: flex; gap: 10px; padding: 10px; background: var(--bg); border-radius: var(--radius-sm); position: relative; }
.cart-item-img { width: 58px; height: 58px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cart-item-img img { width: 80%; height: 80%; object-fit: contain; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .84rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: .75rem; color: var(--text-2); }
.cart-item-ctrl { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.cart-qty-btn { width: 24px; height: 24px; border-radius: 5px; background: var(--bg-card); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .85rem; color: var(--text-2); transition: all var(--transition); }
.cart-qty-btn:hover { border-color: var(--accent); color: var(--accent); }
.cart-qty-num { font-size: .84rem; font-weight: 700; min-width: 18px; text-align: center; }
.cart-item-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--text-3); font-size: .85rem; transition: all var(--transition); }
.cart-item-del:hover { background: rgba(239,68,68,.1); color: #ef4444; }

.cart-footer { padding: 16px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.cart-summary { margin-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; font-size: .84rem; padding: 3px 0; color: var(--text-2); }
.summary-row.total { font-size: 1rem; font-weight: 800; color: var(--text); padding-top: 8px; margin-top: 4px; border-top: 1px solid var(--border); }
.free-shipping-bar { margin-bottom: 12px; }
.free-shipping-text { font-size: .75rem; color: var(--text-2); margin-bottom: 5px; }
.free-shipping-progress { height: 4px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.free-shipping-fill { height: 100%; background: var(--success); border-radius: 4px; transition: width .4s; }

/* ========================================================
   OVERLAY & MODAL
   ======================================================== */
#overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 1500; opacity: 0; pointer-events: none;
  transition: opacity .25s; backdrop-filter: blur(3px);
}
#overlay.active { opacity: 1; pointer-events: auto; }

#checkout-modal {
  position: fixed; inset: 0; z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; opacity: 0; pointer-events: none; transition: opacity .25s;
}
#checkout-modal.open { opacity: 1; pointer-events: auto; }

.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 28px;
  width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  transform: scale(.95) translateY(12px);
  transition: transform .28s cubic-bezier(.34,1.06,.64,1);
}
#checkout-modal.open .modal-box { transform: scale(1) translateY(0); }
.modal-title { font-size: 1.2rem; font-weight: 800; margin-bottom: 18px; }

.form-group { margin-bottom: 12px; }
.form-label { display: block; font-size: .72rem; font-weight: 700; color: var(--text-2); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.form-input { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); font-size: .88rem; transition: border-color .15s, box-shadow .15s; }
.form-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.success-screen { text-align: center; padding: 20px 0; }
.success-icon { width: 68px; height: 68px; background: rgba(5,150,105,.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 1.8rem; color: var(--success); }
.success-order-num { display: inline-block; background: var(--accent-soft); color: var(--accent); padding: 3px 14px; border-radius: 5px; font-weight: 700; font-size: .88rem; margin-top: 8px; }

/* ========================================================
   TOASTS
   ======================================================== */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { background: #111827; color: #f9fafb; padding: 10px 18px; border-radius: 8px; font-size: .84rem; font-weight: 600; box-shadow: 0 4px 20px rgba(0,0,0,.25); animation: toastIn .22s cubic-bezier(.34,1.56,.64,1) forwards; display: flex; align-items: center; gap: 8px; pointer-events: auto; max-width: 320px; }
.toast.out { animation: toastOut .2s ease forwards; }
@keyframes toastIn  { from{opacity:0;transform:translateX(20px) scale(.95)} to{opacity:1;transform:none} }
@keyframes toastOut { from{opacity:1} to{opacity:0;transform:translateX(20px) scale(.95)} }

/* ========================================================
   MISC
   ======================================================== */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--text-3); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-2); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }

.pagination { display: flex; gap: 5px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.page-btn { min-width: 36px; height: 36px; border-radius: 7px; padding: 0 10px; display: flex; align-items: center; justify-content: center; font-size: .83rem; font-weight: 600; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-2); transition: all var(--transition); cursor: pointer; }
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: white; }
.page-btn:disabled { opacity: .4; pointer-events: none; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, var(--bg-elevated) 25%, var(--bg) 50%, var(--bg-elevated) 75%); background-size: 200% 100%; animation: skeleton-wave 1.4s ease-in-out infinite; }
@keyframes skeleton-wave { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.skeleton-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.skeleton-img  { height: 200px; }
.skeleton-text { height: 13px; border-radius: 4px; margin: 8px 16px; }
.skeleton-text.w70 { width: 70%; }
.skeleton-text.w50 { width: 50%; }
.skeleton-text.w30 { width: 30%; }

footer { background: var(--bg-card); border-top: 1px solid var(--border); padding: 48px 0 24px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
@media (max-width: 900px)  { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px)  { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand p { font-size: .875rem; color: var(--text-2); line-height: 1.7; margin-top: 10px; max-width: 260px; }
.footer-logo { height: 32px; width: auto; }
.footer-col-title { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--text-2); margin-bottom: 12px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-link { font-size: .875rem; color: var(--text-2); transition: color var(--transition); }
.footer-link:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 20px; border-top: 1px solid var(--border); font-size: .78rem; color: var(--text-3); flex-wrap: wrap; gap: 8px; }
.social-links { display: flex; gap: 6px; }
.social-link { width: 30px; height: 30px; border-radius: 6px; background: var(--bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: .85rem; transition: all var(--transition); }
.social-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 5px; }

.page { animation: pageFade .22s ease; }
@keyframes pageFade { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:none} }
@keyframes spin { to{transform:rotate(360deg)} }
.pt-nav { padding-top: calc(var(--nav-h) + 32px); }
.text-muted { color: var(--text-2); }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }

/* Button system */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 600; transition: all var(--transition); border: 1px solid transparent; white-space: nowrap; cursor: pointer; }
.btn-primary { background: var(--accent); color: white; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-h); border-color: var(--accent-h); }
.btn-secondary { background: var(--bg-elevated); color: var(--text); border-color: var(--border-2); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-ghost { background: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { opacity: .88; }
.btn-sm { padding: 6px 12px; font-size: .8rem; border-radius: 5px; gap: 5px; }
.btn-lg { padding: 12px 24px; font-size: .95rem; border-radius: 8px; }
.btn-full { width: 100%; justify-content: center; }
