/* ==========================================================================
   Knit & Ispira — shared components: header, navigation, drawers, dialogs,
   toasts, product cards, footer, cookie banner, messenger button
   ========================================================================== */

/* --------------------------------------------------------------------------
   Announcement & utility bar
   -------------------------------------------------------------------------- */
.announcement {
  background: var(--c-dark);
  color: var(--c-on-dark);
  font-size: var(--fs-s);
  text-align: center;
  padding: 9px var(--gutter);
  line-height: 1.4;
}
.announcement a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.announcement a:hover { color: #fff; }
.announcement--sale { background: var(--c-accent); color: var(--c-accent-ink); font-weight: 600; }

/* Staff taking an order for a customer (switched on in the admin) */
.staff-bar {
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: center;
  padding: 8px var(--gutter); background: var(--c-accent); color: var(--c-accent-ink); font-size: var(--fs-s);
}
.staff-bar span { display: inline-flex; gap: 8px; align-items: center; }
.staff-bar button {
  color: inherit; background: none; font: inherit; cursor: pointer;
  border: 1px solid currentColor; border-radius: 999px; padding: 4px 14px; min-height: 32px;
}
.staff-bar button:hover { background: var(--c-accent-hover); }

/* Holidays or a vacation (Store settings → Break) */
.break-bar {
  display: flex; gap: 10px; align-items: center; justify-content: center; padding: 10px var(--gutter);
  background: var(--c-accent-soft); color: var(--c-ink); font-size: var(--fs-s); line-height: 1.45; text-align: center;
}
.break-bar .icon { flex: none; color: var(--c-accent); }

.utility-bar { border-bottom: 1px solid var(--c-line); font-size: var(--fs-xs); color: var(--c-ink-2); background: var(--c-bg); }
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 38px; }
.utility-bar__group { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.utility-bar a { text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.utility-bar a:hover { color: var(--c-accent); }
.utility-bar .icon { width: 15px; height: 15px; }
@media (max-width: 899px) { .utility-bar { display: none; } }

/* Language switch */
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--radius-pill); background: var(--c-surface-2); }
.lang-switch button, .lang-switch a {
  min-width: 34px; height: 26px; padding: 0 9px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--c-ink-2);
  display: inline-grid; place-items: center; text-decoration: none;
}
.lang-switch .is-active { background: var(--c-surface); color: var(--c-ink); box-shadow: var(--shadow-s); }
.lang-switch form { display: contents; }

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: rgb(251 248 243 / 0.92);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-med), box-shadow var(--t-med), transform var(--t-med) var(--ease);
}
.site-header.is-scrolled { border-bottom-color: var(--c-line); box-shadow: 0 6px 24px -18px rgb(42 36 33 / 0.4); }
/* Phones and tablets: [burger + logo] [icons]; the logo gives way first so the cart never leaves the screen. */
.site-header__inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; height: var(--header-h); }
.site-header__start { display: flex; align-items: center; gap: 4px; min-width: 0; }
.site-header__actions { display: flex; align-items: center; gap: 2px; justify-content: flex-end; }
.site-header__burger { margin-left: -10px; flex: none; }
/* The account link is also in the menu drawer; on narrow phones it makes room for search, favourites and cart. */
@media (max-width: 479px) { .site-header__account { display: none; } }
/* Desktop: logo and icons on the first row, the main menu on its own row so that long
   (admin-defined, translated) menus never push the icons off the screen. */
@media (min-width: 1200px) {
  .site-header__inner { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-rows: var(--header-h) auto; gap: 0 32px; height: auto; }
  .site-header__burger { display: none; }
  .site-header__actions { grid-column: 3; grid-row: 1; }
}

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--c-ink); min-width: 0; }
.logo img { height: 40px; width: auto; max-width: 180px; object-fit: contain; }
.logo .logo__mark { width: 34px; height: 34px; flex: none; }
.logo__text { font-family: var(--font-accent); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.1; white-space: nowrap; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.logo__text em { font-style: normal; color: var(--c-accent); font-weight: 500; }
@media (max-width: 420px) { .logo { gap: 8px; } .logo__text { font-size: 1.35rem; } .logo .logo__mark { width: 28px; height: 28px; } }
@media (max-width: 379px) { .logo__text { font-size: 1.25rem; } }

/* Desktop navigation with dropdown panels */
.main-nav { display: none; }
@media (min-width: 1200px) { .main-nav { display: block; grid-column: 1 / -1; grid-row: 2; border-top: 1px solid var(--c-line); } }
.main-nav__list { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 2px; list-style: none; padding: 0; }
.main-nav__item { position: static; }
.main-nav__link {
  --nav-pad: clamp(10px, 1vw, 14px);
  display: inline-flex; align-items: center; gap: 4px; height: var(--nav-h); padding: 0 var(--nav-pad);
  font-size: var(--fs-s); font-weight: 700; text-decoration: none; color: var(--c-ink); position: relative; white-space: nowrap;
}
.main-nav__link::after {
  content: ""; position: absolute; left: var(--nav-pad); right: var(--nav-pad); bottom: 11px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform var(--t-med) var(--ease);
}
.main-nav__link:hover::after, .main-nav__item.is-open > .main-nav__link::after, .main-nav__link[aria-current="page"]::after { transform: scaleX(1); }
.main-nav__link.is-highlight { color: var(--c-berry); }
.main-nav__link .icon { width: 14px; height: 14px; color: var(--c-ink-3); transition: transform var(--t-fast); }
.main-nav__item.is-open > .main-nav__link .icon { transform: rotate(180deg); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-surface);
  border-top: 1px solid var(--c-line);
  box-shadow: 0 30px 50px -30px rgb(42 36 33 / 0.35);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity var(--t-med) var(--ease), transform var(--t-med) var(--ease), visibility 0s linear var(--t-med);
}
.main-nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.mega__inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; padding-block: 36px 44px; }
.mega__links { columns: 3 200px; column-gap: 40px; list-style: none; padding: 0; }
.mega__links li { break-inside: avoid; }
.mega__links a { display: block; padding: 8px 0; text-decoration: none; font-weight: 600; color: var(--c-ink-2); }
.mega__links a:hover { color: var(--c-accent); }
.mega__all { font-weight: 800 !important; color: var(--c-ink) !important; }
.mega__promo { width: 300px; border-radius: var(--radius-m); overflow: hidden; position: relative; background: var(--c-surface-2); text-decoration: none; display: block; }
.mega__promo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mega__promo span { position: absolute; left: 16px; bottom: 14px; color: #fff; font-family: var(--font-accent); font-weight: var(--accent-weight); font-size: 1.5rem; text-shadow: 0 2px 12px rgb(0 0 0 / 0.35); }

/* Header search */
.header-search {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-line);
  box-shadow: 0 30px 50px -30px rgb(42 36 33 / 0.35);
  padding-block: 20px 28px;
}
.header-search__form { position: relative; max-width: 760px; margin-inline: auto; }
.header-search__form .icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--c-ink-3); pointer-events: none; }
.header-search__input {
  width: 100%; height: 56px; padding: 0 56px 0 52px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--c-line-strong); background: var(--c-bg); font-size: 17px;
}
.header-search__input:focus { outline: none; border-color: var(--c-ink); background: var(--c-surface); }
.header-search__input::-webkit-search-cancel-button { -webkit-appearance: none; appearance: none; } /* the panel has its own close button */
.header-search__close { position: absolute; right: 6px; top: 6px; }
.suggest { max-width: 760px; margin: 14px auto 0; display: grid; gap: 18px; }
.suggest__group-title { font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-ink-3); margin-bottom: 6px; }
.suggest__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest__chips a { padding: 6px 14px; border-radius: var(--radius-pill); background: var(--c-surface-2); text-decoration: none; font-size: var(--fs-s); font-weight: 600; }
.suggest__chips a:hover { background: var(--c-accent-soft); color: var(--c-accent-hover); }
.suggest__products { display: grid; gap: 4px; list-style: none; padding: 0; }
.suggest__product { display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 8px; border-radius: var(--radius-s); text-decoration: none; }
.suggest__product:hover, .suggest__product.is-active { background: var(--c-surface-2); }
.suggest__product img { width: 52px; height: 64px; object-fit: cover; border-radius: var(--radius-xs); background: var(--c-surface-2); }
.suggest__product strong { font-weight: 700; font-size: var(--fs-s); }
.suggest__product span { font-weight: 800; font-size: var(--fs-s); white-space: nowrap; }
.suggest__all { justify-self: start; }
.suggest__empty { color: var(--c-ink-3); font-size: var(--fs-s); text-align: center; padding: 10px; }

/* --------------------------------------------------------------------------
   Drawers (mobile menu, cart, filters) and backdrop
   -------------------------------------------------------------------------- */
.backdrop {
  position: fixed; inset: 0; z-index: calc(var(--z-drawer) - 1);
  background: rgb(26 22 20 / 0.45);
  opacity: 0; visibility: hidden; transition: opacity var(--t-med), visibility 0s linear var(--t-med);
}
.backdrop.is-visible { opacity: 1; visibility: visible; transition-delay: 0s; }

.drawer {
  position: fixed; top: 0; bottom: 0; z-index: var(--z-drawer);
  width: min(440px, 100vw);
  background: var(--c-bg);
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-l);
  transition: transform 340ms var(--ease), visibility 0s linear 340ms;
  visibility: hidden;
  overscroll-behavior: contain;
}
.drawer--right { right: 0; transform: translateX(100%); }
.drawer--left { left: 0; transform: translateX(-100%); width: min(380px, 92vw); }
.drawer.is-open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 14px 22px; border-bottom: 1px solid var(--c-line); min-height: var(--header-h); }
.drawer__title { font-family: var(--font-heading); font-size: var(--fs-xl); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px; -webkit-overflow-scrolling: touch; }
.drawer__foot { border-top: 1px solid var(--c-line); padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); background: var(--c-surface); display: grid; gap: 12px; }
.drawer.is-loading .drawer__body { opacity: 0.5; pointer-events: none; }

/* Bottom sheet variant for filters on phones (tablets get the side panel); it can be dragged down by its head */
@media (max-width: 599px) {
  .drawer--sheet { top: auto; left: 0; right: 0; width: 100%; max-height: 88vh; max-height: 88dvh; border-radius: var(--radius-l) var(--radius-l) 0 0; transform: translateY(100%); }
  .drawer--sheet.is-open { transform: none; }
  .drawer--sheet .drawer__head::before { content: ""; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--c-line-strong); }
  .drawer--sheet .drawer__head { position: relative; min-height: 64px; padding-top: 20px; padding-bottom: 10px; touch-action: none; cursor: grab; }
  .drawer--sheet.is-dragging { transition: none; }
}

/* Mobile navigation */
.mobile-nav { list-style: none; padding: 0; }
.mobile-nav > li { border-bottom: 1px solid var(--c-line); }
.mobile-nav a, .mobile-nav summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0; font-weight: 700; font-size: 1.05rem; text-decoration: none; cursor: pointer; list-style: none; }
.mobile-nav summary::-webkit-details-marker { display: none; }
.mobile-nav summary .icon { transition: transform var(--t-fast); color: var(--c-ink-3); }
.mobile-nav details[open] summary .icon { transform: rotate(180deg); }
.mobile-nav ul { list-style: none; padding: 0 0 12px 14px; }
.mobile-nav ul a { font-weight: 600; font-size: var(--fs-m); padding: 10px 0; color: var(--c-ink-2); }
.mobile-nav .is-highlight { color: var(--c-berry); }
.mobile-nav__secondary { display: grid; gap: 4px; margin-top: 18px; list-style: none; padding: 0; }
.mobile-nav__secondary a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; font-weight: 600; color: var(--c-ink-2); }
.mobile-nav__contacts { margin-top: 22px; padding: 18px; border-radius: var(--radius-m); background: var(--c-surface-2); display: grid; gap: 10px; font-size: var(--fs-s); }
.mobile-nav__contacts a { font-weight: 800; font-size: var(--fs-l); text-decoration: none; }

/* --------------------------------------------------------------------------
   Cart drawer content
   -------------------------------------------------------------------------- */
.mini-cart { display: grid; gap: 18px; list-style: none; padding: 0; }
.mini-cart__item { display: grid; grid-template-columns: 76px 1fr; gap: 14px; }
.mini-cart__img { width: 76px; aspect-ratio: var(--ratio); border-radius: var(--radius-s); overflow: hidden; background: var(--c-surface-2); }
.mini-cart__img img { width: 100%; height: 100%; object-fit: cover; }
.mini-cart__info { display: grid; gap: 4px; align-content: start; min-width: 0; }
.mini-cart__name { font-weight: 700; font-size: var(--fs-s); text-decoration: none; line-height: 1.35; }
.mini-cart__name:hover { color: var(--c-accent); }
.mini-cart__variant, .mini-cart__note { font-size: var(--fs-xs); color: var(--c-ink-3); }
.mini-cart__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; }
.mini-cart__price { font-weight: 800; font-size: var(--fs-s); }
.mini-cart__remove { font-size: var(--fs-xs); color: var(--c-ink-3); text-decoration: underline; }
.mini-cart__remove:hover { color: var(--c-danger); }
.mini-cart__problem { font-size: var(--fs-xs); color: var(--c-danger); font-weight: 700; }
.cart-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 800; font-size: var(--fs-l); }
.cart-total-row small { display: inline-block; font-weight: 500; font-size: var(--fs-xs); line-height: 1.4; color: var(--c-ink-3); }

.free-ship { display: grid; gap: 8px; padding: 14px 16px; border-radius: var(--radius-m); background: var(--c-surface-2); font-size: var(--fs-s); }
.free-ship strong { color: var(--c-ink); }
.free-ship__bar { height: 6px; border-radius: 6px; background: var(--c-surface-3); overflow: hidden; }
.free-ship__bar span { display: block; height: 100%; width: var(--progress, 0%); background: linear-gradient(90deg, var(--c-sage), var(--c-accent)); border-radius: inherit; transition: width 600ms var(--ease); }
.free-ship.is-reached { background: var(--c-success-soft); color: var(--c-success); }

/* --------------------------------------------------------------------------
   Dialogs (native <dialog>)
   -------------------------------------------------------------------------- */
dialog.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  padding: 0; border: 0; border-radius: var(--radius-l);
  background: var(--c-bg); color: var(--c-ink);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
dialog.modal[open] { display: flex; flex-direction: column; animation: modal-in 260ms var(--ease); }
dialog.modal::backdrop { background: rgb(26 22 20 / 0.5); backdrop-filter: blur(2px); }
dialog.modal--wide { width: min(880px, calc(100vw - 24px)); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 12px 24px; }
.modal__title { font-family: var(--font-heading); font-size: var(--fs-h3); font-weight: var(--heading-weight); letter-spacing: var(--heading-tracking); line-height: 1.2; }
.modal__body { padding: 4px 24px 24px; overflow-y: auto; }
.modal__body > * + * { margin-top: 14px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } to { opacity: 1; transform: none; } }
@media (max-width: 599px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: var(--radius-l) var(--radius-l) 0 0; }
  dialog.modal[open] { animation: sheet-in 300ms var(--ease); }
  @keyframes sheet-in { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal__body { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
}

/* Image lightbox */
dialog.lightbox { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: 0; border: 0; background: #14110f; color: #fff; }
dialog.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
dialog.lightbox::backdrop { background: #14110f; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; font-size: var(--fs-s); color: rgb(255 255 255 / 0.7); }
.lightbox__bar .icon-btn { color: #fff; }
.lightbox__bar .icon-btn:hover { background: rgb(255 255 255 / 0.1); }
.lightbox__stage { position: relative; overflow: hidden; display: grid; place-items: center; touch-action: pan-y; }
.lightbox__stage img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; transition: transform var(--t-med) var(--ease); cursor: zoom-in; }
.lightbox__stage.is-zoomed img { cursor: zoom-out; }
.lightbox__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; background: rgb(255 255 255 / 0.12); color: #fff; display: grid; place-items: center; }
.lightbox__nav:hover { background: rgb(255 255 255 / 0.22); }
.lightbox__nav--prev { left: 14px; }
.lightbox__nav--next { right: 14px; }
.lightbox__thumbs { display: flex; gap: 8px; justify-content: center; padding: 12px; overflow-x: auto; }
.lightbox__thumbs button { width: 52px; height: 64px; border-radius: 6px; overflow: hidden; opacity: 0.5; flex: none; border: 2px solid transparent; }
.lightbox__thumbs button.is-active { opacity: 1; border-color: #fff; }
.lightbox__thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 699px) { .lightbox__nav { display: none; } }

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toasts { position: fixed; z-index: var(--z-toast); left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; gap: 10px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
@media (min-width: 900px) { .toasts { left: auto; right: 24px; bottom: auto; top: calc(var(--sticky-top) + 16px); transform: none; } }
.toast {
  pointer-events: auto;
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 14px 14px 16px; border-radius: var(--radius-m);
  background: var(--c-dark); color: var(--c-on-dark);
  box-shadow: var(--shadow-l); font-size: var(--fs-s); font-weight: 600; line-height: 1.45;
  animation: toast-in 320ms var(--ease);
}
.toast.is-leaving { animation: toast-out 220ms var(--ease) forwards; }
.toast .icon { margin-top: 1px; }
.toast--success .toast__icon { color: #9fd3ad; }
.toast--error .toast__icon, .toast--warning .toast__icon { color: #f2a99f; }
.toast__text { flex: 1; }
.toast__text a { color: #fff; }
.toast__close { color: rgb(255 255 255 / 0.6); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; margin: -4px -4px 0 0; }
.toast__close:hover { color: #fff; background: rgb(255 255 255 / 0.1); }
.toast__actions { display: flex; gap: 8px; margin-top: 10px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* Messages rendered by the server (no-JS fallback) */
.messages { display: grid; gap: 10px; margin-top: 16px; }

/* --------------------------------------------------------------------------
   Product card
   -------------------------------------------------------------------------- */
.product-grid { display: grid; gap: clamp(28px, 3vw, 44px) clamp(12px, 2vw, 24px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 700px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .product-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.product-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.product-card__media { position: relative; aspect-ratio: var(--ratio); border-radius: var(--radius-m); overflow: hidden; background: var(--c-surface-2); isolation: isolate; }
.product-card__media > a { display: block; width: 100%; height: 100%; }
.product-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 420ms var(--ease), transform 900ms var(--ease); }
.product-card__media .img-placeholder { object-fit: contain; padding: 18%; opacity: 0.7; }
.product-card__alt { opacity: 0; }
@media (hover: hover) {
  .product-card:hover .product-card__alt { opacity: 1; }
  .product-card:hover .product-card__media img:first-child { transform: scale(1.035); }
}
.product-card__badges { position: absolute; left: 10px; top: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 1; pointer-events: none; }
.product-card__fav {
  position: absolute; right: 8px; top: 8px; z-index: 1;
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgb(255 255 255 / 0.88); color: var(--c-ink); box-shadow: var(--shadow-s);
  transition: transform var(--t-fast), color var(--t-fast);
}
.product-card__fav:hover { transform: scale(1.08); }
.product-card__fav[aria-pressed="true"] { color: var(--c-berry); }
.product-card__fav[aria-pressed="true"] .icon { fill: currentColor; }
.product-card__fav .icon { width: 19px; height: 19px; }
.product-card__soldout { position: absolute; inset: auto 10px 10px 10px; z-index: 1; padding: 7px 10px; border-radius: var(--radius-s); background: rgb(255 255 255 / 0.9); font-size: var(--fs-xs); font-weight: 800; text-align: center; letter-spacing: 0.04em; text-transform: uppercase; color: var(--c-ink-2); }
.product-card.is-soldout .product-card__media img { filter: grayscale(0.35); opacity: 0.85; }
.product-card__body { display: grid; gap: 5px; }
.product-card__cat { font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 600; letter-spacing: 0.02em; }
.product-card__title { font-family: var(--font-body); font-size: var(--fs-m); font-weight: 600; line-height: 1.35; }
.product-card__title a { text-decoration: none; }
.product-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.product-card__title a:hover { color: var(--c-accent); }
.product-card__media, .product-card__fav, .product-card__swatches { z-index: 1; }
.product-card__rating { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--c-ink-3); }
.product-card__swatches { display: flex; align-items: center; gap: 5px; position: relative; }
.product-card__swatches .swatch { --size: 14px; }
.product-card__swatches small { font-size: var(--fs-xs); color: var(--c-ink-3); font-weight: 700; }
.product-card .price__now { font-size: var(--fs-m); }
.product-card__note { font-size: var(--fs-xs); color: var(--c-accent-hover); font-weight: 700; }

/* Horizontal product rail (home page, product page) */
.rail { position: relative; }
.rail__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: calc((100% - 1 * 14px) / 2);
  gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding-bottom: 6px; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter);
}
.rail__track::-webkit-scrollbar { display: none; }
.rail__track > * { scroll-snap-align: start; }
@media (min-width: 700px) { .rail__track { grid-auto-columns: calc((100% - 2 * 20px) / 3); gap: 20px; } }
@media (min-width: 1100px) { .rail__track { grid-auto-columns: calc((100% - 3 * 24px) / 4); gap: 24px; margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; } }
.rail__controls { display: none; gap: 8px; }
@media (min-width: 1100px) { .rail__controls { display: flex; } }
.rail__btn { width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--c-line-strong); display: grid; place-items: center; background: var(--c-surface); transition: all var(--t-fast); }
.rail__btn:hover:not([disabled]) { border-color: var(--c-ink); }
.rail__btn[disabled] { opacity: 0.35; cursor: default; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--c-dark); color: var(--c-on-dark); margin-top: var(--section-gap); font-size: var(--fs-s); }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-news { border-bottom: 1px solid rgb(255 255 255 / 0.1); }
.footer-news__inner { display: grid; gap: 22px; padding-block: 44px; align-items: center; }
@media (min-width: 900px) { .footer-news__inner { grid-template-columns: 1fr 1.1fr; gap: 48px; } }
.footer-news h2 { color: #fff; font-size: var(--fs-h3); }
.footer-news p { color: rgb(243 236 227 / 0.75); margin-top: 6px; }
.newsletter-form { display: grid; gap: 12px; }
.newsletter-form__row { display: flex; gap: 8px; }
.newsletter-form__row input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border-radius: var(--radius-pill); border: 1.5px solid rgb(255 255 255 / 0.2); background: rgb(255 255 255 / 0.06); color: #fff; font-size: 16px; }
.newsletter-form__row input::placeholder { color: rgb(243 236 227 / 0.55); }
.newsletter-form__row input:focus { outline: none; border-color: #fff; }
.newsletter-form .check { color: rgb(243 236 227 / 0.75); font-size: var(--fs-xs); }
.newsletter-form .check a { color: #fff; text-decoration: underline; }
.newsletter-form--light .newsletter-form__row input { border-color: var(--c-line-strong); background: var(--c-surface); color: var(--c-ink); }
.newsletter-form--light .newsletter-form__row input::placeholder { color: var(--c-ink-3); }
.newsletter-form--light .newsletter-form__row input:focus { border-color: var(--c-ink); }
.newsletter-form--light .check { color: var(--c-ink-2); }
.newsletter-form--light .check a { color: var(--c-accent); }
@media (max-width: 479px) { .newsletter-form__row { flex-direction: column; } .newsletter-form__row input { flex: none; } .newsletter-form__row .btn { width: 100%; } }

.footer-main { display: grid; gap: 36px; padding-block: 52px 36px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .footer-main { grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr; gap: 40px; } }
.footer-brand { grid-column: 1 / -1; display: grid; gap: 14px; align-content: start; }
@media (min-width: 900px) { .footer-brand { grid-column: auto; } }
.footer-brand .logo { color: #fff; }
.footer-brand p { color: rgb(243 236 227 / 0.7); max-width: 34ch; }
.footer-col h3 { font-family: var(--font-body); font-size: var(--fs-xs); font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(243 236 227 / 0.55); margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; display: grid; gap: 9px; }
.footer-contacts { grid-column: 1 / -1; display: grid; gap: 8px; align-content: start; }
@media (min-width: 900px) { .footer-contacts { grid-column: auto; } }
.footer-contacts .footer-phone { font-size: 1.35rem; font-weight: 800; color: #fff; }
.footer-contacts p { color: rgb(243 236 227 / 0.7); }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgb(255 255 255 / 0.08); transition: background var(--t-fast); }
.socials a:hover { background: rgb(255 255 255 / 0.18); text-decoration: none; }
.socials .icon { width: 19px; height: 19px; }
.footer-legal { border-top: 1px solid rgb(255 255 255 / 0.1); padding-block: 22px calc(22px + env(safe-area-inset-bottom)); display: grid; gap: 14px; font-size: var(--fs-xs); color: rgb(243 236 227 / 0.6); }
/* Room for the floating back-to-top and messenger buttons at the very end of the page */
@media (max-width: 899px) { .footer-legal { padding-bottom: calc(80px + env(safe-area-inset-bottom)); } }
@media (min-width: 900px) { .footer-legal { grid-template-columns: 1fr auto; align-items: center; } }
.footer-legal__links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.pay-icons { display: flex; gap: 6px; flex-wrap: wrap; }
.pay-icons span { display: inline-grid; place-items: center; height: 26px; padding: 0 9px; border-radius: 5px; background: rgb(255 255 255 / 0.92); color: #1d1a18; font-size: 10.5px; font-weight: 900; letter-spacing: 0.04em; }

/* --------------------------------------------------------------------------
   Cookie banner
   -------------------------------------------------------------------------- */
.cookie-banner {
  position: fixed; z-index: calc(var(--z-modal) - 1);
  left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  max-width: 520px;
  padding: 20px; border-radius: var(--radius-l);
  background: var(--c-surface); box-shadow: var(--shadow-l); border: 1px solid var(--c-line);
  display: grid; gap: 14px; font-size: var(--fs-s); color: var(--c-ink-2);
  animation: toast-in 400ms var(--ease);
}
@media (min-width: 700px) { .cookie-banner { left: 24px; bottom: 24px; } }
.cookie-banner h2 { font-family: var(--font-body); font-size: var(--fs-m); font-weight: 800; color: var(--c-ink); display: flex; align-items: center; gap: 8px; }
.cookie-banner a { color: var(--c-accent); }
.cookie-banner__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cookie-banner__actions .btn { min-height: 46px; }

/* --------------------------------------------------------------------------
   Floating messenger button
   -------------------------------------------------------------------------- */
.contact-fab { position: fixed; z-index: calc(var(--z-drawer) - 2); right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); display: grid; justify-items: end; gap: 10px; }
.contact-fab__toggle { width: 56px; height: 56px; border-radius: 50%; background: var(--c-accent); color: #fff; display: grid; place-items: center; box-shadow: 0 12px 30px -10px rgb(166 79 46 / 0.65); transition: transform var(--t-fast), background var(--t-fast); }
.contact-fab__toggle:hover { background: var(--c-accent-hover); transform: scale(1.05); }
.contact-fab__toggle .icon { width: 26px; height: 26px; }
.contact-fab__list { display: grid; gap: 8px; justify-items: end; list-style: none; padding: 0; }
.contact-fab__list a { display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px 9px 10px; border-radius: var(--radius-pill); background: var(--c-surface); box-shadow: var(--shadow-m); text-decoration: none; font-weight: 700; font-size: var(--fs-s); animation: toast-in 240ms var(--ease) both; }
.contact-fab__list a:hover { color: var(--c-accent); }
.contact-fab__list .icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; color: #fff; }
.contact-fab__list .is-viber .icon { background: #7360f2; }
.contact-fab__list .is-telegram .icon { background: #229ed9; }
.contact-fab__list .is-whatsapp .icon { background: #25d366; }
.contact-fab__list .is-phone .icon { background: var(--c-ink); }
.contact-fab__list .is-mail .icon { background: var(--c-accent); }
body.has-sticky-buy .contact-fab { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.has-cookie-banner .contact-fab { display: none; }
@media print { .contact-fab, .cookie-banner, .site-header, .site-footer, .announcement, .utility-bar, .staff-bar, .break-bar { display: none !important; } }

/* --------------------------------------------------------------------------
   Misc shared pieces
   -------------------------------------------------------------------------- */
.page-head { padding-block: clamp(24px, 4vw, 48px) clamp(20px, 3vw, 32px); display: grid; gap: 12px; }
.page-head h1 { font-size: var(--fs-h2); }
.page-head .lead { margin-top: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs button { padding: 12px 16px; font-weight: 700; font-size: var(--fs-s); color: var(--c-ink-3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs .is-active, .tabs [aria-selected="true"] { color: var(--c-ink); border-bottom-color: var(--c-ink); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 6px 14px; border-radius: var(--radius-pill); border: 1.5px solid var(--c-line-strong); background: var(--c-surface); text-decoration: none; font-size: var(--fs-s); font-weight: 600; white-space: nowrap; transition: all var(--t-fast); }
.chip:hover { border-color: var(--c-ink); }
.chip.is-active { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.chip .icon { width: 14px; height: 14px; }
.chip--remove { background: var(--c-surface-2); border-color: transparent; }

.info-list { display: grid; gap: 12px; list-style: none; padding: 0; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-s); color: var(--c-ink-2); }
.info-list .icon { color: var(--c-accent); margin-top: 1px; }
.info-list strong { color: var(--c-ink); }

.benefit-strip { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); }
.benefit-strip__item { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-s); color: var(--c-ink-2); }
.benefit-strip__item .icon { width: 22px; height: 22px; color: var(--c-accent); flex: none; margin-top: 1px; }
.benefit-strip__item strong { display: block; color: var(--c-ink); }

.skeleton { background: linear-gradient(90deg, var(--c-surface-2), var(--c-surface-3), var(--c-surface-2)); background-size: 200% 100%; animation: skeleton 1.2s infinite; border-radius: var(--radius-s); }
@keyframes skeleton { to { background-position: -200% 0; } }

.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 700ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.back-to-top { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: calc(var(--z-drawer) - 2); width: 46px; height: 46px; border-radius: 50%; background: var(--c-surface); box-shadow: var(--shadow-m); display: grid; place-items: center; opacity: 0; transform: translateY(10px); pointer-events: none; transition: all var(--t-med); }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top .icon { transform: rotate(-90deg); }
body.has-sticky-buy .back-to-top { bottom: calc(92px + env(safe-area-inset-bottom)); }
.mobile-nav__contacts .socials a { background: var(--c-surface); color: var(--c-ink); }
.footer-legal__text { display: grid; gap: 8px; }
.footer-legal__links .link { color: inherit; font-size: inherit; text-decoration: none; }
.footer-legal__links .link:hover { color: #fff; text-decoration: underline; }
