/* ============================================
   SIHIR CONSOLE - Stylesheet
   Toko Online Console Game
   ============================================ */

:root {
  --bg:            #0a0812;
  --bg-alt:        #100d1c;
  --surface:       #171328;
  --surface-hi:    #1f1a35;
  --border:        #2c2545;
  --text:          #f0edf7;
  --text-muted:    #9a92b5;
  --primary:       #8b5cf6;
  --primary-dark:  #7c3aed;
  --primary-soft:  rgba(139, 92, 246, 0.14);
  --accent:        #22d3ee;
  --success:       #34d399;
  --warning:       #fbbf24;
  --danger:        #f87171;
  --radius:        14px;
  --radius-lg:     20px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 12px; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.content-narrow { max-width: 780px; }
.muted { color: var(--text-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--primary); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 10px; top: 10px; }

/* ==== TOPBAR ==== */
.topbar {
  background: linear-gradient(90deg, var(--primary-dark), #4f46e5);
  font-size: 0.8rem;
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding-top: 7px; padding-bottom: 7px;
}
.topbar a { font-weight: 600; text-decoration: underline; }

/* ==== HEADER ==== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10, 8, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 70px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 1.15rem; letter-spacing: 0.5px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 1.15rem;
  box-shadow: 0 6px 18px rgba(139, 92, 246, 0.4);
}
.brand-text em { font-style: normal; color: var(--primary); }

.main-nav { display: flex; gap: 26px; }
.main-nav a { color: var(--text-muted); font-size: 0.92rem; font-weight: 500; transition: color .2s; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.cart-link { position: relative; display: flex; padding: 6px; color: var(--text); }
.cart-count {
  position: absolute; top: -2px; right: -4px;
  background: var(--primary); color: #fff;
  font-size: 0.68rem; font-weight: 700;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==== HERO ==== */
.hero { position: relative; padding: 80px 0 70px; overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(600px 320px at 15% 25%, rgba(139, 92, 246, 0.22), transparent 70%),
    radial-gradient(520px 300px at 85% 70%, rgba(34, 211, 238, 0.14), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; display: flex; align-items: center; gap: 48px; }
.hero-text { flex: 1 1 520px; }
.eyebrow {
  display: inline-block; color: var(--accent); font-weight: 700;
  font-size: 0.78rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px;
}
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; margin-bottom: 18px; }
.hero-text p { color: var(--text-muted); max-width: 520px; margin-bottom: 28px; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-bottom: 34px; }

.hero-trust { list-style: none; display: flex; gap: 32px; padding: 0; margin: 0; }
.hero-trust li { display: flex; flex-direction: column; }
.hero-trust strong { font-size: 1.3rem; color: var(--primary); }
.hero-trust span { font-size: 0.82rem; color: var(--text-muted); }

.hero-visual { flex: 0 1 380px; position: relative; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.hero-orb {
  position: absolute; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(139, 92, 246, 0.5), rgba(34, 211, 238, 0.12) 55%, transparent 72%);
  filter: blur(6px);
}
.hero-pad { position: relative; width: 260px; color: var(--primary); opacity: .9; }
.hero-pad svg { width: 100%; height: auto; filter: drop-shadow(0 14px 28px rgba(139, 92, 246, 0.35)); }

/* ==== BUTTONS ==== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px; border: none; cursor: pointer;
  font-family: inherit; font-size: 0.93rem; font-weight: 600;
  transition: all .2s; text-align: center;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 8px 22px rgba(139, 92, 246, 0.35); }
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid transparent; }
.btn-ghost:hover { background: var(--surface-hi); }
.btn-full { width: 100%; }

/* ==== SECTIONS ==== */
.section { padding: 62px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-title { font-size: clamp(1.35rem, 3vw, 1.8rem); margin: 0 0 24px; }
.section-head .section-title { margin: 0; }
.section-link { color: var(--primary); font-size: 0.9rem; font-weight: 600; }
.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin-bottom: 6px; }
.page-subtitle { color: var(--text-muted); margin: 0 0 26px; }
.lead { font-size: 1.05rem; color: var(--text-muted); margin-bottom: 28px; }

/* ==== BREADCRUMB ==== */
.breadcrumb-bar { background: var(--bg-alt); border-bottom: 1px solid var(--border); font-size: 0.85rem; }
.breadcrumb-bar .container { display: flex; align-items: center; gap: 9px; padding-top: 13px; padding-bottom: 13px; flex-wrap: wrap; }
.breadcrumb-bar a { color: var(--text-muted); }
.breadcrumb-bar a:hover { color: var(--primary); }
.breadcrumb-bar span { color: var(--border); }
.breadcrumb-bar .current { color: var(--text); font-weight: 500; }

/* ==== KATEGORI ==== */
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.category-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 20px; display: flex; flex-direction: column; gap: 6px; transition: all .22s;
}
.category-card:hover { border-color: var(--primary); transform: translateY(-4px); background: var(--surface-hi); }
.category-icon { font-size: 1.9rem; line-height: 1; margin-bottom: 4px; }
.category-name { font-weight: 700; font-size: 1rem; }
.category-desc { font-size: 0.8rem; color: var(--text-muted); }

/* ==== PRODUK ==== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 20px; }
.product-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .22s;
}
.product-card:hover { transform: translateY(-5px); border-color: var(--primary); box-shadow: var(--shadow); }
.product-card-link { display: block; height: 100%; }

.product-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-alt); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-hi), var(--bg-alt));
}
.product-thumb-placeholder span {
  font-size: 2rem; font-weight: 900; color: var(--primary); opacity: .45;
  letter-spacing: 1px; text-transform: uppercase;
}
.product-thumb-placeholder.large span { font-size: 4.5rem; }
.product-thumb-placeholder.small { border-radius: 10px; }
.product-thumb-placeholder.small span { font-size: 1.1rem; }

.badge {
  position: absolute; top: 10px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; letter-spacing: .3px;
}
.badge-discount { left: 10px; background: var(--danger); color: #fff; }
.badge-label { right: 10px; background: rgba(10, 8, 18, 0.82); color: var(--accent); border: 1px solid var(--border); }

.product-info { padding: 16px; display: flex; flex-direction: column; gap: 5px; }
.product-category { font-size: 0.72rem; color: var(--accent); font-weight: 600; letter-spacing: .6px; text-transform: uppercase; }
.product-name { font-size: 0.98rem; margin: 0; }
.product-desc {
  font-size: 0.82rem; color: var(--text-muted); margin: 0 0 6px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.price-now { color: var(--text); font-weight: 800; font-size: 1.05rem; }
.price-old { color: var(--text-muted); text-decoration: line-through; font-size: 0.82rem; }
.product-stock { font-size: 0.76rem; color: var(--success); }
.product-stock.is-empty { color: var(--danger); }

/* ==== FILTER ==== */
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.search-form { display: flex; flex: 1 1 280px; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.search-form input { flex: 1; padding: 11px 18px; border: none; background: transparent; color: var(--text); font-family: inherit; outline: none; }
.search-form button { padding: 0 18px; border: none; background: var(--primary); color: #fff; cursor: pointer; display: flex; align-items: center; }
.sort-form select {
  padding: 11px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: inherit; cursor: pointer; outline: none;
}

.category-chips { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 28px; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); font-size: 0.83rem; color: var(--text-muted); transition: all .2s;
}
.chip:hover { border-color: var(--primary); color: var(--text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* ==== EMPTY STATE ==== */
.empty-state { text-align: center; padding: 56px 20px; }
.empty-state p { margin: 0 0 8px; }
.empty-state .btn { margin-top: 18px; }

/* ==== FEATURE ==== */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px 22px; }
.feature-icon { font-size: 1.7rem; display: block; margin-bottom: 10px; }
.feature-card h3 { font-size: 1rem; }
.feature-card p { font-size: 0.87rem; color: var(--text-muted); margin: 0; }

/* ==== CTA BANNER ==== */
.cta-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 36px;
}
.cta-banner h2 { font-size: 1.35rem; margin: 0 0 6px; }
.cta-banner p { color: var(--text-muted); margin: 0; }

/* ==== DETAIL PRODUK ==== */
.product-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.detail-image { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4/3; }
.detail-image img { width: 100%; height: 100%; object-fit: cover; }

.detail-category { font-size: 0.78rem; color: var(--accent); font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.detail-summary h1 { font-size: clamp(1.4rem, 3.4vw, 2rem); margin: 10px 0 10px; }
.detail-short { color: var(--text-muted); margin-bottom: 20px; }

.detail-price { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-price .price-now { font-size: 1.85rem; color: var(--primary); }
.price-save { font-size: 0.8rem; color: var(--success); background: rgba(52, 211, 153, .12); padding: 3px 10px; border-radius: 999px; }

.detail-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.85rem; margin-bottom: 22px; }
.detail-stock { color: var(--success); }
.detail-stock.is-empty { color: var(--danger); }
.detail-sku { color: var(--text-muted); }

.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.qty-control { display: flex; align-items: center; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); overflow: hidden; }
.qty-btn { width: 40px; height: 46px; background: transparent; border: none; color: var(--text); font-size: 1.15rem; cursor: pointer; }
.qty-btn:hover { background: var(--surface-hi); }
.qty-control input { width: 52px; height: 46px; text-align: center; border: none; background: transparent; color: var(--text); font-family: inherit; font-size: 0.95rem; }
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-control input { -moz-appearance: textfield; }

.detail-secondary-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.detail-assurance { list-style: none; padding: 18px 0 0; margin: 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 9px; font-size: 0.87rem; color: var(--text-muted); }

.detail-tabs { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
.detail-desc h2, .detail-specs h2 { font-size: 1.15rem; margin-bottom: 14px; }
.detail-desc p { color: var(--text-muted); margin: 0 0 14px; }

.spec-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.spec-table th, .spec-table td { padding: 12px 16px; text-align: left; font-size: 0.87rem; border-bottom: 1px solid var(--border); }
.spec-table th { color: var(--text-muted); font-weight: 500; width: 42%; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: none; }

/* ==== KERANJANG ==== */
.cart-layout { display: grid; grid-template-columns: 1fr 330px; gap: 32px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.cart-item {
  display: grid; grid-template-columns: 78px 1fr 90px 120px 34px;
  gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px;
}
.cart-item-thumb { width: 78px; height: 62px; border-radius: 10px; overflow: hidden; }
.cart-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.92rem; }
.cart-item-name:hover { color: var(--primary); }
.cart-item-price { font-size: 0.82rem; color: var(--text-muted); }
.cart-item-qty input {
  width: 100%; padding: 8px; text-align: center;
  border: 1px solid var(--border); border-radius: 9px;
  background: var(--bg-alt); color: var(--text); font-family: inherit;
}
.cart-item-subtotal { font-weight: 700; text-align: right; font-size: 0.95rem; }
.cart-item-remove {
  width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border);
  background: transparent; color: var(--text-muted); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.cart-item-remove:hover { border-color: var(--danger); color: var(--danger); }
.cart-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.cart-sidebar, .checkout-summary {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 90px;
}
.cart-sidebar h3, .checkout-summary h3 { font-size: 1.05rem; margin-bottom: 16px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 0.88rem; color: var(--text-muted); padding: 7px 0; }
.summary-total {
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid var(--border); margin-top: 12px; padding-top: 14px; margin-bottom: 18px;
  font-size: 1.05rem; color: var(--text);
}
.summary-total strong { font-size: 1.2rem; color: var(--primary); }
.cart-sidebar .btn { margin-bottom: 9px; }

/* ==== CHECKOUT ==== */
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.checkout-form h3 { font-size: 1rem; margin: 6px 0 0; color: var(--accent); }
.checkout-form label, .contact-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--text-muted); }
.checkout-form input, .checkout-form textarea, .checkout-form select,
.contact-form input, .contact-form textarea {
  padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg-alt); color: var(--text); font-family: inherit; font-size: 0.92rem; outline: none;
}
.checkout-form input:focus, .checkout-form textarea:focus,
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-note { font-size: 0.78rem; color: var(--text-muted); margin: 0; text-align: center; }

.payment-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 11px; }
.payment-option { position: relative; cursor: pointer; }
.payment-option input { position: absolute; opacity: 0; }
.payment-option span {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px; border: 1px solid var(--border); border-radius: 12px;
  background: var(--bg-alt); transition: all .2s;
}
.payment-option span strong { font-size: 0.88rem; color: var(--text); }
.payment-option span small { font-size: 0.74rem; color: var(--text-muted); }
.payment-option input:checked + span { border-color: var(--primary); background: var(--primary-soft); }

/* ==== SUKSES ORDER ==== */
.order-success { max-width: 620px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 44px 32px; }
.success-icon { font-size: 3rem; margin-bottom: 12px; }
.order-code { font-size: 1.05rem; margin-bottom: 8px; }
.order-code strong { color: var(--primary); letter-spacing: 1px; }
.success-summary { text-align: left; background: var(--bg-alt); border-radius: var(--radius); padding: 20px; margin: 26px 0; }
.success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ==== KONTAK ==== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.contact-channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.contact-icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.contact-card h3 { font-size: 0.98rem; margin-bottom: 6px; }
.contact-card p { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 14px; }
.contact-form-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; }
.contact-form { display: flex; flex-direction: column; gap: 15px; }

/* ==== ALERT ==== */
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-size: 0.9rem; }
.alert-info { background: var(--primary-soft); border: 1px solid var(--primary); color: var(--text); }
.alert-error { background: rgba(248, 113, 113, .1); border: 1px solid var(--danger); color: var(--danger); }
.alert ul { margin: 0; padding-left: 18px; }
.alert .btn { margin-top: 12px; }

/* ==== LIST CEKLIS ==== */
.check-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.check-list li { padding-left: 26px; position: relative; color: var(--text-muted); font-size: 0.93rem; }
.check-list li::before { content: '✦'; position: absolute; left: 0; color: var(--primary); }
.check-list strong { color: var(--text); }

.content-narrow h2 { font-size: 1.2rem; margin-top: 30px; }
.content-narrow p { color: var(--text-muted); }
.content-narrow a { color: var(--primary); text-decoration: underline; }

/* ==== FOOTER ==== */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); margin-top: 20px; }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 34px; padding-top: 52px; padding-bottom: 42px; }
.footer-brand { margin-bottom: 14px; }
.footer-desc { color: var(--text-muted); font-size: 0.87rem; max-width: 330px; margin: 0 0 10px; }
.footer-domain { color: var(--primary); font-size: 0.85rem; font-weight: 600; margin: 0; }
.footer-col h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.2px; color: var(--text-muted); margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; color: var(--text-muted); font-size: 0.87rem; margin-bottom: 9px; }
.footer-col a:hover { color: var(--primary); }
.footer-hours { font-size: 0.82rem !important; }

.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; }
.footer-bottom-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom p { margin: 0; }
.footer-bottom strong { color: var(--text); }
.tech-stack span { color: var(--accent); }

/* ==== CHAT WIDGET ==== */
.chat-toggle {
  position: fixed; bottom: 22px; right: 22px; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(139, 92, 246, .45); transition: transform .2s;
}
.chat-toggle:hover { transform: scale(1.06); }
.chat-toggle-dot {
  position: absolute; top: 4px; right: 4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--success); border: 2px solid var(--bg);
}

.chat-window {
  position: fixed; bottom: 92px; right: 22px; z-index: 200;
  width: 350px; max-width: calc(100vw - 32px);
  height: 500px; max-height: calc(100vh - 130px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
.chat-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--surface-hi), var(--surface));
}
.chat-header-info { display: flex; align-items: center; gap: 11px; }
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary-soft); display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.chat-header strong { display: block; font-size: 0.92rem; }
.chat-status { font-size: 0.72rem; color: var(--success); }
.chat-close { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; line-height: 1; padding: 0 4px; }
.chat-close:hover { color: var(--text); }

.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { padding: 10px 14px; border-radius: 14px; font-size: 0.87rem; max-width: 86%; line-height: 1.55; word-wrap: break-word; }
.chat-msg-bot { background: var(--bg-alt); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg-user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-typing { display: flex; gap: 4px; align-items: center; }
.chat-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--text-muted); animation: chatBounce 1.3s infinite; }
.chat-typing span:nth-child(2) { animation-delay: .2s; }
.chat-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes chatBounce { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.chat-suggestions { display: flex; flex-direction: column; gap: 7px; margin-top: 4px; }
.chat-chip {
  text-align: left; padding: 9px 13px; border-radius: 11px;
  border: 1px solid var(--border); background: transparent;
  color: var(--text-muted); font-family: inherit; font-size: 0.8rem; cursor: pointer; transition: all .2s;
}
.chat-chip:hover { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }

.chat-input-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-input-form input {
  flex: 1; padding: 11px 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-alt);
  color: var(--text); font-family: inherit; font-size: 0.88rem; outline: none;
}
.chat-input-form input:focus { border-color: var(--primary); }
.chat-input-form button {
  width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%; border: none;
  background: var(--primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.chat-footnote { font-size: 0.68rem; color: var(--text-muted); text-align: center; margin: 0; padding: 0 12px 10px; }

/* ==== POPUP INSTALL PWA ==== */
.pwa-popup {
  position: fixed; left: 14px; right: 14px; bottom: 14px; z-index: 300;
  display: flex; justify-content: center; animation: pwaUp .35s ease;
}
@keyframes pwaUp { from { transform: translateY(26px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pwa-popup-card {
  position: relative; display: flex; align-items: center; gap: 13px;
  width: 100%; max-width: 440px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: var(--shadow);
}
.pwa-popup-icon { width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0; }
.pwa-popup-text { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.pwa-popup-text strong { font-size: 0.92rem; }
.pwa-popup-text span { font-size: 0.79rem; color: var(--text-muted); }
.pwa-popup-btn {
  flex-shrink: 0; padding: 10px 20px; border-radius: 999px; border: none;
  background: var(--primary); color: #fff; font-family: inherit;
  font-size: 0.84rem; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.pwa-popup-btn:hover { background: var(--primary-dark); }
.pwa-popup-close {
  position: absolute; top: -9px; right: -9px; width: 24px; height: 24px;
  border-radius: 50%; border: 1px solid var(--border); background: var(--bg);
  color: var(--text-muted); cursor: pointer; font-size: 0.95rem; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.pwa-popup-close:hover { color: var(--text); border-color: var(--text-muted); }

/* ==== RESPONSIVE ==== */
@media (max-width: 1024px) {
  .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
  .cart-sidebar, .checkout-summary { position: static; }
  .detail-tabs { grid-template-columns: 1fr; gap: 30px; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .main-nav {
    display: none; position: absolute; top: 70px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 20px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .main-nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }

  .hero { padding: 54px 0 48px; }
  .hero-inner { flex-direction: column; text-align: center; }
  .hero-text p { margin-left: auto; margin-right: auto; }
  .hero-actions, .hero-trust { justify-content: center; }
  .hero-visual { flex: 1 1 auto; min-height: 220px; }
  .hero-pad { width: 190px; }

  .product-detail { grid-template-columns: 1fr; gap: 28px; }
  .topbar-inner span { display: none; }
  .topbar-inner { justify-content: center; }
}

@media (max-width: 620px) {
  .section { padding: 44px 0; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 13px; }
  .product-info { padding: 13px; }
  .product-name { font-size: 0.89rem; }
  .price-now { font-size: 0.95rem; }

  .cart-item { grid-template-columns: 62px 1fr 34px; gap: 11px; }
  .cart-item-thumb { width: 62px; height: 52px; }
  .cart-item-qty { grid-column: 2; max-width: 92px; }
  .cart-item-subtotal { grid-column: 2 / 4; text-align: left; }

  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 26px; }
  .cta-banner { padding: 26px; }
  .chat-window { right: 12px; left: 12px; width: auto; bottom: 86px; }
  .detail-actions { flex-direction: column; align-items: stretch; }
  .qty-control { align-self: flex-start; }
}
