/* ============ FairBargains — Mastercard-inspired editorial theme ============ */
:root {
  /* palette */
  --canvas: #F3F0EE;
  --lifted: #FCFBFA;
  --white: #FFFFFF;
  --bone: #F4F4F4;
  --ink: #141413;
  --charcoal: #262627;
  --slate: #696969;
  --graphite: #565656;
  --whisper: #D8D3CB;
  --link-blue: #3860BE;
  --signal: #CF4500;
  --signal-light: #F37338;
  --clay: #9A3A0A;
  --ok: #2E7D5B;
  --warn: #B7791F;
  --tan: #C4451E;
  --tan-dark: #9A3A0A;
  /* radii */
  --r-btn: 20px;
  --r-stadium: 40px;
  --r-pill: 999px;
  --r-circle: 50%;
  /* elevation */
  --sh-1: rgba(0,0,0,0.04) 0 4px 24px 0;
  --sh-2: rgba(0,0,0,0.08) 0 24px 48px 0;
  --sh-3: rgba(0,0,0,0.20) 0 40px 70px 0;
  /* type */
  --font: 'Geologica', 'Sofia Sans', 'Inter', system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 450;
  letter-spacing: -0.01em;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
}

h1,h2,h3,h4,p { margin: 0; }
h1,h2,h3 { font-weight: 500; letter-spacing: -0.02em; color: var(--ink); }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--signal-light); outline-offset: 2px; }

.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 24px; }

/* ---------- typography ---------- */
.hero-h { font-size: clamp(40px, 7vw, 64px); line-height: 1.0; font-weight: 500; letter-spacing: -0.03em; }
.h2 { font-size: clamp(28px, 4vw, 36px); line-height: 1.1; }
.h3 { font-size: 24px; line-height: 1.2; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink);
}
.eyebrow::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--signal-light); }
.muted { color: var(--ink); opacity: .62; }
.small { font-size: 14px; }
.sub { font-size: clamp(16px, 2vw, 18px); color: var(--charcoal); max-width: 34em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; font-weight: 500; letter-spacing: -0.02em;
  border-radius: var(--r-btn); padding: 14px 26px; border: 1.5px solid var(--ink);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  background: none; color: var(--ink); line-height: 1;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: var(--canvas); border-color: var(--ink); box-shadow: var(--sh-1); }
.btn-primary:hover { box-shadow: var(--sh-2); }
.btn-outline { background: var(--white); border-color: var(--ink); }
.btn-outline:hover { background: var(--bone); }
.btn-ghost { background: transparent; border-color: rgba(20,20,19,.4); }
.btn-amber { background: var(--tan); border-color: var(--tan); color: var(--white); }
.btn-amber:hover { box-shadow: var(--sh-2); }
.btn-block { width: 100%; }
.btn-sm { padding: 10px 18px; font-size: 14px; border-radius: var(--r-btn); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------- badge / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .02em;
  padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--white); color: var(--ink); border: 1px solid rgba(20,20,19,.15);
  white-space: nowrap;
}
.badge.dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); border-color: rgba(32,125,91,.35); background: rgba(201,233,218,.5); }
.badge-warn { color: var(--warn); border-color: rgba(183,121,31,.35); background: rgba(245,228,197,.5); }
.badge-tan { color: var(--tan); border-color: rgba(201,69,0,.3); background: rgba(243,115,56,.12); }
.badge-amber-solid { color: var(--white); background: var(--tan); border-color: var(--tan); }
.badge-ink { color: var(--canvas); background: var(--ink); border-color: var(--ink); }
.tag {
  display: inline-block; font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: var(--r-pill);
  background: var(--white); border: 1px solid rgba(20,20,19,.15);
}

/* ---------- floating nav ---------- */
.nav-wrap { position: sticky; top: 16px; z-index: 50; padding: 8px 24px 0; }
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(10px);
  border-radius: var(--r-pill); padding: 12px 22px;
  box-shadow: var(--sh-1); border: 1px solid rgba(20,20,19,.05);
  max-width: 1220px; margin: 0 auto;
}
.nav .brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -.02em; }
.nav .mark { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--canvas); display: grid; place-items: center; font-weight: 500; }
.nav-links { display: flex; gap: 34px; align-items: center; }
.nav-links a { font-size: 15px; font-weight: 500; opacity: .82; }
.nav-links a:hover, .nav-links a.active { opacity: 1; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--ink); color: var(--tan);
  border: 1.5px solid transparent; display: grid; place-items: center;
  box-shadow: var(--sh-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.icon-btn svg { transition: transform .35s ease; stroke: var(--tan); stroke-width: 2; }
.icon-btn:hover { border-color: var(--tan); transform: translateY(-1px); box-shadow: var(--sh-2); }
.icon-btn.active svg { transform: rotate(90deg); }

/* cart button + count chip */
.cart-btn { position: relative; background: var(--canvas); border-color: rgba(20,20,19,.08); }
.cart-btn svg { stroke: var(--ink); }
.cart-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--tan); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; display: inline-block; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.add-cart svg { vertical-align: -3px; }
.mobile-cart { border: 0; background: transparent; padding: 14px 20px; border-radius: var(--r-btn); font-weight: 500; text-align: left; font-size: 15px; }
.mobile-cart:hover { background: var(--bone); }

/* slide-out cart drawer */
.cart-mask { position: fixed; inset: 0; background: rgba(20,20,19,.45); backdrop-filter: blur(3px); z-index: 320; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.cart-mask.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw);
  background: var(--canvas); z-index: 330; box-shadow: var(--sh-3);
  transform: translateX(105%); transition: transform .38s cubic-bezier(.22,.9,.3,1);
  display: flex; flex-direction: column; overflow-y: auto;
}
.cart-drawer.open { transform: translateX(0); }
.cart-drawer-body { padding: 22px 20px 32px; display: flex; flex-direction: column; flex: 1; }
.cart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-head .cart-count { font-weight: 600; font-size: 14px; color: var(--tan); }
.cart-empty { display: flex; flex-direction: column; gap: 14px; margin-top: 8vh; }
.cart-row { display: flex; gap: 12px; align-items: center; background: var(--white); border-radius: 18px; padding: 10px 12px; margin-bottom: 10px; box-shadow: var(--sh-1); }
.cart-row-thumb { width: 48px; height: 58px; border-radius: 12px; overflow: hidden; flex: none; display: grid; place-items: center; }
.cart-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cart-row-mid b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-row-rm { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(20,20,19,.15); background: transparent; color: var(--charcoal); display: grid; place-items: center; }
.cart-row-rm:hover { background: var(--bone); }
.cart-actions { margin-top: auto; }
.cart-actions .btn { margin-bottom: 8px; }

/* volume-discount promo banner */
.promo-banner { background: linear-gradient(90deg, var(--tan-dark), var(--signal-light)); color: #fff; border-radius: var(--r-btn); margin: 24px 0 0; padding: 16px 20px; }
@media (max-width: 640px) { .promo-banner { margin: 16px 0 0; padding: 14px 14px; } }
.promo-banner-inner { text-align: center; }
@media (max-width: 640px) { .promo-banner b { font-size: 13px !important; } }
.link-pill { padding: 11px 20px; background: var(--ink); color: var(--canvas); border-radius: var(--r-pill); font-size: 14px; font-weight: 500; }
.link-pill:hover { box-shadow: var(--sh-1); }
.hamburger { display: none; }
.mobile-menu {
  display: none; flex-direction: column; gap: 8px; padding: 20px;
  background: var(--white); border-radius: 28px; margin: 12px 24px; box-shadow: var(--sh-2);
}
.mobile-menu a { padding: 14px 20px; border-radius: var(--r-btn); font-weight: 500; }
.mobile-menu a:hover { background: var(--bone); }
.mobile-menu.open { display: flex; }

/* ---------- layout sections ---------- */
.section { padding: clamp(56px, 8vw, 120px) 0; }
.hero-section { padding-top: clamp(48px, 6vw, 88px); }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.stack-sm { gap: 12px; }
.stack-md { gap: 24px; }
.stack-lg { gap: 40px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.space-between { justify-content: space-between; }

/* ---------- cards ---------- */
.card {
  background: var(--lifted); border-radius: var(--r-stadium);
  border: 1px solid rgba(20,20,19,.06); overflow: hidden;
}
.card-pad { padding: clamp(20px, 3vw, 36px); }

/* product tile */
.tile { background: transparent; border-radius: calc(var(--r-btn) + 8px); overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.tile:hover { transform: translateY(-4px); }
.tile-media { position: relative; aspect-ratio: 4/5; border-radius: var(--r-stadium); overflow: hidden; background: var(--lifted); }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile:hover .tile-media img { transform: scale(1.04); }
.tile-overlay { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; gap: 8px; }
.tile-body { padding: 16px 6px 4px; display: flex; flex-direction: column; gap: 6px; }
.tile-body .price { font-weight: 600; letter-spacing: -.02em; margin-top: 6px; }

/* flag: sold / archived / hold */
.flag { position: absolute; inset: 12px; border-radius: calc(var(--r-stadium) - 12px); display: grid; place-items: center; text-align: center; }
.flag-sold { background: rgba(20,20,19,.68); color: var(--white); backdrop-filter: blur(3px); }
.flag-hold { background: rgba(201,69,0,.82); color: var(--white); backdrop-filter: blur(3px); }
.flag .inner { padding: 0 16px; }
.flag b { font-size: 26px; font-weight: 500; letter-spacing: -.02em; display: block; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.input, select.input, textarea.input {
  width: 100%; background: var(--white);
  border: 1px solid rgba(20,20,19,.22); border-radius: var(--r-btn);
  padding: 14px 18px; font-size: 15px; font-family: inherit; color: var(--ink); font-weight: 450;
}
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,19,.06); }
textarea.input { min-height: 100px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23141413' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 16px center; }

/* segmented / pill control */
.pill-group { display: inline-flex; gap: 4px; background: var(--lifted); border: 1px solid rgba(20,20,19,.1); border-radius: var(--r-pill); padding: 4px; }
.pill-group button { border: 0; background: transparent; padding: 9px 18px; border-radius: var(--r-pill); font-size: 14px; font-weight: 500; color: var(--charcoal); }
.pill-group button.active { background: var(--ink); color: var(--canvas); }

/* ---------- hero frame ---------- */
.hero-media { border-radius: 40px; height: clamp(320px, 60vh, 560px); background: var(--ink); overflow: hidden; position: relative; }

/* ---------- hero slider ---------- */
.hero-slider { position: relative; width: 100%; height: 100%; }
.hero-track { position: absolute; inset: 0; }
.hero-slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.02); transition: opacity .9s ease, transform 1.2s ease; }
.hero-slide.active { opacity: 1; transform: scale(1); z-index: 2; }
.hero-slide a { display: block; width: 100%; height: 100%; }
/* portrait photos belong in a landscape frame — cover crops the top/bottom,
   keeps the subject centred and always fills the full hero area */
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.hero-caption { position: absolute; left: 20px; bottom: 18px; z-index: 3; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
.hero-title { font-size: 17px; font-weight: 600; color: #fff; text-shadow: 0 1px 12px rgba(0,0,0,.35); max-width: 60vw; }
.hero-sub { font-size: 13px; color: rgba(255,255,255,.85); text-shadow: 0 1px 8px rgba(0,0,0,.35); }
.hero-dots { position: absolute; right: 20px; bottom: 22px; z-index: 3; display: flex; gap: 7px; }
.hero-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); border: 0; padding: 0; cursor: pointer; transition: background .3s ease, width .3s ease; }
.hero-dot.active { background: #fff; width: 22px; border-radius: 999px; }
@media (max-width: 600px) {
  .hero-caption { left: 14px; bottom: 14px; }
  .hero-dots { right: 14px; bottom: 18px; }
  .hero-title { font-size: 15px; max-width: 70vw; }
}

/* ---------- archive gallery ---------- */
.arch-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 16px; align-items: center; padding: 16px; border-radius: calc(var(--r-stadium) - 12px); background: var(--white); }
.arch-row img, .arch-thumb { width: 56px; height: 56px; border-radius: 20px; object-fit: cover; background: var(--bone); place-items: center; display: grid; }

/* ---------- feature cards ---------- */
.feature { background: var(--lifted); border: 1px solid rgba(20,20,19,.06); border-radius: var(--r-stadium); padding: 32px; display: flex; flex-direction: column; gap: 14px; }
.feature .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--white); display: grid; place-items: center; box-shadow: var(--sh-1); }

/* ---------- footer ---------- */
footer { background: var(--ink); color: #fff; margin-top: 80px; }
.foot-inner { padding: 72px 24px 40px; max-width: 1220px; margin: 0 auto; }
.foot-top { display: grid; gap: 40px; grid-template-columns: 1.2fr 2fr; padding-bottom: 48px; }
.foot-top h2 { color: #fff; font-size: clamp(28px,4vw,38px); }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-links h4 { font-size: 12.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; opacity: .5; margin-bottom: 16px; }
.foot-links a { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; opacity: .85; }
.foot-links a:hover { opacity: 1; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,.16); padding-top: 28px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; font-size: 13px; opacity: .7; }
.foot-social { display: flex; gap: 10px; }
.foot-social svg { width: 20px; height: 20px; }

/* ---------- product hero ---------- */
.pg-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.slider-frame { position: relative; border-radius: var(--r-stadium); overflow: hidden; aspect-ratio: 4/5; background: var(--ink); touch-action: pan-y; }
.slider-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slider-frame .img-after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.slider-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px;
  background: var(--white); transform: translateX(-1px); z-index: 5; cursor: ew-resize;
}
.slider-handle::after {
  content: '⇔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 46px; height: 46px; border-radius: 50%; background: var(--white); color: var(--ink);
  display:grid; place-items:center; box-shadow: var(--sh-2); font-weight: 700;
}
.slider-label { position: absolute; z-index: 6; bottom: 16px; color: var(--white); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing:.04em; }
.slider-label.before { left: 16px; } .slider-label.after { right: 16px; }
.img-frame-lg { position: relative; border-radius: var(--r-stadium); overflow: hidden; aspect-ratio: 4/5; background: var(--ink); }
.img-frame-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.gal-thumb { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; padding: 0; border: 2px solid transparent; cursor: pointer; background: #eee; opacity: .7; }
.gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal-thumb.active { border-color: var(--tan); opacity: 1; }
.specs { border-top: 1px solid rgba(20,20,19,.1); }
.spec-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(20,20,19,.08); font-size: 14.5px; }
.spec-row .k { opacity: .62; }

/* ---------- scale visualizer ---------- */
.scale-stage { background: var(--ink); border-radius: var(--r-stadium); padding: 28px; position: relative; overflow: hidden; color: #fff; min-height: 320px; display: flex; flex-direction: column; }
.scale-floor { flex: 1; position: relative; margin-top: 20px; background: linear-gradient(rgba(255,255,255,.05), rgba(255,255,255,0)); border-top: 1px solid rgba(255,255,255,.25); }
.scale-item { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; color: var(--white); font-size: 12px; }
.scale-chiprow { display: flex; gap: 8px; flex-wrap: wrap; }
.scale-chip { display:flex; flex-direction:column; align-items:center; gap:4px; padding: 8px 10px; border-radius: 16px; background: rgba(255,255,255,.10); font-size: 11px; }
.scale-chip.active { background: var(--tan); }
.scale-chip .bar { height: var(--h, 12px); width: 34px; border-radius: 8px; background: rgba(255,255,255,.5); }
.scale-chip.active .bar { background: rgba(255,255,255,.85); }

/* ---------- timer ---------- */
.timer-card { background: var(--ink); color: #fff; border-radius: var(--r-btn); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.timer-digits { display: flex; gap: 10px; align-items: center; }
.timer-unit b { font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.timer-unit span { display:block; font-size:11px; opacity:.6; text-transform: uppercase; letter-spacing:.05em; margin-top: 2px; }
.timer-colon { font-size: 28px; opacity: .5; }

/* ---------- trust / steps ---------- */
.step { display: flex; gap: 14px; align-items: flex-start; }
.step-num { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--canvas); display: grid; place-items: center; font-weight: 500; font-size: 14px; }

/* ---------- admin ---------- */
.subnav { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }
.subnav a { border:1.5px solid rgba(20,20,19,.2); background:transparent; border-radius:1000px; padding:9px 18px; font-size:14px; font-weight:500; }
.subnav a.active { background:var(--ink); color:var(--canvas); border-color:var(--ink); }
.item-row { display:grid; grid-template-columns:64px 1fr auto; gap:22px; align-items:center; padding:18px; border-radius:24px; background:var(--white); box-shadow:var(--sh-1); }
.item-row .thumb { position: relative; width:64px; height:64px; border-radius:20px; overflow:hidden; background:var(--bone); display:grid; place-items:center; flex:none; }
.item-row .thumb img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; display:block; }
.item-row .thumb svg { width:22px; height:22px; color:var(--charcoal); }
.order-card { background:var(--white); border-radius:28px; padding:18px; box-shadow:var(--sh-1); }
.login-screen { min-height:70vh; display:grid; place-items:center; padding:40px 24px; }
.login-card { max-width:420px; width:100%; }
.admin-grid { display: grid; grid-template-columns: 320px 1fr; gap: 28px; align-items: start; }
.stat { background: var(--lifted); border:1px solid rgba(20,20,19,.06); border-radius: var(--r-stadium); padding: 24px; }
.stat b { font-size: 34px; font-weight: 500; letter-spacing: -.03em; display: block; }
.stat span { font-size: 13px; opacity: .6; text-transform: uppercase; letter-spacing:.04em; }
.upload-thumbs { display:grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 12px; }
.upload-tile { width: 100%; aspect-ratio: 4/5; border: 2px dashed rgba(20,20,19,.25); border-radius: var(--r-btn); display: grid; place-items: center; text-align: center; color: var(--charcoal); font-size: 13px; cursor: pointer; overflow:hidden; position:relative; background: var(--lifted); }
.upload-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.upload-tile.done { border-style: solid; border-color: var(--ok); cursor: default; }
.upload-emoji { font-size: 20px; }
.ph-rm { position: absolute; top: 8px; right: 8px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; background: rgba(20,20,19,.72); color: #fff; border: none; cursor: pointer; line-height: 1; font-size: 17px; }
.ph-rm:hover { background: var(--tan); }
table.data { width:100%; border-collapse: collapse; }
table.data th, table.data td { text-align:left; padding: 14px 12px; border-bottom: 1px solid rgba(20,20,19,.08); font-size: 14px; vertical-align: middle; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing:.05em; opacity:.55; font-weight:700; }

/* quick-add sheet */
.quick-bar { position: sticky; bottom: 14px; z-index: 40; }
.quick-bar .inner { display:flex; gap:10px; align-items:center; background:rgba(20,20,19,.92); color:#fff; padding:10px 14px; border-radius:1000px; box-shadow: var(--sh-3); max-width:560px; margin:0 auto; backdrop-filter: blur(6px); }

/* receipt drop */
.drop { border: 2px dashed rgba(20,20,19,.28); border-radius: var(--r-btn); padding: 28px; text-align:center; cursor:pointer; background: var(--lifted); }
.drop:hover { border-color: var(--ink); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--canvas); padding: 14px 22px; border-radius: 1000px; font-size: 14px; font-weight: 500; opacity:0; pointer-events:none; transition: .25s; z-index: 200; box-shadow: var(--sh-3); }
.modal-mask { position: fixed; inset: 0; background: rgba(20,20,19,.5); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 20px; z-index: 300; opacity: 0; pointer-events: none; transition: opacity .25s; }
.modal-mask.open { opacity: 1; pointer-events: auto; }
.modal-mask > .card { max-width: 460px; width: 100%; }
.cons-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.cons-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(20,20,19,.12); }
#convertModal > .card { max-width: 640px; }
.toast.show { opacity:1; transform: translateX(-50%) translateY(0); }

/* loading / skeleton */
.skeleton { position:relative; overflow:hidden; background: var(--whisper); }
.skeleton::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); transform: translateX(-100%); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }

/* responsive */
@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .pg-grid { grid-template-columns: 1fr; gap: 28px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .form-grid.single { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav-links { display:none; }
}
@media (max-width: 640px) {
  .nav-links { display:none; }
  .hamburger { display: grid; }
  .nav-wrap { padding: 8px 12px 0; }
  .nav { padding: 10px 14px; gap: 10px; }
  .nav .brand { gap: 8px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .grid-3 .feature { grid-column: 1 / -1; }
  .grid-2 { grid-template-columns: 1fr; }
  .tile-body { padding: 12px 2px 2px; gap: 4px; }
  .container { padding: 0 16px; }
  .foot-top { grid-template-columns: 1fr; }
  .foot-links { grid-template-columns: 1fr; }
  .hero { font-size: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .scale-stage { min-height: 240px; }
  .btn { padding: 13px 20px; font-size: 15px; }
  .h2 { font-size: 26px; }
  .section { padding: 48px 0; }
  .stat { padding: 20px; }
  .stat b { font-size: 28px; }
  .order-card .row.space-between { flex-wrap: wrap; gap: 8px; }
}
/* ---------- alert / flash messages ---------- */
.alert { padding: 14px 18px; border-radius: 20px; font-size: 14px; font-weight: 500; margin-bottom: 20px; }
.alert-error { background: rgba(201,69,0,.12); color: var(--clay); border: 1px solid rgba(201,69,0,.3); }
.alert-ok { background: rgba(32,125,91,.12); color: var(--ok); border: 1px solid rgba(32,125,91,.3); }

/* ============ Mobile polish — applies ONLY to phones (< 641px). Desktop untouched ============ */
@media (max-width: 640px) {
  /* nav — keep the pill aligned with the page gutter */
  .nav-wrap { top: 8px; padding: 6px 16px 0; }
  .nav { border-radius: 22px; padding: 10px 14px; gap: 10px; }
  .nav .brand img { height: 48px !important; }
  .icon-btn { width: 44px; height: 44px; }
  .js-menu-btn { background: var(--canvas); border-color: rgba(20,20,19,.08); }
  .js-menu-btn svg { stroke: var(--ink); }

  /* page rhythm — keep horizontal breathing room on every section */
  .container { padding: 0 16px; }
  .section { padding: 44px 16px; }
  section.section.container { padding: 44px 16px; }
  .hero-section { padding-top: 32px; }
  .hero-h { font-size: clamp(36px, 11vw, 40px); }
  .sub { font-size: 15px; }
  .h2 { font-size: 27px; }

  /* filter pills: one scrollable row instead of squeezing the grid */
  .pill-group { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; scrollbar-width: none; }
  .pill-group::-webkit-scrollbar { display: none; }
  .pill-group button { white-space: nowrap; padding: 9px 14px; }
  .row.space-between { gap: 12px; }

  /* tiles — 2-up but comfortable on phones */
  .grid-3, .grid-4 { gap: 12px; }
  .tile-media { border-radius: 22px; }
  .tile-overlay { top: 10px; left: 10px; right: 10px; }
  .tile-overlay .badge { padding: 5px 10px; font-size: 11px; }
  .tile-body { padding: 12px 2px 2px; gap: 4px; }
  .tile-body .h3 { font-size: 16px !important; }
  .tile-body .price { font-size: 15px; }
  .tile-body .tag, .tile-body .small.muted { font-size: 11.5px; }
  .tile-body .btn-sm { padding: 8px 12px; font-size: 12.5px; }
  .flag { inset: 10px; }
  .flag b { font-size: 20px; }

  /* product page */
  .pg-grid { gap: 24px; }
  .pg-grid .stack-lg { position: static !important; }
  .slider-frame, .img-frame-lg { border-radius: 22px; }
  .gal-thumb { width: 56px; height: 56px; border-radius: 12px; }
  .scale-stage { padding: 18px; border-radius: 22px; min-height: 220px; }
  .spec-row { font-size: 13.5px; }
  .card-pad { padding: 20px; }
  .timer-card { padding: 18px; }
  .step-num { width: 30px; height: 30px; font-size: 13px; }

  /* hero slider on phones */
  .hero-media { border-radius: 22px; height: clamp(280px, 48vh, 420px); }
  .hero-title { font-size: 14px; max-width: 74vw; }
  .hero-caption { left: 12px; bottom: 12px; right: 12px; }
  .hero-dots { right: 12px; bottom: 16px; }

  /* drop zone + thumbs */
  .drop { padding: 22px 14px; }
  .cons-thumbs img { width: 56px; height: 56px; }
  .upload-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 10px; }
  .upload-thumbs { gap: 12px; }

  /* footer — 3 compact link columns instead of a tall single stack */
  .foot-inner { padding: 48px 16px 28px; }
  .foot-top { grid-template-columns: 1fr; gap: 24px; padding-bottom: 28px; }
  .foot-top h2 { font-size: 26px; }
  .foot-links { grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
  .foot-links h4 { margin-bottom: 10px; }
  .foot-links a { padding: 4px 0; font-size: 13px; }
  .foot-bottom { justify-content: center; text-align: center; gap: 12px; }
  .foot-social { justify-content: center; }

  /* admin on phones */
  .item-row { grid-template-columns: 48px 1fr; gap: 14px; padding: 14px; border-radius: 20px; }
  .item-row .thumb { width: 48px; height: 48px; border-radius: 14px; }
  .item-row > .row { grid-column: 1 / -1; justify-content: flex-start; }
  .stat { padding: 18px; }
  .stat b { font-size: 26px; }
  .subnav a { flex: 1 1 auto; text-align: center; padding: 9px 12px; font-size: 13px; }
  .admin-grid { gap: 20px; }

  /* modal + toast */
  .modal-mask { padding: 14px; }
  .modal-mask > .card { max-width: 100%; }
  .toast { left: 16px; right: 16px; transform: translateY(20px); justify-content: center; }
  .toast.show { transform: translateY(0); }
}

@media (max-width: 400px) {
  .nav-wrap { padding: 6px 14px 0; }
  .nav .brand img { height: 44px !important; }
  .section { padding: 38px 16px; }
  section.section.container { padding: 38px 16px; }
  .grid-3, .grid-4 { gap: 10px; }
  .tile-body .h3 { font-size: 15px !important; }
  .tile-body .price { font-size: 14px; }
  .tile-overlay .badge { padding: 4px 8px; font-size: 10.5px; }
  .hero-h { font-size: 33px; }
  .hero-media { height: clamp(260px, 46vh, 380px); }
  .stat b { font-size: 24px; }
  .foot-links { grid-template-columns: repeat(3, 1fr); gap: 12px 10px; }
  .foot-links a { font-size: 12.5px; }
  .foot-top h2 { font-size: 24px; }
}

/* prevent accidental horizontal scroll on tiny screens */
html, body { overflow-x: hidden; }
