/* =========================================================
   Tavacena · site.css
   Shared PUBLIC components (modern, light). Requires tokens.css.
   Mirrors the component language used in index.html + search.html.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--tc-font); font-size: 15px; line-height: 1.55;
  color: var(--tc-ink); background: var(--tc-bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; }
::selection { background: var(--tc-brand-wash); }

.page { max-width: var(--tc-max-page); margin: 0 auto; padding: 0 var(--tc-gutter-sm); }
@media (min-width: 720px)  { .page { padding: 0 var(--tc-gutter-md); } }
@media (min-width: 1024px) { .page { padding: 0 var(--tc-gutter-lg); } }
.muted { color: var(--tc-ink-mute); }

/* ---------------- Header ---------------- */
.topbar { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,0.86); backdrop-filter: saturate(180%) blur(12px); border-bottom: var(--tc-border); }
.topbar .bar { max-width: var(--tc-max-page); margin: 0 auto; padding: 10px var(--tc-gutter-sm); display: flex; align-items: center; gap: var(--tc-s-3); min-height: 58px; }
@media (min-width: 720px)  { .topbar .bar { padding: 12px var(--tc-gutter-md); gap: var(--tc-s-4); } }
@media (min-width: 1024px) { .topbar .bar { padding: 12px var(--tc-gutter-lg); } }

.brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--tc-brand); color: var(--tc-on-brand); display: grid; place-items: center; box-shadow: var(--tc-shadow-brand); }
.brand .mark svg { width: 17px; height: 17px; }
.brand .word { font-family: var(--tc-font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--tc-ink); }
.brand .word b { color: var(--tc-brand); }

.topbar nav { display: none; gap: var(--tc-s-5); }
@media (min-width: 860px) { .topbar nav { display: flex; align-items: center; margin-left: var(--tc-s-4); } }
.topbar nav a { color: var(--tc-ink-soft); font-size: 14px; font-weight: 500; padding: 6px 2px; transition: color var(--tc-dur-base) var(--tc-ease); }
.topbar nav a:hover { color: var(--tc-ink); }
.topbar nav a.active { color: var(--tc-brand-ink); font-weight: 600; }
.topbar .spacer { flex: 1 1 auto; }
.topbar .actions { display: flex; align-items: center; gap: var(--tc-s-3); margin-left: auto; }

.pill-meta { display: none; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--tc-save-ink); background: var(--tc-save-wash); padding: 6px 12px; border-radius: var(--tc-r-pill); }
@media (min-width: 1024px) { .pill-meta { display: inline-flex; } }
.pill-meta .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--tc-save); box-shadow: 0 0 0 3px rgba(17,161,79,.18); animation: tc-pulse 2.6s ease-in-out infinite; }
@keyframes tc-pulse { 0%,100% { box-shadow: 0 0 0 3px rgba(17,161,79,.20); } 50% { box-shadow: 0 0 0 5px rgba(17,161,79,.06); } }

.icon-btn { width: 40px; height: 40px; border-radius: var(--tc-r-md); border: var(--tc-border); background: var(--tc-surface); color: var(--tc-ink); display: inline-grid; place-items: center; transition: background var(--tc-dur-base) var(--tc-ease); }
.icon-btn:hover { background: var(--tc-surface-2); }
.icon-btn svg { width: 19px; height: 19px; }
@media (min-width: 860px) { .nav-burger { display: none; } }

/* compact header search (subpages) */
.csearch { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 4px; background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-pill); padding: 4px 4px 4px 14px; transition: border-color var(--tc-dur-base) var(--tc-ease), box-shadow var(--tc-dur-base) var(--tc-ease); }
.csearch:focus-within { border-color: var(--tc-brand); box-shadow: var(--tc-ring); }
.csearch .g { color: var(--tc-ink-mute); display: grid; place-items: center; flex: 0 0 auto; }
.csearch .g svg { width: 18px; height: 18px; }
.csearch input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; font-family: var(--tc-font); font-size: 15px; color: var(--tc-ink); padding: 8px 4px; }
.csearch .go { flex: 0 0 auto; background: var(--tc-brand); color: #fff; border: 0; border-radius: var(--tc-r-pill); height: 38px; padding: 0 16px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 7px; transition: background var(--tc-dur-base) var(--tc-ease); }
.csearch .go:hover { background: var(--tc-brand-strong); }
.csearch .go .t { display: none; }
.csearch .go svg { display: inline-block; width: 16px; height: 16px; }
@media (min-width: 560px) { .csearch .go .t { display: inline; } .csearch .go svg { display: none; } }

/* ---------------- Buttons ---------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--tc-r-md); font-weight: 600; font-size: 14px; padding: 11px 18px; color: var(--tc-ink); background: var(--tc-surface-2); transition: background var(--tc-dur-base) var(--tc-ease), transform var(--tc-dur-fast) var(--tc-ease), border-color var(--tc-dur-base) var(--tc-ease); }
.btn:active { transform: scale(.98); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--tc-brand); color: var(--tc-on-brand); }
.btn-primary:hover { background: var(--tc-brand-strong); }
.btn-secondary { background: var(--tc-surface); color: var(--tc-ink); border: var(--tc-border); }
.btn-secondary:hover { background: var(--tc-surface-2); }
.btn-ghost { background: transparent; color: var(--tc-ink-soft); }
.btn-ghost:hover { color: var(--tc-ink); background: var(--tc-surface-2); }
.btn-pill { border-radius: var(--tc-r-pill); }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 8px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------------- Eyebrow ---------------- */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; color: var(--tc-brand-ink); background: var(--tc-brand-wash); padding: 6px 13px; border-radius: var(--tc-r-pill); }
.eyebrow svg { width: 14px; height: 14px; }

/* ---------------- Page head (subpages) ---------------- */
.pagehead { padding: 26px 0 6px; }
@media (min-width: 720px) { .pagehead { padding: 32px 0 8px; } }
.pagehead .crumb { font-size: 13px; color: var(--tc-ink-mute); margin-bottom: 8px; }
.pagehead .crumb a:hover { color: var(--tc-ink); }
.pagehead h1 { font-family: var(--tc-font-display); font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
@media (min-width: 720px) { .pagehead h1 { font-size: 34px; } }
.pagehead .lede { font-size: 16px; color: var(--tc-ink-soft); margin: 10px 0 0; max-width: 62ch; }

/* ---------------- Section + subhead ---------------- */
.section { padding: 38px 0; }
@media (min-width: 720px) { .section { padding: 52px 0; } }
.section-tight { padding: 24px 0; }
.subh { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--tc-s-3); margin-bottom: var(--tc-s-5); }
.subh h2 { font-family: var(--tc-font-display); font-size: 22px; font-weight: 700; letter-spacing: -0.012em; margin: 0; color: var(--tc-ink); }
@media (min-width: 720px) { .subh h2 { font-size: 26px; } }
.subh .action { font-size: 14px; font-weight: 600; color: var(--tc-brand-ink); display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; transition: gap var(--tc-dur-base) var(--tc-ease); }
.subh .action:hover { gap: 9px; }

/* ---------------- Grid utilities ---------------- */
.grid { display: grid; gap: var(--tc-s-4); }
.gap-3 { gap: var(--tc-s-3); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(2, 1fr); }
.cols-4 { grid-template-columns: repeat(2, 1fr); }
.cols-5 { grid-template-columns: repeat(2, 1fr); }
.cols-6 { grid-template-columns: repeat(3, 1fr); }
@media (min-width: 560px) { .cols-3 { grid-template-columns: repeat(3, 1fr); } .cols-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 720px) { .cols-4 { grid-template-columns: repeat(4, 1fr); } .cols-5 { grid-template-columns: repeat(3, 1fr); } .cols-6 { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .cols-5 { grid-template-columns: repeat(5, 1fr); } .cols-6 { grid-template-columns: repeat(6, 1fr); } }

/* ---------------- Product card ---------------- */
.card { display: flex; flex-direction: column; background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-lg); overflow: hidden; transition: transform var(--tc-dur-base) var(--tc-ease), box-shadow var(--tc-dur-base) var(--tc-ease), border-color var(--tc-dur-base) var(--tc-ease); }
.card:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-md); border-color: transparent; }
.card .thumb { position: relative; aspect-ratio: 4 / 3; background: var(--tc-surface-2); overflow: hidden; }
.card .thumb.sq { aspect-ratio: 1 / 1; }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.card .badges { position: absolute; top: 9px; left: 9px; display: flex; flex-direction: column; gap: 5px; align-items: flex-start; }
.badge { font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 9px; border-radius: var(--tc-r-pill); background: var(--tc-surface); color: var(--tc-ink-soft); box-shadow: var(--tc-shadow-xs); display: inline-flex; align-items: center; gap: 5px; }
.badge.sponsored { background: var(--tc-brand); color: #fff; box-shadow: none; }
.badge.featured { background: var(--tc-ink); color: #fff; box-shadow: none; }
.badge.sale { background: var(--tc-sale); color: #fff; box-shadow: none; }
.badge.soft { background: var(--tc-surface-2); color: var(--tc-ink-soft); box-shadow: none; }
.badge.ok { background: var(--tc-save-wash); color: var(--tc-save-ink); box-shadow: none; }
.heart { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; border-radius: 999px; background: rgba(255,255,255,.9); border: 0; display: grid; place-items: center; color: var(--tc-ink-soft); box-shadow: var(--tc-shadow-xs); }
.heart:hover { color: var(--tc-sale); }
.heart svg { width: 16px; height: 16px; }
.card .body { padding: 13px 14px 15px; display: flex; flex-direction: column; gap: 5px; flex: 1 1 auto; }
.card .cat { font-size: 11.5px; font-weight: 600; color: var(--tc-ink-mute); }
.card .title { font-size: 14.5px; font-weight: 500; line-height: 1.34; margin: 0; color: var(--tc-ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .title mark { background: var(--tc-brand-wash); color: var(--tc-brand-ink); border-radius: 3px; padding: 0 2px; }
.card .prow { margin-top: auto; padding-top: 8px; display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.card .from { font-size: 12px; color: var(--tc-ink-mute); }
.card .price { font-size: 20px; font-weight: 700; letter-spacing: -0.025em; color: var(--tc-ink); }
.card .was { font-size: 13px; color: var(--tc-ink-mute); text-decoration: line-through; }
.card .deliv { font-size: 12px; color: var(--tc-ink-soft); margin-top: 3px; }
.card .deliv.free { color: var(--tc-save-ink); font-weight: 600; }
.card .shop { display: flex; align-items: center; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: var(--tc-border-soft); }
.shop-logo { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: 0 0 auto; }
.card .shop .nm { font-size: 12.5px; color: var(--tc-ink-soft); font-weight: 500; flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .avail { font-size: 11.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.card .avail::before { content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.avail.ok { color: var(--tc-save-ink); } .avail.warn { color: var(--tc-warn); } .avail.stop { color: var(--tc-sale); }
.card .more { font-size: 12px; color: var(--tc-brand-ink); font-weight: 600; margin-top: 9px; }
.card .shops { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 9px; border-top: var(--tc-border-soft); font-size: 12px; color: var(--tc-ink-soft); }
.card .shops .n { font-weight: 600; color: var(--tc-save-ink); }

/* ---------------- Category tile ---------------- */
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 9px; background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-lg); padding: 18px 10px 16px; transition: transform var(--tc-dur-base) var(--tc-ease), box-shadow var(--tc-dur-base) var(--tc-ease), border-color var(--tc-dur-base) var(--tc-ease); }
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--tc-shadow-md); border-color: transparent; }
.cat-tile .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--tc-brand-wash); color: var(--tc-brand); transition: background var(--tc-dur-base) var(--tc-ease); }
.cat-tile:hover .ic { background: var(--tc-brand); color: #fff; }
.cat-tile .ic svg { width: 26px; height: 26px; }
.cat-tile .nm { font-size: 14px; font-weight: 600; color: var(--tc-ink); }
.cat-tile .ct { font-size: 11.5px; color: var(--tc-ink-mute); }

/* ---------------- Chips ---------------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a, .chips span { font-size: 13px; font-weight: 500; color: var(--tc-ink-soft); background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-pill); padding: 7px 13px; transition: all var(--tc-dur-base) var(--tc-ease); }
.chips a:hover { color: var(--tc-brand-ink); border-color: var(--tc-brand); background: var(--tc-brand-wash); }
.chips.soft a, .chips.soft span { background: var(--tc-surface-2); border-color: transparent; }

/* ---------------- Stat cards ---------------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--tc-s-3); }
.stat { background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-lg); padding: 18px 16px; text-align: center; }
@media (min-width: 720px) { .stat { padding: 26px 20px; } }
.stat .v { font-family: var(--tc-font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; color: var(--tc-ink); }
@media (min-width: 720px) { .stat .v { font-size: 34px; } }
.stat .k { font-size: 12.5px; color: var(--tc-ink-soft); margin-top: 4px; }

/* ---------------- Panel ---------------- */
.panel { background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-lg); padding: 20px; }
@media (min-width: 720px) { .panel { padding: 26px; } }
.panel h3 { font-family: var(--tc-font-display); font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 14px; }

/* ---------------- CTA band ---------------- */
.band { background: var(--tc-ink); color: #fff; border-radius: var(--tc-r-xl); padding: 28px 22px; text-align: center; background-image: radial-gradient(120% 140% at 50% -20%, rgba(11,99,246,.45), transparent 60%); }
@media (min-width: 720px) { .band { padding: 40px; } }
.band h3 { font-family: var(--tc-font-display); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 8px; }
@media (min-width: 720px) { .band h3 { font-size: 30px; } }
.band p { color: rgba(255,255,255,.72); margin: 0 auto 18px; max-width: 46ch; }
.band .btn { background: #fff; color: var(--tc-ink); }
.band .btn:hover { transform: translateY(-2px); background: #fff; }

/* ---------------- Footer ---------------- */
.foot { border-top: var(--tc-border); margin-top: var(--tc-s-12); }
.foot .in { max-width: var(--tc-max-page); margin: 0 auto; padding: 28px var(--tc-gutter-sm); display: flex; flex-direction: column; gap: var(--tc-s-4); }
@media (min-width: 720px) { .foot .in { padding: 32px var(--tc-gutter-md); flex-direction: row; align-items: center; justify-content: space-between; } }
@media (min-width: 1024px) { .foot .in { padding: 36px var(--tc-gutter-lg); } }
.foot .links { display: flex; flex-wrap: wrap; gap: var(--tc-s-5); font-size: 14px; }
.foot .links a { color: var(--tc-ink-soft); }
.foot .links a:hover { color: var(--tc-ink); }
.foot .copy { font-size: 13px; color: var(--tc-ink-mute); }

/* ---------------- Mobile menu + burger (auto-injected by site.js) ---------------- */
.nav-burger { display: inline-grid; }
@media (min-width: 860px) { .nav-burger { display: none !important; } }
.mm-scrim { position: fixed; inset: 0; z-index: 60; background: rgba(19,23,32,.45); opacity: 0; pointer-events: none; transition: opacity var(--tc-dur-base) var(--tc-ease); }
body.mm-open .mm-scrim { opacity: 1; pointer-events: auto; }
.mm { position: fixed; top: 0; right: 0; bottom: 0; z-index: 61; width: 84%; max-width: 320px; background: var(--tc-surface); box-shadow: var(--tc-shadow-lg); transform: translateX(100%); transition: transform var(--tc-dur-slow) var(--tc-ease); display: flex; flex-direction: column; padding: 14px 14px 24px; overflow-y: auto; }
body.mm-open .mm { transform: none; }
.mm .mm-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 10px; }
.mm .mm-close { width: 38px; height: 38px; border-radius: var(--tc-r-md); border: var(--tc-border); background: var(--tc-surface); color: var(--tc-ink-soft); display: grid; place-items: center; }
.mm .mm-close:hover { background: var(--tc-surface-2); }
.mm .mm-close svg { width: 18px; height: 18px; }
.mm a { display: block; padding: 13px 12px; border-radius: var(--tc-r-md); font-size: 16px; font-weight: 500; color: var(--tc-ink); }
.mm a:hover { background: var(--tc-surface-2); }
.mm a.sub { font-size: 14px; color: var(--tc-ink-soft); }
.mm .sep { height: 1px; background: var(--tc-line); margin: 8px 6px; }
@media (min-width: 860px) { .mm, .mm-scrim { display: none; } }

/* ---------------- Cookie banner (auto-injected by site.js) ---------------- */
.cookie { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 55; max-width: 580px; margin: 0 auto; background: var(--tc-surface); border: var(--tc-border); border-radius: var(--tc-r-lg); box-shadow: var(--tc-shadow-lg); padding: 16px 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; animation: ck-in 320ms var(--tc-ease) both; }
@keyframes ck-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cookie p { margin: 0; font-size: 13px; color: var(--tc-ink-soft); flex: 1 1 240px; line-height: 1.45; }
.cookie p a { color: var(--tc-brand-ink); font-weight: 600; }
.cookie .ck-acts { display: flex; gap: 8px; flex: 0 0 auto; }

/* ---------------- Brand: TavaCena logo image ---------------- */
.brand .mark { width: auto; height: 34px; border-radius: 0; background: none; box-shadow: none; flex: 0 0 auto; display: inline-flex; align-items: center; }
.brand .mark img.brand-logo { height: 34px; width: auto; display: block; }
