/* Editorial shop additions. Loaded after styles.css. */
:root {
  --paper: #fbf9f3;
  --shop-white: #fffefb;
  --shop-blue: #e5f0f3;
  --shop-border: #d9e1df;
  --shop-soft-ink: #526971;
  --shop-sand: #ecd4b2;
  --shop-radius: 12px;
  --shelf-card-width: 390px;
  --shelf-gap: 22px;
}

html {
  scroll-padding-top: 118px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
}

.site-header::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  z-index: -1;
  background: rgba(251, 249, 243, .96);
  border-bottom: 1px solid rgba(37, 62, 75, .08);
  box-shadow: 0 3px 20px rgba(37, 62, 75, .025);
}

@supports (backdrop-filter: blur(12px)) {
  .site-header::before {
    background: rgba(251, 249, 243, .9);
    backdrop-filter: blur(12px);
  }
}

.nav a,
.text-link,
.article-read {
  transition: color .2s ease, border-color .2s ease;
}

.hero {
  border-radius: 10px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 25px;
  margin-top: 26px;
}

.hero-actions .button {
  min-height: 48px;
  padding: 12px 21px;
  gap: 22px;
  border-radius: 4px;
}

.hero .hero-actions .text-link {
  margin-top: 0;
  font-size: 12px;
  gap: 16px;
}

.hero-stamp {
  position: absolute;
  left: 29px;
  bottom: 27px;
  display: grid;
  place-items: center;
  width: 108px;
  height: 108px;
  color: var(--ink);
  border-radius: 50%;
  background: rgba(251, 249, 243, .9);
  box-shadow: 0 2px 12px rgba(37, 62, 75, .04);
  pointer-events: none;
}

.hero-stamp svg {
  display: block;
  width: 100%;
  height: 100%;
  transform-origin: center;
  animation: stamp-spin 60s linear infinite;
}

.hero-stamp svg text {
  fill: currentColor;
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: .18em;
}

.hero-stamp > span {
  position: absolute;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1;
  letter-spacing: .08em;
}

@keyframes stamp-spin {
  to { transform: rotate(360deg); }
}

.section {
  padding-top: 88px;
}

.section h2,
.picks-section h2,
.shop-section h2 {
  font-family: var(--serif);
  font-size: clamp(27px, 2.55vw, 34px);
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .06em;
  margin-top: 10px;
}

.section-head {
  margin-bottom: 32px;
}

.section-head .side-note {
  max-width: 320px;
  line-height: 2;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .2em;
}

.purpose {
  border-radius: 8px;
  border-color: rgba(37, 62, 75, .025);
}

.purpose h3 {
  letter-spacing: .025em;
}

.featured,
.note-invite,
.guide-hero {
  border-radius: 9px;
}

.picks-section,
.shop-section {
  padding-top: 92px;
  min-width: 0;
}

.shelf-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin: -5px 0 19px;
}

.motion-step,
.motion-toggle {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 9px 14px;
  border: 1px solid #bccdcf;
  background: transparent;
  color: var(--ink);
  border-radius: 30px;
  line-height: 1;
  transition: background .2s ease, border-color .2s ease;
}

.motion-step {
  width: 44px;
  padding: 9px;
  font-size: 20px;
}

.motion-step svg {
  width: 18px;
  height: 18px;
}

.motion-toggle {
  gap: 8px;
  font-size: 11px;
  letter-spacing: .025em;
  padding-inline: 17px;
}

.motion-step:disabled,
.motion-toggle:disabled {
  opacity: .45;
  cursor: default;
}

.shelf-window {
  width: 100%;
  max-width: 1160px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 2px;
  scrollbar-width: thin;
  scrollbar-color: #a7bbc1 transparent;
  padding: 7px 0 17px;
  border-radius: var(--shop-radius);
  -webkit-overflow-scrolling: touch;
}

.shelf-window.is-looping {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.shelf-track {
  display: flex;
  align-items: stretch;
  width: max-content;
  gap: var(--shelf-gap);
}

.shelf-window.is-looping .shelf-track {
  will-change: transform;
}

.shelf-card {
  flex: 0 0 var(--shelf-card-width);
  width: var(--shelf-card-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  background: var(--shop-white);
  scroll-snap-align: start;
  box-shadow: 0 5px 16px rgba(37, 62, 75, .025);
}

.shelf-card:focus-within,
.product-card:focus-within {
  outline: 2px solid #9f744e;
  outline-offset: 3px;
}

.shelf-card .photo {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--shop-blue);
  border-bottom: 1px solid rgba(37, 62, 75, .06);
}

.shelf-card .photo a {
  display: block;
  height: 100%;
}

.shelf-card .photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shelf-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 23px 25px 25px;
}

.product-kicker {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 10px;
  line-height: 1.6;
  letter-spacing: .075em;
  color: var(--shop-soft-ink);
}

.pr-label,
.product-pr,
.ad-label {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 6px;
  border: 1px solid #a6b8be;
  border-radius: 3px;
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: .06em;
  color: #4d6671;
  background: transparent;
}

.product-name {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1.65;
  letter-spacing: .025em;
  margin-top: 11px;
}

.product-tagline {
  font-size: 12px;
  line-height: 1.95;
  color: var(--shop-soft-ink);
  margin-top: 12px;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 22px;
}

.product-actions a,
.amazon-button,
.story-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 17px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: .025em;
  text-align: center;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.product-actions a,
.amazon-button {
  background: var(--shop-sand);
  color: var(--ink);
  border-color: #d7b88f;
}

.story-button {
  background: transparent;
  color: var(--ink);
  border-color: #b7c7cb;
}

.product-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 0 27px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--shop-border);
}

.product-tabs button,
.product-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 9px 20px;
  border: 1px solid #bccdd1;
  border-radius: 28px;
  background: transparent;
  color: var(--shop-soft-ink);
  font-size: 12px;
  line-height: 1.5;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.product-tabs [aria-pressed="true"],
.product-tabs [aria-selected="true"],
.product-tabs .is-active {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 31px 28px;
}

.product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--shop-white);
  border: 1px solid var(--shop-border);
  border-radius: var(--shop-radius);
  box-shadow: 0 8px 28px rgba(37, 62, 75, .025);
}

.product-photo {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--shop-blue);
  border-bottom: 1px solid rgba(37, 62, 75, .06);
}

.product-photo a {
  display: block;
  height: 100%;
}

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

.product-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 31px 31px;
}

.product-copy h3 {
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  line-height: 1.6;
  letter-spacing: .025em;
  margin-top: 12px;
}

.product-copy > p:not(.product-kicker):not(.product-fit):not(.product-caution) {
  font-size: 13px;
  line-height: 2;
  color: var(--shop-soft-ink);
  margin-top: 13px;
}

.product-fit {
  padding-top: 18px;
  border-top: 1px solid var(--shop-border);
  margin-top: 21px;
  font-size: 13px;
  line-height: 1.95;
  color: #3d5965;
}

.product-caution {
  font-size: 12px;
  line-height: 1.95;
  color: #6b6256;
  margin-top: 10px;
}

.product-fit strong,
.product-caution strong {
  font-weight: 600;
}

.product-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 23px;
}

.product-detail {
  margin-top: 22px;
  border-top: 1px solid var(--shop-border);
  font-size: 12px;
  line-height: 1.95;
  color: var(--shop-soft-ink);
}

.product-detail summary {
  cursor: pointer;
  padding: 14px 4px 7px 0;
  min-height: 44px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 500;
  list-style-position: inside;
}

.product-detail[open] summary {
  padding-bottom: 12px;
}

.product-detail p + p {
  margin-top: 8px;
}

.product-detail a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 90;
  background: #759eae;
  transform: scaleX(0);
  transform-origin: left center;
  pointer-events: none;
}

.back-to-top {
  position: fixed;
  right: max(22px, calc((100vw - 1248px) / 2));
  bottom: 24px;
  z-index: 45;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-width: 48px;
  min-height: 48px;
  padding: 11px 15px;
  border: 1px solid #b8c9cf;
  border-radius: 30px;
  background: rgba(251, 249, 243, .97);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(37, 62, 75, .07);
  font-size: 10px;
  letter-spacing: .03em;
  line-height: 1.5;
  transition: background .2s ease, box-shadow .2s ease;
}

.back-to-top svg {
  width: 17px;
  height: 17px;
}

.will-reveal {
  opacity: 0;
  translate: 0 12px;
  transition: opacity .5s ease, translate .5s cubic-bezier(.2, .65, .3, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

.will-reveal.is-visible {
  opacity: 1;
  translate: 0 0;
}

/* Added by JS only after the reveal observer is ready. */
html:not(.js) .will-reveal {
  opacity: 1;
  translate: none;
}

[data-tilt] {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  transform: perspective(1100px) rotateX(0deg) rotateY(0deg);
  transition: transform .28s ease, box-shadow .28s ease;
  transform-origin: center;
}

[data-tilt].will-reveal {
  transition: opacity .5s ease, translate .5s cubic-bezier(.2, .65, .3, 1),
    transform .28s ease, box-shadow .28s ease;
  transition-delay: var(--reveal-delay, 0ms), var(--reveal-delay, 0ms), 0ms, 0ms;
}

.motion-paused *,
.motion-paused *::before,
.motion-paused *::after,
.motion-paused {
  animation-play-state: paused !important;
}

@media (hover: hover) and (pointer: fine) {
  .motion-step:not(:disabled):hover,
  .motion-toggle:not(:disabled):hover {
    background: var(--shop-blue);
    border-color: #91aab5;
  }

  .product-actions a:hover,
  .amazon-button:hover {
    background: #e6c699;
    color: var(--ink);
    border-color: #c4a274;
  }

  .story-button:hover {
    background: var(--shop-blue);
    color: var(--ink);
    border-color: #91aab5;
  }

  .product-tabs button:hover:not([aria-pressed="true"]):not([aria-selected="true"]),
  .product-tabs a:hover:not(.is-active) {
    background: #edf3f3;
    color: var(--ink);
  }

  [data-tilt]:hover {
    transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
    box-shadow: 0 14px 35px rgba(37, 62, 75, .075);
  }

  .back-to-top:hover {
    background: white;
    box-shadow: 0 5px 18px rgba(37, 62, 75, .12);
  }
}

/* The native article entrance adds a navigation item. Collapse before labels
   squeeze into multiple lines on tablets and smaller laptop windows. */
.nav a { white-space: nowrap; }
@media (min-width: 761px) and (max-width: 1100px) {
  .site-header { height: auto; min-height: 82px; flex-wrap: wrap; padding-block: 15px; }
  .nav { width: 100%; flex-wrap: wrap; padding-block: 12px; }
  .js .site-header { height: 82px; padding-block: 0; }
  .js .nav { display: none; position: absolute; top: 81px; left: 0; padding: 15px 22px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 18px rgba(37,62,75,.06); }
  .js .nav.is-open { display: flex; }
  .js .menu-toggle { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: transparent; padding: 7px 10px; font-size: 11px; border-radius: 3px; color: var(--ink); }
}

@media (max-width: 1000px) {
  .hero-actions {
    gap: 12px 20px;
  }

  .hero-actions .button {
    font-size: 11px;
    padding-inline: 17px;
  }

  .hero-stamp {
    width: 94px;
    height: 94px;
    left: 22px;
    bottom: 22px;
  }

  .product-copy {
    padding: 24px;
  }

  .product-copy h3 {
    font-size: 24px;
  }
}

@media (max-width: 760px) {
  :root {
    --shelf-card-width: min(78vw, 330px);
    --shelf-gap: 18px;
  }

  html {
    scroll-padding-top: 100px;
  }

  .site-header {
    position: sticky;
    top: 0;
  }

  .js .nav {
    background: var(--paper);
    border-bottom-color: #cddadb;
    box-shadow: 0 10px 18px rgba(37, 62, 75, .06);
  }

  .hero {
    border-radius: 7px;
  }

  .hero-stamp {
    width: 80px;
    height: 80px;
    top: 22px;
    right: 18px;
    bottom: auto;
    left: auto;
    background: rgba(251, 249, 243, .94);
  }

  .hero-stamp > span {
    font-size: 15px;
  }

  .hero-actions {
    gap: 13px 21px;
    margin-top: 22px;
  }

  .hero-actions .button {
    min-height: 46px;
    padding: 11px 17px;
    font-size: 12px;
  }

  .hero .hero-actions .text-link {
    font-size: 11px;
  }

  .section,
  .picks-section,
  .shop-section {
    padding-top: 61px;
  }

  .section h2,
  .picks-section h2,
  .shop-section h2 {
    font-size: 26px;
    line-height: 1.65;
    letter-spacing: .035em;
  }

  .section-head {
    margin-bottom: 23px;
  }

  .section-head .side-note {
    font-size: 12px;
    max-width: 100%;
    margin-top: 12px;
  }

  .shelf-controls {
    gap: 7px;
    margin-top: 0;
    margin-bottom: 14px;
  }

  .motion-toggle {
    font-size: 10px;
    padding-inline: 13px;
  }

  .shelf-window {
    padding-bottom: 15px;
    border-radius: 9px;
  }

  .shelf-card {
    border-radius: 10px;
  }

  .shelf-info {
    padding: 20px;
  }

  .shelf-card .product-name {
    font-size: 21px;
  }

  .product-tagline {
    font-size: 12px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .product-tabs {
    gap: 8px;
    padding-bottom: 22px;
    margin-bottom: 23px;
  }

  .product-tabs button,
  .product-tabs a {
    font-size: 11px;
    padding-inline: 16px;
  }

  .product-card {
    border-radius: 10px;
  }

  .product-copy {
    padding: 24px 23px 25px;
  }

  .product-copy h3 {
    font-size: 25px;
  }

  .product-copy > p:not(.product-kicker):not(.product-fit):not(.product-caution) {
    font-size: 13px;
  }

  .product-buttons {
    align-items: stretch;
    padding-top: 22px;
  }

  .product-buttons .amazon-button,
  .product-buttons .story-button {
    flex: 1 1 auto;
    padding-inline: 13px;
    font-size: 11px;
  }

  .product-detail {
    margin-top: 21px;
  }

  .back-to-top {
    right: 13px;
    bottom: max(15px, env(safe-area-inset-bottom));
    min-height: 46px;
    padding: 10px 13px;
    font-size: 9px;
  }

  [data-tilt] {
    transform: none;
  }
}

@media (max-width: 359px) {
  .hero-actions {
    gap: 10px 18px;
  }

  .product-copy {
    padding: 21px 19px 23px;
  }

  .product-copy h3 {
    font-size: 22px;
  }

  .product-tabs button,
  .product-tabs a {
    padding-inline: 13px;
  }

  .product-buttons .amazon-button,
  .product-buttons .story-button {
    width: 100%;
    flex-basis: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .will-reveal {
    opacity: 1;
    translate: none;
  }

  [data-tilt],
  [data-tilt]:hover {
    transform: none;
  }

  .shelf-window.is-looping {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .shelf-window.is-looping .shelf-track {
    will-change: auto;
  }
}

/* Small captions stay readable without competing with the product. */
.hero-stamp svg text { font-size: 9px; letter-spacing: .12em; }
.photo-note { font-size: 10px; line-height: 1.8; color: #526971; margin-top: 10px; }
.affiliate-disclosure, .shelf-footnote { font-size: 11px; line-height: 1.9; color: #526971; }
.affiliate-disclosure { margin-bottom: 14px; }
.shelf-footnote { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 12px; }
.shelf-footnote a { text-decoration: underline; text-underline-offset: 4px; }
.motion-setting-note { flex-basis: 100%; font-size: 11px; line-height: 1.8; }
.product-card-inner { display: flex; flex-direction: column; flex: 1; }
.product-photo, .shelf-card .photo { position: relative; }
.shelf-number, .product-status { position: absolute; top: 13px; left: 13px; padding: 5px 9px; background: rgba(251,249,243,.95); color: #253e4b; border-radius: 3px; font-size: 10px; letter-spacing: .05em; }
.product-photo img, .shelf-card .photo img { object-fit: contain; }

.shelf-caution { border-top: 1px solid var(--shop-border); padding-top: 11px; margin-top: 14px; font-size: 11px; color: #6b6256; line-height: 1.8; }
.hero-stamp > span { font-size: 17px; line-height: 1.3; }
@media(max-width:760px) { .hero-stamp > span { font-size: 13px; } }

/* Keep direct manipulation native on touch, with mouse dragging as an enhancement. */
.shelf-window {
  cursor: grab;
  touch-action: auto;
  overflow-anchor: none;
}
.shelf-window.is-manual {
  overflow-x: auto;
  scroll-snap-type: none;
  scroll-behavior: auto;
}
.shelf-window.is-dragging,
.shelf-window.is-dragging * {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}
.shelf-window img,
.shelf-window a {
  -webkit-user-drag: none;
}
.shelf-window .photo a {
  cursor: inherit;
}
.shelf-hint {
  margin: 0 0 12px;
  font-size: 11px;
  line-height: 1.9;
  color: var(--shop-soft-ink);
}
