/* Phone layout fixes for the home page (screens up to 767px wide). */

/* The strip of photos inside a product tile exists only for phones. */
.item-strip { display: none; }

@media (max-width: 767px) {
  /* The page itself must never scroll sideways. Cause fixed below; this is the safety net. */
  body { overflow-x: hidden; }

  /* One product per row, full width (the "collage" rows too). */
  .product-grid-section .partition-wrapper { display: contents; }
  .product-grid-section .hover-image-container { flex: 0 0 100%; position: relative; }

  /* Inside a product: all photos of THAT product in one strip, swiped with a finger.
     One photo fills the whole width, nothing peeks in, no gap. */
  .hover-image-container > .hover-image.hover { display: none; }
  /* The plain photo stays until the strip is ready (script adds .strip-ready); it also keeps the tile height. */
  .item-strip { visibility: hidden; }
  .hover-image-container.strip-ready > .item-strip { visibility: visible; }
  .hover-image-container.strip-ready > .hover-image.default { visibility: hidden; }
  .item-strip {
    display: flex;
    position: absolute;
    inset: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .item-strip::-webkit-scrollbar { display: none; }
  .item-strip img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }

  /* Footer: the e-mail address and the Instagram name used to be 32px (the address was 498px wide, broke into
     two lines and stretched the whole page). Now the size follows the screen width, so the address always
     fits on ONE line: it is about 15 x font-size + 17px wide in the Bebas font, the free width is 100vw - 60px. */
  p.investor-email a,
  p.follow-us-email a {
    font-size: min(32px, calc((100vw - 78px) / 15.2));
    line-height: 1.5;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
  }
}

/* Touch screens: a tap must open the product at once, not first trigger the hover picture. */
@media (hover: none) {
  .hover-image-container:hover .hover-image.hover { opacity: 0; }
  .hover-image-container:hover .hover-image.default { opacity: 1; }
}


/* ---------- Hero sound switch: the equalizer icon of jacquemus.com, no words, OUTSIDE the video (DESIGN-SYSTEM.md 4.2) ---------- */
/* Same slot as the old grey label: left of the video on desktop/tablet, under it on phones.
   No border, fill, radius or shadow. The four bars always move (like theirs); the state is the brightness: 60 % off, white on. */
.sound-line {
  -webkit-appearance: none; appearance: none;
  display: flex; align-items: center; justify-content: center; position: relative; margin: 0 0 10px; padding: 0; height: 24px;
  background: none; border: 0; border-radius: 0; box-shadow: none;
  color: rgba(255, 255, 255, .6);
  cursor: pointer; transition: color .2s ease; -webkit-tap-highlight-color: transparent;
}
.sound-line::before { content: ""; position: absolute; inset: -10px -16px; } /* hit area 44px high, invisible */
.sound-line[aria-pressed="true"] { color: #fff; }
@media (hover: hover) { .sound-line:hover { color: #fff; } }  /* not on touch: hover would stick after a tap */
.sound-line:focus-visible { outline: 1px solid #fff; outline-offset: 6px; color: #fff; }
/* Desktop and tablet: the bars stand on the video's bottom edge, one horizontal line (pixel-perfect). The slot ends 8.8px below the video
   (the video is an inline element, the line box keeps the font's descender), so the old 10px bottom margin left the icon 8px too high. */
/* The slot's own box (video-button-container) clips at 8.8px below the video, so the invisible hit area is 12px up and 8px down: still 44px high. */
@media (min-width: 768px) {
  .sound-button-container { display: flex; justify-content: flex-end; }
  .sound-button-container .sound-line { align-items: flex-end; margin-bottom: 8.8px; }
  .sound-button-container .sound-line::before { inset: -12px -16px -8px; }
}
/* bars: 1 x 7 grid units, bottom edge fixed, height = scaleY(h / 7); timings and heights as on jacquemus.com */
.sound-eq { display: block; width: 14px; height: 10px; fill: currentColor; overflow: visible; }
.sound-eq .b { transform-box: fill-box; transform-origin: 50% 100%; animation: 1s linear infinite; }
.sound-eq .b1 { animation-name: bnn-eq1; animation-duration: 1.2s; transform: scaleY(.2857); }
.sound-eq .b2 { animation-name: bnn-eq2; animation-duration: .8s;  transform: scaleY(.7143); }
.sound-eq .b3 { animation-name: bnn-eq3; animation-duration: 1s;   transform: scaleY(1); }
.sound-eq .b4 { animation-name: bnn-eq4; animation-duration: .7s;  transform: scaleY(.5714); }
@keyframes bnn-eq1 { 0%, 100% { transform: scaleY(.2857); } 50% { transform: scaleY(1); } }
@keyframes bnn-eq2 { 0% { transform: scaleY(.7143); } 40% { transform: scaleY(.1429); } 80% { transform: scaleY(1); } 100% { transform: scaleY(.7143); } }
@keyframes bnn-eq3 { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(0); } }
@keyframes bnn-eq4 { 0%, 100% { transform: scaleY(.2857); } 50% { transform: scaleY(1); } }
@media (prefers-reduced-motion: reduce) { .sound-eq .b { animation: none; } }
/* Phones: the box around the video clips its overflow (the video is wider than the screen area), which would also cut
   the lower part of the invisible hit area. Grow the box by 10px and pull it back with a negative margin: no layout shift. */
@media (max-width: 767px) { .video-button-container { padding-bottom: 10px; margin-bottom: -10px; } }


/* ---------- the same icon in the top right row, next to CART (n), while the sound plays and the film is out of sight ---------- */
.sound-off {
  -webkit-appearance: none; appearance: none; position: fixed; top: 22px; right: var(--bc-m, 70px); z-index: 41;
  display: flex; align-items: center; margin: 0; padding: 8px 4px; background: none; border: 0; border-radius: 0; box-shadow: none; color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.sound-off[hidden] { display: none; }
.sound-off::before { content: ""; position: absolute; inset: -8px -10px; } /* hit area 44px high, invisible */
@media (hover: hover) { .sound-off:hover { opacity: .7; } }
.sound-off:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }


/* ---------- Photos per row (BNN-0080, 2026-10-30): the "-" and "+" top left, banan-density.js ---------- */
/* html[data-bnn-cols] is set before the first paint. Phones: 1 (default, nothing to override) - 2 - 3 - 4 per row; tablets (768 - 1199): 2 (the
   theme's own grid, nothing to override) - 3 - 4. The home page is the hero plus eleven grid sections one after another in <main>; a row cannot
   run from one section into the next, so from 2 (phone) or 3 (tablet) per row the sections, their containers and the collage rows give up their
   boxes (display: contents) and all tiles become items of <main>, which wraps them. The hero stays one full row.
   From 3 per row the strip of photos is off: the plain first photo shows and a tap opens the product. */
html[data-bnn-cols] .product-grid-section .hover-image-container img { object-fit: cover; }   /* tiles of one row share a height: no stretched photos */
@media (max-width: 767px) {
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent:has(.product-grid-section) { display: flex; flex-wrap: wrap; }
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent > .shopify-section:not(:has(.product-grid-section)) { flex: 0 0 100%; min-width: 0; }
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent > .shopify-section:has(.product-grid-section),
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .product-grid-layout-container,
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .product-grid-section,
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .partition-wrapper { display: contents; }
  html[data-bnn-cols="2"] .product-grid-section .hover-image-container { flex: 0 0 50%; }
  html[data-bnn-cols="3"] .product-grid-section .hover-image-container { flex: 0 0 calc(100% / 3); }
  html[data-bnn-cols="4"] .product-grid-section .hover-image-container { flex: 0 0 25%; }
  /* Every tile gets the same shape itself (3:4, the photos are cropped to it) and is never stretched to the height of its row. A tile used to get its
     height from the ratio of its first photo and from stretching to the tallest of its row: when the number per row changes while the page is open,
     Safari (WebKit) keeps the row height of the previous number, so at 3 and 4 per row the tiles stayed as tall as at 2 and the photos came out long
     and narrow (Chrome works the height out again, so it never showed). */
  html:is([data-bnn-cols="2"], [data-bnn-cols="3"], [data-bnn-cols="4"]) .product-grid-section .hover-image-container { aspect-ratio: 3 / 4 !important; align-self: flex-start; }
  html[data-bnn-cols="3"] .item-strip, html[data-bnn-cols="4"] .item-strip { display: none; }
  html[data-bnn-cols="3"] .hover-image-container > .hover-image.default,
  html[data-bnn-cols="4"] .hover-image-container > .hover-image.default { visibility: visible; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent:has(.product-grid-section) { display: flex; flex-wrap: wrap; }
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent > .shopify-section:not(:has(.product-grid-section)) { flex: 0 0 100%; min-width: 0; }
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent > .shopify-section:has(.product-grid-section),
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .product-grid-layout-container,
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .product-grid-section,
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) #MainContent .partition-wrapper { display: contents; }
  html[data-bnn-cols="3"] .product-grid-section .hover-image-container { flex: 0 0 calc(100% / 3); }
  html[data-bnn-cols="4"] .product-grid-section .hover-image-container { flex: 0 0 25%; }
  html:is([data-bnn-cols="3"], [data-bnn-cols="4"]) .product-grid-section .hover-image-container { aspect-ratio: 3 / 4 !important; align-self: flex-start; }   /* same as on phones */
}

/* the buttons: same row as the cart button and the sound icon, mirrored to the left. Always plain white (the earlier "difference" blend
   turned grey on mid-tone photos), no shadow. */
.bnn-density { position: fixed; top: 22px; left: var(--bc-m, 24px); z-index: 41; display: flex; align-items: center; gap: 6px; }
.bnn-density[hidden] { display: none; }
.bnn-density { transition: opacity .25s ease; }
.bnn-density.away { opacity: 0; pointer-events: none; }   /* a name or a price of a tile is about to cover the buttons (banan-peek.js) */
.bnn-dens {
  -webkit-appearance: none; appearance: none; position: relative; display: flex; align-items: center; justify-content: center;
  width: 22px; margin: 0; padding: 8px 4px; background: none; border: 0; border-radius: 0; box-shadow: none; color: #fff; cursor: pointer;
  transition: opacity .2s ease; -webkit-tap-highlight-color: transparent;
}
.bnn-dens::before { content: ""; position: absolute; inset: -8px -3px; }   /* hit area 44px high, invisible */
.bnn-dens svg { display: block; }
.bnn-dens[aria-disabled="true"] { opacity: .3; cursor: default; }
@media (hover: hover) { .bnn-dens:not([aria-disabled="true"]):hover { opacity: .7; } }
.bnn-dens:focus-visible { outline: 1px solid #fff; outline-offset: 3px; }
/* pinch on the grid (banan-density.js) is ours, not the browser's page zoom */
@media (max-width: 1199px) { html[data-bnn-cols] .product-grid-section { touch-action: pan-x pan-y; } }

/* ---------- Name and price over a product tile (BNN-0079, banan-peek.js) ----------
   The texts are in every tile with a photo strip (span.item-label); the class "peek" on the tile fades them in. Phone: while a finger swipes
   the photos, with 1 or 2 per row. Desktop (mouse): after a click on an arrow. Tablets: never. Plain white like the cart button, no shadow. */
.item-label { display: none; }
.item-label .il-name, .item-label .il-price {
  position: absolute; right: var(--il-m, 16px); text-align: right; z-index: 3; max-width: calc(100% - 2 * var(--il-m, 16px)); pointer-events: none; color: #fff;
  font: 400 var(--il-fs, 13px)/1.2 "Helvetica Neue", HelveticaNeue, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase;
  opacity: 0; transition: opacity var(--il-out, .5s) ease;
}
.item-label .il-name { top: var(--il-m, 16px); }
.item-label .il-price { bottom: var(--il-m, 16px); }
.hover-image-container.peek .item-label .il-name, .hover-image-container.peek .item-label .il-price { opacity: 1; transition-duration: var(--il-in, .7s); }
@media (max-width: 767px) {
  .item-label { display: block; }
  html[data-bnn-cols="2"] .item-label { --il-m: 10px; --il-fs: 11px; }
  html[data-bnn-cols="3"] .item-label, html[data-bnn-cols="4"] .item-label { display: none; }   /* too small for text */
}
@media (prefers-reduced-motion: reduce) { .item-label .il-name, .item-label .il-price { transition: none; } }

/* A product none of whose sizes can be ordered (banan-edits.js, 2026-11-09): a small label on the photo, always visible, the same type
   as the name over the tile; the photo is dimmed a little. */
.hover-image-container .bnn-sold {
  position: absolute; left: 12px; bottom: 12px; z-index: 4; pointer-events: none; padding: 4px 8px; background: rgba(0, 0, 0, .72); color: #fff;
  font: 400 11px/1.2 "Helvetica Neue", HelveticaNeue, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase;
}
.hover-image-container.is-sold img { opacity: .6; }
/* "Tell me when it is back" under a sold-out size (banan-cart.js): a quiet underlined line, then an e-mail field and a button in one row */
.bnn-alert, .product__info-container .bnn-alert { margin-top: 12px !important; padding: 0 !important; box-sizing: border-box; text-align: left; }   /* side margins: the button's own, set by banan-cart.js */
.bnn-alert-open { background: none; border: 0; padding: 8px 0; color: #fff; font: inherit; font-size: 13px; letter-spacing: .08em; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bnn-alert-form { display: flex; gap: 8px; }
.bnn-alert-form[hidden] { display: none; }
.bnn-alert-form input[type="email"] { flex: 1 1 auto; min-width: 0; height: 48px; padding: 0 14px; background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .5); border-radius: 0; font: inherit; font-size: 16px; }
.bnn-alert-form input[type="email"]:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.bnn-alert-send { flex: 0 0 auto; height: 48px; padding: 0 18px; background: #fff; color: #000; border: 0; font: inherit; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; }
.bnn-alert-send:disabled { opacity: .5; cursor: default; }
.bnn-alert-msg { margin: 8px 0 0; font-size: 13px; color: rgba(255, 255, 255, .75); }
.bnn-alert-msg:empty { display: none; }
/* a product made in the admin that has no photos yet (banan-edits.js): an empty 3:4 frame with one quiet line instead of another product's photos */
.bnn-nophoto { aspect-ratio: 3 / 4; display: flex; align-items: center; justify-content: center; margin: 0; border: 1px solid rgba(255, 255, 255, .2);
  color: rgba(255, 255, 255, .6); font: 400 12px/1.2 "Helvetica Neue", HelveticaNeue, Arial, sans-serif; letter-spacing: .12em; text-transform: uppercase; }
/* Desktop with a mouse: no instant swap to the second photo on hover; two arrows change the photo instead (Jacquemus style). */
.bnn-arrow { display: none; }
@media (min-width: 1200px) and (hover: hover) {
  .hover-image-container:hover .hover-image.hover { opacity: 0; }
  .hover-image-container:hover .hover-image.default { opacity: 1; }
  .item-label { display: block; --il-in: .35s; --il-out: .35s; --il-m: 20px; }
  /* the photos of the strip lie on top of each other and fade; a tile draws its strip (and loads its photos) only after the mouse was over it */
  .hover-image-container.armed > .item-strip { display: block; position: absolute; inset: 0; pointer-events: none; }
  .item-strip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .45s ease; }
  .item-strip img[aria-hidden] { display: none; }
  .item-strip img.on { opacity: 1; }
  .bnn-arrow {
    -webkit-appearance: none; appearance: none; position: absolute; top: 50%; z-index: 4; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 64px; margin: -32px 0 0; padding: 0; background: none; border: 0; border-radius: 0; box-shadow: none; color: #fff; cursor: pointer;
    opacity: 0; transition: opacity .3s ease; -webkit-tap-highlight-color: transparent;
  }
  .bnn-arrow-prev { left: 8px; }
  .bnn-arrow-next { right: 8px; }
  .hover-image-container:hover .bnn-arrow, .bnn-arrow:focus-visible { opacity: 1; }
  .bnn-arrow:focus-visible { outline: 1px solid #fff; outline-offset: -6px; }
}
