/* Пан Будівельник — storefront styles (warm cream theme) */
:root {
  --brand: #F28A1C;
  --brand-600: #D9700A;
  --brand-50: #FCEBD8;
  --brown: #B5662E;
  --brown-600: #8F4A1C;
  --brown-grad: linear-gradient(180deg, #C27238 0%, #9A5223 100%);
  --ink: #2A2019;
  --ink-2: #51463D;
  --ink-3: #85786C;
  --bg: #FBF4EC;
  --card: #FFFFFF;
  --line: #F0E3D4;
  --muted: #F5EADD;
  --field: #F4E6D6;
  --sale: #B5531B;
  --hit: #F6AE45;
  --ok: #2E8B47;
  --warn: #B45309;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 2px 4px rgba(90, 52, 20, .04), 0 8px 24px rgba(90, 52, 20, .07);
  --shadow-lg: 0 14px 36px rgba(90, 52, 20, .16);
  --font: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-head: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .7, .3, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
h2 { font-size: clamp(20px, 2.4vw, 27px); font-weight: 800; }
.i { flex-shrink: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: 1640px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .container { padding: 0 26px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent;
  font-weight: 700; font-size: 15px; transition: background .2s var(--ease), border-color .2s, transform .15s, box-shadow .2s, filter .2s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-brand { background: linear-gradient(180deg, #F59A33 0%, #DB7212 100%); color: #fff; box-shadow: 0 6px 16px rgba(219, 114, 18, .3); }
.btn-brand:hover { filter: brightness(1.06); box-shadow: 0 8px 22px rgba(219, 114, 18, .42); }
.btn-dark { background: var(--brown-grad); color: #fff; }
.btn-dark:hover { filter: brightness(1.08); }
.btn-ghost { background: #fff; border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brown); color: var(--brown-600); }
.btn-lg { min-height: 56px; padding: 12px 30px; font-size: 17px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
  border: 0; background: transparent; color: var(--ink-3); transition: background .2s, color .2s;
}
.icon-btn:hover { background: #FBE3DA; color: var(--sale); }

/* ---------- header ---------- */
.header { background: var(--bg); position: sticky; top: 0; z-index: 40; transition: box-shadow .2s; }
.header.scrolled { box-shadow: 0 6px 20px rgba(90, 52, 20, .08); }
.header-in { display: flex; align-items: center; gap: 28px; min-height: 116px; }
.burger { display: none; border: 0; background: none; padding: 8px; margin-left: -8px; border-radius: 10px; color: var(--ink); }

.logo { display: inline-flex; align-items: center; flex-shrink: 0; width: 300px; padding-left: 40px; }
.logo-img { width: 108px; height: 108px; border-radius: 50%; transition: transform .25s var(--ease); filter: drop-shadow(0 4px 10px rgba(90, 52, 20, .25)); }
.logo:hover .logo-img { transform: rotate(-4deg) scale(1.03); }
.logo-inv { width: auto; padding: 0; }
.logo-inv .logo-img { width: 120px; height: 120px; }

.hphone { position: relative; display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.hphone-ico { color: var(--ink-2); display: grid; }
.hphone-txt { display: flex; flex-direction: column; line-height: 1.25; }
.hphone-num { font-weight: 700; font-size: 20px; white-space: nowrap; }
.hphone-num:hover { color: var(--brown-600); }
.hphone-more { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px 0; font-size: 14px; color: var(--ink-2); text-align: left; }
.hphone-more .i { transition: transform .2s; }
.hphone-more[aria-expanded="true"] .i { transform: rotate(180deg); }
.hphone-pop { position: absolute; top: calc(100% + 10px); left: 0; z-index: 50; min-width: 280px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; }
.hphone-pop > * { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.hphone-pop > a:hover { background: var(--muted); }
.hphone-pop > a:first-child, .hphone-pop > a:nth-child(2):not([href^="mailto"]) { flex-direction: column; align-items: flex-start; gap: 0; }
.hphone-pop b { font-size: 16px; color: var(--ink); }
.hphone-pop small { color: var(--ink-3); }
.hphone-pop .i { color: var(--brown); }

.search { flex: 1 1 360px; display: flex; align-items: center; background: var(--field); border: 2px solid transparent; border-radius: 999px; transition: border-color .2s, background .2s; }
.search:focus-within { border-color: var(--brand); background: #fff; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 14px 26px; font-size: 16px; outline: none; }
.search input::placeholder { color: var(--ink-2); }
.search input::-webkit-search-cancel-button { display: none; }
.search button { border: 0; background: transparent; width: 60px; height: 52px; display: grid; place-items: center; border-radius: 999px; color: var(--ink); }
.search button:hover { color: var(--brown-600); }

.header-actions { display: flex; align-items: center; gap: 14px; }
.hicon { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; color: var(--ink); transition: background .2s, color .2s; }
.hicon:hover { background: var(--muted); color: var(--brown-600); }
.hicon .i { stroke-width: 1.6; }
.hicon-phone { display: none; }
.badge {
  position: absolute; top: 0; right: 0; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--bg); transition: transform .25s var(--ease);
}
.badge.is-empty { display: none; }
.badge.bump { transform: scale(1.3); }

@media (max-width: 1400px) {
  .logo { width: 260px; padding-left: 20px; }
  .header-in { gap: 20px; }
}
@media (max-width: 1180px) {
  .logo { width: auto; padding-left: 0; }
  .logo-img { width: 84px; height: 84px; }
  .header-in { min-height: 100px; }
  .hphone-ico { display: none; }
  .header-actions { gap: 4px; }
}
@media (max-width: 900px) {
  .header-in { flex-wrap: wrap; gap: 8px 12px; min-height: 0; padding-top: 10px; padding-bottom: 12px; }
  .burger { display: grid; place-items: center; }
  .hphone { display: none; }
  .header-actions { margin-left: auto; }
  .hicon-phone { display: grid; }
  .search { order: 5; flex: 1 1 100%; }
  .search input { padding: 12px 18px; }
  .search button { height: 46px; }
  .header .logo-img { width: 62px; height: 62px; }
}
@media (max-width: 480px) {
  .header .logo-img { width: 54px; height: 54px; }
  .hicon { width: 42px; height: 42px; }
  .hicon .i { width: 24px; height: 24px; }
  .header-actions { gap: 0; margin-right: -6px; }
  .burger { padding: 6px; }
  .badge { min-width: 20px; height: 20px; font-size: 11px; }
}

/* ---------- catalog (sidebar on home, dropdown elsewhere) ---------- */
.catalog { position: relative; }
.catalog-btn {
  display: flex; align-items: center; gap: 16px; width: 100%; min-height: 54px; padding: 0 22px 0 26px;
  border: 0; border-radius: 16px; background: var(--brown-grad); color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 8px 20px rgba(143, 74, 28, .25); text-align: left;
}
.catalog-btn span { flex: 1; }
button.catalog-btn:hover { filter: brightness(1.08); }
.catalog-chev { transition: transform .2s; }
.catalog-btn[aria-expanded="true"] .catalog-chev { transform: rotate(180deg); }
.cat-menu { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 12px 10px; }
.cat-menu-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.cm-item { position: relative; }
.cm-item > a { display: flex; align-items: center; gap: 16px; padding: 9px 14px; border-radius: 12px; font-size: 16px; color: var(--ink); transition: background .15s, color .15s; }
.cm-item > a .i:first-child { color: var(--ink-2); stroke-width: 1.6; }
.cm-item > a span { flex: 1; }
.cm-chev { color: var(--ink-3); transition: transform .2s; }
.cm-item:hover > a, .cm-item:focus-within > a { background: var(--muted); color: var(--brown-600); }
.cm-item:hover > a .i, .cm-item:focus-within > a .i { color: var(--brown); }
.cm-item:hover .cm-chev { transform: translateX(3px); }
.cm-sale > a, .cm-sale > a .i:first-child { color: var(--sale); }
.cm-fly {
  position: absolute; left: calc(100% + 8px); top: -12px; z-index: 45; min-width: 300px; background: #fff; border-radius: 18px;
  box-shadow: var(--shadow-lg); padding: 10px; display: grid; gap: 2px; opacity: 0; visibility: hidden; transform: translateX(-6px);
  transition: opacity .16s, transform .16s var(--ease), visibility .16s;
}
.cm-fly::before { content: ''; position: absolute; right: 100%; top: 0; bottom: 0; width: 12px; }
.has-fly:hover > .cm-fly, .has-fly:focus-within > .cm-fly { opacity: 1; visibility: visible; transform: none; }
.cm-fly a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-size: 15px; color: var(--ink-2); }
.cm-fly a .i { color: var(--ink-3); }
.cm-fly a:hover { background: var(--muted); color: var(--ink); }
.cm-fly .cm-fly-head { font-weight: 800; color: var(--ink); justify-content: space-between; border-bottom: 1px solid var(--line); border-radius: 10px 10px 0 0; margin-bottom: 4px; }

.subbar { display: flex; align-items: center; gap: 24px; margin-top: 2px; }
.subbar .catalog { width: 300px; flex-shrink: 0; }
.cat-drop { position: absolute; left: 0; top: calc(100% + 10px); width: 300px; z-index: 46; box-shadow: var(--shadow-lg); }
.quick { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 1; }
.quick a { padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); transition: background .2s, color .2s; }
.quick a:hover { background: var(--muted); color: var(--ink); }
.quick .quick-sale { display: inline-flex; align-items: center; gap: 6px; color: var(--sale); }
.quick-hours { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-3); }

.home-top { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 2px; }
.catalog.is-static { display: grid; gap: 14px; }
.catalog.is-static .catalog-btn { cursor: default; }
.home-main { min-width: 0; display: grid; gap: 16px; }

@media (max-width: 1400px) { .home-top { grid-template-columns: 260px minmax(0, 1fr); } .subbar .catalog, .cat-drop { width: 260px; } }
@media (max-width: 1180px) { .quick-hours { display: none; } }
@media (max-width: 900px) {
  .home-top { grid-template-columns: 1fr; }
  .catalog.is-static, .subbar { display: none; }
}

/* ---------- mobile drawer ---------- */
.mainnav { display: none; }
.drawer-head, .drawer-extra { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .mainnav { display: block; position: fixed; inset: 0 auto 0 0; width: min(86vw, 360px); background: #fff; transform: translateX(-102%); transition: transform .28s var(--ease); z-index: 60; overflow-y: auto; box-shadow: var(--shadow-lg); visibility: hidden; }
  .mainnav.open { transform: none; visibility: visible; }
  .mainnav-in { display: flex; flex-direction: column; gap: 0; padding: 0 0 24px; }
  .drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; background: var(--brown-grad); color: #fff; font-weight: 800; font-size: 18px; position: sticky; top: 0; z-index: 1; }
  .drawer-head button { border: 0; background: none; padding: 8px; margin-right: -8px; border-radius: 10px; color: #fff; }
  .nav-item { display: flex; flex-direction: column; border-bottom: 1px solid var(--line); }
  .nav-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; font-weight: 700; }
  .nav-link .chev { display: none; }
  .nav-sale, .nav-sale .i { color: var(--sale); }
  .sub-in { display: grid; padding: 0 8px 8px; }
  .sub a { display: flex; align-items: center; gap: 10px; padding: 9px 12px 9px 28px; font-size: 15px; font-weight: 600; color: var(--ink-2); border-radius: 10px; }
  .sub a .i { color: var(--ink-3); }
  .drawer-extra { display: flex; flex-direction: column; padding: 12px 16px; }
  .drawer-extra a { padding: 10px 0; color: var(--ink-2); font-weight: 600; }
  .nav-backdrop { position: fixed; inset: 0; background: rgba(42, 32, 25, .5); z-index: 55; opacity: 0; transition: opacity .25s; }
  .nav-backdrop.show { display: block; opacity: 1; }
}

/* ---------- flashes / toast ---------- */
.flashes { margin-top: 16px; display: grid; gap: 8px; }
.flash { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; background: #fff; border-left: 4px solid var(--ink); box-shadow: var(--shadow); }
.flash-ok { border-color: var(--ok); }
.flash-error { border-color: var(--sale); color: #8F1426; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); z-index: 80;
  background: var(--ink); color: #fff; padding: 12px 14px 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease);
  max-width: calc(100vw - 32px); font-weight: 600;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 999px; font-weight: 800; white-space: nowrap; }

/* ---------- slider ---------- */
.slider { position: relative; border-radius: 26px; overflow: hidden; background: #2a1a11; box-shadow: var(--shadow); }
.slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-behavior: smooth; }
.slides::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start; min-height: clamp(260px, 24vw, 410px);
  display: flex; align-items: center; overflow: hidden; color: #fff; background-color: var(--slide-bg, #2a1a11);
}
.slide::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: 2; background: repeating-linear-gradient(-45deg, #E0802A 0 14px, #5A3420 14px 28px); }
.slide-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(30, 18, 10, .9) 0%, rgba(30, 18, 10, .7) 32%, rgba(30, 18, 10, .15) 62%, rgba(30, 18, 10, 0) 80%); z-index: 1; }
.slide-text { position: relative; z-index: 2; padding: 36px clamp(24px, 3.4vw, 48px) 48px; max-width: 720px; }
.slide-title { font-size: clamp(28px, 3.2vw, 48px); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; }
.slide-title span { display: block; color: #F6A43B; }
.slide-sub { margin: 16px 0 28px; font-size: clamp(15px, 1.35vw, 20px); font-weight: 500; color: rgba(255, 255, 255, .92); }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); transition: background .2s, opacity .2s; opacity: 0; }
.slider:hover .slider-btn, .slider-btn:focus-visible { opacity: 1; }
.slider-btn:hover { background: rgba(255, 255, 255, .3); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.dots { position: absolute; right: 32px; bottom: 26px; z-index: 3; display: flex; gap: 14px; }
.dots button { width: 14px; height: 14px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); padding: 0; transition: background .25s, transform .25s; }
.dots button.active { background: var(--brand); transform: scale(1.1); }
@media (max-width: 767px) {
  .slider { border-radius: 18px; margin-top: 4px; }
  .slider-btn { display: none; }
  .slide::before { background: linear-gradient(90deg, rgba(30, 18, 10, .9) 0%, rgba(30, 18, 10, .6) 70%, rgba(30, 18, 10, .3) 100%); }
  .dots { right: 50%; transform: translateX(50%); bottom: 20px; }
}

/* ---------- perks ---------- */
.perks { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border-radius: 22px; box-shadow: var(--shadow); padding: 12px 0; }
.perk { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 8px 18px; position: relative; }
.perk + .perk::before { content: ''; position: absolute; left: 0; top: 18%; bottom: 18%; width: 1px; background: #E6D3BF; }
.perk .i { color: var(--brown); stroke-width: 1.8; width: 42px; height: 42px; }
.perk div { line-height: 1.3; font-size: 16px; color: var(--ink-2); }
.perk b { display: block; font-weight: 500; }
.perk span { display: block; }
@media (max-width: 1100px) { .perks { grid-template-columns: repeat(2, 1fr); row-gap: 6px; } .perk:nth-child(3)::before { display: none; } .perk { justify-content: flex-start; } }
@media (max-width: 480px) { .perk { padding: 8px 12px; gap: 10px; } .perk .i { width: 32px; height: 32px; } .perk div { font-size: 13.5px; } }

/* ---------- sections ---------- */
.section { margin-top: 44px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.section-head h2 { display: flex; align-items: center; gap: 16px; }
.section-head h2::before { content: ''; width: 7px; height: 30px; border-radius: 4px; background: var(--brand); }
.more { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; color: var(--brown-600); padding: 8px 0; }
.more:hover { color: var(--brand-600); }
.more:hover .i { transform: translateX(3px); }
.more .i { transition: transform .2s; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 4 * 18px) / 5); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 6px 6px 16px; margin: -6px -6px 0; scrollbar-width: thin; scrollbar-color: #E2C9AE transparent; }
.row-scroll > * { scroll-snap-align: start; }
@media (max-width: 1200px) { .row-scroll { grid-auto-columns: calc((100% - 3 * 18px) / 4); } }
@media (max-width: 900px) { .row-scroll { grid-auto-columns: calc((100% - 2 * 12px) / 3); gap: 12px; } }
@media (max-width: 640px) { .row-scroll { grid-auto-columns: 47%; } .more { font-size: 15px; } }

/* ---------- product card ---------- */
.card { position: relative; background: var(--card); border-radius: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; transition: box-shadow .2s, transform .2s var(--ease); min-width: 0; }
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.card-img { position: relative; aspect-ratio: 1 / .78; display: grid; place-items: center; background: #fff; }
/* absolutely placed, so a tall or wide photo can never stretch the box */
.card-img img { position: absolute; inset: 22px 20px 6px; width: calc(100% - 40px); height: calc(100% - 28px); object-fit: contain; transition: transform .3s var(--ease); }
.card:hover .card-img img { transform: scale(1.04); }
.ph { display: grid; place-items: center; width: calc(100% - 40px); height: calc(100% - 40px); border-radius: 14px; color: #D2B79B; background: linear-gradient(135deg, #FCF5EC, #F4E6D6); }
.ph .i { stroke-width: 1.4; }
.tags { position: absolute; top: 16px; left: 16px; display: flex; gap: 6px; z-index: 2; pointer-events: none; }
.tag { padding: 3px 11px; border-radius: 999px; font-size: 15px; font-weight: 800; line-height: 1.4; }
.tag-sale { background: var(--sale); color: #fff; }
.tag-hit { background: var(--hit); color: #4A2A0C; }
.fav-form { position: absolute; top: 10px; right: 10px; z-index: 2; margin: 0; }
.fav { width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--ink-2); transition: color .2s, transform .2s var(--ease), background .2s; }
.fav .i { stroke-width: 1.7; }
.fav:hover { color: var(--sale); background: #fff; }
.fav.on { color: var(--sale); }
.fav.on .i { fill: currentColor; }
.fav.pop { transform: scale(1.25); }
.timer { position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; z-index: 1; }
.timer .t { background: rgba(255, 255, 255, .94); border: 1px solid var(--line); border-radius: 8px; width: 42px; padding: 3px 0; text-align: center; line-height: 1.1; }
.timer .t b { display: block; font-size: 13px; font-weight: 800; }
.timer .t small { font-size: 9px; color: var(--ink-3); font-weight: 600; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 20px 20px; flex: 1; }
.stock { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 500; }
.stock.ok { color: var(--ok); }
.stock.no { color: var(--warn); }
.card-title { font-weight: 500; font-size: 16px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.card-title:hover { color: var(--brown-600); }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.price s { font-size: 15px; color: var(--ink-3); }
.price b { font-size: 23px; font-weight: 800; white-space: nowrap; }
.price small { font-size: 12px; color: var(--ink-3); }
.btn-buy { display: inline-grid; place-items: center; width: 72px; height: 52px; border-radius: 999px; border: 0; background: var(--brown-grad); color: #fff; flex-shrink: 0; box-shadow: 0 6px 14px rgba(143, 74, 28, .28); transition: filter .2s, transform .15s, background .2s; }
.btn-buy:hover { filter: brightness(1.1); }
.btn-buy:active { transform: translateY(1px); }
.btn-buy.added { background: var(--ok); }
.btn-buy span { display: none; }
@media (max-width: 640px) {
  .card { border-radius: 16px; }
  .card-img img { inset: 30px 10px 4px; width: calc(100% - 20px); height: calc(100% - 34px); }
  .card-body { padding: 6px 12px 14px; }
  .card-title { font-size: 14px; }
  .price b { font-size: 18px; }
  .price s { font-size: 13px; }
  .btn-buy { width: 52px; height: 44px; }
  .tags { top: 10px; left: 10px; }
  .tag { font-size: 12px; padding: 2px 8px; }
  .fav-form { top: 4px; right: 4px; }
  .timer .t { width: 36px; }
}
@media (max-width: 380px) { .card-foot { flex-direction: column; align-items: stretch; } .btn-buy { width: 100%; } }

/* ---------- b2b ---------- */
.b2b { margin: 48px 0 8px; background: linear-gradient(120deg, #3A2416 0%, #6E3F1F 100%); color: #fff; border-radius: 20px; padding: clamp(24px, 4vw, 40px); display: flex; align-items: center; justify-content: space-between; gap: 24px; position: relative; overflow: hidden; }
.b2b::before { content: ''; position: absolute; right: -60px; top: -60px; width: 260px; height: 260px; border-radius: 50%; background: var(--brand); opacity: .12; }
.b2b h2 { color: #F6A43B; }
.b2b p { margin: 8px 0 0; color: #C9CDD4; max-width: 640px; }
@media (max-width: 767px) { .b2b { flex-direction: column; align-items: flex-start; } .b2b .btn { width: 100%; } }

/* ---------- listing ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-3); margin: 20px 0 8px; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { color: var(--ink-2); }
.page-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.chip { padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: 14px; transition: border-color .2s, background .2s; }
.chip:hover { border-color: var(--brown); }
.chip.active { background: var(--brown); color: #fff; border-color: var(--brown); }
.toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 16px; font-size: 14px; color: var(--ink-3); }
.toolbar select { padding: 9px 36px 9px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23474D5A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; appearance: none; font-weight: 600; color: var(--ink); cursor: pointer; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
@media (max-width: 1200px) { .grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; }
.pager a { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-weight: 700; }
.pager a.active { background: var(--brown-grad); border-color: var(--brown); color: #fff; }
.empty { text-align: center; background: #fff; border-radius: var(--radius); padding: 56px 24px; box-shadow: var(--shadow); color: var(--ink-2); display: flex; flex-direction: column; align-items: center; gap: 14px; margin: 16px 0; }
.empty > .i { color: #B6BCC6; }
.empty p { margin: 0; max-width: 520px; }
.err-code { font-family: var(--font-head); font-weight: 800; font-size: 72px; color: var(--brand); line-height: 1; }

/* ---------- product page ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; background: #fff; border-radius: 20px; padding: clamp(16px, 3vw, 32px); box-shadow: var(--shadow); margin-top: 8px; }
.product-media { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; border-radius: 16px; overflow: hidden; }
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.product-info h1 { font-size: clamp(20px, 2.6vw, 28px); }
.product-meta { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; margin: 12px 0 20px; font-size: 14px; }
.buy-box { background: var(--bg); border-radius: 16px; padding: 20px; display: grid; gap: 16px; }
.price-lg b { font-size: clamp(26px, 3vw, 34px); }
.price-lg s { font-size: 16px; }
.price-lg small { font-size: 14px; }
.sale-ends { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 600; font-size: 14px; color: var(--sale); }
.timer-inline { position: static; flex-direction: row; }
.timer-inline .t { width: 48px; background: #fff; }
.buy-row { display: flex; gap: 12px; flex-wrap: wrap; }
.buy-row .btn { flex: 1; }
.qty { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 999px; height: 52px; }
.qty button { width: 44px; height: 100%; border: 0; background: none; display: grid; place-items: center; border-radius: 999px; color: var(--ink-2); }
.qty button:hover { color: var(--ink); background: var(--muted); }
.qty input { width: 56px; text-align: center; border: 0; font-weight: 700; font-size: 16px; 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: 40px; }
.qty-sm button { width: 36px; }
.qty-sm input { width: 44px; font-size: 15px; }
.call-order { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.call-order:hover { color: var(--ink); }
.product-perks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 14px; color: var(--ink-2); }
.product-perks li { display: flex; align-items: center; gap: 10px; }
.product-perks .i { color: var(--warn); }
.desc { background: #fff; border-radius: 20px; padding: clamp(16px, 3vw, 32px); box-shadow: var(--shadow); }
.desc-text { margin-top: 12px; white-space: pre-line; color: var(--ink-2); max-width: 820px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 20px; } .product-media { max-height: 420px; } }

/* ---------- text pages ---------- */
.text-page { display: grid; gap: 24px; }
.text-page.with-aside { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
.prose { background: #fff; border-radius: 20px; padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow); color: var(--ink-2); font-size: 16px; line-height: 1.7; max-width: 860px; }
.prose p { margin: 0 0 14px; white-space: pre-line; }
.prose p:last-child { margin-bottom: 0; }
.contact-card { background: #2A1C13; color: #fff; border-radius: 20px; padding: 12px; display: grid; gap: 4px; }
.contact-card > * { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; }
.contact-card a:hover { background: rgba(255, 255, 255, .06); }
.contact-card .i { color: var(--brand); }
.contact-card span { display: flex; flex-direction: column; }
.contact-card small { color: #9AA1AD; font-size: 13px; }
@media (max-width: 860px) { .text-page.with-aside { grid-template-columns: 1fr; } }

/* ---------- cart ---------- */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; }
.cart-list { background: #fff; border-radius: 20px; padding: 8px 20px; box-shadow: var(--shadow); }
.cart-item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 130px 40px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-item:last-of-type { border-bottom: 0; }
.cart-img { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 12px; overflow: hidden; }
.cart-img img { width: 100%; height: 100%; object-fit: contain; }
.cart-name { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.cart-name a:hover { color: var(--warn); }
.cart-name .muted { font-size: 13px; font-weight: 500; }
.cart-line { text-align: right; font-size: 17px; white-space: nowrap; }
.checkout { background: #fff; border-radius: 20px; padding: 24px; box-shadow: var(--shadow); display: grid; gap: 14px; position: sticky; top: 108px; }
.checkout h2 { font-size: 19px; }
.total-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 16px; background: var(--brand-50); border-radius: 12px; font-weight: 700; }
.total-row b { font-size: 24px; font-weight: 800; }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-size: 16px; font-weight: 500; color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brown); box-shadow: 0 0 0 3px rgba(247, 127, 18, .4); }
.js .js-hide { display: none; }
@media (max-width: 980px) { .cart { grid-template-columns: 1fr; } .checkout { position: static; } }
@media (max-width: 640px) {
  .cart-list { padding: 4px 14px; }
  .cart-item { grid-template-columns: 56px minmax(0, 1fr) 36px; grid-template-areas: 'img name del' 'img qty line'; gap: 8px 12px; }
  .cart-img { grid-area: img; width: 56px; height: 56px; }
  .cart-name { grid-area: name; font-size: 14px; }
  .cart-item .qty { grid-area: qty; justify-self: start; }
  .cart-line { grid-area: line; grid-column: 2 / 4; justify-self: end; align-self: center; }
  .cart-item .icon-btn { grid-area: del; }
}
.thanks h1 { font-size: clamp(22px, 3vw, 28px); }
.thanks-ico { display: grid; place-items: center; width: 80px; height: 80px; border-radius: 50%; background: var(--brand); color: #fff; }

/* ---------- footer ---------- */
.footer { margin-top: 56px; background: #2A1C13; color: #D9C8B8; }
.hazard { height: 10px; background: repeating-linear-gradient(-45deg, #E0802A 0 14px, #5A3420 14px 28px); }
.footer-in { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 32px; padding-top: 40px; padding-bottom: 32px; }
.footer h3 { font-family: var(--font); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; color: #fff; margin-bottom: 14px; }
.footer-in > div:not(.footer-brand) { display: flex; flex-direction: column; gap: 4px; }
.footer-in a, .footer-contacts span { padding: 4px 0; display: inline-flex; align-items: center; gap: 8px; transition: color .2s; font-size: 15px; }
.footer-in a:hover { color: var(--brand); }
.footer-contacts .i { color: var(--brand); }
.footer-brand p { margin: 16px 0 0; font-size: 14px; max-width: 320px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px; padding-bottom: 22px; border-top: 1px solid #45301F; font-size: 13px; color: #A8927E; }
.footer-bottom a { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom a:hover { color: #fff; }
@media (max-width: 900px) { .footer-in { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-in { grid-template-columns: 1fr; gap: 24px; } }

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

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* product page heart */
.fav-inline { margin: 0; display: flex; }
.fav-lg { width: 56px; height: 56px; background: #fff; border: 1px solid var(--line); }
.buy-box .buy-row .btn { flex: 1; }

/* ---------- store map ---------- */
.map-card { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); background: #fff; border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; }
.map-info { padding: 22px; display: grid; gap: 6px; align-content: start; }
.map-row { display: flex; gap: 14px; align-items: flex-start; padding: 10px; border-radius: 12px; }
a.map-row:hover { background: var(--muted); }
.map-row .i { color: var(--brown); margin-top: 2px; }
.map-row span { display: flex; flex-direction: column; line-height: 1.35; }
.map-row b { font-size: 16px; }
.map-row small { color: var(--ink-3); font-size: 13px; }
.map-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 0 10px; }
.map-frame { width: 100%; height: 100%; min-height: 380px; border: 0; display: block; background: var(--muted); }
@media (max-width: 860px) { .map-card { grid-template-columns: 1fr; } .map-frame { min-height: 300px; } .map-btns .btn { flex: 1; } }
.consent { margin: -6px 0 0; }
.consent a { color: var(--brown-600); text-decoration: underline; text-underline-offset: 2px; }
.consent a:hover { color: var(--brand-600); }
.para-head { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }

/* ---------- loud red sale: badge, price, countdown ---------- */
:root { --hot: #E3141F; --hot-2: #B80D16; }
.tag-sale { background: linear-gradient(180deg, #FF3B30 0%, var(--hot-2) 100%); color: #fff; box-shadow: 0 4px 12px rgba(227, 20, 31, .45); animation: hot-pulse 1.8s ease-in-out infinite; }
@keyframes hot-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.08); } }
.price b.is-sale { color: var(--hot); }
.price s { text-decoration-color: var(--hot); text-decoration-thickness: 2px; }
.timer .t { background: linear-gradient(180deg, #FF3B30 0%, var(--hot-2) 100%); border: 0; color: #fff; box-shadow: 0 3px 8px rgba(184, 13, 22, .35); }
.timer .t small { color: rgba(255, 255, 255, .85); }
.sale-ends { color: var(--hot); font-weight: 700; }
.timer-inline .t { background: linear-gradient(180deg, #FF3B30 0%, var(--hot-2) 100%); }
/* the price shrinks with the card so it never runs under the cart button */
.card { container-type: inline-size; }
.card-foot .price { flex: 1; }
.card .price b { font-size: clamp(16px, 8.4cqw, 23px); }
@media (prefers-reduced-motion: reduce) { .tag-sale { animation: none; } }

/* card countdown: a slim red pill under the photo, so it never covers the product */
.timer-bar { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; background: linear-gradient(180deg, #FF3B30 0%, var(--hot-2) 100%); color: #fff; font-size: 13px; font-weight: 800; line-height: 1.4; font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: 0 3px 8px rgba(184, 13, 22, .3); }
.timer-bar .i { stroke-width: 2.4; flex-shrink: 0; }
.timer-bar[hidden] { display: none; }
@media (max-width: 640px) { .timer-bar { font-size: 11.5px; padding: 2px 8px 2px 6px; gap: 4px; } .timer-bar .i { width: 12px; height: 12px; } }
