/* Vermalle — header, footer, layout utilities */

.icon {
  width: 1em;
  height: 1em;
  flex: none;
  vertical-align: -0.15em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--accent-contrast);
  padding: 0.6rem 0.85rem;
  border-radius: 0 0 var(--radius-sm) 0;
  font-size: 0.9rem;
}

.skip-link:focus,
.skip-link:focus-visible {
  left: 0;
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 1rem;
  height: 64px;
}

.site-header__logo {
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}

.site-header__nav {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.site-header__nav a {
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.25rem 0;
  position: relative;
}

.site-header__nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* 44 px is Apple HIG / WCAG 2.5.5 minimum for touch targets. */
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.icon-btn:hover {
  background: var(--border);
  opacity: 1;
}

.cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  background: var(--ink);
  color: var(--accent-contrast);
  border-radius: 999px;
}

.site-header__menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  width: 22px;
}

.hamburger > span {
  display: block;
  height: 1.5px;
  background: var(--ink);
  border-radius: 1px;
  transition: transform 200ms ease, opacity 120ms ease;
  transform-origin: center;
}

/* When the menu is open the burger morphs into an X. */
[data-menu-toggle][aria-expanded="true"] .hamburger > span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}
[data-menu-toggle][aria-expanded="true"] .hamburger > span:nth-child(2) {
  opacity: 0;
}
[data-menu-toggle][aria-expanded="true"] .hamburger > span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

/* Department shortcut block — visible inside the mobile drawer only. */
.site-header__nav-section {
  display: none;
}
.site-header__nav-eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1rem var(--gutter) 0.25rem;
}

@media (max-width: 767px) {
  .site-header__inner {
    grid-template-columns: auto 1fr auto;
  }

  .site-header__menu-toggle {
    display: inline-flex;
    order: -1;
  }

  .site-header__nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .site-header__nav.is-open {
    max-height: 80vh;
    overflow-y: auto;
  }

  .site-header__nav > a {
    padding: 1rem var(--gutter);
    border-top: 1px solid var(--border);
    width: 100%;
  }

  .site-header__nav-section {
    display: block;
    width: 100%;
    border-top: 1px solid var(--border);
    padding-bottom: 0.5rem;
  }
  .site-header__nav-section a {
    padding: 0.6rem var(--gutter);
    display: block;
    font-size: 0.95rem;
  }
}

/* ── footer ── */

.site-footer {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

@media (min-width: 640px) {
  .site-footer__inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .site-footer__inner {
    grid-template-columns: 1.4fr repeat(3, 1fr) 1.4fr;
  }
}

.site-footer__logo {
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__col h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
}

.site-footer__col a {
  color: var(--ink);
  font-size: 0.95rem;
}

.site-footer__newsletter h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 500;
}

.site-footer__newsletter-row {
  display: flex;
  gap: 0.5rem;
}

.site-footer__newsletter-row input {
  flex: 1;
}

.site-footer__newsletter-status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  padding-bottom: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.site-footer__bottom p {
  margin: 0;
}

.site-footer__country {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--ink);
  transition: border-color 140ms ease, background 140ms ease;
  flex-wrap: wrap;
  text-align: left;
}
.site-footer__country:hover { border-color: var(--ink); }
.site-footer__country-rate {
  font-size: 0.78rem;
}
.site-footer__country-change {
  margin-left: 0.5rem;
  font-size: 0.78rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: var(--ink-muted);
}
.site-footer__country:hover .site-footer__country-change { color: var(--ink); }

/* Country dialog (modal picker) */
.country-dialog {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}
.country-dialog[hidden] { display: none; }
body.country-open { overflow: hidden; }
.country-dialog__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.45);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: country-fade 200ms ease both;
}
.country-dialog__panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
  animation: country-pop 240ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes country-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes country-pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.country-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.5rem;
}
.country-dialog__head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.country-dialog__close {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--ink);
  padding: 0 0.25rem;
}
.country-dialog__hint {
  margin: 0 1.25rem 0.75rem;
  font-size: 0.85rem;
}
.country-dialog__list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0.75rem 1rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem;
  overflow-y: auto;
}
@media (min-width: 600px) {
  .country-dialog__list { grid-template-columns: repeat(3, 1fr); }
}
.country-dialog__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--ink);
  text-align: left;
  transition: background 120ms ease, border-color 120ms ease;
}
.country-dialog__item:hover { background: var(--border); }
.country-dialog__item.is-active {
  border-color: var(--ink);
  background: var(--bg);
  font-weight: 500;
}

/* ── search overlay ── */

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 88px;
}

body.search-open {
  overflow: hidden;
}

.search-overlay__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.5);
}

.search-overlay__panel {
  position: relative;
  width: min(640px, calc(100vw - 2rem));
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  padding: 1rem;
  max-height: calc(100vh - 120px);
  overflow: auto;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.search-overlay__form {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.5rem;
  align-items: center;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.search-overlay__icon {
  color: var(--ink-muted);
}

.search-overlay__form input {
  border: 0;
  padding: 0.4rem 0.25rem;
  font-size: 1rem;
  background: transparent;
}

.search-overlay__form input:focus {
  outline: none;
}

.search-overlay__close {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 44px;
  min-height: 32px;
}

.search-overlay__close-x { display: none; }

@media (hover: none) and (max-width: 767px) {
  /* Touch devices don't have a physical Esc key — show × instead. */
  .search-overlay__close-key { display: none; }
  .search-overlay__close-x {
    display: inline-block;
    font-size: 1.4rem;
    line-height: 1;
    text-transform: none;
  }
  .search-overlay__close {
    padding: 0.2rem 0.55rem;
    min-height: 44px;
  }
}

.search-overlay__results {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
}

.search-overlay__result a {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  color: var(--ink);
  align-items: center;
  border-radius: var(--radius-sm);
}

.search-overlay__result a:hover {
  background: var(--bg);
  opacity: 1;
}

.search-overlay__result img {
  width: 48px;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.search-overlay__result-body {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
  flex: 1;
}

.search-overlay__result-brand {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.search-overlay__result-name {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-overlay__result-meta {
  font-size: 0.82rem;
  color: var(--ink-muted);
}

/* Image bg fills any contain-padding around the product still. */
.search-overlay__result img {
  background: #f6f5f1;
}

.search-overlay__hint {
  margin: 0.75rem 0 0.25rem;
  font-size: 0.85rem;
}

/* Header tagline (small, desktop-only flavour text near logo) */
.site-header__tagline {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-transform: uppercase;
  justify-self: start;
}
@media (max-width: 1023px) {
  .site-header__tagline { display: none; }
}

/* Row 2: department / shortcut nav under the main header. Horizontal scroll
 * on narrow viewports, hidden when the mobile burger drawer is in play. */
.site-header__row2 {
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.site-header__row2-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.55rem 0;
}
.site-header__row2-inner::-webkit-scrollbar { display: none; }
.site-header__row2 a {
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  position: relative;
  padding: 0.2rem 0;
}
.site-header__row2 a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transition: right 240ms ease;
}
.site-header__row2 a:hover::after { right: 0; }
.site-header__row2 a[data-row2="new"] {
  font-weight: 600;
}
@media (max-width: 760px) {
  .site-header__row2 { display: none; }
}

/* Tagline column takes leftover space on desktop; nav recentres */
@media (min-width: 1024px) {
  .site-header__inner {
    grid-template-columns: auto auto 1fr auto;
  }
  .site-header__nav { justify-self: end; }
}

/* ── Language switcher (in header actions) ─────────────────────────── */
.lang-switch {
  position: relative;
}
.lang-switch__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: transparent;
  border: 1px solid transparent;
  padding: 0.35rem 0.55rem;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink);
  cursor: pointer;
  border-radius: 4px;
  letter-spacing: 0.04em;
}
.lang-switch__btn:hover {
  border-color: rgba(0, 0, 0, 0.12);
}
.lang-switch__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 6px;
  min-width: 160px;
  padding: 0.35rem 0;
  list-style: none;
  margin: 0;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}
.lang-switch__menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0.55rem 0.9rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
}
.lang-switch__menu button:hover {
  background: #f4f2ec;
}
@media (max-width: 640px) {
  .lang-switch__btn { padding: 0.3rem 0.45rem; font-size: 0.75rem; }
}
