/* GRÜns-style inline buy box — mid-page product panel */
html {
  scroll-behavior: smooth;
}

.buy-box-section {
  scroll-margin-top: 24px;
}

.buy-box-section .section-inner {
  max-width: 980px;
}

.buy-box.product-panel {
  margin-top: 8px;
  align-items: stretch;
}

.buy-box-media {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100%;
  background: var(--sand, #f7f4ef);
}

.buy-box-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 16px 12px;
  min-width: 0;
}

.buy-box-details {
  flex: 1;
  padding: 4px 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.buy-box-desc {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.buy-box-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.buy-box-detail-list li {
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  padding-left: 14px;
  position: relative;
}

.buy-box-detail-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--dusty-blue);
}

.buy-box-detail-list strong {
  color: var(--charcoal);
  font-weight: 600;
}

.buy-box-gallery-main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--white);
  overflow: hidden;
}

.buy-box-gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.buy-box-gallery-thumbs {
  display: flex;
  flex-direction: row;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 44, 44, 0.28) transparent;
}

.buy-box-gallery-thumbs::-webkit-scrollbar {
  height: 6px;
}

.buy-box-gallery-thumbs::-webkit-scrollbar-thumb {
  background: rgba(44, 44, 44, 0.28);
  border-radius: 999px;
}

.gallery-thumb {
  appearance: none;
  border: 2px solid transparent;
  border-radius: 4px;
  padding: 0;
  width: 64px;
  height: 64px;
  overflow: hidden;
  cursor: pointer;
  background: var(--white);
  flex-shrink: 0;
  transition: border-color 0.15s, opacity 0.15s;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumb:hover {
  border-color: rgba(44, 44, 44, 0.2);
}

.gallery-thumb.is-active {
  border-color: var(--charcoal);
}

.gallery-thumb:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--charcoal);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(26, 26, 26, 0.12);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.buy-box-gallery-main:hover .gallery-nav,
.gallery-nav:focus-visible {
  opacity: 1;
}

.gallery-prev {
  left: 12px;
}

.gallery-next {
  right: 12px;
}

.gallery-nav:disabled {
  display: none;
}

.buy-box-gallery:not(.has-multiple) .buy-box-gallery-thumbs,
.buy-box-gallery:not(.has-multiple) .gallery-nav {
  display: none;
}

.buy-box-gallery:not(.has-multiple) {
  padding: 0;
}

.buy-box-gallery:not(.has-multiple) + .buy-box-details {
  padding-top: 16px;
}

.buy-box-gallery:not(.has-multiple) .buy-box-gallery-main {
  aspect-ratio: auto;
  min-height: 440px;
}

.buy-box-lede {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 4px;
  max-width: 38ch;
}

.buy-box-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 16px;
}

.buy-box-rating strong {
  color: var(--charcoal);
  font-weight: 600;
}

.buy-box-stars {
  letter-spacing: 1px;
  color: var(--gold);
  font-size: 13px;
}

.size-picker {
  margin: 0 0 22px;
}

.size-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}

.size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-option {
  appearance: none;
  border: 1px solid rgba(44, 44, 44, 0.14);
  background: var(--white);
  color: var(--charcoal);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 11px 16px;
  border-radius: 4px;
  cursor: pointer;
  min-width: 72px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.size-option:hover {
  border-color: var(--dusty-blue);
}

.size-option.is-selected {
  border-color: var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
}

.size-option:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.size-option.is-disabled,
.size-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.color-picker {
  margin: 0 0 22px;
}

.color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.color-option {
  appearance: none;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: var(--swatch, #cccccc);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s, transform 0.15s;
  box-shadow: inset 0 0 0 1px rgba(44, 44, 44, 0.14);
}

.color-option.is-light {
  box-shadow: inset 0 0 0 1px rgba(44, 44, 44, 0.24);
}

.color-option:hover {
  transform: scale(1.06);
}

.color-option.is-selected {
  border-color: var(--charcoal);
  box-shadow:
    0 0 0 2px var(--white),
    0 0 0 4px var(--charcoal);
}

.color-option:focus-visible {
  outline: none;
  box-shadow:
    var(--focus-ring),
    inset 0 0 0 1px rgba(44, 44, 44, 0.14);
}

.color-option.is-selected:focus-visible {
  box-shadow:
    var(--focus-ring),
    0 0 0 2px var(--white),
    0 0 0 4px var(--charcoal);
}

.buy-box-cta {
  width: 100%;
  text-align: center;
  margin-top: 0;
  border: none;
  cursor: pointer;
  font: inherit;
}

.buy-box-cta:disabled {
  opacity: 0.72;
  cursor: wait;
}

.price-installments {
  font-size: 13px;
  color: var(--muted);
  margin: -2px 0 6px;
}

.buy-box-guarantees {
  list-style: none;
  margin: 16px 0 0;
  padding: 14px 0 0;
  border-top: 1px solid rgba(44, 44, 44, 0.08);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  text-align: center;
}

.buy-box-guarantees li {
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

.buy-box-guarantees strong {
  display: block;
  font-size: 13px;
  color: var(--charcoal);
  font-weight: 600;
}

.buy-box-quote {
  margin: 18px 0 0;
  padding: 14px 16px;
  background: var(--white);
  border-left: 3px solid var(--gold);
  border-radius: 2px;
}

.buy-box-quote p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--charcoal);
  font-style: italic;
}

.buy-box-quote cite {
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
}

.hero-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin: -12px 0 18px;
}

.hero-rating strong {
  color: var(--charcoal);
  font-weight: 600;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.compare-table {
  max-width: 820px;
  margin: 8px auto 0;
  background: var(--white);
  border-radius: 4px;
  border: 1px solid rgba(44, 44, 44, 0.06);
  box-shadow: 0 16px 40px rgba(26, 26, 26, 0.05);
  overflow: hidden;
}

.compare-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  align-items: center;
  border-top: 1px solid rgba(44, 44, 44, 0.06);
}

.compare-row > span {
  padding: 16px 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.compare-row > span[role="rowheader"] {
  font-weight: 600;
  color: var(--charcoal);
}

.compare-row > .compare-us {
  background: rgba(122, 158, 159, 0.08);
  color: var(--charcoal);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.compare-head {
  border-top: none;
}

.compare-head > span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.compare-head > .compare-us {
  color: var(--charcoal);
  justify-content: flex-start;
}

.compare-yes {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dusty-blue);
  position: relative;
}

.compare-yes::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 4px;
  height: 8px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.compare-cta {
  text-align: center;
  margin-top: 32px;
}

.sticky-buy {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(44, 44, 44, 0.1);
  box-shadow: 0 -8px 24px rgba(26, 26, 26, 0.08);
  transform: translateY(110%);
  transition: transform 0.25s ease;
}

.sticky-buy.is-visible {
  transform: translateY(0);
}

.sticky-buy-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sticky-buy-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sticky-buy-info strong {
  font-size: 15px;
  color: var(--charcoal);
  font-weight: 600;
}

.sticky-buy-info span {
  font-size: 13px;
  color: var(--muted);
}

.sticky-buy-cta {
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}

body:has(.sticky-buy) {
  padding-bottom: 84px;
}

@media (prefers-reduced-motion: reduce) {
  .sticky-buy {
    transition: none;
  }
}

.buy-box-trust {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.buy-box-trust li {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.buy-box-trust li::before {
  content: "✓";
  color: var(--dusty-blue);
  font-weight: 700;
  flex-shrink: 0;
}

.buy-box-checkout-note {
  font-size: 12px;
  color: var(--muted);
  margin: 12px 0 0;
  line-height: 1.5;
}

@media (max-width: 860px) {
  .buy-box.product-panel {
    grid-template-columns: 1fr;
  }

  .buy-box-gallery {
    padding: 12px 12px 0;
  }

  .buy-box-media {
    display: contents;
  }

  .buy-box-gallery {
    order: 1;
    background: var(--sand, #f7f4ef);
  }

  .buy-box .product-copy {
    order: 2;
  }

  .buy-box-details {
    order: 3;
    padding: 20px 24px 28px;
    background: var(--sand, #f7f4ef);
  }

  .compare-row {
    grid-template-columns: 0.9fr 1.2fr 1fr;
  }

  .compare-row > span {
    padding: 12px 10px;
    font-size: 13px;
  }

  .compare-yes {
    display: none;
  }

  .sticky-buy-inner {
    padding: 10px 16px;
  }

  .sticky-buy-info strong {
    font-size: 14px;
  }

  .sticky-buy-cta {
    padding: 12px 18px;
    font-size: 14px;
  }

  body:has(.sticky-buy) {
    padding-bottom: 72px;
  }

  .buy-box-gallery-main {
    aspect-ratio: 4 / 3;
  }

  .buy-box-gallery:not(.has-multiple) .buy-box-gallery-main {
    min-height: 280px;
  }

  .gallery-nav {
    opacity: 1;
  }

  .buy-box .product-copy {
    padding: 32px 24px 36px;
  }

  .buy-box .price-line {
    font-size: 34px;
  }
}
