/* layout.css — header, mega-menu, search, footer, veil (019, build P6). Shared by every page; only the window edits it. */

/* header: logo · search across the middle · hours + phone · for business · account · cart with sum (S06 line) */
.hdr { position: sticky; top: 0; z-index: 100; background: var(--paper); }
.hdr::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line); }
.hdr.is-scrolled { box-shadow: 0 12px 30px rgba(6, 16, 32, .35); }
.hdr__row { display: grid; grid-template-columns: auto minmax(280px, 1fr) auto auto auto auto; align-items: center;
  gap: clamp(14px, 1.4vw, 32px); height: 78px; }
.logo { display: inline-grid; justify-items: start; gap: 2px; color: var(--ink); min-width: 0; }
.logo__word { width: 150px; height: auto; aspect-ratio: 715 / 205; margin-top: -8px; }
.logo__sub { font: 500 12px/1.2 var(--f-text); color: var(--ink-2); white-space: nowrap; }
.logo--light .logo__word { width: 190px; }

.search { position: relative; display: flex; align-items: center; height: 50px; border-radius: var(--r-pill); background: rgba(244, 239, 232, .07);
  box-shadow: inset 0 0 0 1.5px rgba(244, 239, 232, .22); max-width: 760px; width: 100%; justify-self: center; }
.search:focus-within { box-shadow: inset 0 0 0 2px var(--ink); }
.search__ic { width: 20px; height: 20px; margin-left: 18px; color: var(--ink-3); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; padding: 0 12px; font-size: 16px; }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search__go { height: 40px; margin-right: 5px; padding: 0 20px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 15px; }
.search__drop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 120; padding: 8px; border-radius: var(--r-l); background: var(--card);
  box-shadow: 0 24px 50px rgba(6, 16, 32, .45); max-height: 70vh; overflow: auto; }
.search__drop:not([hidden]) { animation: dropin .3s var(--ease-h) both; }   /* hints slide in, not pop (Operator 28.09 «плавно») */
@keyframes dropin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.sd__row { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px 10px; border-radius: 12px; }
.sd__row:hover { background: rgba(244, 239, 232, .08); }
.sd__row > .pl { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; }
.sd__row > .pl img { width: 86%; height: 86%; object-fit: contain; }
.sd__n { display: grid; font-weight: 500; line-height: 1.3; font-size: 15px; }
.sd__n small { color: var(--ink-3); font-size: 14px; font-weight: 450; }
.sd__row b { color: var(--price); font-weight: 700; }
.sd__all { display: block; padding: 12px 10px 6px; font-weight: 600; color: var(--link); }
.sd__none { padding: 14px 10px; color: var(--ink-2); }

.hdr__contact { display: grid; justify-items: end; line-height: 1.2; }
.hdr__hours { font-size: 14px; color: var(--ink-2); }
.hdr__line { display: inline-flex; align-items: center; gap: 8px; }
.hdr__phone { font: 600 17px/1.2 var(--f-text); white-space: nowrap; }
.hdr__msg { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; transition: transform var(--t-h) var(--ease-h); }
.hdr__msg:hover { transform: scale(1.1); }
.hdr__msg img { width: 22px; height: 22px; }
.hdr__msg--max { width: auto; padding: 0 7px; height: 22px; border-radius: 6px; background: linear-gradient(135deg, #3c71f7, #8a3cf7); color: #fff;
  font: 700 11px/22px var(--f-text); letter-spacing: .04em; }
.hdr__cart { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 12px; border-radius: var(--r-pill);
  background: var(--ink); color: var(--paper); font-weight: 600; white-space: nowrap; }
.hdr__cart-ic { position: relative; display: grid; place-items: center; width: 26px; height: 26px; }
.hdr__cart-ic svg { width: 24px; height: 24px; }
.hdr__cart-ic b { position: absolute; right: -8px; top: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
  color: #fff; font: 700 12px/18px var(--f-text); text-align: center; transform: scale(0); transition: transform .3s var(--ease); }
.hdr__cart-ic.has b { transform: scale(1); }
.hdr__acc svg { width: 22px; }

.hdr__nav { position: relative; }
.hdr__navrow { display: flex; align-items: center; justify-content: space-between; height: 50px; }
.menu { display: flex; gap: clamp(18px, 2vw, 44px); height: 100%; }
.menu li { display: flex; align-items: center; height: 100%; position: relative; }
.menu > li > a { font: 600 16px/1 var(--f-text); position: relative; padding: 14px 0; }
.menu > li > a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 2px; background: var(--ink); transform: scaleX(0);
  transform-origin: left; transition: transform var(--t-h) var(--ease-h); }
.menu > li:hover > a::after, .menu > li.is-on > a::after, .menu > li.is-cur > a::after { transform: scaleX(1); }
.menu--aux > li > a { font-weight: 500; color: var(--ink-2); }

/* mega-menu (S01 moze: panel of columns + photo tile) — a lighter blue panel that fades and slides down, and back up on leave */
.mega { position: absolute; left: 0; right: 0; top: 100%; background: #1c3c64; box-shadow: 0 30px 50px rgba(6, 16, 32, .45);
  border-top: 1px solid var(--line); z-index: 90; opacity: 0; transform: translateY(-10px); pointer-events: none;
  transition: opacity .28s var(--ease-h), transform .45s var(--ease); }
.mega.is-open { opacity: 1; transform: none; pointer-events: auto; }
.mega__in > * { opacity: 0; transform: translateY(8px); transition: opacity .35s var(--ease-h), transform .5s var(--ease); }
.mega.is-open .mega__in > * { opacity: 1; transform: none; }
.mega.is-open .mega__in > :nth-child(2) { transition-delay: .04s; }
.mega.is-open .mega__in > :nth-child(3) { transition-delay: .08s; }
.mega.is-open .mega__in > :nth-child(4) { transition-delay: .12s; }
.mega__in { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(260px, 1.2fr); gap: clamp(20px, 2.6vw, 60px); padding-block: 32px 36px; }
.mega__col { display: grid; align-content: start; gap: 4px; }
.mega__h { font: 600 13px/1 var(--f-text); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 10px; }
.mega__h--2 { margin-top: 18px; }
.mega__col a { padding: 5px 0; font-size: 15px; display: flex; justify-content: space-between; gap: 12px; max-width: 280px; }
.mega__col a b { font-weight: 500; color: var(--ink-3); }
.mega__col a:hover { color: var(--link); }
.mega__all { color: var(--link) !important; font-weight: 600; margin-top: 6px; }
.mega__promo { position: relative; display: grid; align-content: end; min-height: 250px; padding: 22px; border-radius: var(--r-l); overflow: hidden;
  background: var(--sec-bg, linear-gradient(160deg, #6fa8e0, #2f6fb1)); color: var(--navy); }
.mega__promo[data-sec="kalyany"] { --sec-bg: linear-gradient(160deg, #ffc49e 0%, #f2745a 100%); }
.mega__promo[data-sec="smesi"] { --sec-bg: linear-gradient(160deg, #fff09a 0%, #f3b53a 100%); }
.mega__promo[data-sec="ugol"] { --sec-bg: linear-gradient(160deg, #b9f1de 0%, #37b89c 100%); }
.mega__promo[data-sec="aksessuary"] { --sec-bg: linear-gradient(160deg, #ffc8e6 0%, #b983ee 100%); }
.mega__promo img { position: absolute; right: 6%; top: 5%; height: 66%; max-width: 80%; width: auto; object-fit: contain; object-position: right top;
  filter: drop-shadow(0 16px 20px rgba(15, 36, 64, .3)); transition: transform .4s var(--ease-h); }   /* above the title, never over it: navy on a black pack vanished */
.mega__promo:hover img { transform: scale(1.04); }
.mega__promo span { position: relative; font: 400 24px/1.1 var(--f-display); display: grid; gap: 8px; }
.mega__promo span b { font: 600 15px/1.2 var(--f-text); color: rgba(15, 36, 64, .78); }

/* footer — the dark frame at the bottom (Darkside keeps menu and footer dark even on its light pages) */
.ftr { background: var(--navy); color: rgba(255, 255, 255, .86); padding-top: clamp(56px, 5vw, 110px); margin-top: clamp(40px, 4vw, 90px); }
.ftr a:hover { color: #fff; }
.ftr__top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr; gap: var(--gutter); padding-bottom: 48px; }
.ftr__name { margin: 20px 0 22px; color: rgba(255, 255, 255, .6); font-size: 15px; }
.ftr__msg { display: flex; flex-wrap: wrap; gap: 10px; }
.ftr__col { display: grid; align-content: start; gap: 10px; font-style: normal; font-size: 15px; }
.ftr__h { font: 600 13px/1 var(--f-text); letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .58); margin-bottom: 6px; }
.ftr__law { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: start; padding-block: 26px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 14px; color: rgba(255, 255, 255, .74); }
.ftr__law p + p { margin-top: 6px; }
.ftr__law b { color: #fff; letter-spacing: .04em; font-weight: 600; }
.ftr__18 { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; background: var(--red); color: #fff; font: 400 17px/1 var(--f-display); }
.ftr__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px 30px;
  border-top: 1px solid rgba(255, 255, 255, .12); font-size: 14px; color: rgba(255, 255, 255, .62); }
.ftr__pd summary { cursor: pointer; }
.ftr__pd p { max-width: 60ch; margin-top: 8px; }

.veil { position: fixed; inset: 0; z-index: 400; background: var(--paper); pointer-events: none; }
html.is-gated { overflow: hidden; }

@media (max-width: 1500px) {
  .hdr__row { grid-template-columns: auto minmax(240px, 1fr) auto auto auto; }
  .hdr__acc { display: none; }
  .logo__sub { font-size: 11px; }
}
