/**
 * Weiss Products: front-end styles (In Stock page, home preview, product page).
 *
 * Reads the child theme's tokens (--weiss-*, --font-*) and falls back to the
 * Weiss design-guide values, so it looks right with or without the theme.
 * Type is set larger than the mockup on purpose (body 18–19px, labels 14–15px):
 * many of the shop's customers are older.
 */

.wpr-stock,
.wpr-product-page {
  --wpr-font-heading: var(--font-heading, 'Libre Caslon Text', Georgia, serif);
  --wpr-font-body:    var(--font-body, 'Work Sans', 'Helvetica Neue', Arial, sans-serif);
  --wpr-burgundy:     var(--weiss-burgundy, #7E1F2A);
  --wpr-burgundy-dark: var(--weiss-burgundy-dark, #5E1420);
  --wpr-accent:       var(--weiss-accent-red, #C8443F);
  --wpr-ink:          var(--weiss-ink, #1E1614);
  --wpr-text:         var(--wp--preset--color--text, #4A3D38);
  --wpr-muted:        var(--wp--preset--color--muted, #6B5C55);
  --wpr-espresso:     var(--weiss-espresso, #1A0F0D);
  --wpr-cream:        var(--weiss-cream, #F6F0E7);
  --wpr-line:         var(--weiss-line, #DCCFC0);
  --wpr-frame-light:  var(--weiss-frame-on-light, #C9B8AE);
  --wpr-label:        var(--weiss-on-dark-label, #E8C9C9);
  --wpr-section-pad:  var(--weiss-section-pad, clamp(64px, 9vw, 120px));
  --wpr-side-pad:     var(--weiss-side-pad, clamp(20px, 4vw, 40px));
  --wpr-in:           #3E8E5A;
  --wpr-freezer:      #2F6690; /* icy blue for "In the freezer" */
  --wpr-frame-width:  2px; /* white line inside product photos */
}

.wpr-stock *,
.wpr-stock *::before,
.wpr-stock *::after,
.wpr-product-page *,
.wpr-product-page *::before,
.wpr-product-page *::after {
  box-sizing: border-box;
}

.wpr-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================================================
   Section shell (In Stock page, preview, "Also in the counter")
   ============================================================================= */

.wpr-stock {
  background: var(--wpr-cream);
  padding: var(--wpr-section-pad) var(--wpr-side-pad);
  font-family: var(--wpr-font-body);
  color: var(--wpr-text);
}

.wpr-stock__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.wpr-stock__head { margin-bottom: clamp(28px, 4vw, 40px); }

.wpr-stock__title {
  margin: 0;
  font-family: var(--wpr-font-heading);
  font-weight: 700;
  font-size: clamp(2.75rem, 6.6vw, 5.25rem);
  line-height: 1;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--wpr-ink);
}

.wpr-stock__title--small {
  font-size: clamp(2.25rem, 4.6vw, 3.625rem);
  line-height: 1.02;
}

.wpr-stock__updated {
  margin: 14px 0 0;
  font-size: 1.0625rem;
  color: var(--wpr-muted);
}

/* Eyebrow: burgundy, wide tracking, led by a short red rule. */
.wpr-stock__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 14px;
  font-family: var(--wpr-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--wpr-burgundy);
}
.wpr-stock__eyebrow::before {
  content: '';
  flex: none;
  width: 40px;
  height: 2px;
  background: var(--wpr-accent);
}

.wpr-stock__empty {
  max-width: 40em;
  font-size: 1.25rem;
  line-height: 1.6;
}
.wpr-stock__empty a { color: var(--wpr-burgundy); font-weight: 600; }

/* =============================================================================
   Filter buttons
   ============================================================================= */

.wpr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 clamp(36px, 5vw, 56px);
}

.wpr-filter {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 22px;
  border: 1px solid var(--wpr-frame-light);
  border-radius: 0;
  background: transparent;
  font-family: var(--wpr-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--wpr-ink) !important;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.wpr-filter:hover {
  border-color: var(--wpr-burgundy);
  color: var(--wpr-burgundy) !important;
}
.wpr-filter[aria-current="true"] {
  background: var(--wpr-burgundy);
  border-color: var(--wpr-burgundy);
  color: #fff !important;
}
.wpr-filter:focus-visible {
  outline: 2px solid var(--wpr-burgundy);
  outline-offset: 3px;
}
.wpr-filter__count {
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.75;
}

/* Counter / Freezer: one joined bar above the category buttons. */
.wpr-where {
  display: inline-flex;
  flex-wrap: wrap;
  margin: 0 0 16px;
  border: 1px solid var(--wpr-ink);
}
.wpr-where__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  min-height: 52px;
  padding: 0 24px;
  font-family: var(--wpr-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: var(--wpr-ink) !important;
  transition: background-color .15s ease, color .15s ease;
}
.wpr-where__btn + .wpr-where__btn { border-left: 1px solid var(--wpr-ink); }
.wpr-where__btn:hover { background: rgba(30, 22, 20, 0.06); }
.wpr-where__btn[aria-current="true"] {
  background: var(--wpr-ink);
  color: #fff !important;
}
.wpr-where__btn[data-where="freezer"][aria-current="true"] { background: var(--wpr-freezer); }
.wpr-where__btn:focus-visible { outline: 2px solid var(--wpr-burgundy); outline-offset: 3px; }

.wpr-filter[hidden] { display: none; }
.wpr-where__short { display: none; }

/* Category dropdown: phones only (the buttons are used on wider screens).
   One framed bar: "SHOW" in burgundy on the left, the choice in the middle,
   and a burgundy block with a white arrow on the right, like the site's buttons. */
.wpr-cat-select { display: none; }
.wpr-cat-select__box {
  position: relative;
  display: block;
  background: #fff;
  box-shadow: 0 1px 0 rgba(30, 22, 20, 0.08);
}
.wpr-cat-select__label {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-family: var(--wpr-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--wpr-burgundy);
  pointer-events: none; /* taps go through to the dropdown */
}
.wpr-cat-select__box::before {
  /* the burgundy block on the right */
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 56px;
  background: var(--wpr-burgundy);
  pointer-events: none;
}
.wpr-cat-select__box::after {
  /* white chevron in the block */
  content: '';
  position: absolute;
  top: 50%;
  right: 23px;
  width: 9px;
  height: 9px;
  margin-top: -7px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  pointer-events: none;
}
.wpr-cat-select select {
  display: block;
  width: 100%;
  min-height: 58px;
  margin: 0;
  padding: 0 72px 0 88px; /* room for "SHOW" and the block */
  border: 1px solid var(--wpr-burgundy);
  border-radius: 0;
  background: transparent;
  font-family: var(--wpr-font-heading);
  font-size: 1.1875rem; /* 16px+ also stops phones zooming in */
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none; /* phones copy this into the picker list; capitals read as shouting */
  color: var(--wpr-ink);
  -webkit-appearance: none;
          appearance: none;
  cursor: pointer;
}
.wpr-cat-select option {
  font-family: var(--wpr-font-body);
  font-weight: 400;
  text-transform: none;
}
.wpr-cat-select select:focus-visible { outline: 2px solid var(--wpr-burgundy); outline-offset: 3px; }
.wpr-cat-select noscript .wpr-button { margin-top: 10px; }

/* -----------------------------------------------------------------------------
   Filters on phones: Counter/Freezer as one even three-part bar (label over
   count), and a plain dropdown for the category instead of 10 buttons.
   ----------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .wpr-where {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    margin-bottom: 22px;
  }
  .wpr-where__btn {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 8px 4px;
    font-size: 0.875rem;
    letter-spacing: 0.12em;
    text-align: center;
  }
  .wpr-where__long { display: none; }
  .wpr-where__short { display: inline; }
  .wpr-where__btn .wpr-filter__count { font-size: 0.875rem; }

  .wpr-filters { display: none; }
  .wpr-cat-select { display: block; margin: 0 0 clamp(28px, 6vw, 40px); }
}

.wpr-stock__none {
  font-size: 1.125rem;
  margin: 8px 0 0;
}
.wpr-stock__none[hidden] { display: none; }

/* =============================================================================
   Tiles: 4 across, 2 under 900px; under 500px a photo-left list
   ============================================================================= */

.wpr-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 56px) clamp(20px, 3vw, 40px);
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}
.wpr-tile { margin: 0; }
.wpr-tile[hidden] { display: none; }

.wpr-tile__link {
  display: block;
  color: inherit !important;
  text-decoration: none !important;
}
.wpr-tile__link:focus-visible {
  outline: 2px solid var(--wpr-burgundy);
  outline-offset: 6px;
}

.wpr-tile__photo {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--wpr-espresso);
}
/* Inset frame 12px inside the photo (design guide). */
.wpr-tile__photo::after {
  content: '';
  position: absolute;
  inset: 12px;
  border: var(--wpr-frame-width) solid rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.wpr-tile__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.wpr-tile__link:hover .wpr-tile__img { transform: scale(1.04); }

.wpr-tile__img--none {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: repeating-linear-gradient(135deg, #2B1E1B 0 16px, #231714 16px 32px);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-align: center;
  text-transform: uppercase;
  color: var(--wpr-label);
}

.wpr-tile__text {
  display: block;
  margin-top: 20px;
}
.wpr-tile__eyebrow {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--wpr-burgundy);
}
.wpr-tile__title {
  margin: 6px 0 8px !important;
  font-family: var(--wpr-font-heading) !important;
  font-weight: 700 !important;
  font-size: clamp(1.375rem, 1.8vw, 1.625rem) !important;
  line-height: 1.1 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase;
  color: var(--wpr-ink);
}
.wpr-tile__link:hover .wpr-tile__title { color: var(--wpr-burgundy); }
.wpr-tile__eyebrow--freezer { color: var(--wpr-freezer); }
.wpr-tile__maker {
  display: block;
  margin: -2px 0 8px;
  font-size: 0.9375rem;
  color: var(--wpr-muted);
}
.wpr-tile__blurb {
  display: block;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--wpr-text);
}

@media (prefers-reduced-motion: reduce) {
  .wpr-tile__img { transition: none; }
  .wpr-tile__link:hover .wpr-tile__img { transform: none; }
}

@media (max-width: 900px) {
  .wpr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones: two across, photo on top, name underneath. The description is
   left off here so the photo, not the text, leads. */
@media (max-width: 500px) {
  .wpr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 14px; }
  .wpr-tile__photo::after { inset: 7px; }
  .wpr-tile__text { margin-top: 12px; }
  .wpr-tile__eyebrow { font-size: 0.875rem; letter-spacing: 0.1em; }
  .wpr-tile__title { margin: 4px 0 4px !important; font-size: 1.125rem !important; line-height: 1.15 !important; letter-spacing: 0.01em !important; }
  .wpr-tile__maker { margin: 0; font-size: 0.9375rem; }
  .wpr-grid:not(.wpr-grid--teaser) .wpr-tile__blurb { display: none; }
  .wpr-tile__img--none { padding: 8px; font-size: 0.75rem; letter-spacing: 0.1em; }
}

/* =============================================================================
   Buttons
   ============================================================================= */

.wpr-stock__more {
  margin: clamp(40px, 5vw, 56px) 0 0;
  text-align: center;
}
.wpr-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 1px solid var(--wpr-burgundy);
  border-radius: 0;
  background: var(--wpr-burgundy);
  font-family: var(--wpr-font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #fff !important;
  transition: background-color .15s ease, color .15s ease;
}
.wpr-button:hover { background: var(--wpr-burgundy-dark); border-color: var(--wpr-burgundy-dark); }
.wpr-button--outline { background: transparent; color: var(--wpr-burgundy) !important; }
.wpr-button--outline:hover { background: var(--wpr-burgundy); color: #fff !important; }
.wpr-button:focus-visible { outline: 2px solid var(--wpr-burgundy); outline-offset: 3px; }

/* =============================================================================
   Product page
   ============================================================================= */

.wpr-product {
  padding: clamp(40px, 6vw, 80px) var(--wpr-side-pad) var(--wpr-section-pad);
  font-family: var(--wpr-font-body);
  color: var(--wpr-text);
}
.wpr-product__inner { max-width: 1200px; margin: 0 auto; }

.wpr-product__back {
  margin: 0 0 clamp(24px, 4vw, 40px);
  font-size: 1.0625rem;
}
.wpr-product__back a {
  color: var(--wpr-burgundy);
  font-weight: 600;
  text-decoration: none;
}
.wpr-product__back a:hover { text-decoration: underline; }

.wpr-product__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.wpr-product__photo {
  position: relative;
  aspect-ratio: 1 / 1;
  margin: 12px; /* room for the outline */
  outline: 1px solid var(--wpr-frame-light);
  outline-offset: 12px;
  background: var(--wpr-espresso);
}
.wpr-product__img,
.wpr-product__photo .wpr-tile__img--none {
  display: flex;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wpr-product__title {
  margin: 0 0 20px !important;
  font-family: var(--wpr-font-heading) !important;
  font-weight: 700 !important;
  font-size: clamp(2.25rem, 4.6vw, 3.625rem) !important;
  line-height: 1.02 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--wpr-ink);
}

.wpr-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--wpr-ink);
}
.wpr-badge::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--wpr-muted);
}
.wpr-badge--in::before { background: var(--wpr-in); }

.wpr-product__call {
  margin: 0 0 12px;
  font-size: 1.125rem;
}
.wpr-product__call a { color: var(--wpr-burgundy); font-weight: 600; white-space: nowrap; }

.wpr-product__description {
  margin-top: 24px;
  font-size: 1.1875rem;
  line-height: 1.7;
}
.wpr-product__description > :first-child { margin-top: 0; }

.wpr-product__cat { margin: 32px 0 0; }

@media (max-width: 900px) {
  .wpr-product__grid { grid-template-columns: 1fr; }
  .wpr-product__photo { max-width: 560px; }
}

/* =============================================================================
   Home teaser: "IN THE COUNTER / FREEZER"
   Heading left, button right, 3 tiles (photo, name, category). The dimmed word
   is outlined type; tapping it makes it solid and swaps the tiles.
   ============================================================================= */

.wpr-teaser__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: clamp(36px, 5vw, 56px);
}
.wpr-teaser__heading { min-width: 0; }

.wpr-teaser__title {
  margin: 0 !important;
  font-family: var(--wpr-font-heading) !important;
  font-weight: 700 !important;
  font-size: clamp(2.5rem, 6vw, 4.75rem) !important;
  line-height: 1 !important;
  letter-spacing: 0.03em !important;
  text-transform: uppercase;
  color: var(--wpr-ink);
}
.wpr-teaser__places { white-space: nowrap; }

.wpr-teaser__place {
  color: var(--wpr-ink) !important;
  text-decoration: none !important;
  transition: color .3s ease, -webkit-text-stroke-color .3s ease;
}
a.wpr-teaser__place { cursor: pointer; }
.wpr-teaser__place[aria-pressed="false"] { color: var(--wpr-muted) !important; opacity: 0.55; }
/* Outlined type for the word you can switch to. */
@supports (-webkit-text-stroke: 1px black) {
  .wpr-teaser__place[aria-pressed="false"] {
    opacity: 1;
    color: transparent !important;
    -webkit-text-stroke: 1.5px var(--wpr-frame-light);
  }
  .wpr-teaser__place[aria-pressed="false"]:hover,
  .wpr-teaser__place[aria-pressed="false"]:focus-visible {
    -webkit-text-stroke-color: var(--wpr-burgundy);
  }
}
.wpr-teaser__place:focus-visible { outline: 2px solid var(--wpr-burgundy); outline-offset: 6px; }
/* The freezer reads icy when it's the one showing. */
.wpr-teaser__place[data-wpr-place="freezer"][aria-pressed="true"] { color: var(--wpr-freezer) !important; }

.wpr-teaser__slash {
  margin: 0 0.12em;
  font-weight: 400;
  color: var(--wpr-frame-light);
}

.wpr-teaser__button { flex: none; }

/* Live eyebrow: a pulsing green dot instead of the red rule. */
.wpr-stock__eyebrow--live::before { display: none; }
.wpr-live-dot {
  position: relative;
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--wpr-in);
}
.wpr-live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--wpr-in);
  animation: wpr-pulse 2s ease-out infinite;
}
@keyframes wpr-pulse {
  from { transform: scale(1); opacity: 0.6; }
  to   { transform: scale(2.8); opacity: 0; }
}

/* Teaser grid: as many columns as tiles (3 by default), a list under 640px. */
.wpr-grid--teaser { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.wpr-grid--teaser[data-cols="1"] { grid-template-columns: minmax(0, 420px); }
.wpr-grid--teaser[data-cols="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wpr-grid--teaser[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wpr-grid--teaser[hidden] { display: none; }
.wpr-grid--teaser .wpr-tile__maker { margin: 6px 0 0; }

/* Swap: tiles rise and fade in one after another. */
.wpr-grid--teaser.is-entering .wpr-tile { animation: wpr-rise .5s ease both; }
.wpr-grid--teaser.is-entering .wpr-tile:nth-child(2) { animation-delay: .07s; }
.wpr-grid--teaser.is-entering .wpr-tile:nth-child(3) { animation-delay: .14s; }
.wpr-grid--teaser.is-entering .wpr-tile:nth-child(4) { animation-delay: .21s; }
@keyframes wpr-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .wpr-grid--teaser[data-cols="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .wpr-teaser__head { align-items: flex-start; flex-direction: column; }
  .wpr-teaser__places { white-space: normal; }
  .wpr-grid--teaser,
  .wpr-grid--teaser[data-cols] { grid-template-columns: 1fr; gap: 24px; }
  .wpr-grid--teaser .wpr-tile__link {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 16px;
    align-items: center;
  }
  .wpr-grid--teaser .wpr-tile__photo::after { inset: 6px; }
  .wpr-grid--teaser .wpr-tile__text { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .wpr-live-dot::after { animation: none; }
  .wpr-grid--teaser.is-entering .wpr-tile { animation: none; }
}
