/* Storefront overrides - wider language dropdown to fit emoji + name */
.dropdown.bootstrap-select.image-select.type-languages > .dropdown-menu {
  width: 180px;
  margin-left: calc(50% - 90px) !important;
}

/* On mobile force shop grid to 2 columns regardless of which density was picked
 * on desktop. List layout (single column) still works because the `list-layout`
 * class doesn't use tf-grid-layout. */
@media (max-width: 767.98px) {
  .tf-grid-layout.tf-col-3,
  .tf-grid-layout.tf-col-4,
  .tf-grid-layout.tf-col-5,
  .tf-grid-layout.tf-col-6 {
    grid-template-columns: 1fr 1fr !important;
  }
}

/* Product gallery: thumbnails below main on mobile (default — Swiper horizontal),
 * to the left on desktop (Swiper vertical). */
.product-gallery .product-main-wrap {
  width: 100%;
  min-width: 0; /* allow flex shrink so absolute children don't trigger overflow */
}
.product-gallery .product-main-swiper {
  width: 100%;
  border-radius: 10px;
}
.product-gallery .product-thumbs-swiper {
  width: 100%;
  margin-top: 10px;
}
.product-gallery .product-thumbs-swiper .swiper-slide {
  opacity: 0.5;
  border: 2px solid transparent;
  border-radius: 5px;
  transition: opacity 0.2s, border-color 0.2s;
}
.product-gallery .product-thumbs-swiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: #000;
}
@media (min-width: 768px) {
  .product-gallery {
    display: flex;
    gap: 10px;
    align-items: stretch;
  }
  .product-gallery .product-main-wrap {
    order: 2;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .product-gallery .product-thumbs-swiper {
    order: 1;
    flex: 0 0 14%;
    width: 14%;
    /* Match the height of the main image — flexbox stretches it via align-items.
       Swiper's vertical mode then fits its slides to whatever height we get. */
    height: auto;
    margin-top: 0;
  }
}

/* "Ask a question" modal on the product page. Without these overrides the
 * shared .modalDemo rules stretch the dialog to 1540px (designed for the
 * mega-menu popups). Match the QuickAdd modal's compact width instead. */
.popup-product-ask .modal-dialog {
  max-width: min(520px, 92vw);
}
.popup-product-ask .modal-content {
  margin: 8px;
  padding: 30px 0;
}
.popup-product-ask .modal-content > .wrap {
  padding: 0 24px;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
}
/* The shared .modalDemo absolute-positions the close icon flush against the
 * modal edge (top:18px right:0). Pull it inward so it sits inside the same
 * 24px padded gutter as the rest of the modal body. */
.popup-product-ask .header .icon-close-popup {
  top: 14px;
  right: 18px;
  z-index: 2;
}

/* ────────────────────────────────────────────────────────────────────
   Theme-token bindings
   ────────────────────────────────────────────────────────────────────
   The admin's /design/theme editor lets the merchant pick colors + fonts.
   <ThemeTokenStyle> emits them as CSS custom properties at :root —
   e.g. --colors-bg, --colors-fg, --colors-accent, --fonts-body.
   The rules below alias those onto the visible surfaces of the storefront
   so changes in /design/theme actually propagate. We use !important
   sparingly — only where Bootstrap/template specificity would otherwise
   pin the value to its compiled-in default. */

/* Body background + text — drives the overall page chrome */
body.webbase-tenant {
  background: var(--colors-bg, #FAF8F3);
  color: var(--colors-fg, #0A0A0F);
  font-family: var(--fonts-body, "Inter Tight", Inter, system-ui, sans-serif);
}

/* Headings — serif by default, overridable */
.webbase-tenant h1,
.webbase-tenant h2,
.webbase-tenant h3,
.webbase-tenant h4,
.webbase-tenant h5,
.webbase-tenant h6 {
  font-family: var(--fonts-heading, Georgia, serif);
  color: var(--colors-fg, #0A0A0F);
}

/* Muted text — captions, secondary copy */
.webbase-tenant .text-muted,
.webbase-tenant small.text-muted,
.webbase-tenant .footer-menu_item {
  color: var(--colors-muted, #6B6258) !important;
}

/* Primary buttons — match theme primary.
 * Exclude `.btn-line` (text link with only an underline — `padding: 0` + a
 * `::after` 1px rule). Forcing a background/border on it turns links like
 * footer "Navigovať" or login "Registrácia" into filled buttons. */
.webbase-tenant .tf-btn:not(.btn-line):not(.btn-line-light),
.webbase-tenant .btn-fill,
.webbase-tenant .btn-onsurface {
  background: var(--colors-primary, #0A0A0F);
  color: var(--colors-bg, #FFFFFF);
  border-color: var(--colors-primary, #0A0A0F);
}
.webbase-tenant .tf-btn:not(.btn-line):not(.btn-line-light):hover,
.webbase-tenant .btn-fill:hover {
  background: var(--colors-accent, #C0392B);
  border-color: var(--colors-accent, #C0392B);
}

/* Accent — for callouts, sale badges, on-sale price */
.webbase-tenant .badge-sale,
.webbase-tenant .price-sale,
.webbase-tenant .text-accent {
  color: var(--colors-accent, #C0392B);
}
.webbase-tenant .badge-sale {
  background: var(--colors-accent, #C0392B);
  color: var(--colors-bg, #FFFFFF);
}

/* Card / surface — product cards, modals, drawers */
.webbase-tenant .card,
.webbase-tenant .modal-content,
.webbase-tenant .offcanvas {
  background: var(--colors-surface, #FFFFFF);
  color: var(--colors-fg, #0A0A0F);
}

/* Rule lines — table dividers, card borders, hr */
.webbase-tenant hr,
.webbase-tenant .border-top,
.webbase-tenant .border-bottom,
.webbase-tenant .border {
  border-color: var(--colors-rule, #E5DAC2) !important;
}

/* Links inherit foreground; accent on hover */
.webbase-tenant a {
  color: var(--colors-fg, #0A0A0F);
}
.webbase-tenant a:hover {
  color: var(--colors-accent, #C0392B);
}

/* Success state — in-stock badges */
.webbase-tenant .text-success,
.webbase-tenant .badge-instock {
  color: var(--colors-success, #1F7A4F) !important;
}

/* Code-style text uses the mono token */
.webbase-tenant code,
.webbase-tenant kbd,
.webbase-tenant pre {
  font-family: var(--fonts-mono, ui-monospace, "SF Mono", monospace);
}

/* ────────────────────────────────────────────────────────────────────
   Cart page
   ──────────────────────────────────────────────────────────────────── */

/* Line-item remove (×): a quiet control that darkens to the foreground on
 * hover. `.text-muted` is pinned with !important above, so override the
 * color explicitly here for the hover to register. */
.webbase-tenant .remove-cart-item {
  transition: color 0.15s ease;
}
.webbase-tenant .remove-cart-item:hover {
  color: var(--colors-fg, #0A0A0F) !important;
}

/* Upsell carousel headers ("Recommended for you" / "Small joys").
 * The theme's .flat-title .title scales up to 42px on desktop (sized for
 * full-width homepage sections) and renders in the body/sans font, so it
 * doesn't match the cart's own <h3> heading. Pin it to the SAME type as
 * that heading — serif, 30px, weight 500 — so every header on the page is
 * uniform. 3-class specificity beats the theme's 2-class rule everywhere. */
.webbase-tenant .cart-suggest-head .title {
  font-family: var(--fonts-heading, Georgia, serif);
  font-size: 30px;
  line-height: 1.25;
  font-weight: 500;
}

/* ────────────────────────────────────────────────────────────────────
   Omnibus — "prior price" disclosure (EU 2019/2161, SK zák. 108/2024)
   An info icon next to a discounted price opens the "Predošlé ceny" modal.
   Shared by both templates (loaded on every storefront page).
   ──────────────────────────────────────────────────────────────────── */

/* "Pôvodne:" label shown before the strike-through reference price. */
.price-original-label {
  display: block;
  font-size: 12px;
  line-height: 1.2;
  color: var(--colors-muted, #6c757d);
  margin-top: 6px;
  margin-bottom: 2px;
}
/* Maison keeps its inline price row — render the label inline + muted. */
.mn-pdp__price-prev-label {
  font-size: 12px;
  color: var(--colors-muted, #6c757d);
  margin-right: 2px;
}

/* Info-icon trigger — inline, quiet, aligns with the price line. */
.omnibus-ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 6px;
  border: 0;
  background: transparent;
  color: var(--colors-muted, #6c757d);
  cursor: pointer;
  border-radius: 50%;
  transition: color 0.15s ease, background 0.15s ease;
}
.omnibus-ph-btn:hover {
  color: var(--colors-fg, #0A0A0F);
  background: rgba(0, 0, 0, 0.06);
}

/* Modal (custom, portal-rendered — no Bootstrap JS dependency). */
.omnibus-ph-backdrop {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.45);
}
.omnibus-ph-dialog {
  width: 100%;
  max-width: 380px;
  background: var(--colors-surface, #fff);
  color: var(--colors-fg, #0A0A0F);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  font-size: 14px;
}
.omnibus-ph-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--colors-rule, #E5DAC2);
}
.omnibus-ph-title {
  font-weight: 600;
  font-size: 16px;
}
.omnibus-ph-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  color: var(--colors-muted, #6c757d);
  cursor: pointer;
  padding: 0 4px;
}
.omnibus-ph-steps {
  list-style: none;
  counter-reset: ph;
  margin: 0;
  padding: 8px 18px;
}
.omnibus-ph-steps > li {
  counter-increment: ph;
  position: relative;
  padding: 12px 0 12px 34px;
}
.omnibus-ph-steps > li + li {
  border-top: 1px solid var(--colors-rule, #E5DAC2);
}
.omnibus-ph-steps > li::before {
  content: counter(ph);
  position: absolute;
  left: 0;
  top: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--colors-fg, #0A0A0F);
  color: var(--colors-bg, #fff);
  font-size: 12px;
  font-weight: 600;
}
.omnibus-ph-step-label {
  display: block;
  color: var(--colors-muted, #6c757d);
  font-size: 13px;
  margin-bottom: 4px;
}
.omnibus-ph-step-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
}
.omnibus-ph-badge {
  font-size: 12px;
  font-weight: 600;
  color: var(--colors-accent, #C0392B);
}
.omnibus-ph-vat {
  display: block;
  color: var(--colors-muted, #6c757d);
  font-size: 12px;
  margin-top: 2px;
  font-weight: 400;
}
.omnibus-ph-note {
  margin: 0;
  padding: 14px 18px;
  border-top: 1px solid var(--colors-rule, #E5DAC2);
  background: rgba(0, 0, 0, 0.02);
  color: var(--colors-muted, #6c757d);
  font-size: 13px;
  line-height: 1.4;
}

/* "Powered by Streamo" (PoweredByStreamo.tsx) — identical in every template:
   the 16px Streamo mark, then the name in the template's ink (--mn-fg, which
   each template's bridge redeclares). The selector is specific enough to beat
   the templates' generic `footer a` rules; text size follows the legal line. */
footer .streamo-credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  /* Line box = icon height, so the words and the mark centre on each other. */
  line-height: 16px;
  /* The brand name keeps its own case even where a template sets its legal
     line in capitals (Rosette). The typeface follows the template. */
  text-transform: none;
  letter-spacing: normal;
}
/* Whatever row carries the credit (every template's legal line) centres its
   children, so the © line and the credit sit on one axis. */
footer :has(> .streamo-credit) { align-items: center; }
footer .streamo-credit a.streamo-credit__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mn-fg, currentColor);
  text-decoration: none;
}
footer .streamo-credit a.streamo-credit__link:hover { opacity: 0.7; text-decoration: none; }
footer .streamo-credit .streamo-credit__mark { display: block; width: 16px; height: 16px; border-radius: 4px; }

/* "Currently unavailable" page for a closed shop (ShopUnavailable.tsx):
   the message centred in the viewport, a Streamo footer pinned under it.
   It renders outside every template's chrome, so it reads Maison's --mn-*
   locals (the default template's, stamped on <body>) with plain fallbacks. */
.shop-unavailable {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  color: var(--mn-fg, #111);
}
.shop-unavailable__main {
  flex: 1 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 16px;
  text-align: center;
}
.shop-unavailable__body { max-width: 460px; }
.shop-unavailable__logo {
  display: block;
  max-height: 64px;
  max-width: 220px;
  margin: 0 auto 28px;
}
.shop-unavailable__muted { color: var(--mn-muted, #6c757d); }
.shop-unavailable__footer {
  padding: 28px 16px 20px;
  border-top: 1px solid var(--mn-rule, rgba(0, 0, 0, 0.08));
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
}
.shop-unavailable__about { max-width: 520px; margin: 0 auto 20px; }
.shop-unavailable__cta {
  color: var(--mn-fg, #111);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.shop-unavailable__cta:hover { opacity: 0.7; color: var(--mn-fg, #111); }
.shop-unavailable__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  font-size: 12px;
  color: var(--mn-muted, #6c757d);
}

/* "Created with AI" on AI Photoshoot images (EU AI Act Art. 50) — every template.
   Dark pill: legible on any photo, light or dark. */
.sf-ai-label {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 3;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(17, 17, 26, 0.72);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.02em;
  pointer-events: none;
}

/* A product video as a lightbox slide (src/lib/lightbox-video.ts): centred, never cropped. */
.pswp-video {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 72px 40px;
}
/* styles.css makes every <video> 100% x 100%, cropped to cover — not here. */
.pswp-video video { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 767.98px) {
  .pswp-video { padding: 52px 0 16px; }
}
