/* ================================
   GALAXY TRADING — Industrial Pro theme
   ================================ */
:root {
  --bg: #1a1f2c;
  --surface: #232a3a;
  --surface-2: #2c3447;
  --border: #353e54;
  --text: #f1f4fb;
  --muted: #98a3bd;
  --primary: #4a9eff;
  --primary-2: #2e7ce0;
  --accent: #ff7a3a;
  --accent-2: #e8501c;
  --danger: #ef4444;
  --radius: 8px;
  --card: #232a3a;
  --shadow: 0 20px 50px -20px rgba(46,124,224,.45);
  --shadow-glow: 0 0 40px rgba(74,158,255,.35);
  --gradient-steel: linear-gradient(135deg, #4a9eff, #2e7ce0);
  --gradient-fire: linear-gradient(135deg, #ff7a3a, #e8501c);
  --gradient-hero: linear-gradient(180deg, rgba(26,31,44,.55), rgba(26,31,44,.95));
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font: inherit; color: inherit; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(26,31,44,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .row {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 8px;
  background: var(--gradient-steel);
  box-shadow: var(--shadow-glow);
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.brand span b { color: var(--primary); }
.nav { display: none; gap: 24px; font-size: 14px; }
.nav a { color: var(--muted); transition: color .15s; }
.nav a:hover, .nav a.active { color: var(--text); }
.nav a.sale { color: var(--accent); }
.actions { display: flex; align-items: center; gap: 8px; }
@media (min-width: 768px) { .nav { display: flex; } }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: var(--radius);
  font-weight: 600; font-size: 14px;
  transition: transform .15s, box-shadow .15s, background .15s, opacity .15s;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-hero { background: var(--gradient-steel); color: white; box-shadow: var(--shadow); }
.btn-hero:hover { transform: scale(1.02); box-shadow: var(--shadow-glow); }
.btn-fire { background: var(--gradient-fire); color: white; box-shadow: var(--shadow); }
.btn-fire:hover { opacity: .95; }
.btn-outline { border-color: var(--border); background: transparent; color: var(--text); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.cart-btn { position: relative; }
.cart-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  background: var(--accent); color: white;
  border-radius: 999px; font-size: 11px; font-weight: 700;
  margin-left: 4px;
}
.user-chip {
  display: none; align-items: center; gap: 6px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; color: var(--muted);
}
@media (min-width: 640px) { .user-chip { display: inline-flex; } }

/* ===== Hero ===== */
.hero { position: relative; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background: var(--gradient-hero);
}
.hero-content { position: relative; padding: 96px 0; max-width: 640px; }
@media (min-width: 768px) { .hero-content { padding: 144px 0; } }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px;
  border: 1px solid rgba(74,158,255,.4);
  background: rgba(74,158,255,.1);
  font-size: 11px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .08em;
  color: var(--primary);
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--primary); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
h1 { font-size: 36px; font-weight: 700; line-height: 1.05; letter-spacing: -.02em; margin-top: 20px; }
@media (min-width: 768px) { h1 { font-size: 60px; } }
h1 .grad {
  background: var(--gradient-steel);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-content p.lead { margin-top: 20px; color: var(--muted); font-size: 17px; max-width: 560px; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-feats { margin-top: 40px; display: grid; grid-template-columns: repeat(3, auto); gap: 16px; max-width: 480px; }
.hero-feats div { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.hero-feats svg { color: var(--primary); }

/* ===== Sections ===== */
section.padded { padding: 64px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 32px; gap: 16px; flex-wrap: wrap; }
.section-head .pre { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.section-head h2 { font-size: 24px; font-weight: 700; margin-top: 4px; }
@media (min-width: 768px) { .section-head h2 { font-size: 30px; } }

/* ===== Product grid ===== */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-2px); border-color: rgba(74,158,255,.5); box-shadow: var(--shadow); }
.card .imgwrap { position: relative; aspect-ratio: 1/1; overflow: hidden; background: var(--surface-2); }
.card .imgwrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .imgwrap img { transform: scale(1.05); }
.sale-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--gradient-fire); color: white;
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  box-shadow: 0 4px 12px rgba(232,80,28,.35);
}
.card .body { padding: 16px; display: flex; flex-direction: column; flex: 1; gap: 8px; }
.card .cat { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.card h3 { font-size: 15px; font-weight: 600; line-height: 1.25; }
.card .meta { font-size: 13px; color: var(--muted); }
.card .meta b { color: var(--text); font-weight: 500; }
.card .footrow { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.price { font-size: 18px; font-weight: 700; }

/* ---- quantity per size, on the catalog's item cards ---- */
.size-qty {
  display: flex; flex-direction: column; gap: 6px;
  max-height: 232px; overflow-y: auto; padding-right: 4px;
  scrollbar-width: thin; scrollbar-color: #3d475e transparent;
}
.size-qty::-webkit-scrollbar { width: 8px; }
.size-qty::-webkit-scrollbar-thumb { background: #3d475e; border-radius: 999px; }
.sq-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
}
.sq-stock { text-align: right; line-height: 1.2; white-space: nowrap; }
.sq-stock .qty-value { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sq-add { flex-shrink: 0; }
.sq-add:disabled { opacity: .45; cursor: not-allowed; }
.sq-info { min-width: 0; }
.sq-size { display: block; font-size: 13px; font-weight: 600; }
.sq-sale {
  font-size: 9px; font-weight: 800; letter-spacing: .04em; vertical-align: 2px;
  background: var(--accent-2); color: #fff; padding: 1px 5px; border-radius: 3px;
}
.sq-price { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
/* the stock figure, read from the Inventory and not editable */
.qty-value { font-variant-numeric: tabular-nums; }
/* the same figure on a list row (cart, checkout), where it has no box */
.stock-line { display: block; font-size: 11px; color: #34d8a4; margin-top: 1px; }
.stock-line .qty-value { font-weight: 700; }
.stock-line .stock-note { display: inline; margin: 0; }
.stock-line:has(.stock-note.out) { color: var(--danger); }
.qty-value.out { color: var(--danger); }
.qty-box {
  display: inline-block; min-width: 54px; padding: 6px 10px; text-align: center;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums;
  cursor: default; user-select: none;
}
.qty-box.out { color: var(--danger); }
/* how many are on the shelf, next to the quantity figure */
.stock-note { display: block; font-size: 11px; color: #34d8a4; margin-top: 1px; }
.stock-note.out { color: var(--danger); }
.stock-note:empty { display: none; }
.sq-row.out-of-stock { opacity: .55; }
.qty-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 2px;
}
.qty-row .qty-lbl { font-size: 12px; color: var(--muted); }
.qty-row .stock-note { margin: 0; }
@media (max-width: 560px) {
  .size-qty { max-height: 210px; }
  /* One item per row on a phone: these cards carry a list of sizes, not just a
     price. Only the catalog uses .item-grid, so other pages keep their layout. */
  .grid.item-grid { grid-template-columns: 1fr; }
}
.price-old { font-size: 12px; color: var(--muted); text-decoration: line-through; display: block; }

/* ===== Filters ===== */
.search {
  position: relative; flex: 1;
}
.search input {
  width: 100%; height: 44px; padding: 0 16px 0 40px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; outline: none;
}
.search input:focus { border-color: var(--primary); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0; }
.chip {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: all .15s;
}
.chip:hover { border-color: rgba(74,158,255,.4); color: var(--text); }
.chip.active { background: var(--primary); border-color: var(--primary); color: white; }

/* ===== Cart drawer ===== */
.drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 50; opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: 100%; max-width: 420px;
  background: var(--surface); border-left: 1px solid var(--border);
  z-index: 60; transform: translateX(100%);
  transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-head { padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.drawer-foot { padding: 20px 24px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }

.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; height: 100%; color: var(--muted); text-align: center; }

.cart-item {
  display: flex; gap: 12px; padding: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  margin-bottom: 12px;
}
.cart-item img { width: 64px; height: 64px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.cart-item .info { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.cart-item .info .name { font-size: 13px; font-weight: 600; line-height: 1.25; }
.cart-item .info .sub { font-size: 11px; color: var(--muted); }
.cart-item .ctrl-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 6px; }
.qty button { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.qty button:hover { color: var(--text); }
.qty span { width: 28px; text-align: center; font-size: 13px; font-weight: 500; }
.cart-item .remove { color: var(--muted); align-self: start; padding: 4px; }
.cart-item .remove:hover { color: var(--danger); }
.subtotal-row { display: flex; align-items: center; justify-content: space-between; }
.subtotal-row .lbl { color: var(--muted); font-size: 14px; }
.subtotal-row .val { font-size: 18px; font-weight: 700; }
.note { font-size: 12px; color: var(--muted); }

/* ===== Auth & checkout pages ===== */
.panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px;
  box-shadow: var(--shadow);
}
.panel-narrow { max-width: 440px; margin: 60px auto; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 500; }
.field input, .field textarea {
  padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; outline: none; font-size: 14px;
}
.field input:focus, .field textarea:focus { border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 80px; }

.row2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }

.checkout-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .checkout-grid { grid-template-columns: 1.4fr 1fr; } }

.summary-list { margin-top: 16px; }
.summary-list li {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--border); list-style: none;
}
.summary-list li:first-child { border-top: none; }
.summary-list img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; }
.summary-list .info { flex: 1; font-size: 13px; }
.summary-list .info .nm { font-weight: 500; }
.summary-list .info .sb { font-size: 11px; color: var(--muted); }

.banner-fire {
  display: flex; align-items: center; gap: 16px;
  background: var(--gradient-fire); color: white;
  padding: 24px; border-radius: 16px; box-shadow: var(--shadow);
  margin-bottom: 32px;
}
.banner-fire svg { width: 40px; height: 40px; flex-shrink: 0; }

.notice {
  margin-top: 24px;
  padding: 16px; border: 1px solid rgba(74,158,255,.3); background: rgba(74,158,255,.05);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.notice .t { font-weight: 500; }
.notice .s { font-size: 12px; color: var(--muted); }

.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  padding: 12px 20px; border-radius: 8px; box-shadow: var(--shadow);
  transform: translateY(20px); opacity: 0; pointer-events: none;
  transition: all .25s; z-index: 100;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: var(--primary); }
.toast.error { border-color: var(--danger); }

footer.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(35,42,58,.5);
  padding: 48px 0 0; margin-top: 64px;
  font-size: 14px; color: var(--muted);
}
.footer-grid {
  display: grid; gap: 36px; grid-template-columns: 1fr;
  padding-bottom: 36px; text-align: left;
}
/* About column is given more room once there is space for three columns. */
@media (min-width: 860px) {
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 48px; }
}
.footer-col h4 {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text); margin-bottom: 14px;
}
.footer-about p { line-height: 1.75; margin-bottom: 12px; max-width: 60ch; }
.footer-about p:last-child { margin-bottom: 0; }

.footer-link {
  display: flex; gap: 11px; align-items: flex-start;
  color: var(--muted); line-height: 1.6; padding: 7px 0;
  transition: color .15s;
}
.footer-link:hover { color: var(--text); }
.footer-link:hover b { color: var(--primary); }
.footer-link svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; color: var(--primary); }
.footer-link b { font-weight: 600; color: var(--muted); transition: color .15s; }
.footer-contact { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0; text-align: center; font-size: 13px;
}

.empty-state {
  text-align: center; padding: 64px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  color: var(--muted);
}

.success-icon {
  width: 56px; height: 56px; margin: 0 auto;
  background: rgba(74,158,255,.15); color: var(--primary);
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.ref-pill {
  display: inline-block; margin-top: 16px;
  padding: 6px 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  font-size: 14px; font-family: ui-monospace, SFMono-Regular, monospace;
}
.ref-pill b { color: var(--primary); }

.muted-link { color: var(--muted); text-decoration: underline; }
.muted-link:hover { color: var(--text); }
.center { text-align: center; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }

/* ===== Galaxy Trading additions ===== */
.size-btns { display:flex; flex-wrap:wrap; gap:6px; margin: 10px 0 12px; }
.size-btn {
  padding: 4px 10px; border-radius: 6px; border: 1.5px solid var(--border);
  background: var(--card); color: var(--text); font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.size-btn:hover { border-color: var(--primary); color: var(--primary); }
.size-btn.active { background: var(--primary); border-color: var(--primary); color:#fff; }

/* ===== TOPBAR (Shopee-style) ===== */
.topbar{background:var(--bg);color:var(--text);font-size:13px;padding:0;border-bottom:1px solid var(--border)}
.topbar-inner{display:flex;justify-content:space-between;align-items:center;height:36px}
.tb-left{color:rgba(255,255,255,.85);font-size:12px}
.tb-right{display:flex;align-items:center;gap:6px}
.tb-link{color:var(--muted);cursor:pointer;transition:color .15s;padding:4px 2px}
.tb-link:hover,.tb-bold:hover{color:var(--text)}
.tb-bold{font-weight:600}
.tb-sep{color:var(--border)}
.tb-user-wrap{position:relative}
.tb-user-btn{background:transparent;border:none;color:var(--muted);font-size:13px;cursor:pointer;padding:4px 6px;border-radius:4px;transition:background .15s}
.tb-user-btn:hover{background:var(--surface-2)}
.tb-user-drop{display:none;position:absolute;top:calc(100%+6px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:8px;min-width:160px;box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:200;overflow:hidden}
.tb-user-drop.open{display:block}
.tb-user-drop a,.tb-user-drop button{display:block;width:100%;text-align:left;padding:11px 16px;font-size:14px;color:var(--text);background:transparent;border:none;cursor:pointer;transition:background .15s}
.tb-user-drop a:hover,.tb-user-drop button:hover{background:var(--surface-2)}

/* ===== Notification dropdown ===== */
.notif-wrap{position:relative}
.notif-drop{display:none;position:absolute;top:calc(100%+6px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;width:340px;max-width:88vw;max-height:420px;overflow-y:auto;box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:250}
.notif-drop.open{display:block}
.notif-drop-head{padding:14px 16px;font-size:13px;font-weight:700;color:var(--text);border-bottom:1px solid var(--border);position:sticky;top:0;background:var(--surface)}
.notif-drop-item{display:flex;gap:10px;padding:12px 16px;border-bottom:1px solid var(--border);text-align:left}
.notif-drop-item:last-child{border-bottom:none}
.ndi-icon{width:30px;height:30px;border-radius:50%;background:var(--surface-2);display:flex;align-items:center;justify-content:center;flex-shrink:0;color:var(--accent)}
.ndi-text{min-width:0}
.ndi-title{font-size:13px;font-weight:600;color:var(--text)}
.ndi-desc{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.ndi-time{font-size:11px;color:var(--muted);margin-top:4px}
.notif-drop-empty{padding:28px 16px;text-align:center;font-size:13px;color:var(--muted)}
.notif-drop-viewall{display:block;text-align:center;padding:12px;font-size:13px;font-weight:600;color:var(--primary);border-top:1px solid var(--border);background:var(--surface);position:sticky;bottom:0;cursor:pointer}
.notif-drop-viewall:hover{background:var(--surface-2)}

/* ===== MAIN HEADER (Shopee-style with big search) ===== */
.site-header{position:sticky;top:0;z-index:40;background:rgba(26,31,44,.95);backdrop-filter:blur(10px);border-bottom:1px solid var(--border);padding:10px 0}
.site-header-inner{display:flex;align-items:center;gap:16px}
.header-search{flex:1;max-width:640px;display:flex;background:var(--bg);border:2px solid var(--border);border-radius:8px;overflow:hidden;transition:border-color .2s}
.header-search:focus-within{border-color:var(--accent)}
.header-search input{flex:1;min-width:0;padding:10px 14px;background:transparent;border:none;color:var(--text);font-size:14px}
/* min-width:0 lets the box shrink on phones; without it the input kept its default
   width and pushed the search button out of view. Desktop is unchanged. */
.header-search{min-width:0}
.header-search-btn{flex-shrink:0}
.header-search input:focus{outline:none}
.header-search-btn{padding:0 16px;background:var(--accent-2);border:none;color:#fff;cursor:pointer;font-size:14px;font-weight:600;transition:background .15s;display:flex;align-items:center}
.header-search-btn:hover{background:var(--accent)}
.cart-icon-btn{position:relative;background:transparent;border:none;color:var(--text);cursor:pointer;padding:6px;display:flex;align-items:center;transition:color .15s;margin-left:auto}
.cart-icon-btn:hover{color:var(--accent)}
.cart-badge{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 4px;background:var(--accent);color:#fff;border-radius:999px;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}

/* ===== CART DRAWER ===== */
.drawer-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:800}
.drawer-backdrop.open{display:block}
.drawer{position:fixed;top:0;right:0;height:100%;width:380px;max-width:100vw;background:var(--surface);border-left:1px solid var(--border);z-index:900;transform:translateX(100%);transition:transform .3s;display:flex;flex-direction:column}
.drawer.open{transform:translateX(0)}
.drawer-head{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;border-bottom:1px solid var(--border);flex-shrink:0}
.drawer-head h3{font-size:16px;font-weight:700}
.drawer-body{flex:1;overflow-y:auto;padding:16px 20px;display:flex;flex-direction:column;gap:12px}
.drawer-foot{display:flex;flex-direction:column;gap:10px;padding:16px 20px;border-top:1px solid var(--border);flex-shrink:0}
.subtotal-row{display:flex;justify-content:space-between;font-size:14px}
.subtotal-row .lbl{color:var(--muted)}
.subtotal-row .val{font-weight:700;font-size:17px;color:var(--primary)}
.cart-empty{text-align:center;padding:60px 20px;color:var(--muted);display:flex;flex-direction:column;align-items:center;gap:14px}
.cart-item{display:flex;gap:12px;padding:12px;background:var(--bg);border-radius:10px;position:relative}
.cart-item img{width:64px;height:64px;border-radius:8px;object-fit:cover;flex-shrink:0}
.cart-item .info{flex:1;min-width:0}
.cart-item .name{font-size:14px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cart-item .sub{font-size:12px;color:var(--muted);margin-top:2px}
.cart-item .ctrl-row{display:flex;justify-content:space-between;align-items:center;margin-top:8px}
.cart-item .qty{display:flex;align-items:center;background:var(--surface);border-radius:6px;overflow:hidden}
.cart-item .qty button{width:28px;height:28px;background:transparent;border:none;color:var(--text);font-size:18px;cursor:pointer;transition:background .15s}
.cart-item .qty button:hover{background:var(--surface-2)}
.cart-item .qty span{font-size:14px;font-weight:600;padding:0 8px}
.cart-item .remove{position:absolute;top:8px;right:8px;background:transparent;border:none;color:var(--muted);font-size:16px;cursor:pointer;opacity:.6;transition:opacity .15s}
.cart-item .remove:hover{opacity:1}

/* ===== PADDED SECTION ===== */
.padded{padding:32px 0 64px}

/* ===== Language Switcher ===== */
.lang-wrap{position:relative}
.lang-btn{background:transparent;border:none;color:var(--muted);font-size:13px;cursor:pointer;padding:4px 6px;border-radius:4px;display:flex;align-items:center;gap:4px;transition:color .15s}
.lang-btn:hover{color:var(--text)}
.lang-drop{display:none;position:absolute;top:calc(100%+6px);right:0;background:var(--surface);border:1px solid var(--border);border-radius:8px;min-width:140px;box-shadow:0 8px 24px rgba(0,0,0,.4);z-index:300;overflow:hidden}
.lang-drop.open{display:block}
.lang-drop button{display:block;width:100%;text-align:left;padding:10px 16px;font-size:13px;color:var(--text);background:transparent;border:none;cursor:pointer;transition:background .15s;display:flex;align-items:center;gap:8px}
.lang-drop button:hover{background:var(--surface-2)}
.lang-drop button.active{color:var(--accent);font-weight:600}

/* ===== Sticky header stays on scroll ===== */
.topbar{position:sticky;top:0;z-index:50}
.site-header{position:sticky;top:37px;z-index:40}

/* Very narrow phones (320-360px): keep the top bar on one line. The bell icon
   stays; only the word "Notifications" is dropped. */
@media (max-width: 360px) {
  .tb-right { gap:4px; }
  .tb-link, .lang-btn { white-space:nowrap; }
  #lbl-notifications { display:none; }
}
