/* ════════════ Layout: containers, header, navigation, footer ════════════ */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.container--wide { max-width: 1680px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section--fog { background: var(--fog); }
.section--ash  { background: var(--ash); }
.section:not(.section--fog):not(.section--ash) + .section:not(.section--fog):not(.section--ash) { padding-top: 0; }

main { display: block; min-height: 40vh; }

/* ── Announcement bar ── */
.announce { background: var(--ink); color: #e9e9e7; font-size: var(--fs-xs); }
.announce__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-6); min-height: 34px; padding-block: var(--s-2); }
.announce p { margin: 0; }
.announce a { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.announce a:hover { color: #fff; text-decoration-color: var(--signal); }
@media (max-width: 767px) { .announce__inner { justify-content: center; text-align: center; } .announce__extra { display: none; } }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  background: var(--paper);
  border-bottom: 1px solid var(--ink);
}
.header-bar {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center;
  gap: clamp(1rem, .5rem + 2vw, 3rem);
  height: var(--header-h);
}
.brand-logo { display: block; line-height: 0; }
.brand-logo img { height: 40px; width: auto; }

.primary-nav__list { display: flex; align-items: center; gap: clamp(.9rem, .2rem + 1.4vw, 2rem); list-style: none; height: var(--header-h); }
.primary-nav__item { display: flex; height: 100%; }
.primary-nav__link {
  position: relative; display: inline-flex; align-items: center; gap: .3rem; height: 100%;
  font-size: var(--fs-sm); font-weight: 500; letter-spacing: -.005em; color: var(--ink); white-space: nowrap;
}
.primary-nav__link .ic { width: 14px; height: 14px; transition: transform var(--t-fast) var(--ease); }
.primary-nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--ink);
  transform: scaleY(0); transform-origin: bottom; transition: transform var(--t-fast) var(--ease);
}
.primary-nav__link:hover::after, .primary-nav__link[aria-expanded="true"]::after, .is-active > .primary-nav__link::after { transform: scaleY(1); }
.primary-nav__link[aria-expanded="true"] .ic { transform: rotate(180deg); }
.primary-nav__link--accent { color: var(--signal-ink); }
.primary-nav__link--accent::after { background: var(--signal); }
@media (max-width: 1279px) { .primary-nav__item--wide { display: none; } }

.header-tools { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-1); }
.tool-link { display: inline-flex; align-items: center; gap: var(--s-2); height: 44px; padding: 0 var(--s-2); font-size: var(--fs-sm); font-weight: 500; color: var(--ink); }
.tool-link .ic { width: 20px; height: 20px; }
.tool-link:hover .tool-link__label { text-decoration: underline; text-underline-offset: .3em; }
.tool-link--bag { padding-right: 0; }
.bag-count {
  display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 7px;
  border-radius: var(--r-pill); background: var(--ink); color: var(--paper);
  font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.bag-count[hidden] { display: inline-flex !important; background: transparent; color: var(--ink); border: 1px solid var(--ink); }
.bag-count.is-bumped { animation: badge-bump .55s var(--ease); }
@keyframes badge-bump { 40% { transform: scale(1.3); background: var(--signal); color: #fff; } }
@media (max-width: 1279px) { .tool-link:not(.tool-link--bag) .tool-link__label { display: none; } }

/* Inline desktop search */
.header-search { position: relative; }
.header-search__field {
  display: flex; align-items: center; gap: var(--s-2);
  width: 150px; height: 38px; padding: 0 var(--s-3);
  background: var(--fog); border-radius: var(--r-pill);
  transition: width var(--t-med) var(--ease), background var(--t-fast);
}
.header-search__field:focus-within { width: 290px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.header-search__field .ic { width: 17px; height: 17px; flex: 0 0 auto; }
.header-search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: var(--fs-sm); }
.header-search input::placeholder { color: var(--ink-soft); }
.header-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
@media (max-width: 1279px) { .header-search__field { width: 120px; } .header-search__field:focus-within { width: 240px; } }

/* Search results (desktop dropdown + mobile panel) */
.search-results { list-style: none; margin: 0; padding: 0; max-height: min(62vh, 520px); overflow-y: auto; overscroll-behavior: contain; }
.header-search .search-results {
  position: absolute; right: 0; top: calc(100% + 10px); width: 420px;
  background: var(--paper); border: 1px solid var(--ink); box-shadow: var(--shadow-float); z-index: var(--z-mega);
}
.header-search .search-results:empty { display: none; }
.search-results li { border-bottom: 1px solid var(--line); }
.search-results li:last-child { border-bottom: 0; }
.search-results .item_link_search { display: block; padding: var(--s-3) var(--s-4); }
.search-results .item_link_search:hover, .search-results .item_link_search:focus-visible { background: var(--fog); }
.search-results .row { display: flex; align-items: center; gap: var(--s-3); margin: 0; }
.search-results .col-sm-12, .search-results .col-9, .search-results .col-2 { padding: 0; width: auto; flex: 0 1 auto; }
.search-results .col-sm-12 { width: 100%; }
.search-results .col-9 { flex: 1; min-width: 0; }
.search-results .item_image_search { width: 52px; height: 52px; object-fit: contain; background: var(--fog); mix-blend-mode: multiply; }
.search-results h4 { margin: 0; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0; line-height: 1.35; }
.search-results > p, .search-results .search-empty { padding: var(--s-4); margin: 0 !important; color: var(--muted) !important; text-align: left !important; font-size: var(--fs-sm); }
.search-results__all { display: flex; align-items: center; justify-content: space-between; padding: var(--s-3) var(--s-4); font-size: var(--fs-sm); font-weight: 500; background: var(--ink); color: var(--paper); }
.search-results__all:hover { color: var(--paper); }

/* Mega menu — inverted panel */
.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--ink); color: #d9d9d6; z-index: var(--z-mega);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .45s var(--ease), visibility 0s linear .45s;
  max-height: calc(100vh - 140px); overflow-y: auto;
}
.mega.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition-delay: 0s; }
.mega__inner { display: grid; grid-template-columns: minmax(240px, .9fr) minmax(0, 2fr) 260px; gap: clamp(2rem, 1rem + 3vw, 4rem); padding-block: var(--s-10) var(--s-12); }
.mega__menus { list-style: none; display: grid; align-content: start; gap: var(--s-1); }
.mega__menu-btn {
  display: flex; align-items: baseline; gap: var(--s-3); width: 100%; text-align: left;
  font-size: clamp(1.8rem, 1rem + 1.8vw, 2.8rem); font-weight: 500; letter-spacing: var(--track-display); line-height: 1.15;
  color: #6f6f6c; transition: color var(--t-fast), transform var(--t-med) var(--ease);
}
.mega__num { font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; color: #8c8c88; font-variant-numeric: tabular-nums; }
.mega__menu-btn:hover, .mega__menu-btn[aria-selected="true"] { color: #fff; }
.mega__menu-btn[aria-selected="true"] { transform: translateX(10px); }
.mega__menu-btn[aria-selected="true"] .mega__num { color: var(--signal); }
.mega__body { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: var(--s-8); align-content: start; }
.mega__panel[hidden] { display: none; }
.mega__cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--s-6) var(--s-8); align-content: start; }
.mega__cat-title { display: block; margin-bottom: var(--s-2); font-size: var(--fs-xs); color: #8c8c88; }
.mega__subs { list-style: none; }
.mega__subs a, .mega__types a { display: block; padding: .28rem 0; font-size: var(--fs-sm); color: #f1f1ef; }
.mega__subs a:hover, .mega__types a:hover { color: #fff; text-decoration: underline; text-underline-offset: .3em; text-decoration-color: var(--signal); }
.mega__types { border-left: 1px solid #333331; padding-left: var(--s-6); }
.mega__all { display: inline-flex; align-items: center; gap: var(--s-2); margin-top: var(--s-8); font-size: var(--fs-sm); font-weight: 500; color: #fff; border-bottom: 1px solid #fff; padding-bottom: 2px; }
.mega__all .ic { width: 16px; height: 16px; }
.mega__all:hover { color: #fff; }
.mega__feature { position: relative; display: block; overflow: hidden; align-self: start; background: #222; }
.mega__feature img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease); }
.mega__feature:hover img { transform: scale(1.04); }
.mega__feature-label { position: absolute; left: 0; bottom: 0; display: inline-flex; align-items: center; gap: var(--s-2); padding: var(--s-2) var(--s-3); background: var(--paper); color: var(--ink); font-size: var(--fs-xs); font-weight: 500; }
.mega__feature-label .ic { width: 14px; height: 14px; }
.mega__empty { color: #8c8c88; font-size: var(--fs-sm); }

/* ── Mobile header ── */
.only-mobile { display: none; }
.menu-btn { display: none; align-items: center; gap: var(--s-2); height: 44px; font-size: var(--fs-sm); font-weight: 500; }
.menu-btn__lines { position: relative; width: 20px; height: 9px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
@media (max-width: 1023px) {
  .only-desktop { display: none !important; }
  .only-mobile { display: inline-flex; }
  .menu-btn { display: inline-flex; }
  .header-bar { grid-template-columns: 1fr auto 1fr; gap: var(--s-2); }
  .brand-logo { justify-self: center; }
  .brand-logo img { height: 32px; }
  .header-tools { gap: 0; margin-right: -4px; }
}
@media (max-width: 374px) { .menu-btn__label { display: none; } .tool-link--bag .tool-link__label { display: none; } .brand-logo img { height: 28px; } }

/* Generic icon button (drawers, modals) */
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; color: inherit; border-radius: var(--r-pill);
  transition: background var(--t-fast) var(--ease);
}
.icon-btn:hover { background: rgba(127,127,127,.12); }
.icon-btn .ic { width: 22px; height: 22px; }

/* ── Drawer (mobile nav + filters share the base) ── */
.drawer { position: fixed; inset: 0; z-index: var(--z-drawer); visibility: hidden; pointer-events: none; }
.drawer.is-open { visibility: visible; pointer-events: auto; }
.drawer__scrim { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity var(--t-med) var(--ease); }
.drawer.is-open .drawer__scrim { opacity: 1; }
.drawer__panel {
  position: absolute; top: 0; bottom: 0; left: 0; width: min(420px, 88vw);
  display: flex; flex-direction: column; background: var(--paper);
  transform: translateX(-100%); transition: transform var(--t-med) var(--ease);
}
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 64px; padding: var(--s-2) var(--s-3) var(--s-2) var(--s-5); border-bottom: 1px solid var(--line); }
.drawer__head img { height: 30px; width: auto; }
.drawer__title { font-size: var(--fs-lg); margin: 0; }
.drawer__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }

/* Full-screen inverted mobile menu */
.drawer--full .drawer__panel {
  width: 100%; background: var(--ink); color: #f1f1ef;
  transform: none; clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease);
}
.drawer--full.is-open .drawer__panel { clip-path: inset(0 0 0 0); }
.drawer--full .drawer__head { border-color: #2c2c2a; padding-top: env(safe-area-inset-top); }
.drawer--full .drawer__head img { height: 30px; }

.mnav { list-style: none; padding: var(--s-4) 0; }
.mnav > li { border-bottom: 1px solid #2c2c2a; }
.mnav__link, .mnav__toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 62px; padding: 0 var(--s-5); text-align: left; color: #f1f1ef;
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); font-weight: 500; letter-spacing: var(--track-display);
}
.mnav__link:hover { color: #fff; }
.mnav__toggle .ic { transition: transform var(--t-fast) var(--ease); width: 22px; height: 22px; }
.mnav__toggle[aria-expanded="true"] > .ic { transform: rotate(180deg); }
.mnav__link--accent { color: #ff8a80; }
.mnav__sub { list-style: none; padding: 0 0 var(--s-3); }
.mnav__sub .mnav__toggle, .mnav__sub .mnav__link { min-height: 48px; font-size: var(--fs-md); letter-spacing: 0; padding-left: var(--s-8); color: #cfcfcc; }
.mnav__subsub { padding: 0 var(--s-5) var(--s-3) var(--s-10); }
.mnav__subsub a { display: block; padding: .5rem 0; font-size: var(--fs-sm); color: #d9d9d6; }
.mnav__subsub strong { color: #fff; font-weight: 500; }
.mnav__group-title { display: block; padding: var(--s-3) 0 var(--s-1); font-size: var(--fs-xs); color: #8c8c88; }
.mnav-utility { display: grid; gap: var(--s-1); padding: var(--s-5) var(--s-5) calc(var(--s-8) + env(safe-area-inset-bottom)); }
.mnav-utility a { display: flex; align-items: center; gap: var(--s-3); padding: .6rem 0; font-size: var(--fs-sm); color: #d9d9d6; }
.mnav-utility .ic { width: 18px; height: 18px; }

/* Mobile search panel */
.search-panel {
  position: fixed; inset: 0; z-index: var(--z-drawer); background: var(--paper);
  display: flex; flex-direction: column;
  opacity: 0; visibility: hidden; transform: translateY(-12px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.search-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.search-panel__bar { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-3) var(--s-3) var(--s-4); border-bottom: 1px solid var(--ink); }
.search-panel__bar form { flex: 1; display: flex; align-items: center; gap: var(--s-2); }
.search-panel__bar input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; font-size: 1.4rem; font-weight: 500; letter-spacing: -.02em; background: transparent; }
.search-panel .search-results { max-height: none; flex: 1; }

/* ── Page header (inner pages) ── */
.page-head { background: var(--fog); padding-block: clamp(1.75rem, 1rem + 3vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-head__title { margin: var(--s-3) 0 0; font-size: var(--fs-2xl); }
.page-head__intro { margin: var(--s-3) 0 0; max-width: 60ch; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; list-style: none; font-size: var(--fs-xs); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: .35rem; color: var(--line-strong); }
.breadcrumb a:hover { color: var(--ink); text-decoration: underline; }
.breadcrumb [aria-current] { color: var(--ink); }

/* ── Newsletter: a sentence you complete ── */
.newsletter { background: var(--fog); padding-block: clamp(3rem, 2rem + 4vw, 6rem); border-top: 1px solid var(--line); }
.newsletter__form { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: var(--s-4); row-gap: var(--s-4); }
.newsletter__line { margin: 0; font-size: clamp(1.6rem, .9rem + 2.6vw, 3.4rem); font-weight: 500; letter-spacing: var(--track-display); line-height: 1.08; max-width: 24ch; }
.newsletter__field { flex: 1 1 360px; display: flex; align-items: center; border-bottom: 2px solid var(--ink); }
.newsletter__field input {
  flex: 1; min-width: 0; height: 64px; border: 0; outline: 0; background: transparent;
  font-size: clamp(1.3rem, .9rem + 1.6vw, 2.4rem); font-weight: 500; letter-spacing: -.02em; color: var(--ink);
}
.newsletter__field input::placeholder { color: #a3a3a0; }
.newsletter__field button { display: inline-flex; align-items: center; gap: var(--s-2); height: 48px; padding: 0 var(--s-5); background: var(--ink); color: var(--paper); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap; border-radius: var(--r-pill); }
.newsletter__field button .ic { width: 16px; height: 16px; transition: transform var(--t-fast) var(--ease); }
.newsletter__field button:hover .ic { transform: translateX(4px); }
.newsletter__field button:disabled { opacity: .6; }
.newsletter__msg { min-height: 1.5em; margin: var(--s-3) 0 0; font-size: var(--fs-sm); }
@media (max-width: 599px) { .newsletter__field { flex-wrap: wrap; border-bottom: 0; } .newsletter__field input { flex-basis: 100%; height: 56px; border-bottom: 2px solid var(--ink); margin-bottom: var(--s-4); } .newsletter__field button { width: 100%; justify-content: center; } }

/* ── Footer ── */
.site-footer { background: var(--ink); color: #bdbdba; font-size: var(--fs-sm); overflow: hidden; }
.site-footer a { color: #e7e7e4; }
.site-footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: .3em; text-decoration-color: var(--signal); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .7fr)) minmax(0, 1fr) minmax(0, 1fr); gap: var(--s-8); padding-block: clamp(3rem, 2rem + 3vw, 5rem) var(--s-10); }
.footer-about p { max-width: 38ch; }
.footer-title { font-family: var(--font-sans); font-size: var(--fs-xs); font-weight: 400; letter-spacing: 0; color: #8c8c88; margin: 0 0 var(--s-4); }
.footer-links { list-style: none; display: grid; gap: .5rem; }
.footer-store { display: grid; gap: 2px; margin-bottom: var(--s-4); }
.footer-store strong { color: #fff; font-weight: 500; }
.footer-store a { display: inline-flex; align-items: center; gap: var(--s-2); }
.footer-store .ic { width: 16px; height: 16px; }
.social { display: flex; gap: var(--s-2); margin-top: var(--s-5); }
.social a { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border: 1px solid #3a3a38; border-radius: 50%; transition: border-color var(--t-fast), background var(--t-fast); }
.social a:hover { border-color: #fff; background: #222; }
.social .ic { width: 18px; height: 18px; }
.app-badges { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
.app-badges img { width: 130px; height: auto; }
.footer-bottom { position: relative; background: var(--ink); border-top: 1px solid #2c2c2a; padding-block: var(--s-4); font-size: var(--fs-xs); color: #8c8c88; }
.footer-bottom__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); }
.footer-bottom p { margin: 0; }
@media (max-width: 1023px) { .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .footer-about { grid-column: 1 / -1; } }
@media (max-width: 599px) { .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-8) var(--s-5); } .footer-stores, .footer-app { grid-column: 1 / -1; } }

/* ── Floating WhatsApp ── */
.wa-float {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%;
  background: #1f8f4e; color: #fff; box-shadow: var(--shadow-soft);
  transition: transform var(--t-fast) var(--ease), bottom var(--t-med) var(--ease);
}
.wa-float:hover { color: #fff; transform: translateY(-2px); }
.wa-float .ic { width: 26px; height: 26px; }
body.has-sticky-buy .wa-float { bottom: calc(88px + env(safe-area-inset-bottom)); }
/* Keep form-heavy pages clear on small screens (WhatsApp stays in the menu/footer) */
@media (max-width: 767px) {
  .page-checkout1 .wa-float, .page-login .wa-float, .page-profile .wa-float, .page-verify_phone .wa-float,
  .page-cart .wa-float, .page-new_cart .wa-float { display: none; }
  .page-checkout1 .notices, .page-login .notices, .page-profile .notices, .page-verify_phone .notices { display: none; }
}
