/* ==========================================================================
   Da's Brabants — shop pages: home (/), winkel (/winkel), product (/product)
   --------------------------------------------------------------------------
   Loaded after /css/style.css. Only page-specific additions live here; all
   shared components (cards, chips, swatches, hero, …) come from style.css.

    1. Shared helpers
    2. Home
    3. Winkel
    4. Product
   ========================================================================== */


/* 1. Shared helpers
   ========================================================================== */

/* Four-item grids (featured, related): 2 → 2 → 4 columns, never 3 + 1 orphan. */
@media (min-width: 640px) and (max-width: 959.98px) {
  .product-grid--quad {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Cards inside <li> keep their full height in the grid. */
.product-grid > li {
  display: flex;
  flex-direction: column;
  min-inline-size: 0;
}

.product-grid > li > .product-card {
  flex: 1;
}

/* "Kon niet laden" block with a retry button. */
.load-error {
  max-inline-size: 42rem;
  margin-block: var(--space-2) var(--space-6);
}

.load-error .notice__body > * + * {
  margin-top: var(--space-2);
}

.load-error .notice__body .cluster,
.load-error .notice__body p:last-child {
  margin-top: var(--space-3);
}

/* Spam trap: out of sight for people and assistive tech. */
.hp-field {
  position: absolute !important;
  left: -10000px;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
}


/* 2. Home
   ========================================================================== */

/* Hero ------------------------------------------------------------------- */

/* Eyebrow as a white sticker: small text needs more contrast than white on --rood. */
.home-hero .eyebrow {
  padding: 0.4rem 0.8rem 0.4rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--wit);
  color: var(--rood-actie);
  box-shadow: 0 8px 18px -10px rgb(60 0 8 / 0.55);
  transform: rotate(-2deg);
}

.home-hero .eyebrow::before {
  box-shadow: 0 0 0 1px var(--rood);
}

/* The plate stays round and sized while the photo loads; the product photo is clipped to the circle. */
.home-hero .hero__plate {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  overflow: hidden;
}

.home-hero .hero__plate > .product-image {
  inline-size: 100%;
  block-size: 100%;
}

@media (min-width: 960px) {
  .home-hero .hero__actions {
    margin-top: var(--space-2);
  }
}

/* Price tag pinned to the plate: one tap to the product. */
.home-hero a.hero-tag {
  position: absolute;
  z-index: 2;
  inset-inline-end: 0;
  bottom: 3%;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  max-inline-size: 100%;
  min-block-size: var(--tap);
  padding: 0.4rem 0.4rem 0.4rem 1rem;
  border-radius: var(--radius-pill);
  background: var(--wit);
  color: var(--inkt);
  font-size: var(--fs-sm);
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 16px 30px -14px rgb(60 0 8 / 0.6);
  transform: rotate(2deg);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.home-hero a.hero-tag:hover {
  color: var(--inkt);
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 20px 36px -14px rgb(60 0 8 / 0.7);
}

.hero-tag__name {
  min-inline-size: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-tag__price {
  color: var(--rood-actie);
  font-weight: 900;
  white-space: nowrap;
}

.hero-tag__go {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: 50%;
  background: var(--rood-actie);
  color: var(--wit);
}

@media (min-width: 640px) {
  .home-hero a.hero-tag {
    font-size: 0.9375rem;
    inset-inline-end: -2%;
  }
}

/* USP's ------------------------------------------------------------------ */

.home-usps {
  padding-bottom: calc(var(--section-space) * 0.5);
}

.home-usps .usp strong {
  color: var(--inkt);
}

/* Very narrow phones: icon above the text, so the two columns keep readable lines. */
@media (max-width: 419.98px) {
  .home-usps .usp {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }
}

/* Categories ------------------------------------------------------------- */

/* "Op zoek naar een cadeau?" link to the gift guides under the tiles. */
.home-categories__gifts {
  margin: var(--space-5) 0 0;
}

/* The tile picture is a product photo: fill the square, also when the photo is wider than the tile. */
.home-categories .category-tile__media {
  overflow: hidden;
}

.home-categories .category-tile__media > .product-image {
  object-fit: cover;
}

/* Two tiles side by side on phones: a bit tighter, so the title fits on one line. */
@media (max-width: 479.98px) {
  .home-categories .category-tile__body {
    padding: 0.7rem 0.75rem 0.85rem;
  }

  .home-categories .category-tile__title {
    font-size: 1rem;
  }

  .home-categories .category-tile__title .icon {
    display: none;
  }
}

/* Wide screens: the tiles (Mokken, Hoodies) fill the row, each with the photo next to the text. */
@media (min-width: 960px) {
  .home-categories .category-tiles {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  }

  .home-categories .category-tile {
    flex-direction: row;
    align-items: stretch;
  }

  .home-categories .category-tile__media {
    flex: 0 0 260px;
  }

  .home-categories .category-tile__body {
    flex: 1;
    align-content: center;
    gap: 0.5rem;
    padding: var(--space-5) var(--space-6);
  }

  .home-categories .category-tile__title {
    justify-content: flex-start;
    gap: var(--space-3);
    font-size: var(--fs-h3);
  }

  .home-categories .category-tile__text {
    font-size: var(--fs-base);
  }
}

/* Brabants voor beginners ------------------------------------------------- */

/* Deep red section with a flag band on top and bottom. */
.home-words {
  position: relative;
  padding-block: calc(var(--section-space) + 12px);
}

.home-words::before,
.home-words::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  block-size: 12px;
  background: var(--bont-gradient) 0 0 / 12px 12px;
}

.home-words::before { top: 0; }
.home-words::after { bottom: 0; }

.home-words .section-head p:not(.eyebrow) {
  color: rgb(255 255 255 / 0.88);
  font-size: var(--fs-lg);
}

.words {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 480px) {
  .words {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Five cards in two columns: the last one spans the row. */
  .word:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 960px) {
  .words {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--space-4);
  }

  .word:last-child:nth-child(odd) {
    grid-column: auto;
  }

  /* Loosely "stuck" on the wall. */
  .word:nth-child(odd) { transform: rotate(-1.2deg); }
  .word:nth-child(even) { transform: rotate(1deg) translateY(6px); }
}

.word {
  display: grid;
  align-content: start;
  gap: 0.3rem;
  padding: 1.1rem 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--wit);
  color: var(--inkt);
  box-shadow: 0 16px 30px -18px rgb(0 0 0 / 0.65);
}

.word__term {
  margin-bottom: 0.5rem;
}

.word__term .stamp {
  font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.625rem);
}

.word__meaning {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.word__example {
  color: var(--grijs);
  font-size: var(--fs-sm);
  font-style: italic;
  line-height: 1.45;
}

/* About teaser ----------------------------------------------------------- */

.home-about__inner {
  display: grid;
  gap: clamp(2rem, 1.5rem + 3vw, 4.5rem);
  align-items: center;
}

@media (min-width: 960px) {
  .home-about__inner {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }
}

/* Chequered "flag" with a white plate and the tagline stamp. */
.home-about__art {
  display: grid;
  place-items: center;
  inline-size: calc(100% - 16px);
  max-inline-size: 540px;
  aspect-ratio: 5 / 4;
  justify-self: center;
  border-radius: var(--radius-lg);
  background: var(--bont-gradient) 0 0 / 56px 56px;
  box-shadow: 0 0 0 8px var(--wit), var(--shadow-lg);
  transform: rotate(-2deg);
}

.home-about__plate {
  display: grid;
  place-items: center;
  inline-size: 66%;
  aspect-ratio: 1;
  padding: 1rem;
  border-radius: 50%;
  background: var(--wit);
  box-shadow: 0 0 0 12px rgb(255 255 255 / 0.5), var(--shadow-lg);
  text-align: center;
}

.home-about__plate .stamp {
  --stamp-gap: var(--wit);
  font-size: clamp(1.125rem, 0.8rem + 1.8vw, 2.125rem);
}

.home-about__text {
  display: grid;
  gap: var(--space-4);
  justify-items: start;
}

.home-about__text .lead {
  color: var(--inkt);
}

.home-about__text > p:not(.eyebrow, .lead) {
  max-inline-size: 62ch;
  color: var(--grijs);
}

/* Newsletter ------------------------------------------------------------- */

.newsletter {
  display: grid;
  gap: var(--space-5);
  align-items: center;
}

@media (min-width: 960px) {
  .newsletter {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: var(--space-7);
    padding: calc(var(--space-7) + 12px) var(--space-7) var(--space-7);
  }
}

.newsletter__intro {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.newsletter__intro > p:not(.eyebrow) {
  color: var(--grijs);
  max-inline-size: 48ch;
}

.newsletter__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
}

.newsletter__title {
  font-size: var(--fs-h2);
}

.newsletter__stamp {
  font-size: 0.9375rem;
  transform: rotate(5deg);
}

.newsletter__form .hint a {
  color: inherit;
}

.newsletter__alert {
  margin-top: var(--space-3);
}

.newsletter__success {
  display: grid;
  gap: var(--space-3);
  padding: var(--space-5);
  border: 1px solid #BFE3CD;
  border-radius: var(--radius-md);
  background: var(--succes-zacht);
}

.newsletter__success-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-h3);
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--succes);
}

/* Discount code "coupon" with a dashed cut-out edge. */
.coupon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) var(--space-4);
  border: 2px dashed var(--rood-actie);
  border-radius: var(--radius-md);
  background: var(--wit);
}

.coupon__label {
  flex-basis: 100%;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grijs);
}

.coupon__code {
  font-family: var(--font-mono);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem);
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--rood-actie);
  user-select: all;
}

.coupon__copy {
  margin-inline-start: auto;
}


/* 3. Winkel
   ========================================================================== */

.shop {
  padding-top: var(--space-5);
}

/* Chips + search on one line when there is room, otherwise stacked. */
.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
}

.shop-chips {
  flex: 1 1 38rem;
  min-inline-size: 0;
}

.shop-search {
  flex: 1 1 18rem;
  max-inline-size: 28rem;
}

.chip__count:empty {
  display: none;
}

/* Result count + sort. */
.shop-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-block: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--lijn);
}

.shop-count {
  font-weight: 750;
  color: var(--inkt);
}

.shop-sort {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.shop-sort__label {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--grijs);
  white-space: nowrap;
}

.shop-sort .select {
  inline-size: auto;
  min-inline-size: 10.5rem;
  font-weight: 650;
}

.shop-empty {
  padding-block: var(--space-6) var(--space-7);
}

.shop-empty .small {
  margin-top: var(--space-2);
}


/* 4. Product
   ========================================================================== */

.pdp-crumbs {
  padding-block: var(--space-4);
}

@media (min-width: 960px) {
  .pdp-crumbs {
    padding-block: var(--space-5);
  }
}

.pdp-state {
  margin-bottom: var(--section-space);
}

.pdp {
  display: grid;
  gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);
  align-items: start;
  padding-bottom: var(--section-space);
}

@media (min-width: 960px) {
  .pdp {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  }
}

/* Image ------------------------------------------------------------------ */

.pdp__media {
  position: relative;
  inline-size: 100%;
  max-inline-size: 640px;
  margin-inline: auto;
}

/* The image stays in view while you pick colour and size. (After the rule above:
   with position: relative winning, "top" would push the image down instead.) */
@media (min-width: 960px) {
  .pdp__media {
    position: sticky;
    top: calc(var(--header-h) + var(--space-4));
  }
}

.pdp__stage {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.pdp__stage:not(.skeleton) {
  border: 1px solid var(--lijn);
  background: radial-gradient(circle at 50% 42%, var(--wit) 0 46%, #FFF4EE 74%, var(--rood-zacht) 100%);
  box-shadow: var(--shadow-sm);
}

.pdp__stage > .product-image {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

.pdp__stage.is-swapping > .product-image {
  animation: pdp-swap 0.35s var(--ease);
}

.pdp__badge {
  position: absolute;
  z-index: 1;
  top: 1rem;
  left: 1rem;
  pointer-events: none;
}

/* Photo gallery (product.images as a list): the photo in view + thumbnail buttons. */
.pdp__stage--photos {
  touch-action: pan-y pinch-zoom; /* a horizontal swipe shows the next/previous photo */
}

.pdp__stage--photos > .pdp__photo {
  -webkit-user-drag: none;
  user-select: none;
}

.pdp-thumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-3);
  padding: 0;
  list-style: none;
}

.pdp-thumb {
  position: relative;
  display: block;
  inline-size: clamp(64px, 19vw, 88px);
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--lijn);
  border-radius: var(--radius-md);
  background: var(--wit);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.72;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.pdp-thumb__img {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
}

/* Frame on top of the photo: thin for the others, thick and red for the photo in view. */
.pdp-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.pdp-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pdp-thumb[aria-pressed="true"] {
  opacity: 1;
  box-shadow: var(--shadow-sm);
}

.pdp-thumb[aria-pressed="true"]::after {
  box-shadow: inset 0 0 0 3px var(--rood-actie);
}

.pdp-thumb:focus-visible {
  opacity: 1;
  outline-offset: 3px;
}

/* Wide screens: the thumbnails in a column left of the photo, so they are in
   view together with the photo (also while it sticks next to the info column). */
@media (min-width: 960px) {
  .pdp__media--gallery {
    --pdp-thumb: 76px;
    display: grid;
    grid-template-columns: var(--pdp-thumb) minmax(0, 1fr);
    gap: var(--space-3);
    align-items: start;
    max-inline-size: calc(640px + var(--pdp-thumb) + var(--space-3));
  }

  .pdp__media--gallery .pdp__stage {
    grid-column: 2;
    grid-row: 1;
    /* never taller than the window below the header */
    max-inline-size: max(360px, calc(100vh - var(--header-h) - 2 * var(--space-4)));
  }

  .pdp__media--gallery .pdp-thumbs {
    grid-column: 1;
    grid-row: 1;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    margin-top: 0;
  }

  .pdp__media--gallery .pdp-thumb {
    inline-size: var(--pdp-thumb);
  }

  .pdp__media--gallery .pdp-thumb:hover {
    transform: translateX(2px);
  }

  .pdp__media--gallery .pdp__badge {
    left: calc(var(--pdp-thumb) + var(--space-3) + 1rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .pdp-thumb:hover,
  .pdp__media--gallery .pdp-thumb:hover {
    transform: none;
  }
}

/* Info column ------------------------------------------------------------ */

.pdp__info {
  display: grid;
  gap: var(--space-5);
  align-content: start;
  min-inline-size: 0;
}

.pdp__heading {
  display: grid;
  gap: var(--space-3);
  justify-items: start;
}

.pdp__category {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

@media (pointer: coarse) {
  .pdp__category { min-block-size: var(--tap); }
}

.pdp__category:hover {
  color: var(--rood-hover);
  text-decoration: underline;
}

.pdp__title {
  font-size: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

/* "Betekenis: …" as a small speech bubble. */
.pdp__meaning {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: var(--space-1);
  padding: 0.7rem 1rem;
  border-radius: var(--radius-md);
  background: var(--rood-zacht);
  font-size: 1.0625rem;
  line-height: 1.45;
}

.pdp__meaning::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 1.4rem;
  inline-size: 14px;
  block-size: 14px;
  background: inherit;
  transform: rotate(45deg);
  border-radius: 2px;
}

.pdp__meaning .icon {
  margin-top: 0.12em;
  color: var(--rood-actie);
}

.pdp__meaning-label {
  font-weight: 800;
}

.pdp__price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
}

.pdp__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.6rem;
}

.pdp__price .price--lg {
  font-size: clamp(1.75rem, 1.5rem + 1vw, 2.25rem);
}

.pdp__vat {
  font-size: var(--fs-sm);
  color: var(--grijs);
}

.pdp__short {
  font-size: var(--fs-lg);
  line-height: 1.5;
}

/* Buy box ---------------------------------------------------------------- */

.buy-box {
  display: grid;
  gap: var(--space-5);
  padding: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  border: 1px solid var(--lijn);
  border-radius: var(--radius);
  background: var(--wit);
  box-shadow: var(--shadow-sm);
}

.buy-box__options {
  display: grid;
  gap: var(--space-5);
}

.buy-box__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.buy-box__row .qty {
  flex: none;
}

/* Next to the stepper when there is room; otherwise full width on its own row
   (never a label broken over two lines). */
.buy-box__submit {
  flex: 1 1 12rem;
  padding-inline: 1.25rem;
  white-space: nowrap;
}

/* Brief green confirmation after adding. */
.buy-box__submit.is-added {
  --btn-bg: var(--succes);
  --btn-bg-hover: #186238;
  --btn-shadow: 0 8px 18px -8px rgb(31 122 69 / 0.6);
}

.buy-box__submit.is-added .icon {
  animation: pdp-pop 0.4s var(--ease-bounce);
}

.buy-box__stock {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 650;
  line-height: 1.45;
  color: var(--succes);
}

.buy-box__stock .icon {
  margin-top: 0.05em;
}

.buy-box__stock.is-soldout {
  color: var(--rood-actie);
}

.sizes .field-error {
  margin-top: var(--space-3);
}

.size-help {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin-top: var(--space-3);
  font-size: var(--fs-sm);
  color: var(--grijs);
}

.size-help .icon {
  margin-top: 0.1em;
}

/* About & delivery ------------------------------------------------------- */

.pdp__section {
  display: grid;
  gap: var(--space-3);
}

.pdp__subtitle,
.delivery-box__title {
  font-size: var(--fs-h4);
  font-weight: 850;
}

.pdp__section p {
  line-height: 1.65;
}

.pdp__section .check-list {
  margin-top: var(--space-2);
}

.delivery-box {
  padding: clamp(1rem, 0.75rem + 1vw, 1.5rem);
  border-radius: var(--radius);
  background: var(--rood-zacht);
}

.delivery-box__title {
  margin-bottom: var(--space-4);
}

.delivery-box__list {
  display: grid;
  gap: var(--space-4);
  list-style: none;
  padding: 0;
}

.delivery-box__list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}

.delivery-box__list strong {
  display: block;
}

.delivery-box__icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  inline-size: 40px;
  block-size: 40px;
  border-radius: 50%;
  background: var(--wit);
  color: var(--rood-actie);
}

/* Related ---------------------------------------------------------------- */

.pdp-related {
  border-top: 1px solid var(--lijn);
}

/* Motion ----------------------------------------------------------------- */

@keyframes pdp-swap {
  from { opacity: 0.3; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes pdp-pop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

@media print {
  .buy-box,
  .pdp-thumbs,
  .pdp-related,
  .home-newsletter {
    display: none !important;
  }
}
