/* Kashane Amn — public site & customer panel */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-var.woff2") format("woff2-variations"), url("../fonts/Vazirmatn-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --brand: #f5a524;
  --brand-ink: #1a1203;
  --brand-soft: color-mix(in srgb, var(--brand) 14%, transparent);
  --ink: #0b1220;
  --ink-2: #111a2e;
  --ink-3: #1b2640;
  --bg: #f4f5f9;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e4e7ef;
  --success: #16a34a;
  --danger: #dc2626;
  --info: #2563eb;
  --warning: #d97706;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .35);
  --container: 1240px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { overflow-x: clip; }
.panel-layout > *, .wh-layout > *, .shop-layout > *, .checkout-grid > *, .product-page > *, .contact-grid > *, .grid > * { min-width: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-feature-settings: "ss01";
  background: var(--bg);
  color: var(--text);
  line-height: 1.85;
  font-size: 15px;
  direction: rtl;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { line-height: 1.45; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
.ltr { direction: ltr; unicode-bidi: embed; display: inline-block; }
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.hide-mobile { }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-split { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 960px) { .grid-split { grid-template-columns: minmax(0, 1fr); } }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 700; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s;
  background: var(--surface); color: var(--text); border-color: var(--line);
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled, .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); box-shadow: 0 8px 24px -10px var(--brand); }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .22); color: #fff; }
.btn-light { background: var(--surface-2); border-color: var(--line); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }
.btn-lg { height: 54px; padding: 0 30px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-icon { width: 42px; padding: 0; }
.link { color: var(--info); font-weight: 600; }
.link:hover { text-decoration: underline; }

/* ----------------------------------------------------------------- badges */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; line-height: 1.9; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-amber { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-violet { background: #ede9fe; color: #5b21b6; }
.badge-teal { background: #ccfbf1; color: #115e59; }
.badge-gray { background: #f1f5f9; color: #475569; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 60%, #000); font-size: 12.5px; font-weight: 700; }

/* ------------------------------------------------------------------ forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 13.5px; }
.field .hint { font-size: 12px; color: var(--muted); }
.req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 48px; padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--surface); transition: border-color .2s, box-shadow .2s; outline: none;
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.9; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.is-invalid { border-color: var(--danger); }
.input-lg { min-height: 56px; font-size: 17px; }
.otp-input { letter-spacing: 14px; text-align: center; font-size: 26px; font-weight: 800; direction: ltr; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); margin-top: 4px; flex: none; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid .span-2 { grid-column: 1 / -1; }

/* segmented choice (user / colleague) */
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; }
.choice-card .choice-body { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); transition: .2s; height: 100%; }
.choice-card .choice-body strong { font-size: 16px; }
.choice-card .choice-body span { color: var(--muted); font-size: 13px; line-height: 1.8; }
.choice-card input:checked + .choice-body { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.choice-card input:focus-visible + .choice-body { outline: 2px solid var(--brand); }

/* ----------------------------------------------------------------- alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; line-height: 1.9; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.flash-stack { position: fixed; top: calc(var(--header-h) + 12px); left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 10px; width: min(560px, calc(100% - 32px)); }
.flash-stack .alert { box-shadow: var(--shadow-lg); animation: drop .35s ease; }
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } }

/* ------------------------------------------------------------------- card */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-body { padding: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 16px; }

/* ----------------------------------------------------------------- header */
.announce-bar { background: var(--ink); color: #e2e8f0; font-size: 13px; }
.announce-bar .container { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 40px; text-align: center; }
.announce-bar strong { color: var(--brand); }
.site-header { position: sticky; top: 0; z-index: 60; background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.site-header .container { display: flex; align-items: center; gap: 28px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { height: 38px; width: auto; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 600; font-size: 14.5px; color: #334155; transition: .2s; }
.main-nav a:hover { background: var(--surface-2); color: var(--text); }
.main-nav a.active { background: var(--ink); color: #fff; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }
.cart-btn { position: relative; }
.cart-count { position: absolute; top: -4px; left: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.menu-toggle { display: none; }
.mobile-nav { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 23, .55); opacity: 0; pointer-events: none; transition: .25s; }
.mobile-nav.open { opacity: 1; pointer-events: auto; }
.mobile-nav-panel { position: absolute; top: 0; bottom: 0; right: 0; width: min(320px, 86vw); background: var(--surface); padding: 22px; transform: translateX(100%); transition: transform .3s ease; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.mobile-nav.open .mobile-nav-panel { transform: none; }
.mobile-nav-panel a { padding: 12px 14px; border-radius: 12px; font-weight: 600; }
.mobile-nav-panel a.active, .mobile-nav-panel a:hover { background: var(--surface-2); }

/* --------------------------------------------------------------- sections */
.section { padding-block: 84px; }
.section-tight { padding-block: 56px; }
.section-dark { background: var(--ink); color: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 36px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(22px, 3vw, 34px); margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--muted); max-width: 560px; }
.section-dark .section-head p { color: #94a3b8; }
.kicker { display: inline-block; color: color-mix(in srgb, var(--brand) 75%, #000); font-weight: 800; font-size: 13px; margin-bottom: 6px; letter-spacing: .02em; }
.section-dark .kicker { color: var(--brand); }

.features { margin-top: -56px; position: relative; z-index: 2; }
.features .grid { background: var(--surface); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 10px; border: 1px solid var(--line); }
.feature { display: flex; gap: 14px; align-items: center; padding: 18px; border-radius: 18px; }
.feature + .feature { }
.feature .f-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 70%, #000); flex: none; }
.feature h3 { font-size: 15px; margin: 0 0 2px; }
.feature p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }

.cat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.cat-tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 200px; padding: 22px; border-radius: 22px; overflow: hidden; background: var(--ink-2); color: #fff; isolation: isolate; transition: transform .25s; }
.cat-tile:hover { transform: translateY(-4px); }
.cat-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; opacity: .55; transition: transform .5s, opacity .3s; }
.cat-tile:hover img { transform: scale(1.06); opacity: .7; }
.cat-tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(2, 6, 23, .92), rgba(2, 6, 23, .1)); }
.cat-tile h3 { margin: 0; font-size: 18px; }
.cat-tile span { font-size: 13px; color: #cbd5e1; }

.service-card { padding: 28px; border-radius: 22px; background: var(--ink-2); border: 1px solid rgba(255, 255, 255, .08); transition: .25s; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.service-card:hover { border-color: color-mix(in srgb, var(--brand) 60%, transparent); transform: translateY(-4px); }
.service-card .s-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.service-card h3 { margin: 4px 0 0; font-size: 18px; }
.service-card p { color: #94a3b8; margin: 0; font-size: 14px; flex: 1; }
.service-card .more { color: var(--brand); font-weight: 700; font-size: 13.5px; display: inline-flex; gap: 6px; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.stat b { display: block; font-size: 34px; font-weight: 900; color: var(--text); }
.stat span { color: var(--muted); font-weight: 600; }

.cta-band { position: relative; overflow: hidden; border-radius: 28px; padding: 48px; background: linear-gradient(120deg, var(--ink) 0%, var(--ink-3) 100%); color: #fff; display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; isolation: isolate; }
.cta-band::before { content: ""; position: absolute; width: 460px; height: 460px; left: -120px; top: -200px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 55%, transparent), transparent 65%); z-index: -1; }
.cta-band h2 { font-size: clamp(22px, 3vw, 32px); }
.cta-band p { color: #cbd5e1; margin: 0; max-width: 620px; }

.testimonial { padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); height: 100%; display: flex; flex-direction: column; gap: 16px; }
.testimonial p { margin: 0; font-size: 15.5px; flex: 1; }
.testimonial .who { display: flex; gap: 12px; align-items: center; }
.testimonial .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--ink); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.testimonial .quote { color: var(--brand); width: 34px; height: 34px; }

/* --------------------------------------------------------- product cards */
.products-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.product-card { position: relative; display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s, border-color .25s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(15, 23, 42, .4); border-color: #d5dae4; }
.product-card .thumb { aspect-ratio: 1 / 1; margin: 8px 8px 0; border-radius: 14px; background: #fff; display: grid; place-items: center; overflow: hidden; position: relative; }
.product-card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .5s; }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .thumb .badge { position: absolute; top: 12px; right: 12px; }
.product-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.product-card .cat { font-size: 12px; color: var(--muted); font-weight: 600; }
.product-card h3 { font-size: 14.5px; margin: 0; line-height: 1.8; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 52px; }
.product-card .price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; }
.price { font-weight: 800; font-size: 16px; }
.price small { font-size: 12px; font-weight: 600; color: var(--muted); }
.price-old { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.price-off { background: var(--danger); color: #fff; border-radius: 8px; padding: 0 7px; font-size: 12px; font-weight: 800; }
.no-thumb { color: #cbd5e1; }

/* shop layout */
.page-hero { background: linear-gradient(135deg, #131d33, var(--ink) 65%); color: #fff; padding: 50px 0 60px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(520px 260px at 92% 0%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); }
.page-hero .container { position: relative; }
.page-hero .container::after { content: ""; position: absolute; right: 20px; bottom: -26px; width: 64px; height: 3px; border-radius: 3px; background: var(--brand); }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.page-hero h1 { font-size: clamp(24px, 3.4vw, 38px); margin: 6px 0 4px; }
.page-hero p { color: #cbd5e1; margin: 0; }
.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; color: #94a3b8; }
.breadcrumbs a:hover { color: #fff; }
.breadcrumbs.dark { color: var(--muted); }
.breadcrumbs.dark a:hover { color: var(--text); }
.shop-layout { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; padding-block: 36px 80px; }
.sidebar { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 16px; }
.cat-list { list-style: none; margin: 0; padding: 8px; }
.cat-list a { display: flex; justify-content: space-between; padding: 9px 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #334155; }
.cat-list a:hover { background: var(--surface-2); }
.cat-list a.active { background: var(--ink); color: #fff; }
.cat-list a span { color: var(--muted); font-size: 12px; }
.cat-list a.active span { color: #cbd5e1; }
.cat-list ul { list-style: none; padding-inline-start: 14px; margin: 0; }
.toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.search-box { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-box .icon { position: absolute; top: 50%; right: 16px; transform: translateY(-50%); color: var(--muted); }
.search-box .input { padding-right: 46px; border-radius: 999px; }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 36px; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 42px; height: 42px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); font-weight: 700; }
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }

/* product page */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; padding-block: 36px 60px; align-items: start; }
.gallery-main { border-radius: 24px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); aspect-ratio: 1/1; display: grid; place-items: center; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs button { width: 72px; height: 72px; border-radius: 14px; overflow: hidden; border: 2px solid var(--line); padding: 0; cursor: pointer; background: var(--surface); }
.gallery-thumbs button.active { border-color: var(--brand); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(22px, 2.6vw, 30px); }
.product-buy { padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.prose { font-size: 15.5px; line-height: 2.1; }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-inline-start: 22px; }
.prose li { margin-bottom: 4px; }
.prose img { border-radius: 16px; margin: 1.2em auto; }
.prose a { color: var(--info); }
.prose blockquote { margin: 1.4em 0; padding: 14px 20px; border-inline-start: 4px solid var(--brand); background: var(--surface-2); border-radius: 12px; }
.prose table { width: 100%; border-collapse: collapse; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button, .tabs a { padding: 12px 18px; border: 0; background: none; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs .active { color: var(--text); border-bottom-color: var(--brand); }

/* ------------------------------------------------------ option chips */
.opt-group { display: flex; flex-direction: column; gap: 8px; }
.opt-group-title { font-size: 13px; font-weight: 700; color: #334155; display: flex; justify-content: space-between; gap: 8px; }
.opt-group-title .chosen { color: var(--muted); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; min-height: 38px; padding: 6px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s; line-height: 1.6; }
.chip:hover { border-color: #94a3b8; }
.chip.active { border-color: var(--ink); background: var(--ink); color: #fff; }
.chip .delta { font-size: 11px; opacity: .7; margin-inline-start: 4px; }
.chip.is-off { opacity: .4; text-decoration: line-through; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; height: 46px; background: var(--surface); }
.qty button { width: 42px; height: 100%; border: 0; background: var(--surface-2); cursor: pointer; font-size: 20px; font-weight: 700; display: grid; place-items: center; }
.qty button:hover { background: #eef1f6; }
.qty input { width: 70px; height: 100%; border: 0; text-align: center; font-weight: 800; font-size: 16px; outline: none; background: transparent; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm { height: 38px; }
.qty-sm button { width: 34px; font-size: 16px; }
.qty-sm input { width: 54px; font-size: 14px; }

/* ----------------------------------------------------------------- blog */
.post-card { display: flex; flex-direction: column; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); transition: transform .25s ease, box-shadow .25s; height: 100%; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 22px 40px -26px rgba(15, 23, 42, .4); }
.post-card .cover { aspect-ratio: 16/10; margin: 8px 8px 0; border-radius: 14px; background: linear-gradient(135deg, var(--ink), var(--ink-3)); overflow: hidden; display: grid; place-items: center; }
.post-card .cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.post-card:hover .cover img { transform: scale(1.06); }
.post-card .body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.post-card h3 { font-size: 17px; margin: 0; }
.post-card p { color: var(--muted); font-size: 14px; margin: 0; flex: 1; }
.post-meta { display: flex; gap: 14px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.article { max-width: 820px; margin-inline: auto; padding-block: 40px 80px; }
.article .cover { border-radius: 24px; overflow: hidden; margin-bottom: 28px; }

/* ------------------------------------------------------------ contact/about */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 28px; padding-block: 40px 80px; align-items: start; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.contact-item .c-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); color: var(--brand); display: grid; place-items: center; flex: none; }
.contact-item b { display: block; margin-bottom: 2px; }
.map-box { height: 300px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); z-index: 0; position: relative; }
.socials { display: flex; gap: 8px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); transition: .2s; }
.socials a:hover { background: var(--brand); color: var(--brand-ink); }
.about-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; }
.about-visual { border-radius: 28px; background: var(--ink); aspect-ratio: 4/5; display: grid; place-items: center; overflow: hidden; position: relative; }
.about-visual img.mark { width: 55%; filter: drop-shadow(0 0 40px color-mix(in srgb, var(--brand) 70%, transparent)); }
.about-visual img.photo { width: 100%; height: 100%; object-fit: cover; }
.value-card { padding: 24px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.value-card .num { width: 40px; height: 40px; border-radius: 12px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 900; margin-bottom: 12px; }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--ink); color: #cbd5e1; padding-top: 64px; margin-top: 0; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 36px; padding-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.site-footer a:hover { color: var(--brand); }
.site-footer .brand img { height: 42px; }
.site-footer .about { font-size: 14px; color: #94a3b8; margin-top: 16px; }
.site-footer .bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 20px 0; font-size: 13px; color: #94a3b8; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-contact li { display: flex; gap: 10px; align-items: flex-start; }
.footer-contact .icon { color: var(--brand); margin-top: 4px; }

/* ------------------------------------------------------------------ auth */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: var(--ink); color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; isolation: isolate; }
.auth-side::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(500px 300px at 80% 10%, color-mix(in srgb, var(--brand) 35%, transparent), transparent 60%); }
.auth-side h2 { font-size: 30px; }
.auth-side ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 14px; margin: 24px 0 0; color: #cbd5e1; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li .icon { color: var(--brand); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.auth-card { width: 100%; max-width: 520px; }
.auth-card h1 { font-size: 26px; }
.steps { display: flex; gap: 8px; margin-bottom: 26px; }
.steps span { flex: 1; height: 5px; border-radius: 5px; background: var(--line); }
.steps span.done { background: var(--brand); }
.map-picker { height: 280px; border-radius: 16px; overflow: hidden; border: 1.5px solid var(--line); position: relative; z-index: 0; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.address-mode { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.address-mode button { border: 0; background: none; padding: 6px 16px; border-radius: 999px; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); }
.address-mode button.active { background: var(--ink); color: #fff; }

/* ----------------------------------------------------------------- panel */
.panel-layout { display: grid; grid-template-columns: 260px 1fr; gap: 28px; padding-block: 32px 80px; align-items: start; }
.panel-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 14px; }
.panel-user { display: flex; gap: 12px; align-items: center; padding: 10px 10px 16px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.panel-user .avatar { width: 46px; height: 46px; border-radius: 14px; background: var(--ink); color: var(--brand); display: grid; place-items: center; font-weight: 900; font-size: 18px; flex: none; }
.panel-user b { display: block; font-size: 14.5px; }
.panel-nav nav { display: flex; flex-direction: column; gap: 2px; }
.panel-nav nav a, .panel-nav nav button { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 12px; font-weight: 600; font-size: 14px; color: #334155; border: 0; background: none; width: 100%; cursor: pointer; text-align: right; }
.panel-nav nav a:hover, .panel-nav nav button:hover { background: var(--surface-2); }
.panel-nav nav a.active { background: var(--ink); color: #fff; }
.panel-nav nav a .count { margin-inline-start: auto; background: var(--brand); color: var(--brand-ink); border-radius: 999px; min-width: 22px; height: 22px; display: grid; place-items: center; font-size: 11px; font-weight: 800; padding: 0 6px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.panel-title h1 { font-size: 24px; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 20px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.kpi span { color: var(--muted); font-size: 13px; font-weight: 600; }
.kpi b { display: block; font-size: 24px; font-weight: 900; margin-top: 4px; }
.status-hero { padding: 26px; border-radius: 22px; color: #fff; background: linear-gradient(120deg, var(--ink), var(--ink-3)); display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; position: relative; overflow: hidden; isolation: isolate; }
.status-hero::before { content: ""; position: absolute; width: 300px; height: 300px; left: -80px; top: -150px; background: radial-gradient(circle, color-mix(in srgb, var(--brand) 50%, transparent), transparent 65%); z-index: -1; }
.status-hero h2 { margin: 0 0 4px; font-size: 20px; }
.status-hero p { margin: 0; color: #cbd5e1; }

/* tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: right; font-size: 12.5px; color: var(--muted); font-weight: 700; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .icon { width: 48px; height: 48px; margin: 0 auto 12px; color: #cbd5e1; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 26px 18px 0; font-size: 14px; }
.timeline li::before { content: ""; position: absolute; right: 5px; top: 10px; bottom: -6px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline li::after { content: ""; position: absolute; right: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline time { display: block; color: var(--muted); font-size: 12px; }

/* tickets */
.messages { display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 82%; padding: 14px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.msg.staff { align-self: flex-end; background: #f0f7ff; border-color: #cfe1ff; }
.msg .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.msg p { margin: 0; white-space: pre-wrap; }

/* ------------------------------------------------- wholesale (pre-invoice) */
.wh-layout { display: grid; grid-template-columns: 230px 1fr; gap: 26px; align-items: start; }
.wh-nav { position: sticky; top: calc(var(--header-h) + 20px); padding: 10px; }
.wh-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border-radius: 12px; font-weight: 700; font-size: 14px; color: #334155; }
.wh-nav a:hover { background: var(--surface-2); }
.wh-nav a.active { background: var(--ink); color: #fff; }
.wh-nav a span { font-size: 12px; color: var(--muted); font-weight: 600; }
.wh-nav a.active span { color: #cbd5e1; }
.wh-group { scroll-margin-top: calc(var(--header-h) + 20px); margin-bottom: 40px; }
.wh-group-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.wh-group-head .g-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--ink); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--brand); }
.wh-group-head .g-icon img { width: 100%; height: 100%; object-fit: cover; }
.wh-group-head h2 { margin: 0; font-size: 20px; }
.wh-group-head p { margin: 0; color: var(--muted); font-size: 13px; }
.wh-group-head .pill { margin-inline-start: auto; }
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.wh-card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; transition: box-shadow .25s, border-color .25s; }
.wh-card:hover { box-shadow: var(--shadow); }
.wh-card.ready { border-color: color-mix(in srgb, var(--brand) 70%, transparent); }
.wh-card-top { display: flex; gap: 14px; padding: 16px; align-items: center; border-bottom: 1px dashed var(--line); }
.wh-card-top .thumb { width: 76px; height: 76px; border-radius: 16px; background: var(--surface-2); overflow: hidden; flex: none; display: grid; place-items: center; border: 1px solid var(--line); }
.wh-card-top .thumb img { width: 100%; height: 100%; object-fit: cover; }
.wh-card-top h3 { margin: 0; font-size: 16px; }
.wh-card-top .sub { color: var(--muted); font-size: 12.5px; }
.wh-card-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.wh-card-foot { padding: 14px 16px; background: var(--surface-2); border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.wh-price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wh-price .final { font-size: 18px; font-weight: 900; }
.wh-price .final small { font-size: 12px; color: var(--muted); font-weight: 600; }
.wh-price .hint { font-size: 12.5px; color: var(--muted); }
.wh-actions { display: flex; gap: 10px; align-items: center; }
.wh-actions .btn { flex: 1; }
.wh-card.unavailable .wh-card-body { opacity: .5; pointer-events: none; }
.wh-card .soldout { position: absolute; top: 14px; left: 14px; }
.wh-desc { font-size: 13px; color: var(--muted); margin: 0; line-height: 1.9; }
.cart-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%) translateY(140%); z-index: 70; width: min(760px, calc(100% - 24px)); background: var(--ink); color: #fff; border-radius: 20px; padding: 12px 12px 12px 20px; display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow-lg); transition: transform .35s cubic-bezier(.2, .9, .3, 1.2); }
.cart-bar.show { transform: translateX(-50%) translateY(0); }
.cart-bar .cb-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; flex: none; position: relative; }
.cart-bar .cb-info { flex: 1; min-width: 0; }
.cart-bar .cb-info b { display: block; font-size: 17px; }
.cart-bar .cb-info span { font-size: 12.5px; color: #94a3b8; }
.bump { animation: bump .45s ease; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------------------------------------------------------- cart/checkout */
.checkout-grid { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.summary-card { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: 14.5px; }
.summary-row.total { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 14px; font-size: 17px; font-weight: 900; }
.summary-row .off { color: var(--success); }
.line-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; padding: 16px; border-bottom: 1px solid var(--line); align-items: center; }
.line-item:last-child { border-bottom: 0; }
.line-item .thumb { width: 64px; height: 64px; border-radius: 14px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.line-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-item h4 { margin: 0; font-size: 14.5px; }
.line-item .opts { color: var(--muted); font-size: 12.5px; }
.line-item .controls { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.line-item .error { color: var(--danger); font-size: 12.5px; font-weight: 600; }
.invoice-preview { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.choice-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-actions .btn { height: auto; min-height: 64px; flex-direction: column; gap: 0; padding: 10px; white-space: normal; text-align: center; line-height: 1.6; }
.choice-actions .btn small { font-weight: 500; font-size: 11.5px; opacity: .8; }

/* -------------------------------------------------------------- modal/toast */
.toast-stack { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 20px; border-radius: 14px; box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 600; animation: drop .3s ease; pointer-events: auto; display: flex; gap: 8px; align-items: center; }
.toast.error { background: var(--danger); }
.toast.success .icon { color: #4ade80; }
.modal { position: fixed; inset: 0; z-index: 95; background: rgba(2, 6, 23, .6); display: none; align-items: center; justify-content: center; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: var(--surface); border-radius: 22px; max-width: 640px; width: 100%; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); }

.error-page { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 60px 20px; }
.error-page b { font-size: 96px; font-weight: 900; line-height: 1; color: var(--brand); display: block; }

/* --------------------------------------------------------------- responsive */
@media (max-width: 1100px) {
  .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  :root { --header-h: 64px; }
  .main-nav, .hide-mobile { display: none !important; }
  .menu-toggle { display: inline-flex; }
  .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-layout, .panel-layout, .wh-layout, .checkout-grid, .product-page, .contact-grid, .about-grid { grid-template-columns: 1fr; }
  .sidebar, .panel-nav, .wh-nav, .summary-card { position: static; }
  .shop-layout .sidebar { order: 2; }
  .panel-nav nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; scrollbar-width: none; }
  .panel-nav nav::-webkit-scrollbar, .wh-nav::-webkit-scrollbar { display: none; }
  .wh-nav { scrollbar-width: none; }
  .panel-nav nav a, .panel-nav nav button { white-space: nowrap; width: auto; }
  .panel-user { display: none; }
  .wh-nav { display: flex; overflow-x: auto; gap: 6px; position: sticky; top: var(--header-h); z-index: 20; border-radius: 0 0 16px 16px; }
  .wh-nav a { white-space: nowrap; }
  .wh-nav a span { display: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .cta-band { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .container { padding-inline: 16px; }
  .section { padding-block: 56px; }
  .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-card .body { padding: 12px; }
  .product-card h3 { font-size: 13px; min-height: 46px; }
  .price { font-size: 14px; }
  .grid-2, .grid-3, .grid-4, .form-grid, .choice-cards, .choice-actions { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .cat-tiles { grid-template-columns: 1fr 1fr; gap: 12px; }
  .cat-tile { min-height: 150px; padding: 16px; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .wh-grid { grid-template-columns: 1fr; }
  .line-item { grid-template-columns: 52px 1fr; }
  .line-item .controls { grid-column: 1 / -1; justify-content: space-between; }
  .features { margin-top: -40px; }
  .btn-lg { height: 50px; padding: 0 22px; }
  .card-body { padding: 18px; }
  .msg { max-width: 100%; }
  .brand img { height: 30px; }
  .site-header .container { gap: 10px; }
  .header-actions { gap: 6px; }
  .header-actions .btn { height: 40px; min-width: 40px; padding: 0 12px; font-size: 13px; }
  .menu-toggle { width: 40px; height: 40px; }
}
@media (max-width: 380px) {
  .brand img { height: 26px; }
  .header-actions .btn-dark { padding: 0 10px; }
}

@media print {
  .site-header, .site-footer, .announce-bar, .no-print, .cart-bar, .flash-stack { display: none !important; }
  body { background: #fff; }
}

/* Variant stock states */
.chip.off{opacity:.45;text-decoration:line-through;text-decoration-thickness:1px}
.chip.off.active{opacity:.7}
.stock-note{margin:6px 0 2px;padding:6px 10px;border-radius:8px;font-weight:600}
.stock-note.ok{background:rgba(22,163,74,.08);color:#15803d}
.stock-note.low{background:rgba(245,165,36,.12);color:#b45309}
.stock-note.out{background:rgba(220,38,38,.08);color:#b91c1c}
/* "Bought together" sheet */
.companion-sheet{position:fixed;inset:0;z-index:90;display:flex;align-items:flex-end;justify-content:center}
.companion-sheet .cs-backdrop{position:absolute;inset:0;background:rgba(11,18,32,.45);opacity:0;transition:opacity .2s}
.companion-sheet .cs-box{position:relative;background:#fff;width:min(560px,100%);max-height:85vh;display:flex;flex-direction:column;border-radius:18px 18px 0 0;box-shadow:0 -10px 40px rgba(0,0,0,.18);transform:translateY(30px);opacity:0;transition:transform .25s,opacity .25s}
.companion-sheet.open .cs-backdrop{opacity:1}
.companion-sheet.open .cs-box{transform:none;opacity:1}
@media (min-width:700px){.companion-sheet{align-items:center}.companion-sheet .cs-box{border-radius:18px}}
.cs-head{display:flex;justify-content:space-between;gap:12px;padding:18px 20px 12px;border-bottom:1px solid #eef2f7}
.cs-head b{display:block;font-size:16px}
.cs-head span{font-size:13px;color:#64748b}
.cs-x{border:0;background:#f1f5f9;border-radius:50%;width:32px;height:32px;font-size:20px;cursor:pointer;flex:none}
.cs-list{overflow:auto;padding:8px 20px}
.cs-item{display:grid;grid-template-columns:64px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-bottom:1px solid #f1f5f9}
.cs-item:last-child{border-bottom:0}
.cs-img{width:64px;height:64px;border-radius:12px;background:#f8fafc;overflow:hidden;display:grid;place-items:center}
.cs-img img{width:100%;height:100%;object-fit:contain}
.cs-body{min-width:0;display:flex;flex-direction:column;gap:2px}
.cs-body b{font-size:14px;line-height:1.6}
.cs-body small{color:#64748b;font-size:12px}
.cs-price{font-size:13px;font-weight:700;color:var(--ink)}
.cs-foot{display:flex;gap:10px;justify-content:flex-end;padding:14px 20px;border-top:1px solid #eef2f7}
.wh-card.flash{box-shadow:0 0 0 3px var(--brand);transition:box-shadow .3s}

/* Companions on product page */
.companions{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px}
.companion{display:grid;grid-template-columns:72px 1fr;gap:12px;align-items:center;padding:12px;border:1px solid #e8edf3;border-radius:14px;background:#fff;color:inherit;text-decoration:none;transition:border-color .2s,box-shadow .2s}
.companion:hover{border-color:var(--brand);box-shadow:0 6px 20px rgba(15,23,42,.06)}
.cp-img{width:72px;height:72px;border-radius:12px;background:#f8fafc;overflow:hidden;display:grid;place-items:center}
.cp-img img{width:100%;height:100%;object-fit:contain}
.cp-body{display:flex;flex-direction:column;gap:3px;min-width:0}
.cp-body b{font-size:14px;line-height:1.6}
.cp-body small{color:#64748b;font-size:12px}
.cp-price{font-weight:700;font-size:13px}
/* Support chat widget */
.support{position:fixed;inset-inline-end:20px;bottom:20px;z-index:80;font-size:14px}
body:has(.cart-bar.show) .support{bottom:96px}
.support-fab{position:relative;width:58px;height:58px;border-radius:50%;border:0;background:var(--ink);color:#fff;display:grid;place-items:center;cursor:pointer;box-shadow:0 10px 30px rgba(11,18,32,.3);transition:transform .2s}
.support-fab:hover{transform:translateY(-2px)}
.support-fab .icon{width:26px;height:26px}
.support.is-open .support-fab{display:none}
.support-dot{position:absolute;top:6px;inset-inline-end:6px;width:12px;height:12px;border-radius:50%;background:#94a3b8;border:2px solid var(--ink)}
.support-dot.on{background:#22c55e}
.support-badge{position:absolute;top:-4px;inset-inline-start:-4px;min-width:22px;height:22px;padding:0 6px;border-radius:11px;background:#ef4444;color:#fff;font-size:12px;font-weight:700;display:grid;place-items:center}
.support-panel{width:min(370px,calc(100vw - 32px));height:min(540px,calc(100vh - 110px));background:#fff;border-radius:18px;box-shadow:0 20px 60px rgba(11,18,32,.25);display:flex;flex-direction:column;overflow:hidden}
.support-panel[hidden]{display:none}
.support-panel header{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px 16px;background:var(--ink);color:#fff}
.support-panel header b{display:block;font-size:15px}
.support-panel header span{font-size:12px;color:#cbd5e1}
.support-panel header button{border:0;background:rgba(255,255,255,.12);color:#fff;width:32px;height:32px;border-radius:50%;font-size:20px;cursor:pointer}
.support-msgs{flex:1;overflow:auto;padding:14px;background:#f8fafc;display:flex;flex-direction:column;gap:8px}
.msg{display:flex;flex-direction:column;max-width:85%}
.msg .bubble{padding:9px 13px;border-radius:14px;line-height:1.8;white-space:normal;word-break:break-word}
.msg .meta{font-size:11px;color:#94a3b8;margin-top:2px}
.msg-me{align-self:flex-start}
.msg-me .bubble{background:var(--ink);color:#fff;border-end-start-radius:4px}
.msg-them{align-self:flex-end}
.msg-them .bubble{background:#fff;border:1px solid #e2e8f0;border-end-end-radius:4px}
.msg.sys .bubble{background:rgba(245,165,36,.1);border-color:rgba(245,165,36,.3)}
.support-form{padding:10px 12px;border-top:1px solid #eef2f7;display:flex;flex-direction:column;gap:8px}
.support-contact{display:grid;grid-template-columns:1fr 1fr;gap:6px}
.support-contact[hidden]{display:none}
.support-contact .input{height:38px;font-size:13px}
.support-send{display:flex;gap:8px;align-items:flex-end}
.support-send .textarea{flex:1;min-height:40px;max-height:120px;resize:none;font-size:14px;padding:8px 12px}
.support-call{display:flex;align-items:center;gap:6px;font-size:12px;color:#64748b;justify-content:center}
@media (max-width:520px){.support{inset-inline-end:12px;bottom:12px}.support-panel{height:calc(100vh - 90px)}}
/* Utilities */
.btn-link { border: 0; background: none; padding: 0; color: #dc2626; cursor: pointer; font: inherit; }
.btn-link:hover { text-decoration: underline; }
.text-green { color: #15803d; }
.text-red { color: #b91c1c; }
.text-blue { color: #1d4ed8; }
.pill-green { background: rgba(22,163,74,.12); color: #15803d; }

/* Staff portal */
.staff-tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.staff-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: inherit; text-decoration: none; white-space: nowrap; font-size: 14px; font-weight: 600; }
.staff-tabs a.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.punch-card { padding: 26px 20px; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.punch-clock { display: flex; flex-direction: column; align-items: center; }
.punch-clock span { font-size: 40px; font-weight: 800; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.punch-clock small { color: #64748b; }
.punch-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: min(340px, 100%); padding: 22px; border: 0; border-radius: 20px; color: #fff; font: inherit; font-size: 19px; font-weight: 800; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(15,23,42,.45); transition: transform .15s; }
.punch-btn:active { transform: scale(.98); }
.punch-btn .icon { width: 28px; height: 28px; }
.punch-btn.is-in { background: linear-gradient(135deg, #16a34a, #15803d); }
.punch-btn.is-out { background: linear-gradient(135deg, #ea580c, #c2410c); }
.today-list { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.cam-modal { position: fixed; inset: 0; z-index: 95; background: rgba(11,18,32,.6); display: grid; place-items: center; padding: 12px; }
.cam-modal[hidden] { display: none; }
.cam-box { background: #fff; border-radius: 18px; width: min(460px, 100%); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cam-head { display: flex; justify-content: space-between; align-items: center; }
.cam-head button { border: 0; background: #f1f5f9; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.cam-view { position: relative; aspect-ratio: 3/4; background: #0b1220; border-radius: 14px; overflow: hidden; display: grid; place-items: center; }
.cam-view video, .cam-view img { width: 100%; height: 100%; object-fit: cover; }
.cam-view video { transform: scaleX(-1); }
.cam-msg { position: absolute; inset: auto 12px 12px; color: #fff; background: rgba(0,0,0,.5); padding: 8px 12px; border-radius: 10px; font-size: 13px; text-align: center; }
.cam-actions { display: flex; gap: 8px; justify-content: center; }
.cam-actions .btn { flex: 1; }

/* Admin attendance */
.punches { display: flex; flex-wrap: wrap; gap: 10px; }
.punch { display: flex; gap: 8px; align-items: flex-start; background: #f8fafc; border: 1px solid #eef2f7; border-radius: 10px; padding: 6px 8px; font-size: 13px; }
.punch img, .punch .no-photo { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; display: grid; place-items: center; background: #e2e8f0; }
.decide { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.decide .input-sm { height: 32px; font-size: 13px; padding: 4px 8px; }
/* Inline punch edit (admin attendance) */
.punch-edit { display: inline-block; }
.punch-edit summary { cursor: pointer; list-style: none; display: inline-block; }
.punch-edit summary::-webkit-details-marker { display: none; }
.punch-edit form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; padding: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.punch-edit .input-sm, .punch-edit .select.input-sm { height: 32px; font-size: 13px; padding: 4px 8px; width: auto; }
.punch-add { flex-basis: 100%; }

/* Price freshness + pre-sale */
.price-fresh { display: flex; align-items: center; gap: 4px; margin-top: 2px; font-size: 10.5px; font-weight: 500; color: #15803d; line-height: 1.4; }
.price-fresh .icon { width: 11px; height: 11px; flex: none; }
.stock-note.presale { background: rgba(124,58,237,.1); color: #6d28d9; }
.badge-violet { background: rgba(124,58,237,.12); color: #6d28d9; }
.terms-check { align-items: flex-start; padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 10px; background: #f8fafc; }
.wallet-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; }
.wallet-line .icon { vertical-align: -3px; margin-inline-end: 4px; }
.wallet-card { padding: 24px; border-radius: 18px; color: #fff; background: linear-gradient(135deg, var(--ink), #1e293b); display: flex; flex-direction: column; gap: 6px; box-shadow: 0 18px 40px -20px rgba(15,23,42,.6); }
.wallet-card span { color: #cbd5e1; font-size: 13px; }
.wallet-card b { font-size: 28px; letter-spacing: .5px; }
.wallet-card small { color: #94a3b8; font-size: 12px; line-height: 1.8; }

/* Login: SMS code / password */
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 20px 0 16px; background: #f1f5f9; border-radius: 12px; }
.login-tabs button { border: 0; background: none; padding: 10px; border-radius: 9px; font: inherit; font-size: 14px; font-weight: 700; color: #64748b; cursor: pointer; }
.login-tabs button.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15,23,42,.08); }

/* Install-app bar (PWA) */
.install-bar { position: fixed; inset-inline: 12px; bottom: 12px; z-index: 85; max-width: 460px; margin-inline: auto; display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; box-shadow: 0 16px 40px -12px rgba(15,23,42,.35); animation: ib-in .3s ease; }
.install-bar img { width: 44px; height: 44px; border-radius: 11px; flex: none; }
.install-bar .ib-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; line-height: 1.7; }
.install-bar .ib-text span { color: #64748b; font-size: 12px; }
.install-bar .ib-share { display: inline-block; border: 1px solid #cbd5e1; border-radius: 5px; padding: 0 4px; font-size: 11px; }
.install-bar .ib-x { border: 0; background: #f1f5f9; width: 30px; height: 30px; border-radius: 50%; font-size: 18px; cursor: pointer; flex: none; }
body:has(.install-bar) .support { bottom: 96px; }
@keyframes ib-in { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }
/* Inside the installed app: account for the phone's notch / home bar */
.is-app body { padding-bottom: env(safe-area-inset-bottom); }
