/* ============================================================
   SOO MOODY – основен дизайн (цветовете идват от theme.css)
   Тъмно и елегантно: Cormorant Garamond за заглавия, Manrope за текст, златни акценти.
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
/* Атрибутът hidden винаги скрива – дори ако елементът има display от друго правило */
[hidden] { display: none !important; }

:root {
  --serif:  'Playfair Display', Georgia, serif;
  --logo:   'DM Serif Display', Georgia, serif;     /* само за логото – латиница */
  --sans:   'Manrope', system-ui, -apple-system, sans-serif;
  --radius: 20px;
  --ease:   cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 60% 40% at 75% -10%, var(--glow), transparent 70%);
  text-rendering: optimizeLegibility;
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }

img { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-2); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.1; letter-spacing: -.015em; margin: 0 0 .5em; text-wrap: balance; }
em { font-style: italic; color: var(--accent); }

.container { width: min(1240px, 100% - 32px); margin-inline: auto; }
.container.narrow { width: min(820px, 100% - 32px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .8em;
  font: 600 .72rem var(--sans);
  text-transform: uppercase; letter-spacing: .24em;
  color: var(--accent);
}
.eyebrow::before { content: ''; width: 26px; height: 1px; background: currentColor; }

.section-title { font-size: clamp(2.6rem, 6vw, 4rem); margin: 10px 0 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon-line { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Бутони ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: .9em 1.7em;
  font: 700 .92rem var(--sans); letter-spacing: .02em;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s, border-color .25s, color .25s, transform .3s var(--ease), box-shadow .3s;
}
.btn:hover { color: var(--accent-ink); background: var(--accent-2); border-color: var(--accent-2); transform: translateY(-2px); box-shadow: 0 12px 30px -12px var(--glow); }
.btn:active { transform: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn .icon-line { width: 18px; height: 18px; }
.btn-ghost { color: var(--text); background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-color: var(--text-muted); box-shadow: none; }
.btn-sm { padding: .65em 1.2em; font-size: .85rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  color: var(--text); background: transparent; border: 1px solid var(--line-strong); border-radius: 50%;
  cursor: pointer; transition: border-color .2s, background .2s;
}
.icon-btn:hover { border-color: var(--text-muted); background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; }

.text-link { font: 600 .9rem var(--sans); color: var(--text); border-bottom: 1px solid var(--accent); padding-bottom: 3px; }
.text-link:hover { color: var(--accent); }

.link-btn { background: none; border: 0; color: var(--text-muted); cursor: pointer; font: 600 .82rem var(--sans); padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--danger); }

.chip {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .45em .9em; font: 600 .82rem var(--sans);
  color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  cursor: pointer; transition: border-color .2s;
}
.chip:hover { border-color: var(--accent); }
.chip .icon-line { width: 14px; height: 14px; color: var(--text-muted); }

/* ---------- Логото: „soo moody“ – двете „o“ са сънени очи ---------- */
.brand-word {
  font: 400 1.95rem/1 var(--logo);
  letter-spacing: -.005em;
  color: var(--text);
  white-space: nowrap;
}
/* Размерът и мястото на очите се изчисляват от буквата „o“ на шрифта (common.js → fitEyes) */
.brand-eye {
  width: var(--eye-w, .47em); height: var(--eye-h, .47em);
  vertical-align: var(--eye-va, -.01em);
  margin: 0 var(--eye-m, .03em);
  overflow: visible;
}
.m-eye .eye-ball { fill: var(--text); }
.m-eye .eye-white { fill: var(--surface); }
.m-eye .eye-pupil { fill: var(--text); }
.m-eye .eye-glint { fill: var(--surface); }
.m-eye .eye-look { transition: transform .12s ease-out; }
.m-eye .eye-lid { transition: transform .35s cubic-bezier(.3, 1.3, .5, 1); }
/* Посочено лого → очите се отварят; мигане → клепачът пада */
.eyes:hover .eye-lid, .m-eye:hover .eye-lid { transform: translateY(-24px); }
.blink .eye-lid { transform: translateY(46px) !important; transition-duration: .09s; }
@media (prefers-reduced-motion: reduce) { .m-eye .eye-look, .m-eye .eye-lid { transition: none; } }

/* ---------- Хедър ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 78px; }
.logo { color: var(--text); line-height: 1; }
.logo:hover { color: var(--text); }

.main-nav { display: flex; gap: 4px; }
.main-nav a {
  position: relative; padding: .5em .9em;
  font: 600 .9rem var(--sans); color: var(--text-muted);
  transition: color .2s;
}
.main-nav a::after {
  content: ''; position: absolute; left: .9em; right: .9em; bottom: .2em; height: 1px;
  background: var(--accent); transform: scaleX(0); transition: transform .3s var(--ease);
}
.main-nav a:hover { color: var(--text); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--text); }

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.header-search { position: relative; display: flex; align-items: center; }
.header-search input[type="search"] {
  width: 230px; padding: .65em 2.8em .65em 1.1em;
  font: 500 .88rem var(--sans); color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; outline: none;
  transition: border-color .2s, width .35s var(--ease);
}
.header-search input[type="search"]:focus { border-color: var(--accent); width: 280px; box-shadow: none; }
.header-search input::placeholder { color: var(--text-muted); }
.header-search button { position: absolute; right: 6px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--text-muted); background: none; border: 0; cursor: pointer; }
.header-search button:hover { color: var(--accent); }
.header-search .icon-line { width: 18px; height: 18px; }
.search-toggle, .nav-toggle { display: none; }

.cart-link {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  color: var(--accent-ink); background: var(--accent); border-radius: 50%;
  transition: background .2s, transform .3s var(--ease);
}
.cart-link:hover { color: var(--accent-ink); background: var(--accent-2); transform: translateY(-2px); }
.cart-link svg { width: 20px; height: 20px; stroke-width: 1.8; }
.cart-count {
  position: absolute; top: -5px; right: -5px;
  min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center;
  font: 800 .68rem var(--sans);
  color: var(--bg); background: var(--text);
  border: 2px solid var(--bg); border-radius: 10px;
}
.cart-count[data-count="0"] { display: none; }
.cart-link.bump { animation: bump .5s var(--ease); }
@keyframes bump { 40% { transform: scale(1.15); } }

@media (max-width: 1020px) {
  .header-search input[type="search"] { width: 180px; }
  .header-search input[type="search"]:focus { width: 200px; }
}
@media (max-width: 900px) {
  .header-inner { gap: 12px; height: 68px; }
  .nav-toggle, .search-toggle { display: grid; }
  .logo { margin-inline: auto; }
  .brand-word { font-size: 1.6rem; }
  .header-actions { margin-left: 0; }
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .9em .4em; border-bottom: 1px solid var(--line); }
  .main-nav a::after { display: none; }
  .header-search {
    position: absolute; top: 100%; left: 0; right: 0; padding: 10px 16px 14px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    display: none;
  }
  .search-open .header-search { display: flex; }
  .header-search input[type="search"], .header-search input[type="search"]:focus { width: 100%; }
  .header-search button { right: 22px; }
}

/* ---------- Лента с надписи ---------- */
.ticker { overflow: hidden; padding: 16px 0; border-block: 1px solid var(--line); }
.ticker-track { display: flex; width: max-content; animation: ticker 50s linear infinite; }
.ticker span { padding: 0 2em; font: 500 1.35rem var(--serif); font-style: italic; color: var(--text-muted); white-space: nowrap; }
.ticker span::after { content: '✦'; font-style: normal; font-size: .7em; color: var(--accent); margin-left: 4em; vertical-align: .15em; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------- Hero ---------- */
.hero { padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(2.8rem, 5.6vw, 4.9rem); line-height: 1; margin: 20px 0 22px; }
.hero h1 em { display: block; }
.hero .lead { font-size: 1.08rem; color: var(--text-muted); max-width: 50ch; margin: 0 0 34px; }

.hero-search {
  display: flex; align-items: center; gap: 10px;
  max-width: 560px; padding: 7px 7px 7px 20px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.hero-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
.hero-search > .icon-line { width: 20px; height: 20px; color: var(--text-muted); flex-shrink: 0; }
.hero-search input[type="search"] { flex: 1; min-width: 0; padding: .6em 0; font: 500 1rem var(--sans); color: var(--text); background: none; border: 0; border-radius: 0; outline: none; box-shadow: none; }
.hero-search input::placeholder { color: var(--text-muted); }

.quick-cats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; font-size: .85rem; color: var(--text-muted); }
.quick-cats span { margin-right: 4px; }
.quick-cats a { padding: .35em .85em; color: var(--text); border: 1px solid var(--line-strong); border-radius: 999px; transition: border-color .2s, color .2s; }
.quick-cats a:hover { color: var(--accent); border-color: var(--accent); }

/* Емблемата: голямо око в кръг с въртящ се надпис */
.hero-emblem { position: relative; justify-self: center; width: min(440px, 100%); aspect-ratio: 1; }
.emblem-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; animation: spin 60s linear infinite; }
.ring-line { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.ring-line.faint { stroke: var(--line); }
.ring-text { font: 600 15px var(--sans); text-transform: uppercase; letter-spacing: .3em; fill: var(--text-muted); }
@keyframes spin { to { transform: rotate(360deg); } }
.emblem-eye {
  position: absolute; inset: 22%;
  display: grid; place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.eye-pair { display: inline-flex; align-items: center; justify-content: center; gap: .14em; line-height: 0; }
.eye-pair .pair-eye { width: 1em; height: 1em; overflow: visible; }
.hero-eyes { font-size: clamp(52px, 8.5vw, 92px); filter: drop-shadow(0 18px 26px var(--shadow)); }

@media (max-width: 900px) {
  .hero { padding: 40px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-emblem { order: -1; width: min(280px, 70%); }
}

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 12px 0 0; }
.section-head p { margin: 0; color: var(--text-muted); max-width: 46ch; }
@media (max-width: 700px) { .section { padding: 64px 0; } }

/* ---------- Категории ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.cat-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 230px; padding: 28px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.cat-card::before { /* златно сияние при посочване */
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(80% 80% at 100% 0%, var(--glow), transparent 60%);
  opacity: 0; transition: opacity .4s;
}
.cat-card:hover { color: var(--text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); transform: translateY(-4px); box-shadow: 0 18px 40px -18px var(--shadow); }
.cat-card:hover::before { opacity: 1; }
.cat-card .icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: auto;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 50%;
}
.cat-card .icon .icon-line { width: 24px; height: 24px; }
.cat-card .count { position: absolute; top: 28px; right: 28px; font: 600 .8rem var(--sans); color: var(--text-muted); }
.cat-card h3 { font-size: 1.75rem; margin: 34px 0 6px; }
.cat-card .tagline { font-size: .9rem; color: var(--text-muted); max-width: 30ch; }
.cat-card .go {
  position: absolute; right: 24px; bottom: 24px;
  display: grid; place-items: center; width: 38px; height: 38px;
  color: var(--accent-ink); background: var(--accent); border-radius: 50%;
  opacity: 0; transform: translateX(-8px); transition: opacity .3s, transform .4s var(--ease);
}
.cat-card .go .icon-line { width: 18px; height: 18px; stroke-width: 1.8; }
.cat-card:hover .go { opacity: 1; transform: none; }
@media (max-width: 960px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-card { min-height: 0; }
  .cat-card .go { opacity: 1; transform: none; }
}

/* ---------- SOO MERRY банер ---------- */
.merry-section { padding-top: 0; }
.merry-banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px;
  padding: 72px 24px;
  /* тъмен зелен банер в светлия сайт – с локални светли цветове за текста */
  --text: #f7f0e4; --text-muted: #d6ccbb; --accent: #e2b277; --accent-2: #edc694; --accent-ink: #1b1714;
  color: var(--text);
  background:
    radial-gradient(60% 80% at 50% 0%, rgba(226, 178, 119, .22), transparent 70%),
    linear-gradient(160deg, #1d3528, #16291f 60%, #11201a);
  border: 1px solid rgba(226, 178, 119, .3);
  border-radius: 28px;
}
.merry-banner:hover { color: var(--text); }
.merry-title { font: 600 clamp(3.2rem, 9vw, 6.5rem)/.9 var(--serif); letter-spacing: .06em; }
.merry-text { color: var(--text-muted); max-width: 44ch; margin-bottom: 10px; }
.merry-banner .btn .icon-line { transition: transform .3s var(--ease); }
.merry-banner:hover .btn { background: var(--accent-2); }
.merry-banner:hover .btn .icon-line { transform: translateX(4px); }
.snow { /* тих падащ сняг */
  position: absolute; inset: -100% 0 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, .5), transparent),
    radial-gradient(1.5px 1.5px at 30% 60%, rgba(255, 255, 255, .4), transparent),
    radial-gradient(2px 2px at 55% 35%, rgba(255, 255, 255, .45), transparent),
    radial-gradient(1.5px 1.5px at 75% 80%, rgba(255, 255, 255, .35), transparent),
    radial-gradient(2px 2px at 90% 15%, rgba(255, 255, 255, .5), transparent);
  background-size: 260px 260px;
  animation: snow 18s linear infinite;
}
@keyframes snow { to { transform: translateY(50%); } }

/* ---------- Продукти ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.shop-layout .product-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, 1fr); } .shop-layout .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .product-grid, .shop-layout .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.product-card { position: relative; display: flex; flex-direction: column; }
.product-card .thumb {
  position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .3s;
}
.product-card:hover .thumb { border-color: color-mix(in srgb, var(--accent) 40%, transparent); box-shadow: 0 18px 40px -18px var(--shadow); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.product-card:hover .thumb img { transform: scale(1.04); }
.product-card .body { padding: 16px 4px 4px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.product-card .cat { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .18em; color: var(--text-muted); }
.product-card h3 { font-size: 1.25rem; font-weight: 600; margin: 4px 0 0; line-height: 1.25; }
.product-card h3 a { color: var(--text); }
.product-card h3 a:hover { color: var(--accent); }
.product-card .bottom { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 10px; }

.placeholder {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: var(--accent);
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 60%), var(--surface);
}
.placeholder .icon-line { width: 34%; height: 34%; stroke-width: 1; transition: transform .8s var(--ease); }
.product-card:hover .placeholder .icon-line { transform: scale(1.06); }

.price { font: 700 1.05rem var(--sans); color: var(--text); }
.price del { font-size: .85em; font-weight: 500; color: var(--text-muted); margin-left: .5em; }

.badge {
  position: absolute; z-index: 2; top: 12px; left: 12px;
  padding: .35em .8em;
  font: 700 .7rem var(--sans); letter-spacing: .04em;
  color: var(--text); background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--line-strong); border-radius: 999px;
  backdrop-filter: blur(6px);
}
.badge-sale { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.badge-custom { left: auto; right: 12px; color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.badge-out { top: auto; bottom: 12px; }

.add-btn {
  width: 40px; height: 40px; display: grid; place-items: center; flex-shrink: 0;
  color: var(--text); background: transparent;
  border: 1px solid var(--line-strong); border-radius: 50%;
  font: 500 1.3rem var(--sans); line-height: 1;
  cursor: pointer;
  transition: background .25s, color .25s, border-color .25s;
}
.add-btn .icon-line { width: 18px; height: 18px; }
.add-btn:hover { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.add-btn:disabled { opacity: .3; cursor: not-allowed; background: transparent; color: var(--text); border-color: var(--line-strong); }

/* ---------- Магазин: филтри и търсачка ---------- */
.shop-sub { margin: 12px 0 0; color: var(--text-muted); }
.shop-layout { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.filters { position: sticky; top: 100px; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.filters-head { display: none; }
.filter-block + .filter-block { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.filters h3 { font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .2em; color: var(--text-muted); margin: 0 0 12px; }
.filters ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.filters li a { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: .55em .8em; color: var(--text-muted); border-radius: 12px; font-weight: 600; font-size: .92rem; }
.filters li a span { display: flex; align-items: center; gap: .6em; }
.filters li a .icon-line { width: 16px; height: 16px; }
.filters li a:hover { color: var(--text); background: var(--surface-2); }
.filters li a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.filters li a small { font-size: .78rem; font-weight: 700; opacity: .7; }

.price-inputs { display: flex; align-items: end; gap: 8px; margin-bottom: 12px; }
.price-inputs label { flex: 1; display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--text-muted); }
.price-inputs input[type="number"] { padding: .6em .8em; -moz-appearance: textfield; appearance: textfield; }
.price-inputs input::-webkit-inner-spin-button, .price-inputs input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.price-inputs .dash { padding-bottom: .6em; color: var(--text-muted); }
.price-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.price-presets button {
  padding: .4em .8em; font: 600 .8rem var(--sans); color: var(--text-muted);
  background: transparent; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.price-presets button:hover { color: var(--text); border-color: var(--text-muted); }
.price-presets button.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }

.shop-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-search { position: relative; flex: 1; min-width: 220px; }
.shop-search .icon-line { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.shop-search input[type="search"] { padding-left: 46px; border-radius: 999px; }
.shop-toolbar select { width: auto; min-width: 210px; border-radius: 999px; }
.filters-open { display: none; }
.active-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.active-filters:empty { display: none; }
.result-info { font-size: .88rem; color: var(--text-muted); margin: 0 0 22px; }

@media (max-width: 900px) {
  .shop-layout { grid-template-columns: 1fr; gap: 0; }
  .filters-open { display: inline-flex; }
  /* Филтрите стават панел отстрани */
  .filters {
    position: fixed; z-index: 100; top: 0; bottom: 0; left: 0; width: min(340px, 88vw);
    border-radius: 0; overflow-y: auto;
    transform: translateX(-105%); transition: transform .35s var(--ease);
    box-shadow: 20px 0 60px var(--shadow);
  }
  .filters.open { transform: none; }
  .filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
  .filters-head h2 { font-size: 1.8rem; margin: 0; }
  .shop-toolbar select { flex: 1; min-width: 0; }
}

/* ---------- Форми ---------- */
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.field label, .field legend { font: 700 .85rem var(--sans); color: var(--text); }
.field small { color: var(--text-muted); font-size: .82rem; }
input[type="text"], input[type="tel"], input[type="email"], input[type="number"], input[type="search"],
input[type="password"], input[type="file"], select, textarea {
  width: 100%;
  padding: .8em 1.1em;
  font: inherit; font-size: .95rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a39b8f' stroke-width='1.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; cursor: pointer; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--text-muted) 70%, transparent); }
textarea { min-height: 130px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--glow); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .row-2 { grid-template-columns: 1fr; } }

fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.choice-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.choice { position: relative; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  padding: 14px 18px;
  background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 14px;
  transition: border-color .2s, background .2s;
}
.choice span b { font-weight: 700; }
.choice span small { color: var(--text-muted); font-size: .82rem; }
.choice:hover span { border-color: var(--text-muted); }
.choice input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); }
.choice input:focus-visible + span { box-shadow: 0 0 0 4px var(--glow); }

.form-error {
  padding: 14px 18px; margin-bottom: 20px; font-weight: 600;
  color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); border-radius: 14px;
}
.form-error:empty { display: none; }

/* ---------- Панел ---------- */
.panel { padding: 36px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.panel h2 { font-size: 1.9rem; margin-bottom: 22px; }
@media (max-width: 600px) { .panel { padding: 26px 20px; } }

/* ---------- Продуктова страница ---------- */
.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.product-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-info h1 { font-size: clamp(2.6rem, 5vw, 3.8rem); margin: 14px 0 14px; }
.product-info .price { font-size: 1.6rem; display: block; margin-bottom: 16px; }
.product-info .desc { color: var(--text-muted); margin: 0 0 28px; white-space: pre-line; }
.stock { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 22px; font: 700 .82rem var(--sans); }
.stock.in { color: var(--success); }
.stock.low { color: var(--warning); }
.stock.out { color: var(--danger); }
.qty-row { display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.qty { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px; }
.qty button { width: 40px; height: 40px; font: 500 1.2rem var(--sans); background: transparent; color: var(--text); border: 0; border-radius: 50%; cursor: pointer; transition: background .2s; }
.qty button:hover { background: var(--surface-2); }
.qty input { width: 44px; text-align: center; border: 0; background: transparent; padding: 0; font-weight: 700; box-shadow: none; -moz-appearance: textfield; appearance: textfield; }
.qty input:focus { box-shadow: none; }
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.custom-box { padding: 24px; margin-bottom: 26px; background: var(--surface); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: var(--radius); }
.custom-box h3 { font-size: 1.6rem; color: var(--accent); margin-bottom: 12px; }
.breadcrumbs { font-size: .85rem; font-weight: 600; color: var(--text-muted); margin-bottom: 32px; }
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--text); }
@media (max-width: 860px) { .product-page { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Количка ---------- */
.cart-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 32px; align-items: start; }
.cart-layout > div { display: flex; flex-direction: column; gap: 32px; }
.cart-layout > aside { position: sticky; top: 100px; }
.cart-item { display: grid; grid-template-columns: 84px 1fr auto; gap: 18px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item:last-child { border-bottom: 0; }
.cart-item .thumb { width: 84px; aspect-ratio: 1; overflow: hidden; border-radius: 14px; background: var(--bg-2); }
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item h3 { font-size: 1.3rem; margin: 0 0 2px; }
.cart-item h3 a { color: var(--text); }
.cart-item .custom-note { font: 600 .85rem var(--sans); color: var(--accent); margin-top: 2px; }
.cart-item .right { display: flex; flex-direction: column; align-items: end; gap: 8px; }
.cart-item .qty button { width: 32px; height: 32px; }
.cart-item .qty input { width: 32px; }
.summary-row { display: flex; justify-content: space-between; padding: 8px 0; color: var(--text-muted); font-weight: 500; }
.summary-row span:last-child { color: var(--text); }
.summary-row.total { font: 600 1.8rem var(--serif); color: var(--text); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 18px; }
.free-ship-note { font: 600 .9rem var(--sans); color: var(--accent); margin: 6px 0 22px; }
@media (max-width: 900px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-layout > aside { position: static; }
}

/* ---------- Празни състояния ---------- */
.empty-state { grid-column: 1 / -1; text-align: center; padding: 48px 20px 64px; }
.empty-state h1, .empty-state h2 { font-size: clamp(2.6rem, 6vw, 3.8rem); margin: 18px 0 10px; }
.empty-state p { color: var(--text-muted); margin: 0 0 28px; }
.empty-eyes { display: flex; width: max-content; margin: 0 auto; font-size: 64px; }

/* ---------- Успешна поръчка ---------- */
.success-box { max-width: 640px; margin: 20px auto; text-align: center; }
.success-box h1, .success-box h2 { font-size: clamp(2.6rem, 6vw, 3.8rem); margin: 14px 0; }
.success-box p { color: var(--text-muted); }
.order-no { display: inline-block; font: 700 1.4rem var(--sans); letter-spacing: .08em; padding: .4em 1.2em; margin: 6px 0 22px; color: var(--accent-ink); background: var(--accent); border-radius: 999px; }

/* ---------- Поръчка по идея ---------- */
.cta-panel {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center;
  padding: 56px;
  background: radial-gradient(70% 90% at 0% 100%, var(--glow), transparent 70%), var(--surface);
  border: 1px solid var(--line); border-radius: 28px;
}
.cta-title { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 14px 0 16px; }
.cta-panel p { margin: 0 0 28px; color: var(--text-muted); max-width: 46ch; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; display: flex; flex-direction: column; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: '0' counter(step); grid-row: span 2; font: 600 2rem/1 var(--serif); color: var(--accent); }
.steps b { font-weight: 700; }
.steps span { color: var(--text-muted); font-size: .92rem; }
@media (max-width: 860px) { .cta-panel { grid-template-columns: 1fr; gap: 32px; padding: 36px 24px; } }

/* ---------- Футър ---------- */
.site-footer { margin-top: 96px; padding: 64px 0 32px; background: var(--surface-2); border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.withdraw-link { display: inline-block; margin-top: 36px; font-weight: 700; color: var(--accent); border-bottom: 1px solid currentColor; }
.footer-grid .tagline { display: block; margin-top: 10px; font: italic 500 1.1rem var(--serif); color: var(--accent); }
.footer-grid p { color: var(--text-muted); max-width: 40ch; margin-top: 14px; font-size: .92rem; }
.site-footer h4 { font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .2em; color: var(--text-muted); margin: 8px 0 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 8px; color: var(--text-muted); font-size: .92rem; }
.site-footer a { color: var(--text); }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Доставка: падащо търсене (град, офис, улица) ---------- */
.ac { position: relative; }
.ac-list {
  position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0;
  max-height: 290px; overflow-y: auto; margin: 0; padding: 6px; list-style: none;
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 14px;
  box-shadow: 0 20px 50px var(--shadow);
}
.ac-list li { padding: .6em .8em; border-radius: 10px; cursor: pointer; font-size: .92rem; }
.ac-list li small { display: block; color: var(--text-muted); font-size: .78rem; }
.ac-list li:hover, .ac-list li.active { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ac-list li.empty { color: var(--text-muted); cursor: default; }
.ac-list li.empty:hover { background: none; }
.choice.disabled { opacity: .45; cursor: not-allowed; }
.dl-hint { display: block; margin: -8px 0 18px; color: var(--text-muted); font-size: .82rem; }

/* ---------- Каса ---------- */
.checkout-login { margin: -8px 0 20px; color: var(--text-muted); font-size: .92rem; }
.quote-note { min-height: 1.4em; margin: -6px 0 22px; font-size: .88rem; color: var(--text-muted); }
.quote-note.ok { color: var(--success); }
.quote-note.error { color: var(--danger); }
.test-note { margin: -10px 0 18px; padding: 10px 14px; font-size: .82rem; color: var(--warning); border: 1px dashed color-mix(in srgb, var(--warning) 50%, transparent); border-radius: 12px; }
.check-line { display: flex; gap: 10px; align-items: center; font-size: .92rem; cursor: pointer; }
.check-line input { width: 18px; height: 18px; accent-color: var(--accent); }
.saved-addresses { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.saved-address {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; text-align: left;
  font: inherit; color: var(--text); background: var(--bg-2); border: 1px solid var(--line-strong); border-radius: 14px; cursor: pointer;
}
.saved-address span { color: var(--text-muted); font-size: .82rem; }
.saved-address:hover { border-color: var(--text-muted); }
.saved-address.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg-2)); }
.success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.muted-note { color: var(--text-muted); font-size: .88rem; margin-top: 18px; }

/* ---------- Вход и регистрация ---------- */
.narrow-auth { width: min(480px, 100% - 32px); }
.auth-card { text-align: center; }
.auth-card form { text-align: left; margin-top: 8px; }
.auth-card h1 { font-size: clamp(2.4rem, 6vw, 3.2rem); margin: 10px 0 8px; }
.auth-sub { color: var(--text-muted); margin: 0 0 22px; }
.auth-eyes { font-size: 40px; }
.auth-links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 22px; font-size: .9rem; color: var(--text-muted); }
.auth-links .btn { margin-bottom: 4px; }
.form-error .resend { display: inline; margin-top: 6px; color: var(--accent); }
.account-link.signed-in { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }

/* ---------- Моят профил ---------- */
.account-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.account-tabs button {
  position: relative; padding: .8em 1.1em; font: 600 .92rem var(--sans); color: var(--text-muted);
  background: none; border: 0; cursor: pointer;
}
.account-tabs button.active { color: var(--text); }
.account-tabs button.active::after { content: ''; position: absolute; left: 1.1em; right: 1.1em; bottom: -1px; height: 2px; background: var(--accent); }
.order-card { margin-bottom: 18px; padding: 24px 28px; }
.order-card header { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.order-card header div { display: flex; flex-direction: column; }
.order-card header span { color: var(--text-muted); font-size: .85rem; }
.order-items { list-style: none; margin: 0 0 12px; padding: 0; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.order-items small { display: block; color: var(--accent); font-size: .8rem; }
.order-meta { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--text-muted); }
.order-waybill { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-strong); font-size: .9rem; }
.status-pill { padding: .3em .8em; font: 700 .75rem var(--sans); border-radius: 999px; border: 1px solid currentColor; white-space: nowrap; color: var(--text-muted) !important; }
.status-pill.new { color: var(--accent) !important; }
.status-pill.confirmed, .status-pill.shipped { color: var(--info) !important; }
.status-pill.delivered { color: var(--success) !important; }
.status-pill.cancelled { color: var(--danger) !important; }
.address-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.address-card { padding: 22px; }
.address-card.default { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.address-card .tag { margin-left: 8px; padding: .15em .6em; font-size: .72rem; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; }
.address-card p { color: var(--text-muted); font-size: .9rem; margin: 8px 0 12px; }
.address-actions { display: flex; gap: 14px; }
.link-btn.danger:hover { color: var(--danger); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 760px) { .profile-grid { grid-template-columns: 1fr; } }

/* ---------- Правни страници ---------- */
.legal { max-width: 820px; }
.legal h1 { font-size: clamp(2.4rem, 5vw, 3.4rem); margin: 12px 0 6px; }
.legal h2 { font-size: 1.6rem; margin: 40px 0 12px; }
.legal h3 { font: 700 1.05rem var(--sans); margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text); line-height: 1.75; }
.legal ul, .legal ol { padding-left: 1.3em; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.legal .btn { text-decoration: none; }
.legal-meta { color: var(--text-muted); margin: 0 0 24px; }
.legal-note { color: var(--text-muted); font-size: .92rem; }
.legal-card { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 8px 18px; margin: 12px 0 18px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.legal-card dt { color: var(--text-muted); }
.legal-card dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .legal-card { grid-template-columns: 1fr; gap: 2px; } .legal-card dd { margin-bottom: 10px; } }
.table-scroll { overflow-x: auto; margin: 12px 0 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.legal-table { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 560px; }
.legal-table th, .legal-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal-table th { font: 700 .72rem var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--text-muted); }
.legal-table tr:last-child td { border-bottom: 0; }
.legal-form { padding: 20px 24px; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 14px; }
.legal-form p { margin: 6px 0; }
.withdraw-cta { margin: 8px 0 8px; }
/* Непопълнени данни на търговеца – видими, за да не останат забравени */
.todo { padding: 0 .35em; color: #7a4a00; background: #fff1c2; border: 1px dashed #c99a2e; border-radius: 4px; font-weight: 700; }

/* ---------- Функция за отказ ---------- */
.withdraw-form, .withdraw-confirm, .withdraw-done { margin: 24px 0; }
.withdraw-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.withdraw-done { text-align: center; }
.withdraw-done h2 { margin-top: 14px; }
.withdraw-confirm h2 { margin-top: 0; }
.order-withdraw { display: inline-block; margin-top: 12px; font-size: .88rem; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.order-terms-note { margin: -24px 0 28px; padding: 12px 16px; font-size: .9rem; color: var(--text); background: var(--surface-2); border-radius: 12px; }
.terms-line { align-items: flex-start; margin-top: 18px; }
.terms-line input { margin-top: 3px; flex-shrink: 0; }
.terms-line a { color: var(--accent); text-decoration: underline; }
.custom-legal { margin: -4px 0 14px; font-size: .85rem; }

/* ---------- Известия ---------- */
.toast-wrap { position: fixed; bottom: 24px; left: 50%; translate: -50% 0; z-index: 200; display: flex; flex-direction: column; gap: 10px; width: min(420px, 100% - 32px); }
.toast {
  padding: 14px 22px;
  font-weight: 600;
  color: var(--text); background: var(--surface-2);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 14px;
  box-shadow: 0 18px 40px var(--shadow);
  animation: toast-in .4s var(--ease);
}
.toast.error { border-color: var(--danger); color: var(--danger); }
.toast.hide { animation: toast-out .3s forwards; }
@keyframes toast-in { from { transform: translateY(16px); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(16px); opacity: 0; } }

.loading { grid-column: 1 / -1; text-align: center; padding: 48px; font: italic 500 1.3rem var(--serif); color: var(--text-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
