/* RIVET — responsive.css (desktop-first overrides) */

@media (max-width: 1100px) {
  .site-nav { gap: 20px; }
  .site-tools { gap: 18px; }
  .shop { grid-template-columns: 210px 1fr; gap: 32px; }
  .cartpage, .checkout { grid-template-columns: 1fr 340px; gap: 36px; }
  .related__grid { grid-template-columns: repeat(2, 1fr); }
  .related__grid > :nth-child(3) { display: none; }
}

@media (max-width: 860px) {
  :root { --header-h: 58px; }
  .site-header { grid-template-columns: auto 1fr auto; gap: 12px; }
  .site-nav { display: none; }
  .menu-btn { display: block; margin-left: -9px; }
  .logo { font-size: 22px; align-items: flex-start; }
  .logo small { display: none; }
  .site-tools { gap: 16px; }
  .site-tools [data-open-wish] { display: none; }

  /* hero */
  .hero__title { font-size: clamp(60px, 19vw, 150px); inset: calc(var(--header-h) + var(--demo-h, 40px) + 18px) var(--gutter) auto; }
  .hero__fallback { height: min(50vh, 110vw); top: 64%; }
  .shop__bar .search-input { flex: 1 1 100%; max-width: none; }
  .hero__cue span { display: none; }

  /* details: hotspot card docks to the bottom on small screens */
  .details__head h2 { font-size: clamp(40px, 11vw, 72px); }
  .details__index { font-size: 40px; }
  .dframe--intro img { height: 60vh; }
  .dframe::after { background: linear-gradient(180deg, rgba(11,9,8,0.75) 0%, transparent 35%, transparent 60%, rgba(11,9,8,0.8) 100%); }
  .hotspot-card { left: 16px !important; right: 16px; top: auto !important; bottom: 110px; width: auto; }

  /* collection: native horizontal swipe instead of a pinned scroll */
  .collection__pin { height: auto; display: block; padding: 90px 0 70px; overflow: visible; }
  .collection__head { padding: 0 var(--gutter) 30px; }
  .collection__track {
    overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    padding-bottom: 10px; scrollbar-width: none; transform: none !important;
  }
  .collection__track::-webkit-scrollbar { display: none; }
  .collection__track > .collection__head { display: none; }
  .collection__track .pcard { flex-basis: 76vw; scroll-snap-align: center; }
  .collection__track .pcard:nth-child(even) { margin-top: 0; }
  .collection__end { flex-basis: 60vw; scroll-snap-align: center; }

  /* viewer */
  .viewer__inner { grid-template-columns: 1fr; }
  .viewer__stage { max-height: none; }

  /* craft */
  .chapter { grid-template-columns: 1fr; gap: 22px; }
  .chapter .chapter__img, .chapter .chapter__text { grid-column: 1 !important; grid-row: auto !important; }
  .chapter--a .chapter__img, .chapter--c .chapter__img, .chapter--d .chapter__img { width: 82%; }
  .chapter--c .chapter__img, .chapter--d .chapter__img { margin-left: auto; }
  .chapter__num { font-size: 52px; }

  .promises { grid-template-columns: 1fr; }

  .site-footer { grid-template-columns: 1fr; gap: 40px; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); }

  /* shop: filters become a sheet */
  .shop { grid-template-columns: 1fr; }
  .filter-toggle { display: inline-flex; }
  .filters {
    position: fixed; z-index: 82; left: 0; right: 0; bottom: 0; top: auto;
    max-height: 82vh; overflow-y: auto; background: var(--ink-2);
    border-top: 1px solid var(--line-2); padding: 24px var(--gutter) 30px;
    transform: translateY(100%); transition: transform 0.5s var(--ease);
  }
  .filters.is-open { transform: none; }
  .filters__close { display: flex !important; }
  .shop__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 12px; }
  .pcard__name { font-size: 20px; }
  .pcard__body { grid-template-columns: 1fr; }
  .pcard__price { grid-row: auto; grid-column: 1; align-self: start; }

  .pdp, .cartpage, .checkout { grid-template-columns: 1fr; }
  .pdp__info, .summary { position: static; }
  .checkout .summary { order: -1; }
  .related__grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .confirm__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .demo-bar { font-size: 11px; }
  .hero__product span { font-size: 18px; }
  .hero__meta .eyebrow { display: none; }
  .shop__grid { gap: 24px 10px; }
  .pcard__actions { flex-wrap: wrap; }
  .pcard__actions .btn { font-size: 11px; padding: 0 10px; }
  .grid-2 { grid-template-columns: 1fr; }
  .cartpage .line-item { grid-template-columns: 88px 1fr; }
  .cartpage .line-item__img { width: 88px; height: 110px; }
  .cartpage .line-item__price { grid-column: 2; text-align: left; }
  .quick { grid-template-columns: 1fr; }
  .quick__img { max-height: 220px; aspect-ratio: auto; height: 220px; }
  .search-input { font-size: 18px; height: 54px; }
  .credits .col-hide { display: none; }
  .modal h2 { font-size: 30px; }
}

@media (hover: none) {
  .pcard:hover .pcard__media img { transform: none; }
}
