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

/* Hide native number-input spinner arrows site-wide — qty fields use their
   own +/- buttons, the spinner is redundant and blocks free typing/centering */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* ── Quantity stepper (pill) — shared across product page, cart, cart drawer ── */
.qty-mini {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  overflow: hidden;
  width: fit-content;
  flex-shrink: 0;
}
.qty-mini button {
  width: 34px; height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.qty-mini button:hover { background: var(--light); }
.qty-mini input {
  width: 32px;
  height: 34px;
  text-align: center;
  border: none;
  background: none;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.qty-mini input:focus { outline: none; }

:root {
  --accent:  #c8a96e;
  --dark:    #1a1a2e;
  --mid:     #2d2d44;
  --light:   #EFE8D8;
  --white:   #ffffff;
  --card:    #FFFCF5;
  --text:    #111111;
  --muted:   #666666;
  --border:  #e0e0e0;
  --green:   #007600;
  --red:     #c62828;
  --radius:  6px;
  --shadow:  0 1px 3px rgba(0,0,0,.08);
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--light);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Header ── */
header {
  background: var(--dark);
  color: white;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 52px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -.3px;
}
.logo-hifi {
  color: #ffffff;
  font-weight: 900;
}
.logo-hub {
  background: var(--accent);
  color: var(--dark);
  font-weight: 900;
  padding: 1px 7px 2px;
  border-radius: 4px;
  margin-left: 5px;
}

/* Search bar */
.header-search {
  flex: 1;
  max-width: 560px;
  display: flex;
  border-radius: 4px;
  overflow: hidden;
}
.header-search input {
  flex: 1;
  border: none;
  padding: 8px 12px;
  font-size: .85rem;
  color: var(--text);
  outline: none;
}
.header-search button {
  background: var(--accent);
  border: none;
  padding: 0 14px;
  cursor: pointer;
  font-size: .95rem;
  color: var(--dark);
  font-weight: 700;
}
.header-search button:hover { background: #b89860; }

.header-categories {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}
.header-categories a {
  color: rgba(255,255,255,.75);
  font-size: .8rem;
  white-space: nowrap;
  transition: color .15s;
}
.header-categories a:hover { color: white; }
.header-categories a.active { color: var(--accent); font-weight: 700; }
@media (max-width: 900px) {
  .header-categories { display: none; }
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.account-btn {
  display: flex; align-items: center; gap: 6px;
  color: var(--text);
  font-size: .85rem; font-weight: 600;
  padding: 5px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card);
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.account-btn:hover { border-color: var(--accent); color: var(--accent); }
.account-btn-login svg { opacity: .7; }
.account-btn-avatar {
  display: block;
  padding: 0; border: none; background: none;
  line-height: 0;
}
.account-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.currency-dropdown {
  position: relative;
}
.currency-trigger {
  display: flex; align-items: center; gap: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .82rem; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s;
}
.currency-trigger:hover { border-color: var(--accent); }
.currency-dropdown.open .currency-trigger { border-color: var(--accent); }
.currency-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
  min-width: 120px;
  z-index: 200;
  overflow: hidden;
}
.currency-dropdown.open .currency-menu { display: block; }
.currency-option {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 9px 14px;
  font-size: .85rem; color: var(--text);
  transition: background .1s;
}
.currency-option:hover { background: var(--hover); }
.currency-option.active { color: var(--accent); font-weight: 700; }
.currency-option span { color: var(--muted); font-size: .78rem; }
.cart-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent);
  color: var(--dark);
  padding: 7px 14px;
  border-radius: 4px;
  font-size: .85rem;
  font-weight: 700;
  white-space: nowrap;
}
.cart-btn:hover { background: #b89860; }
.cart-count {
  background: var(--dark);
  color: var(--accent);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: .72rem;
  font-weight: 800;
}

/* ── Cart drawer ── */
.cart-drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 300;
  opacity: 0; visibility: hidden;
  transition: opacity .25s;
}
.cart-drawer-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed; top: 0; right: 0;
  width: 420px; max-width: 92vw;
  height: 100vh;
  background: var(--card);
  z-index: 301;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .3s ease;
  box-shadow: -6px 0 24px rgba(0,0,0,.25);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  font-size: .95rem;
  flex-shrink: 0;
}
.cart-drawer-header span#drawer-count { color: var(--muted); font-weight: 400; font-size: .85rem; }
.cart-drawer-close {
  background: none; border: none; cursor: pointer;
  font-size: 1.1rem; color: var(--muted);
  width: 32px; height: 32px; border-radius: 4px;
}
.cart-drawer-close:hover { background: var(--light); color: var(--text); }

.cart-drawer-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

.drawer-promo { padding: 14px 20px; border-bottom: 1px solid var(--border); }
.drawer-promo-text { font-size: .82rem; color: var(--text); margin-bottom: 8px; }
.drawer-promo-done .drawer-promo-text { margin-bottom: 0; color: var(--green); font-weight: 600; }
.drawer-progress-track { height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; }
.drawer-progress-fill { height: 100%; background: var(--accent); transition: width .3s; }

.drawer-items { flex: 1; }
.drawer-item {
  display: flex; gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
}
.drawer-item-img {
  width: 64px; height: 64px; flex-shrink: 0;
  border-radius: 4px; overflow: hidden;
  background: var(--light); border: 1px solid var(--border);
}
.drawer-item-img img { width: 100%; height: 100%; object-fit: cover; }
.drawer-item-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; color: var(--border); }
.drawer-item-info { flex: 1; min-width: 0; }
.drawer-item-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.drawer-item-title { font-size: .85rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.drawer-item-title:hover { color: #0066c0; }
.drawer-item-remove { background: none; border: none; cursor: pointer; color: var(--muted); font-size: .85rem; flex-shrink: 0; }
.drawer-item-remove:hover { color: var(--red); }
.drawer-item-bottom { display: flex; align-items: center; justify-content: space-between; }
.drawer-item-price { font-weight: 700; font-size: .9rem; }

.drawer-footer { padding: 16px 20px; border-top: 1px solid var(--border); flex-shrink: 0; }
.drawer-sum-row { display: flex; justify-content: space-between; font-size: .85rem; color: var(--muted); padding: 4px 0; }
.drawer-sum-total { display: flex; justify-content: space-between; font-size: 1rem; font-weight: 800; color: var(--text); padding: 8px 0; }
.drawer-checkout-btn {
  display: block; text-align: center;
  width: 100%; padding: 12px;
  background: var(--dark); color: white;
  border-radius: 4px; font-weight: 700; font-size: .9rem;
  margin-top: 8px;
}
.drawer-checkout-btn:hover { background: var(--mid); text-decoration: none; }
.drawer-continue-btn {
  display: block; width: 100%; padding: 11px;
  background: none; border: 1px solid var(--border);
  border-radius: 4px; font-weight: 600; font-size: .85rem;
  color: var(--text); cursor: pointer; margin-top: 8px;
}
.drawer-continue-btn:hover { border-color: var(--accent); color: var(--accent); }

.drawer-trust {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-size: .72rem; color: var(--muted);
  text-align: center; flex-shrink: 0;
}

.drawer-empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 20px; text-align: center; color: var(--muted); }
.drawer-empty-icon { font-size: 2.8rem; margin-bottom: 12px; }
.drawer-empty-state p { margin-bottom: 16px; }

/* ── Main ── */
main { flex: 1; max-width: 1200px; width: 100%; margin: 16px auto; padding: 0 16px 120px; }

/* ── Payment methods bar ── */
.payment-bar {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 10px 16px;
  position: fixed;
  bottom: 52px;
  left: 0;
  right: 0;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.payment-bar-label {
  font-size: .7rem;
  color: var(--muted);
  white-space: nowrap;
  margin-right: 4px;
}

/* ── Footer ── */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.4);
  padding: 16px;
  font-size: .78rem;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
footer a { color: rgba(255,255,255,.5); }
footer a:hover { color: var(--accent); }
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}
.footer-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-lang { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Footer language dropdown */
.footer-lang-dd { position: relative; }
.footer-lang-trigger {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  padding: 5px 10px;
  color: rgba(255,255,255,.7);
  font-size: .82rem; font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.footer-lang-trigger svg { display: block; flex-shrink: 0; }
.footer-lang-trigger span { line-height: 1; }
.footer-lang-trigger:hover { border-color: var(--accent); color: var(--accent); }
.footer-lang-dd.open .footer-lang-trigger { border-color: var(--accent); color: var(--accent); }
.footer-lang-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.2);
  min-width: 130px;
  z-index: 200;
  overflow: hidden;
}
.footer-lang-dd.open .footer-lang-menu { display: block; }
.footer-lang-option {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px;
  font-size: .85rem; color: var(--text);
  transition: background .1s;
}
.footer-lang-option:hover { background: var(--hover); }
.footer-lang-option.active { color: var(--accent); font-weight: 700; }
.footer-lang-option svg { border-radius: 2px; overflow: hidden; flex-shrink: 0; }

/* Footer currency dropdown (dark theme) */
.footer-currency-dd { position: relative; }
.footer-currency-trigger {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 4px;
  padding: 5px 10px;
  font-size: .82rem; font-weight: 600;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.footer-currency-trigger:hover { border-color: var(--accent); color: var(--accent); }
.footer-currency-dd.open .footer-currency-trigger { border-color: var(--accent); color: var(--accent); }
.footer-currency-menu {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 -4px 16px rgba(0,0,0,.2);
  min-width: 120px;
  z-index: 200;
  overflow: hidden;
}
.footer-currency-dd.open .footer-currency-menu { display: block; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  text-decoration: none;
}
.btn:hover { opacity: .85; }
.btn:active { transform: scale(.98); }
.btn-primary  { background: var(--accent); color: var(--dark); }
.btn-dark     { background: var(--dark); color: white; }
.btn-outline  { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm       { padding: 5px 12px; font-size: .78rem; }
.btn[disabled] { opacity: .4; cursor: not-allowed; }

/* ── Forms ── */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; color: var(--muted); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .875rem;
  color: var(--text);
  background: white;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--accent); }
.form-group textarea { resize: vertical; min-height: 70px; }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 14px; font-size: .875rem; }
.alert-error   { background: #fff0f0; border: 1px solid #ffcdd2; color: var(--red); }
.alert-success { background: #f0fff4; border: 1px solid #c8e6c9; color: var(--green); }

/* ── Breadcrumb ── */
.breadcrumb { font-size: .78rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 5px; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .header-search { max-width: none; flex: 1; }
  .logo { font-size: .95rem; }
}
