/* Director by May Jolivet & Justine Herbel (Velvetyne), free under the
   SIL Open Font License (fonts/Director-OFL.txt). Light, Regular, Bold. */
@font-face {
  font-family: "Director";
  src: url("/fonts/Director-Light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Director";
  src: url("/fonts/Director-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Director";
  src: url("/fonts/Director-Bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --gap: 0.7rem;
  /* Extra space in from the image edges for text, form fields and buttons
     (same as the name and price under the grid images). Images use --gap only. */
  --text-inset: 1rem;

  /* The whole palette */
  --white: #ffffff;
  --black: #000000;
  --yellow: #f7fbce;
  --grey-light: #d0cfcf;

  /* What each colour is used for */
  --bg: var(--white);
  --text: var(--black);
  --line: #e2e1e1; /* every line and outline: fields, buttons, info rows, footer */

  /* All text */
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* Product name in the product view (Director, loaded below) */
    --font-title:  var(--font);
  --font-title-weight: 400;
  /* Running text: the footer, the texts that open under the Order button
     (not their headings), and the grey price and material text */
  --font-text: var(--font);

  /* The dark grey at the top of the landing video and its still image.
     Safari shows it in the status bar strip above the page, so the strip
     blends into the video instead of being white. */
  --landing-top: #59575b;

  /* ---- Landing page on phones: change these two to adjust it ----
     Zoom of the video: 1 = not zoomed, 1.2 = 20% closer. More zoom hides
     more of the white sky behind the logo, but crops the person tighter.
     Logo width: share of the screen width (e.g. 50vw = 50%). */
  --landing-zoom-mobile: 1.18;
  --landing-logo-mobile: 51vw;

  /* ---- Landing page on computers ----
     Zoom of the video (and its still image): 1 = not zoomed, 1.2 = 20% closer.
     Zoom centre: the point it zooms in towards, across and down (50% 50% = middle). */
  --landing-zoom-desktop: 1.2;
  --landing-zoom-desktop-centre: 50% 58%;

  /* How long the product view takes to slide up when it opens (and back
     down when it closes), in seconds */
  --overlay-slide: 0.35s;

  /* Phones: how far above the bottom of the screen the floating Order button
     sits in the product view. Raise it if Safari's bar covers the button. */
  --order-button-bottom: calc(var(--gap) + env(safe-area-inset-bottom, 0px));
}

/* Above the page (status bar, pull-down bounce): the landing's dark grey.
   Below it (bounce at the very bottom): white. The page itself is white. */
html {
  background: linear-gradient(var(--landing-top) 50%, var(--bg) 50%);
}
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9375rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

button {
  font: inherit;
  color: inherit;
}

/* No grey square when tapping buttons and choices on phones */
button,
label,
a {
  -webkit-tap-highlight-color: transparent;
}
button:focus:not(:focus-visible) {
  outline: none;
}

/* ---------- Landing ---------- */

/* Full screen, including behind the iPhone notch and the browser bars.
   lvh = the screen height when the browser bars are hidden, so the video
   never leaves a gap. object-fit: cover crops the sides, never stretches. */
.landing {
  position: relative;
  overflow: hidden; /* a zoomed-in video stays inside */
  height: 100vh;
  height: 100lvh;
  cursor: pointer;
}

.landing-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Crop a bit more from the top than the bottom, so on wide screens
     you see from just above the head down to the ankles.
     Lower % = show more of the top, higher % = show more of the bottom. */
  object-position: center 58%;
}

/* The landing video lies invisible on top of its still image until it really
   plays. Phones in Low Power Mode never autoplay videos and would otherwise
   show a play button; this way they just show the still image. */
.landing-video {
  transition: opacity 0.6s ease;
}

/* Computers: zoom set at the top of this file (phones have their own below) */
@media (min-width: 901px) {
  .landing-image {
    transform: scale(var(--landing-zoom-desktop));
    transform-origin: var(--landing-zoom-desktop-centre);
  }
}
.landing-video.waiting {
  opacity: 0;
}

.landing-title {
  position: absolute;
  inset: 0;
  margin: 0;
  display: flex;
  align-items: flex-start; /* logo at the top */
  justify-content: center;
  padding-top: calc(2rem + env(safe-area-inset-top)); /* clear of the notch */
  text-align: center;
  font-weight: 400;
  font-size: clamp(3rem, 9vw, 8rem);
  letter-spacing: 0.02em;
  color: #fff79f; /* same yellow as the form's Yellow option */
}

/* Logo colour is set inside SVG/EC-Logo-Yellow.svg (fill="...") */
.landing-logo {
  display: block;
  width: min(80vw, 40rem);
  height: auto;
}
/* ---------- Shop ---------- */

.shop {
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gap);
}

/* Full width, natural height, but never taller than 80% of the screen
   (if it would be, it's cropped top and bottom instead of squashed) */
/* Hidden sections (empty bottom grid, no featured image) */
.product-grid[hidden],
.feature[hidden] {
  display: none;
}

/* Feature: columns side by side with the same spacing as the product
   grid (3 on computers, 1 on phones; set in script.js). In each column
   the images lie on top of each other and only the active one shows;
   they switch instantly, without a fade. */
.feature {
  display: grid;
  grid-template-columns: repeat(var(--feature-columns, 3), 1fr);
  gap: 0;
}
.feature-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  max-height: 80vh;
}
.feature-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}
.feature-image.active {
  opacity: 1;
}


/* ---------- Product (image carousel) ---------- */

.product {
  position: relative;
}

.product-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  aspect-ratio: 3 / 4;
  cursor: pointer;
}
.product-track::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  object-fit: cover;
  display: block;
  width: 100%;
  height: 100%;
  -webkit-user-drag: none;
  user-select: none;
}

.product-name {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Name at the image's left edge, then the price 40px after it, in the same
   light grey as the material text */
.product-meta {
  display: flex;
  gap: 40px;
  margin: 0.5rem 0 0.75rem; /* space above (from the image) and below */
}
.product-meta .product-name {
  margin: 0;
}
.grid-price {
  color: var(--grey-light);
  font-family: var(--font-text);
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: none;
  background: none;
  color: var(--text);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
/* The V shape: two borders of a small square, rotated */
.arrow::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 35%;
  height: 35%;
  border-left: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
}
.arrow.prev::before { transform: translate(-30%, -50%) rotate(45deg); }
.arrow.next::before { transform: translate(-70%, -50%) rotate(-135deg); }
.arrow.prev { left: 0.5rem; }
.arrow.next { right: 0.5rem; }

/* Only one image: nothing to scroll, so no arrows or previews */
.single .arrow,
.single .thumbs {
  display: none;
}

/* Touch screens: no arrows at all, just swipe. (Arrows that appear on
   "hover" made phones need two taps to open a product.) */
@media (hover: none) {
  .arrow {
    display: none;
  }
  /* Product view: arrows show there are more images, but you swipe (or
     tap a preview) to change image */
  .overlay:not(.single) .arrow {
    display: block;
    opacity: 1;
  }
  .overlay .arrow {
    pointer-events: none;
  }
}

/* Never show the browser's own play button / controls on the
   background videos (iPhone shows one while loading or in Low Power Mode) */
video::-webkit-media-controls,
video::-webkit-media-controls-start-playback-button,
video::-webkit-media-controls-overlay-play-button {
  display: none !important;
  -webkit-appearance: none;
}

/* Arrows sit in the middle of the image, not the image + name */
.product .arrow {
  top: calc(50% - 1.2rem);
}

/* Show arrows on hover (and keyboard focus) */
/* Arrows only show while hovering the images
   (or when reached with the keyboard's Tab key) */
.product:hover .arrow,
.overlay-gallery:hover .arrow,
.arrow:focus-visible {
  opacity: 1;
  pointer-events: auto;
}


/* ---------- Product view (full viewport) ---------- */

/* Image on the left, the info column right next to it. The whole view
   scrolls like a normal page (scrollbar at the screen edge); the image
   stays put while the info column scrolls past it. */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  overflow-y: auto;
  overscroll-behavior: contain; /* don't scroll the shop behind it */
  /* Space for the scrollbar is always kept free, so nothing shifts sideways
     when the form unfolds and the view becomes scrollable */
  scrollbar-gutter: stable;
  background: var(--bg);
  display: flex;
  align-items: flex-start;
  gap: var(--gap); /* between the previews, the image and the info column */
  /* The shop grid's margin above and at the sides; the image reaches the bottom */
  padding: var(--gap) var(--gap) 0;
}
/* Sliding up from the bottom when opened, back down when closed (script.js).
   It moves its real position (top/bottom), not just its picture (transform):
   iPhone Safari colours the strip behind the status bar after whatever
   touches the top of the screen, so this way the strip only turns white
   when the view actually gets there. The X moves along with it. */
.overlay.slide-in,
.overlay.slide-in .overlay-close {
  animation-duration: var(--overlay-slide);
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-fill-mode: both;
}
.overlay.slide-out,
.overlay.slide-out .overlay-close {
  animation-duration: var(--overlay-slide);
  animation-timing-function: cubic-bezier(0.6, 0, 0.8, 0.4);
  animation-fill-mode: both;
}
.overlay.slide-in { animation-name: overlay-up; }
.overlay.slide-out { animation-name: overlay-down; }
.overlay.slide-in .overlay-close { animation-name: close-up; }
.overlay.slide-out .overlay-close { animation-name: close-down; }
@keyframes overlay-up {
  from { top: 100%; bottom: -100%; }
  to { top: 0; bottom: 0; }
}
@keyframes overlay-down {
  from { top: 0; bottom: 0; }
  to { top: 100%; bottom: -100%; }
}
@keyframes close-up {
  from { top: 100%; }
  to { top: 0; }
}
@keyframes close-down {
  from { top: 0; }
  to { top: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .overlay.slide-in,
  .overlay.slide-out,
  .overlay.slide-in .overlay-close,
  .overlay.slide-out .overlay-close { animation: none; }
}
.overlay[hidden] {
  display: none;
}

/* Image fills the screen height under the top margin and stays there while
   scrolling; its width follows the photo's shape (3:4) */
.overlay-gallery {
  position: sticky;
  top: 0; /* measured from inside the view's top padding */
  flex: 0 1 auto;
  min-width: 0;
  height: calc(100vh - var(--gap));
  height: calc(100svh - var(--gap));
  aspect-ratio: 3 / 4;
}

/* Small previews in a column left of the image; they stay put too.
   The one in view gets a black outline (like a button on hover). */
.thumbs {
  position: sticky;
  top: 0;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  width: 4.5rem;
  max-height: calc(100svh - 2 * var(--gap));
  overflow-y: auto; /* many images: scroll the previews */
  scrollbar-width: none;
}
.thumbs::-webkit-scrollbar {
  display: none;
}
.thumb {
  flex: none;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid transparent;
  background: none;
  cursor: pointer;
  transition: border-color 0.2s;
}
.thumb img,
.thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.thumb:hover {
  border-color: var(--line);
}
.thumb.active {
  border-color: var(--text);
}

.overlay-track {
  height: 100%;
  aspect-ratio: auto;
  cursor: default;
}

.overlay .arrow {
  width: 2.75rem;
  height: 2.75rem;
}

/* Info column: title, price and material, then the order form (folded),
   the Order button and the info menu. Grows with its content; the page
   scrolls, not the column. */
.overlay-info {
  flex: 0 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 1.5rem var(--text-inset) var(--gap);
}
.overlay-info .order-button {
  flex: none;
  padding: 0.7rem;
}

/* Folding panel (order form, info menu texts): animates its height open */
.fold {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s ease;
}
.fold.open {
  grid-template-rows: 1fr;
}
/* No padding here: padding would keep a strip of the content visible
   while folded. Space comes from the content's own margins. */
.fold-inner {
  min-height: 0;
  overflow: hidden;
}

/* Shipping, returns, care…: rows with a small + under the Order button */
.info-menu {
  flex: none;
  margin: 1.5rem 0 0;
  border-top: 1px solid var(--line);
}
.info-menu[hidden] {
  display: none;
}
.info-item {
  border-bottom: 1px solid var(--line);
}
.info-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.7rem 0;
  border: none;
  background: none;
  text-align: left;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.info-toggle:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.info-text .fold-inner {
  font-family: var(--font-text);
  padding-right: 3.2vw; /* keeps the paragraphs from running too wide */
  font-size: 0.8125rem;
}
.info-text p {
  margin: 0 0 0.75rem;
}

/* The +: two thin lines. When the row opens, the upright line turns down
   flat, so the + becomes a − */
.plus {
  position: relative;
  flex: none;
  width: 0.6rem;
  height: 0.6rem;
}
.plus span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transition: transform 0.25s ease;
}
.plus span:nth-child(2) { transform: rotate(90deg); }
.info-item.open .plus span:nth-child(2) { transform: rotate(0deg); }

.product-title {
  margin: 0;
  font-family: var(--font-title);
  font-weight: var(--font-title-weight); /* set at the top of this file */
  font-size: 2.5rem;
  line-height: 1.1;
}

.product-price {
  margin: 0.75rem 0 0;
}

.product-material {
  margin: 0.25rem 0 2rem;
  font-family: var(--font-text);
  color: var(--grey-light);
  white-space: pre-line; /* line breaks typed in the CMS show as new lines */
}

.order-button {
  display: block;
  width: 100%;
  padding: 1rem;
  border: none;
  background: var(--text);
  color: var(--bg);
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}
/* Only with a mouse: on a phone a tap would leave it yellow afterwards */
@media (hover: hover) {
  .order-button:hover {
    background-color: var(--yellow);
    color: var(--black);
  }
}
.order-button:disabled {
  opacity: 0.85;
  cursor: default;
}

/* Close: "X CLOSE" in the top right corner, like Acne Studios' close
   button: the X is simply the letter X, 12px uppercase text with a little
   letter spacing. Same on phones. Hover: underlined (X and word). */
.overlay-close {
  position: fixed; /* stays in the corner while the product view scrolls */
  top: 0;
  right: 0;
  z-index: 1;
  padding: 0.25rem 20px 0.25rem var(--gap); /* the text ends 20px from the right edge */
  border: none;
  background: none;
  color: var(--text);
  font-size: 0.75rem;
  line-height: 20px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  cursor: pointer;
}
.overlay-close {
  word-spacing: 3.4px; /* widens the space between X and CLOSE to ~7px */
}
.overlay-close:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* ---------- Order form (unfolds in the product view) ---------- */

.order-heading {
  margin: 0 0 1.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field {
  position: relative;
  display: block;
  margin: 0 0 1.75rem;
  padding: 0;
  border: none;
}
/* Field titles (Full name, Email, Size…): the same plain style as the price */
.field > span,
.field legend {
  display: block;
  margin-bottom: 0.5rem;
  padding: 0;
}

/* Fields you type in: no background, just a light grey outline */
.field input[type="email"],
.field input[type="text"],
.field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: none;
  color: var(--text);
  font: inherit;
}
/* Phones and tablets: 16px text in fields, or iPhones zoom in when you tap one */
@media (hover: none), (max-width: 900px) {
  .field input[type="email"],
  .field input[type="text"],
  .field textarea {
    font-size: 16px;
  }
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--text); /* black while typing, so you see where you are */
}
.field textarea {
  resize: vertical;
}

/* Size and colour choices look like buttons */
/* Size and colour buttons: an even grid of equal boxes with no gaps.
   Each box overlaps its neighbours by 1px so the borders are shared
   (one thin line, not two). */
.options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 0 1px 1px 0; /* room for the overlap */
}
.option {
  position: relative;
  display: block;
  margin: 0 -1px -1px 0;
  cursor: pointer;
}
/* The hovered or chosen box sits on top, so its whole black outline shows */
.option:hover,
.option:has(input:checked) {
  z-index: 1;
}
.option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
/* Light grey outline; black outline on hover; chosen: yellow with black
   text, like the Order button on hover, and a black outline */
.option span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 100%;
  padding: 0.6rem 0.5rem;
  text-align: center;
  font-size: 0.8125rem;
  border: 1px solid var(--line);
  background: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.option:hover span {
  border-color: var(--text);
}
.option input:checked + span {
  border-color: var(--grey-light);
  background: var(--grey-light);
  color: var(--black);
}
.option:hover input:checked + span {
  border-color: var(--text); /* the chosen one gets the black hover outline too */
}
.option input:focus-visible + span {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}
/* Colours this product doesn't come in */
.option[hidden] {
  display: none;
}
/* Colour buttons: dot and name sit at the left of the square */
.swatch span {
  justify-content: flex-start;
  text-align: left;
}
.swatch i {
  flex: none;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 1px solid var(--line);
}

/* "Other" colour: a rainbow colour wheel */
.swatch i.rainbow {
  background: linear-gradient(45deg,
    #e8473f 0 16.6%, #ec9831 0 33.3%, #f4dd4c 0 50%,
    #4ecb5f 0 66.6%, #5ea9ff 0 83.3%, #9a5bd6 0);
}

/* Floats in the space under the field, so it never moves the layout */
.field-hint {
  position: absolute;
  top: 100%;
  left: 0;
  margin: 0.3rem 0 0;
  font-size: 0.8125rem;
  color: var(--text);
}

.form-status {
  margin: 1rem 0 0;
  font-size: 0.8125rem;
}
.form-status:empty {
  display: none;
}

body.no-scroll {
  overflow: hidden;
}
/* While a product is open (and has finished sliding up), hide the page
   behind it. Otherwise, when a phone resizes the screen (keyboard, address
   bar), the dark landing video could show through as a black area at the
   bottom. */
body.covered .landing,
body.covered .shop,
body.covered .contact {
  visibility: hidden;
}


/* ---------- Contact ---------- */

/* Computers: the same 4 columns as the product grid above. The text about
   Emma spans the first two, her contact details start at the third.
   Both in the same text style. */
.contact {
  font-family: var(--font-text);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: var(--gap);
  margin: 0 var(--gap);
  padding: 3rem 0 4rem;
  border-top: 1px solid var(--line);
  font-size: 1rem;
  line-height: 1.6;
}

.contact .contact-intro {
  grid-column: 1 / 3;
  padding-right: 5rem; 
}

.contact-info {
  grid-column: 3 / 5;
  display: flex;
  flex-direction: column;
}

.contact p {
  margin: 0;
}
.contact .contact-intro p + p {
  margin-top: 1em;
}


/* ---------- Smaller screens ---------- */

/* Phone layout below 900px wide. If you change it, change the other
   900px / 901px widths in this file and the one in script.js too. */
@media (max-width: 900px) {
  :root { --gap: 0.7rem; --text-inset: 0; }

  /* Landing video on phones when there's no mobile version: the wide
     desktop video, cropped so the person is centred.
     - object-position: which part of the video is shown; the first value
       moves it sideways (the person is a bit right of centre in the video)
     - scale: how much it's zoomed in (--landing-zoom-mobile at the top);
       origin: the point the zoom is centred on (x y), here the person, so
       she stays in the middle
     Only the video: its still image (shown in Low Power Mode) is a
     different photo and stays as it is. */
  .landing {
    overflow: hidden;
    /* A bit shorter than the screen, so the top of the grid peeks out */
    height: calc(100vh - 4rem);
    height: calc(100svh - 4rem);
  }
  video.landing-image,
  img.landing-moving {
    object-position: 46% 50%;
    transform: scale(var(--landing-zoom-mobile)); /* set at the top of this file */
    transform-origin: 50% 90%;
  }
  /* The mobile version from the CMS (and its still image, the same first
     frame): zoomed in from the bottom, so the white sky moves up out of view
     and the logo sits on the dark rock */
  .landing-image.mobile-version {
    object-position: 50% 50%;
    transform: scale(var(--landing-zoom-mobile));
    transform-origin: 50% 95%;
  }
  .landing-logo { width: var(--landing-logo-mobile); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }

  /* Product view: image on top, the previews centred under it, then the
     info; the whole view scrolls */
  .overlay {
    flex-direction: column;
    align-items: stretch;
    padding: 0 var(--gap) var(--gap); /* the image starts at the top edge */
  }
  .overlay-gallery { order: 1; position: relative; top: auto; height: auto; }
  /* Full width, and tall enough for a whole 3:4 photo, so photos are
     never cut at the top or bottom (a wider photo is cut at the sides).
     Never shorter than the min-height, so photos don't get too small;
     then the photo is cut equally at both sides. The width is fixed, or
     the min-height would make the area wider than the screen. */
  .overlay-track { width: 100%; height: auto; aspect-ratio: 3 / 4; min-height: 60vh; }
  .overlay-gallery { width: 100%; aspect-ratio: auto; }
  .thumbs {
    order: 2;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-height: none;
    overflow: visible;
  }
  .thumb { width: 2.25rem; }
  .overlay-info { order: 3; flex: none; height: auto; overflow: visible; padding: 0.5rem var(--text-inset) 1.5rem; } /* top: space under the previews */

  /* Smaller buttons on mobile */
  .arrow,
  .overlay .arrow {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.75rem;
  }
  .arrow.prev { left: 0.5rem; }
  .arrow.next { right: 0.5rem; }
  /* No arrows in the product view on phones: swipe or tap a preview instead */
  .overlay .arrow,
  .overlay:not(.single) .arrow { display: none; }

  .order-button {
    padding: 0.7rem;
    font-size: 0.6875rem;
  }
  /* Product view: the Order button floats at the bottom of the screen, above
     Safari's bar, until you reach it. When pressed it slides down with the
     unfolding form to its place at the end of the form, and stays there. */
  .overlay-info .order-button {
    position: sticky;
    bottom: var(--order-button-bottom);
    z-index: 2;
  }
  .overlay-info .order-button.settled {
    position: static;
  }

  .option span {
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
  }

  /* Phones: contact details under the text */
  .contact { display: flex; flex-direction: column; gap: 3rem; }
  .contact .contact-intro { padding-right: 0; } /* full width on phones */

  /* Price under the name instead of beside it.
     Two tighter lines take the same height as one line + the space under
     it did, so the images stay just as far apart. */
  .product-meta {
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
  }
  .product-meta .product-name { line-height: 1.3; }
}
