/* Lora (SIL OFL 1.1, see fonts/OFL-Lora.txt), the store page's font: variable, weights 400 to 700 in one file
   per style and script; latin-ext covers Polish diacritics */
@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lora;
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-ext-wght-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Lora;
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(/fonts/lora-latin-wght-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  scroll-behavior: smooth;
}

/* Set while the search dialog or the photo preview is open */
html.is-scroll-locked {
  overflow: hidden;
}

body {
  margin: 0;
  overflow-x: clip;
}

h1,
h2,
h3,
p {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: inherit;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* Badges, on the store page's cards and on the product page */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 9999px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.badge-lg {
  padding: 0.375rem 0.625rem;
  font-size: 0.75rem;
}

/* The store's look, on <body class="shop"> of every page StoreLayout makes (the store's tabs, the products' pages, the
   customer portal, the legal pages, the error page): cream paper, brown ink, Lora headings over a plain sans-serif */

.shop {
  --paper: #faf6ee;
  --card: #fffdf8;
  --hero: #efe5d6;
  --hero-line: #e1d1bf;
  --tile: #ede3d7;
  --ink: #51372b;
  --ink-dark: #3f2a20;
  --ink-soft: #796854;
  --line: #e5dacb;
  --line-strong: #d6c6b4;
  --rose: #b77772;
  --sale: #9c524d;
  --pink: #ead3ca;
  --sage: #dce2ce;
  --shadow: 0 6px 18px rgb(81 55 43 / 0.07);
  --shadow-raised: 0 10px 26px rgb(81 55 43 / 0.16);
  --serif: Lora, Georgia, 'Times New Roman', serif;
  --radius: 0.625rem;
  /* The page's content is at most this wide */
  --page: 80rem;
  --gutter: 1rem;
  /* How much further in the header's content starts than the page's */
  --inset: 0rem;

  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
  background: var(--paper);
}

.shop :focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

/* Small capitals over a title, e.g. "Dla żłobków i przedszkoli" */
.shop-eyebrow {
  color: var(--ink-soft);
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* Header: the logo, the search field and "Portal Klienta" with "Pomoc" and the store's profiles under it, as icons,
   then the tabs, over a line across the whole page. On narrow screens the search field has a row of its own. */

.shop-header {
  padding: 0.75rem calc(max(var(--gutter), (100% - var(--page)) / 2) + var(--inset)) 0.875rem;
  border-bottom: 1px solid var(--line-strong);
}

.shop-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.shop-logo {
  flex: none;
}

.shop-logo-image {
  width: 9.75rem;
  height: auto;
}

/* Looks like a text field; it opens the search dialog, which needs JavaScript */
.shop-search {
  order: 1;
  display: flex;
  flex: 1 1 100%;
  align-items: center;
  min-width: 0;
  height: 2.75rem;
  padding-inline: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4375rem;
  background: var(--card);
  color: #9ca3af;
  font-size: 0.875rem;
  text-align: left;
  cursor: text;
  visibility: hidden;
  transition: border-color 0.15s;
}

.js .shop-search {
  visibility: visible;
}

.shop-search span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-search:hover {
  border-color: var(--ink-soft);
}

/* "Portal Klienta", as tall as the search field, and under it, at its right edge, an envelope for "Pomoc" and the
   logos of Facebook and Instagram: those switched on in the admin panel, or none */
.shop-actions {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.shop-portal {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.4375rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.shop-portal:hover {
  background: var(--ink-dark);
}

.shop-portal svg {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

.shop-links {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Round, so that the focus outline is round too */
.shop-link {
  display: block;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  transition: box-shadow 0.15s, transform 0.15s;
}

.shop-link svg {
  width: 100%;
  height: 100%;
}

/* Raised under the pointer, like the products' cards; the logos keep their colors */
@media (hover: hover) {
  .shop-link:hover {
    box-shadow: 0 4px 10px rgb(81 55 43 / 0.2);
    transform: translateY(-2px);
  }
}

/* The padding is room for the outline of the focused tab, which the scrolling would cut off */
.shop-tabs {
  display: flex;
  gap: 0.4375rem;
  margin: 0.625rem -0.25rem -0.25rem;
  padding: 0.25rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.shop-tabs::-webkit-scrollbar {
  display: none;
}

.shop-tab {
  flex-shrink: 0;
  padding: 0.6875rem 0.8125rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color 0.15s;
}

.shop-tab[aria-current] {
  background: var(--rose);
  color: #fff;
}

@media (hover: hover) {
  .shop-tab:not([aria-current]):hover {
    background: rgb(183 119 114 / 0.14);
  }
}

/* Under the header: the side panel, with the hero and the products next to it. On narrow screens it's all one column:
   the hero, the lists, the products, the occasions. */

.shop-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 1rem auto 0;
  padding-inline: var(--gutter);
}

.shop-side,
.shop-content {
  display: contents;
}

.shop-hero {
  order: 1;
}

.shop-finder {
  order: 2;
}

.shop-main {
  order: 3;
}

.shop-upcoming {
  order: 4;
}

/* Hero */

.shop-hero {
  padding: 1.375rem 1.4375rem;
  border: 1px solid var(--hero-line);
  border-radius: var(--radius);
  background: var(--hero);
  box-shadow: var(--shadow);
}

.hero-title {
  margin-top: 0.6875rem;
  font-family: var(--serif);
  font-size: 2.25rem;
  line-height: 1.06;
  white-space: pre-line;
}

.hero-lead {
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: 0.9375rem;
  font-style: italic;
  line-height: 1.4;
}

.hero-button {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.71875rem 0.875rem;
  border-radius: 0.3125rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.875rem;
  line-height: 1.25;
  transition: background-color 0.15s;
}

.hero-button:hover {
  background: var(--ink-dark);
}

/* Side panel, "Znajdź materiały": the lists by group, a row of pills on narrow screens and a column next to the page.
   Under it, "Nadchodzące okazje". */

.shop-finder,
.shop-upcoming {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.finder-title,
.upcoming-title {
  font-family: var(--serif);
  font-size: 1.5rem;
  line-height: 1.2;
}

.upcoming-title {
  margin-top: 0.375rem;
}

.finder-label {
  margin-top: 0.875rem;
  padding: 0.3125rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.3;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.finder-label.is-occasions {
  background: var(--pink);
}

.finder-label.is-kinds {
  background: var(--sage);
}

.finder-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.625rem;
}

.finder-links a {
  display: block;
  padding: 0.3rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 9999px;
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.finder-fold {
  margin-top: 0.875rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.finder-fold summary {
  font-size: 0.9375rem;
  list-style: none;
  cursor: pointer;
}

.finder-fold summary::-webkit-details-marker {
  display: none;
}

.finder-fold summary::before {
  content: '▾';
  margin-right: 0.375rem;
}

.finder-fold:not([open]) summary::before {
  content: '▸';
}

/* An occasion: its date on a tile, its name, and a link to its materials when the store has them */

.occasion {
  display: flex;
  gap: 0.625rem;
  padding-block: 0.8125rem;
  border-bottom: 1px solid var(--line);
}

.occasion-date {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 2.625rem;
  height: 3.375rem;
  border-radius: 0.375rem;
  background: var(--tile);
}

.occasion-day {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.15;
}

.occasion-month {
  color: var(--ink-soft);
  font-size: 0.6875rem;
  line-height: 1.2;
}

.occasion-name {
  font-size: 0.875rem;
  line-height: 1.35;
}

.occasion-until {
  margin-top: 0.125rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.occasion-link {
  display: inline-block;
  margin-top: 0.3125rem;
  font-size: 0.75rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.occasion-link:hover {
  text-decoration-thickness: 2px;
}

/* Beside the date tile, as narrow as the side panel lets it be */
.occasion-text {
  min-width: 0;
}

/* Several packages for one occasion: a line each, cut short when the name is longer than the line */
.occasion-links .occasion-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.occasions {
  margin-top: 0.75rem;
}

.upcoming-more {
  display: block;
  margin-top: 0.875rem;
  padding: 0.5625rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.25;
  text-align: center;
  transition: border-color 0.15s;
}

.upcoming-more:hover {
  border-color: var(--ink-soft);
}

/* "Kalendarz okazji": a card for each month */

.calendar-month {
  margin-top: 1rem;
  padding: 1rem 1rem 0.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.calendar-month-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.2;
  text-transform: capitalize;
}

.calendar-month .occasions {
  margin-top: 0.25rem;
}

.calendar-month .occasion:last-child {
  border-bottom: 0;
}

/* Lists and tabs: a heading over a grid of cards, two columns and from 640 px of room three */

.shop-main {
  min-width: 0;
  container-type: inline-size;
}

.shop-section {
  scroll-margin-top: 1rem;
}

.shop-section + .shop-section {
  margin-top: 2.5rem;
}

.shop-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

.shop-section-title {
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.shop-section-count {
  color: var(--ink-soft);
  font-size: 0.75rem;
  white-space: nowrap;
}

.shop-section-link {
  font-size: 0.875rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  white-space: nowrap;
}

.shop-section-link:hover {
  text-decoration-thickness: 2px;
}

.shop-section-intro {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
}

.shop-empty {
  margin-top: 1.5rem;
  padding: 2.5rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-style: italic;
  text-align: center;
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.875rem;
}

/* The card's name links to the product, and its link covers the whole card */
.product-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-cover {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  background: var(--tile);
}

/* Covers come in all shapes; the top of a tall one, where its title usually is, stays in view */
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
}

.product-badges {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  left: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.product-badges .badge {
  font-size: 0.6875rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.15);
}

.product-promo {
  background: var(--sale);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.625rem;
}

.product-name,
.product-subtitle {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
}

.product-name {
  margin-top: 0.3125rem;
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.25;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.product-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: var(--radius);
}

.product-link:focus-visible {
  outline: none;
}

.product-link:focus-visible::after {
  outline: 2px solid var(--rose);
  outline-offset: 2px;
}

.product-subtitle {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.35;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

/* The price and the button sit at the bottom, so they line up across a row of cards */
.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.375rem;
  margin-top: auto;
  padding-top: 0.75rem;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.2;
}

.product-price s {
  color: var(--ink-soft);
  font-size: 0.8em;
}

.product-price.is-on-sale span {
  color: var(--sale);
}

.product-button {
  margin-top: 0.625rem;
  padding: 0.625rem 0.5rem;
  border-radius: 0.3125rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.25;
  text-align: center;
  transition: background-color 0.15s;
}

@media (hover: hover) {
  .product-card:hover {
    box-shadow: var(--shadow-raised);
    transform: translateY(-3px);
  }

  .product-card:hover .product-button {
    background: var(--ink-dark);
  }

  .finder-links a:hover {
    border-color: var(--ink-soft);
  }
}

/* Tighter, to stay in one line on a phone's narrow card */
@container (max-width: 27.99rem) {
  .product-body .shop-eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.04em;
  }
}

@container (min-width: 28rem) {
  .shop-grid {
    gap: 0.9375rem;
  }

  .product-body {
    padding: 0.875rem;
  }

  .product-name {
    margin-top: 0.4375rem;
    font-size: 1.25rem;
  }

  .product-price {
    padding-top: 1rem;
    font-size: 1.25rem;
  }

  .product-button {
    margin-top: 0.75rem;
    padding-block: 0.6875rem;
    font-size: 0.875rem;
  }
}

@container (min-width: 40rem) {
  .shop-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-name {
    font-size: 1.125rem;
  }
}

@container (min-width: 56rem) {
  .shop-grid {
    gap: 1.25rem;
  }

  .product-name {
    font-size: 1.3125rem;
  }

  .product-price {
    font-size: 1.3125rem;
  }

  .product-button {
    font-size: 0.9375rem;
  }
}

/* From this width the side panel stands next to the page */
@media (min-width: 720px) {
  .shop {
    --inset: 0.75rem;
  }

  .shop-header {
    padding-top: 0.5rem;
    padding-bottom: 1.125rem;
  }

  .shop-bar {
    flex-wrap: nowrap;
    gap: 1.125rem;
  }

  .shop-logo-image {
    width: 12.6875rem;
  }

  /* At the top, in line with "Portal Klienta" */
  .shop-search {
    order: 0;
    flex: 1 1 0;
    align-self: flex-start;
  }

  .shop-tabs {
    margin-top: 1.125rem;
  }

  .shop-body {
    display: grid;
    grid-template-columns: 11.5rem minmax(0, 1fr);
    gap: 1.1875rem;
    align-items: start;
    margin-top: 0.9375rem;
  }

  /* An empty store's calendar has nothing on the side */
  .shop-body:not(:has(.shop-side > *)) {
    grid-template-columns: minmax(0, 1fr);
  }

  .shop-side,
  .shop-content {
    display: flex;
    flex-direction: column;
  }

  .shop-side {
    gap: 1.25rem;
    min-width: 0;
  }

  .shop-content {
    gap: 1.8125rem;
    min-width: 0;
  }

  .shop-eyebrow {
    font-size: 0.625rem;
    letter-spacing: 0.15em;
  }

  .shop-finder,
  .shop-upcoming {
    padding-inline: 0.9375rem;
  }

  .shop-finder {
    padding-top: 0.8125rem;
  }

  .finder-title,
  .upcoming-title {
    font-size: 1.375rem;
  }

  .finder-label {
    margin-top: 0.9375rem;
    padding-block: 0.375rem;
    font-size: 0.625rem;
  }

  .finder-links {
    display: block;
    margin-top: 0.375rem;
  }

  .finder-links + .finder-label {
    margin-top: 0.8125rem;
  }

  .finder-fold .finder-links {
    margin-top: 0;
  }

  .finder-links a {
    padding: 0.5rem;
    border: 0;
    border-radius: 0;
    font-size: 0.75rem;
    line-height: 1.25;
  }

  .finder-links a:hover {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.2em;
  }

  .finder-fold summary {
    font-size: 0.875rem;
  }

  .occasion-name {
    font-size: 0.75rem;
  }

  .occasion-link,
  .occasion-until,
  .shop-section-count {
    font-size: 0.6875rem;
  }
}

@media (min-width: 1000px) {
  .shop-body {
    grid-template-columns: 14.5rem minmax(0, 1fr);
    gap: 1.5rem;
  }

  .shop-search {
    flex: 0 1 42rem;
  }

  .shop-actions {
    margin-left: auto;
  }

  .shop-tab,
  .shop-portal,
  .shop-search {
    font-size: 0.9375rem;
  }

  .finder-title,
  .upcoming-title {
    font-size: 1.5rem;
  }

  .finder-links a {
    font-size: 0.9375rem;
  }

  .shop-eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.14em;
  }

  .finder-label {
    font-size: 0.6875rem;
  }

  .occasion-name {
    font-size: 0.9375rem;
  }

  .occasion-link,
  .occasion-until {
    font-size: 0.8125rem;
  }

  .upcoming-more {
    font-size: 0.875rem;
  }

  .shop-hero {
    padding: 2rem 2.25rem;
  }

  .hero-title {
    font-size: 3rem;
  }

  .hero-lead {
    font-size: 1.125rem;
  }

  .hero-button {
    padding: 0.8125rem 1.125rem;
    font-size: 0.9375rem;
  }

  .shop-section-title {
    font-size: 2rem;
  }

  .shop-section-count {
    font-size: 0.875rem;
  }

  .shop-section-link {
    font-size: 0.9375rem;
  }

  .shop-section-intro {
    font-size: 1.0625rem;
  }

  .calendar-month {
    padding: 1.25rem 1.25rem 0.5rem;
  }

  .calendar-month-title {
    font-size: 1.5rem;
  }
}

@media (min-width: 1100px) {
  .shop {
    --gutter: 1.5rem;
  }

  .shop-logo-image {
    width: 14rem;
  }

  .shop-body {
    grid-template-columns: 17rem minmax(0, 1fr);
  }

  .shop-finder,
  .shop-upcoming {
    padding: 1.25rem;
  }

  .finder-title,
  .upcoming-title {
    font-size: 1.75rem;
  }

  .finder-label {
    padding-block: 0.375rem;
    font-size: 0.75rem;
  }

  .finder-fold summary {
    font-size: 1rem;
  }
}

/* Footer: "Portal Klienta" and the legal pages the store shows, the copyright, and sparkles in the corner */

.store-footer {
  position: relative;
  margin-top: 3.5rem;
  border-top: 1px solid var(--line-strong);
}

.footer-inner {
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 1.75rem var(--gutter) 2.5rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.4;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

.footer-links a {
  white-space: nowrap;
}

.footer-links span {
  color: var(--line-strong);
}

.footer-copy {
  margin-top: 1.25rem;
  text-align: center;
}

.footer-sparkles {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 121px;
  color: var(--pink);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .shop-search,
  .shop-portal,
  .shop-link,
  .shop-tab,
  .hero-button,
  .upcoming-more,
  .product-card,
  .product-button {
    transition: none;
  }

  .product-card:hover,
  .shop-link:hover {
    transform: none;
  }
}

/* Legal pages, /regulamin and /polityka-prywatnosci, in the space next to the side panel: the title and when the text
   last changed, like a tab's heading, then a card with the table of contents and a card with the text. From 1100 px the
   table of contents stands next to the text and stays in view. On a phone the side panel comes after them, as after a
   product. */

.shop-main:has(> .legal) {
  order: 1;
}

.legal {
  display: grid;
  gap: 1rem;
}

.legal-toc,
.legal-text {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

/* The chapters; each heading has its own number, if any */
.legal-toc {
  padding: 1rem;
}

.legal-toc-title {
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.2;
}

.legal-toc ul {
  margin-top: 0.375rem;
}

.legal-toc li + li {
  border-top: 1px solid var(--line);
}

.legal-toc a {
  display: block;
  padding-block: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.legal-toc li:last-child a {
  padding-bottom: 0;
}

.legal-toc a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* The text as saved in the admin panel's editor, like a product's description: paragraphs, "Nagłówek 1" and
   "Nagłówek 2" headings (the chapters, each under a line), lists, bold, italics, underline and links, a block aligned
   at most */
.legal-text {
  padding: 1.125rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.legal-text p,
.legal-text ul,
.legal-text ol {
  margin: 0 0 0.875rem;
}

.legal-text ul,
.legal-text ol {
  padding-left: 1.5rem;
}

.legal-text ul {
  list-style: disc;
}

.legal-text ol {
  list-style: decimal;
}

.legal-text li + li {
  margin-top: 0.375rem;
}

/* A list in a list's item */
.legal-text li > :is(ul, ol) {
  margin: 0.375rem 0 0;
}

.legal-text > :is(h1, h2) {
  margin: 1.75rem 0 0.75rem;
  font-family: var(--serif);
  line-height: 1.3;
  scroll-margin-top: 1rem;
}

.legal-text > h1 {
  font-size: 1.375rem;
}

.legal-text > h2 {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.25rem;
}

.legal-text > :first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.legal-text > :last-child {
  margin-bottom: 0;
}

.legal-text a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.legal-text a:hover {
  text-decoration-thickness: 2px;
}

@media (min-width: 1000px) {
  .legal-toc-title {
    font-size: 1.5rem;
  }

  .legal-toc a {
    font-size: 0.9375rem;
  }
}

@media (min-width: 1100px) {
  .legal {
    grid-template-areas:
      'head'
      'text';
  }

  .legal:has(> .legal-toc) {
    grid-template-columns: minmax(0, 1fr) 16rem;
    grid-template-areas:
      'head head'
      'text toc';
    column-gap: 1.25rem;
  }

  .legal-head {
    grid-area: head;
  }

  .legal-text {
    grid-area: text;
    padding: 1.5rem;
    font-size: 1rem;
  }

  /* In view while the text scrolls by; when it's taller than the screen, it scrolls on its own */
  .legal-toc {
    position: sticky;
    top: 1rem;
    grid-area: toc;
    align-self: start;
    max-height: calc(100vh - 2rem);
    padding: 1.25rem;
    overflow-y: auto;
  }
}

/* Product page: the product in the space next to the side panel. In one column: its pictures, then its price with
   the order form, then its description. From 940 px the buying stands next to the pictures and the description goes
   under them. */

.pd {
  display: grid;
  gap: 0.875rem;
}

/* On a phone the side panel comes after the product, not before it as on the lists */
.shop-main:has(> .pd) {
  order: 1;
}

.pd-back {
  justify-self: start;
  font-size: 0.8125rem;
}

.pd-back:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.gallery-frame,
.pd-buy,
.pd-description {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.pd-buy,
.pd-description {
  min-width: 0;
  padding: 1.125rem;
}

.pd-name {
  margin-top: 0.375rem;
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.625rem;
}

.pd-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.5rem;
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-size: 1.75rem;
  line-height: 1.2;
}

.pd-price s {
  color: var(--ink-soft);
  font-size: 0.7em;
}

.pd-price strong {
  font-weight: 400;
}

.pd-price.is-on-sale strong {
  color: var(--sale);
}

.pd-lowest {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.35;
}

.pd-description {
  font-size: 0.9375rem;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.pd-description p {
  margin-bottom: 1rem;
}

.pd-description a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.pd-description a:hover {
  text-decoration-thickness: 2px;
}

/* What the description editor in the admin panel can also make: headings and lists */
.pd-description h1,
.pd-description h2,
.pd-description h3 {
  margin-bottom: 0.625rem;
  font-family: var(--serif);
  line-height: 1.3;
}

.pd-description h1 {
  font-size: 1.375rem;
}

.pd-description h2 {
  font-size: 1.25rem;
}

.pd-description h3 {
  font-size: 1.125rem;
}

.pd-description ul,
.pd-description ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.pd-description ul {
  list-style: disc;
}

.pd-description ol {
  list-style: decimal;
}

.pd-description > :last-child {
  margin-bottom: 0;
}

/* Product gallery: a scroll-snap slider plus a full-screen preview. The pictures come in all shapes and have text on
   them, so they're shown whole. */

.gallery {
  min-width: 0;
}

.gallery-frame {
  position: relative;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  aspect-ratio: 1;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-slide {
  flex: 0 0 100%;
  overflow: hidden;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  cursor: zoom-in;
}

/* Inside, because the slider would cut off an outline around it */
.gallery-slide:focus-visible {
  outline-offset: -2px;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 10;
  display: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--line);
  border-radius: 9999px;
  background: var(--card);
  color: var(--ink);
  font-size: 1.25rem;
  box-shadow: var(--shadow);
  transform: translateY(-50%);
}

.gallery-prev {
  left: 0.625rem;
}

.gallery-next {
  right: 0.625rem;
}

.gallery-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-block: 0.375rem;
  border-top: 1px solid var(--line);
}

.gallery-dot {
  display: grid;
  place-items: center;
  width: 0.75rem;
  height: 0.75rem;
}

/* Dots shrink with their distance from the current photo */
.gallery-dot span {
  width: 0.25rem;
  height: 0.25rem;
  border-radius: 9999px;
  background: rgb(81 55 43 / 0.25);
  transition: all 0.2s ease-out;
}

.gallery-dot[data-distance='1'] span {
  width: 0.375rem;
  height: 0.375rem;
  background: rgb(81 55 43 / 0.4);
}

.gallery-dot[data-distance='0'] span {
  width: 0.5rem;
  height: 0.5rem;
  background: var(--ink);
}

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgb(0 0 0 / 0.92);
  color: #fff;
}

.lightbox::backdrop {
  background: transparent;
}

.lightbox-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overscroll-behavior: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.lightbox-track::-webkit-scrollbar {
  display: none;
}

.lightbox-slide {
  display: grid;
  flex: 0 0 100%;
  place-items: center;
  padding: 4rem 1rem;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}

.lightbox-slide img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  max-height: calc(100dvh - 8rem);
  border-radius: 0.5rem;
}

.lightbox-counter {
  position: absolute;
  top: calc(1.25rem + env(safe-area-inset-top));
  left: 50%;
  z-index: 10;
  font-size: 0.875rem;
  font-weight: 500;
  transform: translateX(-50%);
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  z-index: 10;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  font-size: 1.375rem;
  transition: background-color 0.15s;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  background: rgb(255 255 255 / 0.22);
}

.lightbox-close {
  top: calc(0.75rem + env(safe-area-inset-top));
  right: calc(0.75rem + env(safe-area-inset-right));
}

.lightbox-arrow {
  top: 50%;
  display: none;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* The order form, in the card with the product's name and price */

.pd-checkout {
  margin-top: 0.875rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 1rem;
}

.checkout-perks {
  display: grid;
  gap: 0.375rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.checkout-perks li {
  display: flex;
  gap: 0.4375rem;
}

.checkout-perks svg {
  flex-shrink: 0;
  margin-top: 0.0625rem;
  color: var(--ink-soft);
  font-size: 1rem;
}

.checkout-form {
  margin-top: 0.875rem;
}

.checkout-label,
.portal-label {
  display: block;
  margin-bottom: 0.3125rem;
  font-size: 0.8125rem;
}

.checkout-label span {
  color: var(--sale);
}

.checkout-input,
.portal-input {
  width: 100%;
  height: 2.75rem;
  padding-inline: 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.4375rem;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.checkout-input::placeholder {
  color: #9ca3af;
}

.checkout-input[aria-invalid='true'],
.portal-input[aria-invalid='true'] {
  border-color: var(--sale);
}

.checkout-error,
.portal-error {
  margin-top: 0.3125rem;
  color: var(--sale);
  font-size: 0.8125rem;
}

.checkout-button,
.portal-button {
  display: block;
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.3125rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 1.25;
  text-align: center;
  transition: background-color 0.15s;
}

.checkout-button:hover,
.portal-button:hover {
  background: var(--ink-dark);
}

.checkout-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Thank-you screen shown after placeOrder() */
.checkout-success {
  padding-block: 0.5rem;
  text-align: center;
}

.checkout-success h2 {
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.2;
}

.checkout-success h2:focus {
  outline: none;
}

.checkout-success p:first-of-type {
  margin-top: 0.75rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.checkout-success strong {
  overflow-wrap: anywhere;
}

.checkout-success h3 {
  margin-top: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 700;
}

.checkout-success h3 + p {
  margin-top: 0.25rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.checkout-note {
  margin-top: 0.625rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.checkout-note a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

/* In place of the order form while BLOCK_PURCHASES is on, under the same line (.pd-checkout) */
.checkout-soon {
  padding-bottom: 0.25rem;
  font-family: var(--serif);
  font-weight: 700;
  text-align: center;
}

.checkout-soon h2 {
  font-size: 1.75rem;
  line-height: 1.2;
}

.checkout-soon p {
  margin-top: 0.375rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

/* "Kup teraz" bar while the buying is one column with the rest; store.js hides it while the order form is on screen */
.sticky-cta {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 30;
  padding: 0.75rem;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  pointer-events: none;
  transition: transform 0.3s ease, visibility 0.3s;
}

.sticky-cta.is-hidden {
  visibility: hidden;
  transform: translateY(110%);
}

.sticky-cta a {
  display: block;
  height: 45px;
  border-radius: 0.3125rem;
  background: var(--ink);
  color: #fff;
  font-size: 0.9375rem;
  line-height: 45px;
  text-align: center;
  box-shadow: 0 6px 18px rgb(81 55 43 / 0.3);
  pointer-events: auto;
}

/* Room for the bar under the links at the end of the page */
@media (max-width: 939.98px) {
  .shop:has(.sticky-cta) .footer-inner {
    padding-bottom: 6rem;
  }
}

@media (min-width: 720px) {
  .gallery-arrow {
    display: grid;
  }

  /* The whole width of the space would make a square taller than the screen */
  .gallery-track {
    aspect-ratio: 4 / 3;
  }
}

@media (min-width: 768px) {
  .lightbox-arrow {
    display: grid;
  }
}

@media (min-width: 940px) {
  .pd {
    grid-template-areas:
      'back back'
      'gallery buy'
      'description buy';
    grid-template-rows: auto auto 1fr;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1rem 1.25rem;
    align-items: start;
  }

  .pd-back {
    grid-area: back;
  }

  .gallery {
    grid-area: gallery;
  }

  .pd-buy {
    grid-area: buy;
  }

  .pd-description {
    grid-area: description;
  }

  .gallery-track {
    aspect-ratio: 1;
  }

  .sticky-cta {
    display: none;
  }
}

/* The buying stays in view next to a long description, on a screen tall enough to show all of it */
@media (min-width: 940px) and (min-height: 720px) {
  .pd-buy {
    position: sticky;
    top: 1rem;
  }
}

@media (min-width: 1100px) {
  .pd-buy,
  .pd-description {
    padding: 1.5rem;
  }

  .pd-name {
    font-size: 1.875rem;
  }

  .pd-price {
    font-size: 2rem;
  }

  .pd-description {
    font-size: 1rem;
  }

  .checkout-perks {
    font-size: 0.875rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-dot span,
  .checkout-button,
  .portal-button,
  .sticky-cta {
    transition: none;
  }
}

/* Customer portal: signing in, and the files of what was bought, in the space next to the side panel */

.portal {
  display: grid;
  gap: 1rem;
}

/* On a phone the side panel comes after it, as after a product */
.shop-main:has(> .portal) {
  order: 1;
}

.portal-title {
  margin-top: 0.375rem;
  font-family: var(--serif);
  font-size: 1.625rem;
  line-height: 1.2;
}

.portal-account {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem 0.75rem;
  margin-top: 0.5rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.portal-account strong {
  color: var(--ink);
}

.portal-more a,
.portal-empty a,
.portal-text-button {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.portal-card {
  min-width: 0;
  padding: 1.125rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.portal-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.875rem;
  border-bottom: 1px solid var(--line);
}

.portal-product img {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 0.375rem;
  background: var(--tile);
  object-fit: cover;
}

.portal-product-name {
  font-family: var(--serif);
  font-size: 1.1875rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.portal-files > li + li {
  border-top: 1px solid var(--line);
}

.portal-file {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-block: 0.75rem;
}

.portal-file:hover .portal-file-name {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.portal-files > li:last-child .portal-file {
  padding-bottom: 0;
}

.portal-file-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.375rem;
  background: var(--tile);
  font-size: 1.25rem;
}

.portal-file-text {
  flex: 1;
  min-width: 0;
}

.portal-file-name,
.portal-file-details {
  display: block;
}

.portal-file-name {
  font-size: 0.9375rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.portal-file-details {
  margin-top: 0.125rem;
  color: var(--ink-soft);
  font-size: 0.75rem;
}

.portal-file > svg {
  flex: none;
  font-size: 1.375rem;
}

.portal-empty {
  margin-top: 0.875rem;
  color: var(--ink-soft);
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

/* Signing in: a narrow card in the middle of the space */

.portal-login,
.order-status {
  justify-self: center;
  width: 100%;
  max-width: 28rem;
}

/* After paying: /zamowienie, what was bought between the title and the text */
.order-status .portal-product {
  margin-top: 1rem;
}

.portal-text {
  margin-top: 0.625rem;
  font-size: 0.875rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.portal-notice {
  margin-top: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.375rem;
  background: var(--sage);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.portal-form {
  margin-top: 1rem;
}

/* The space after the last digit is made up for on the left, so that the digits are in the middle */
.portal-code {
  padding-left: calc(0.75rem + 0.4em);
  font-size: 1.5rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.4em;
  text-align: center;
}

.portal-more {
  margin-top: 0.875rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
}

/* The contact form, /kontakt: one card over the whole space next to the side panel, as an error's (see .error-page, which
   gives it its height too), with the form, or the thanks, in a column in its middle; the portal's fields */

.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.contact-body {
  width: 100%;
  max-width: 36rem;
}

/* The thanks, a few lines alone in the card: in its middle, as an error is */
.contact-thanks {
  text-align: center;
}

.contact-field + .contact-field {
  margin-top: 0.875rem;
}

.contact-optional {
  color: var(--ink-soft);
}

.portal-input.contact-textarea {
  display: block;
  height: auto;
  min-height: 10rem;
  padding-block: 0.625rem;
  line-height: 1.45;
  resize: vertical;
}

/* For robots only: out of sight, and out of the way of the keyboard (see ContactPage) */
.contact-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (min-width: 1000px) {
  .portal-title {
    font-size: 2rem;
  }

  .portal-card {
    padding: 1.5rem;
  }

  .portal-product-name {
    font-size: 1.3125rem;
  }

  .portal-account,
  .portal-text {
    font-size: 0.9375rem;
  }
}

/* An error (404, 500): one card over the space next to the side panel, down to the bottom of the screen, with the
   error in its middle. On a phone the side panel comes after it, as after a product. */

.shop-main:has(> .error-page) {
  order: 1;
}

/* Down to the bottom of the screen; the contact form's card too (see .contact), which a long form makes taller */
.error-page,
.contact {
  min-height: clamp(22rem, calc(100vh - 17rem), 40rem);
  min-height: clamp(22rem, calc(100svh - 17rem), 40rem);
}

.error-page {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem 2.5rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.error-sparkles {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 4.5rem;
  color: var(--pink);
}

.error-code {
  margin-top: 0.25rem;
  color: var(--rose);
  font-family: var(--serif);
  font-size: 6.5rem;
  line-height: 1;
}

.error-title {
  margin-top: 0.5rem;
  font-family: var(--serif);
  font-size: 1.875rem;
  line-height: 1.15;
}

.error-text {
  max-width: 34rem;
  margin-top: 0.875rem;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.error-page .hero-button {
  margin-top: 1.5rem;
}

.error-help {
  margin-top: 1.25rem;
  color: var(--ink-soft);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.error-help a {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

@media (min-width: 720px) {
  .error-page,
  .contact {
    min-height: clamp(26rem, calc(100vh - 13rem), 44rem);
    min-height: clamp(26rem, calc(100svh - 13rem), 44rem);
  }
}

@media (min-width: 1000px) {
  .error-page {
    padding: 3.5rem 2.5rem 3rem;
  }

  .error-sparkles {
    top: 1.25rem;
    right: 1.25rem;
    width: 7.5rem;
  }

  .error-code {
    font-size: 9rem;
  }

  .error-title {
    font-size: 2.5rem;
  }

  .error-text {
    font-size: 1.0625rem;
  }

  .error-help {
    font-size: 0.875rem;
  }
}

/* Search dialog, on the store's pages */

.search {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: rgb(250 246 238 / 0.88);
  color: var(--ink);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
}

.search[open] {
  display: flex;
  flex-direction: column;
}

.search::backdrop {
  background: transparent;
}

.search-top {
  flex-shrink: 0;
  padding: max(1rem, env(safe-area-inset-top)) 1rem 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  max-width: 640px;
  margin-inline: auto;
}

.search-form {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-inline: 1rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 0.875rem;
  background: var(--card);
  box-shadow: inset 0 1px 2px rgb(74 34 21 / 0.08);
}

.search-form-icon {
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 20px;
}

.search-input {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.0625rem;
  line-height: 1.5rem;
  -webkit-appearance: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--ink-soft);
  font-style: italic;
}

.search-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

.search-clear {
  display: flex;
  flex-shrink: 0;
  color: var(--ink-soft);
  font-size: 16px;
  transition: color 0.15s;
}

.search-clear:hover {
  color: var(--ink);
}

.search-close {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  font-size: 22px;
  box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
}

.search-results {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.search-results-inner {
  max-width: 640px;
  margin-inline: auto;
  padding: 1rem 1rem 1.5rem;
}

.search-empty {
  padding-block: 2.5rem;
  color: var(--ink-soft);
  font-style: italic;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-align: center;
}

.search-section {
  margin-top: 1.5rem;
}

.search-section:first-child {
  margin-top: 0;
}

.search-section h2 {
  padding-inline: 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.5rem;
}

.search-section ul {
  margin-top: 0.5rem;
}

.search-product {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
  transition: background-color 0.15s;
}

.search-product:hover {
  background: rgb(255 255 255 / 0.5);
}

.search-product-cover {
  flex-shrink: 0;
  width: 3.5rem;
  height: 3.5rem;
  overflow: hidden;
  border-radius: 0.5rem;
  background: var(--tile);
}

.search-product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-product-info {
  flex: 1;
  min-width: 0;
}

.search-product-name {
  display: block;
  overflow: hidden;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-product-price {
  display: flex;
  align-items: baseline;
  gap: 0.375rem;
  margin-top: 0.125rem;
  white-space: nowrap;
}

.search-product-price s {
  color: var(--ink-soft);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
}

.search-product-price span {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
}

.search-recent {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding-inline: 0.5rem;
}

.search-recent-term {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
  padding-block: 0.5rem;
  text-align: left;
}

.search-recent-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  background: var(--tile);
  color: var(--ink-soft);
  font-size: 18px;
}

.search-recent-text {
  overflow: hidden;
  font-size: 0.875rem;
  line-height: 1.25rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-recent-remove {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 9999px;
  color: var(--ink-soft);
  font-size: 16px;
}

.search-recent-remove:hover {
  color: var(--ink);
}

@media (min-width: 768px) {
  .search-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
  }
}
