/* ==========================================================================
   Shop DIY Kits page (/shop). Loaded after /css/styles.css.
   Mobile styles first (390px Figma frame), desktop at 1240px and up
   (1440px Figma frame). 768px to 1239px keeps the mobile layout centered.
   ========================================================================== */

:root {
  --shop-card: color-mix(in srgb, var(--ink) 4%, var(--white)); /* Figma light gray card */
}

/* ---------- Shared bits ---------- */

/* White circle with a small arrow pointing up and to the right */
.shop-arrow {
  display: flex; align-items: center; justify-content: center; flex: none;
  width: 33.935px; height: 33.935px; border-radius: 50%; background: var(--white); color: var(--black);
}
.shop-arrow svg { width: 64%; height: 64%; transform: rotate(-44.16deg); fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

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

.shop-hero { background: var(--blue); padding: 40px 24px 54px; overflow: hidden; }
.shop-hero__inner { max-width: 600px; margin: 0 auto; }
.shop-hero__copy { display: flex; flex-direction: column; align-items: flex-start; }
.shop-hero__copy .hero__text { margin-top: 24px; }
.shop-hero__btn { width: 216px; height: 3.25rem; margin-top: 48px; }

/* Photo with the tilted white card behind it. Positions are percentages of the Figma photo. */
.shop-hero__media { position: relative; width: 100%; max-width: 342px; aspect-ratio: 342 / 296; margin-top: 52px; }
.shop-hero__media::before {
  content: ''; position: absolute; left: -2.287%; top: 4.878%; width: 96.491%; height: 97.973%;
  border-radius: 40px; background: var(--white); transform: rotate(3deg);
}
.shop-hero__media > img {
  position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 28px; max-width: none;
}

/* "DIY" speech bubble. Everything is sized from the text, so one font size scales the whole sticker. */
.shop-sticker {
  position: absolute; left: -16px; top: -23.11px; z-index: 1;
  width: 2.6687em; height: 1.7165em;
  font-family: var(--font-fun); font-size: 2.4565rem; line-height: 1.3; letter-spacing: 0.1228rem; color: var(--white);
}
.shop-sticker img { width: 100%; height: 100%; max-width: none; }
.shop-sticker__text {
  position: absolute; left: 0.4895em; top: 0.0929em; width: 2.6648em; height: 1.2917em;
  transform: rotate(-9.8deg); white-space: nowrap;
}

/* ---------- What's inside ---------- */

.shop-inside { background: var(--vanilla); padding: 56px 24px 40px; }
.shop-inside__inner { display: flex; flex-direction: column; gap: 35px; max-width: 600px; margin: 0 auto; }
.shop-inside__media { position: relative; width: 100%; max-width: 462px; }
.shop-inside__media > img:first-child {
  width: 100%; aspect-ratio: 342 / 342.74; object-fit: cover; border-radius: 29.61px; background: var(--white);
}
.shop-inside__palette { position: absolute; right: -9.58px; top: -34.53px; width: 99.03px; max-width: none; rotate: -20.47deg; }
.shop-inside__title { font-family: var(--font-fun); font-weight: 400; font-size: 2.625rem; line-height: 2.875rem; color: var(--red); }
.shop-inside__lead { margin-top: 16px; font-weight: 600; font-size: 1.25rem; line-height: 1.375rem; letter-spacing: 0.0125rem; color: var(--ink); }
.shop-inside__list { display: flex; flex-direction: column; gap: 15px; margin-top: 24px; }
.shop-inside__list li {
  display: flex; align-items: center; gap: 8px; min-height: 28.8px; color: var(--text-80);
}
.shop-inside__list li::before {
  content: ''; flex: none; width: 28.8px; height: 28.8px; background: url('/images/shop-check.svg') no-repeat center / contain;
}

/* ---------- The range ---------- */

.shop-range { padding: 40px 24px; }
.shop-range__head { display: flex; flex-direction: column; align-items: center; gap: 23px; text-align: center; }
.shop-range__title { font-weight: 500; font-size: 1.875rem; line-height: 2.375rem; letter-spacing: -0.0187rem; color: var(--ink); }
.shop-range__text { color: var(--ink); }
.shop-range__btn { width: 180px; height: 3.25rem; }
.shop-range__carousel { margin-top: 32px; }

/* Phones and tablets: one kit at a time, swipe or use the arrows */
.shop-range__list {
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
.shop-range__list::-webkit-scrollbar { display: none; }
.shop-kit {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  display: flex; flex-direction: column; gap: 30px;
  padding-top: 24px; border-radius: 40px; background: var(--shop-card);
}
.shop-kit__body { display: flex; flex-direction: column; padding: 0 27px; }
.shop-kit__top { display: flex; align-items: center; justify-content: space-between; height: 47.986px; padding-right: 7.025px; }
.shop-kit__price { font-size: 0.875rem; line-height: 1.375rem; letter-spacing: 0.0612rem; }
.shop-kit__title { margin-top: 27px; font-weight: 600; font-size: 1.3125rem; line-height: 1.375rem; letter-spacing: 0.0125rem; color: var(--ink); }
.shop-kit__title a { color: inherit; text-decoration: none; }
/* The whole card is clickable through the title link */
.shop-kit__title a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: 40px; }
.shop-kit:has(a:focus-visible) { outline: 3px solid var(--blue); outline-offset: 3px; }
.shop-kit__title a:focus-visible { outline: none; }
.shop-kit__text { margin-top: 20px; color: var(--ink); }
.shop-kit__img { width: 100%; aspect-ratio: 342 / 225; object-fit: cover; border-radius: 28px; }

.shop-range__nav { display: flex; justify-content: center; gap: 10px; margin-top: 32px; }
.shop-range__nav[hidden] { display: none; }
.shop-range__arrow {
  display: flex; align-items: center; justify-content: center;
  width: 56px; height: 54px; padding: 0; border: 0; border-radius: 27px; background: var(--red); color: var(--white); cursor: pointer;
  transition: background-color .2s ease, opacity .2s ease;
}
.shop-range__arrow:hover { background: var(--red-hover); }
.shop-range__arrow[disabled] { opacity: .45; cursor: default; }
.shop-range__arrow svg { width: 56px; height: 54px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.shop-range__arrow--prev svg { transform: rotate(180deg); }

/* ---------- Loving your kit ---------- */

.shop-favors { padding: 48px 24px; }
.shop-favors__box {
  position: relative; max-width: 600px; margin: 0 auto; overflow: hidden;
  border-radius: 28px; background: var(--vanilla);
}
.shop-favors__copy { display: flex; flex-direction: column; align-items: flex-start; padding: 32px 24px 24px; }
.shop-favors__title { font-family: var(--font-fun); font-weight: 400; font-size: 2.625rem; line-height: 2.875rem; color: var(--red); }
.shop-favors__text { margin-top: 24px; color: var(--ink); }
.shop-favors__btn { width: 100%; height: 3.25rem; margin-top: 41px; }
.shop-favors__media { position: relative; display: block; }
.shop-favors__media img { width: 100%; aspect-ratio: 342 / 272; object-fit: cover; }
.shop-favors__media .shop-arrow { position: absolute; left: 90.058%; top: 13.235%; width: 31.116px; height: 31.116px; transform: translate(-50%, -50%); }

/* ==========================================================================
   Desktop: 1240px and up
   ========================================================================== */

@media (min-width: 1240px) {
  .shop-arrow { width: 37.88px; height: 37.88px; }

  /* Hero */
  .shop-hero { height: 618px; padding: 0; }
  .shop-hero__inner { position: relative; width: 1152px; max-width: none; height: 100%; margin: 0 auto; }
  .shop-hero__copy { position: absolute; left: 0; top: 166px; width: 550px; }
  .shop-hero__copy .hero__title { color: var(--ink); letter-spacing: -0.06rem; }
  .shop-hero__copy .hero__text { width: 520px; margin-top: 32px; }
  .shop-hero__btn { width: 230px; height: 3.5rem; margin-top: 40px; }
  .shop-hero__media { position: absolute; left: 644px; top: 92px; width: 508px; max-width: none; margin: 0; aspect-ratio: auto; height: 440px; }
  .shop-hero__media::before { left: -2.815%; top: 4.582%; width: 100%; height: 100%; transform: rotate(4deg); }
  .shop-hero__media > img { border-radius: 40px; }
  .shop-sticker { left: -94.1px; top: 74px; font-size: 4.724rem; letter-spacing: 0.2362rem; }

  /* What's inside */
  .shop-inside { height: 623px; padding: 80px 0; }
  .shop-inside__inner { flex-direction: row; align-items: center; justify-content: center; gap: 120px; max-width: none; height: 100%; }
  .shop-inside__media { flex: 0 0 462px; }
  .shop-inside__media > img:first-child { aspect-ratio: 462 / 463; border-radius: 40px; }
  .shop-inside__palette { display: none; }
  .shop-inside__copy { flex: 0 0 560px; }
  .shop-inside__title { font-size: 3.5rem; line-height: 5rem; }
  .shop-inside__lead { font-size: 1.875rem; line-height: 2.5rem; letter-spacing: 0; }
  .shop-inside__list { gap: 16px; }
  .shop-inside__list li { font-size: 1.125rem; line-height: 1.75rem; }

  /* The range */
  .shop-range { height: 1025px; padding: 120px 0; }
  .shop-range__head { gap: 24px; }
  .shop-range__title { font-size: 2.75rem; line-height: 1.2; letter-spacing: -0.0275rem; }
  .shop-range__text { width: 652px; font-size: 1.25rem; line-height: 1.4; letter-spacing: -0.0125rem; }
  .shop-range__btn { height: 3.5rem; }
  .shop-range__carousel { margin-top: 56px; }
  .shop-range__list { justify-content: center; gap: 32px; overflow: visible; scroll-snap-type: none; }
  .shop-kit { flex: 0 0 328px; min-width: 0; gap: 0; padding-top: 32px; }
  .shop-kit__body { flex: 1; padding: 0 40px 32px; }
  .shop-kit__top { height: 53.565px; padding-right: 7.843px; }
  .shop-kit__title { width: 262px; margin-top: 6px; font-size: 1.875rem; line-height: 2.5rem; letter-spacing: 0; }
  .shop-kit__text { margin-top: 12px; font-size: 1.125rem; line-height: 1.75rem; }
  .shop-kit__img { aspect-ratio: auto; height: 216px; border-radius: 40px; }
  .shop-range__nav, .shop-range__nav:not([hidden]) { display: none; }

  /* Loving your kit */
  .shop-favors { height: 591px; padding: 113px 0 0; }
  .shop-favors__box {
    display: flex; width: 1146px; max-width: none; height: 409px; margin-left: calc(50% - 572px);
    border-radius: 40px;
  }
  .shop-favors__copy { flex: 0 0 599px; justify-content: center; padding: 0 0 0 56px; }
  .shop-favors__title { font-size: 3.5rem; line-height: 5rem; }
  .shop-favors__text { width: 494px; margin-top: 16px; font-size: 1.125rem; line-height: 1.4; letter-spacing: -0.0113rem; }
  .shop-favors__btn { width: 188px; height: 3.5rem; margin-top: 40px; }
  .shop-favors__media { flex: 0 0 547px; }
  .shop-favors__media img { height: 409px; aspect-ratio: auto; }
  .shop-favors__media .shop-arrow { left: 88.446%; top: 11.444%; width: 37.88px; height: 37.88px; }

  /* Waitlist band (Figma frame is 491px tall here, homepage 477px) */
  .waitlist { height: 491px; padding-top: 75.42px; }
}

/* ---------- Motion (reduce motion turns all of this off in styles.css) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .shop-hero__media::before { animation: hm-tilt 1s var(--ease-spring) 0.15s backwards; }
  .shop-sticker { animation: shop-pop 0.7s var(--ease-spring) 0.35s backwards; }
  .shop-kit { transition: opacity var(--reveal-time) var(--ease-out), transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out); }
  .shop-kit.is-visible:hover, .shop-kit.is-visible:focus-within,
  html:not(.js) .shop-kit:hover { transform: translateY(-0.375rem); box-shadow: 0 1.5rem 2.5rem -1.75rem rgba(15, 22, 28, 0.45); }
  .shop-arrow svg { transition: translate 0.3s var(--ease-spring); }
  .shop-kit:hover .shop-arrow svg, .shop-favors__box:hover .shop-arrow svg { translate: 0.125rem -0.125rem; }
}

@keyframes shop-pop { from { opacity: 0; transform: scale(0.6) rotate(-8deg); } }
