/* ==========================================================================
   Australia Watch: Shop + product pages
   Same language as the homepage: an inset night frame under a floating
   pill nav, rounded fields in forest / cream / sage / powder, pill controls,
   cream marks on dark, forest marks on light.
   ========================================================================== */

:root {
  --sage: #e4eee3;
  --powder: #d7e3ee;
  --cream-soft: #f6efdc;
  --spring: cubic-bezier(.22, .8, .24, 1);
}

.page-shop main,
.page-product main { background: #fff; }

/* Shared bits ------------------------------------------------------------ */
.pending {
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-size: .8125rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.on-dark .pending { background: rgba(244, 232, 200, .16); color: var(--cream); }
.mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
}
.mark .icon { width: 16px; height: 16px; }
.mark--yes { background: var(--forest); color: #fff; }

.sec-head { display: grid; gap: 14px; }
.sec-head h2,
.finder__head h2,
.cmp__head h2,
.ways__head h2 {
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: -.03em;
  line-height: 1.05;
}
.finder__head p,
.ways__head p { color: var(--ink-2); }

/* ==========================================================================
   SHOP: hero frame with the two device panes
   ========================================================================== */
.shop-hero { padding: 10px; }
.shop-hero__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: calc(100svh - 20px);
  padding: calc(var(--nav-h) + clamp(36px, 5vh, 64px)) 10px 10px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--night);
  color: var(--salt);
  isolation: isolate;
}
.shop-hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
  padding: 0 clamp(14px, 2.6vw, 40px) clamp(28px, 4vh, 44px);
}
.shop-hero__title {
  color: #fff;
  font-size: clamp(2.6rem, 5vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1;
}
.shop-hero__line { display: block; overflow: hidden; padding-bottom: .06em; }
.shop-hero__line > span { display: block; }
.shop-hero__title em { font-style: normal; color: var(--cream); }
.shop-hero__aside p { color: rgba(243, 245, 239, .82); font-size: 1.05rem; line-height: 1.55; max-width: 30em; }
.shop-hero__jump {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--cream);
  font-weight: 700;
}
.shop-hero__jump .icon {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  background: rgba(244, 232, 200, .14);
  transform: rotate(90deg);
  transition: transform .45s var(--spring), background-color .3s;
}
.shop-hero__jump:hover .icon { transform: rotate(90deg) translateX(4px); background: rgba(244, 232, 200, .24); }

.duo {
  display: flex;
  flex: 1;
  gap: 10px;
  min-height: 500px;
  margin: 0;
  padding: 0;
}
.duo__pane {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-radius: 14px;
  overflow: hidden;
  background: var(--mist);
  color: var(--ink);
  transition: flex-grow .85s var(--spring);
}
.duo__pane--2 { background: var(--cream-soft); }
@media (hover: hover) and (min-width: 1001px) {
  .duo:hover .duo__pane { flex-grow: .8; }
  .duo .duo__pane:hover,
  .duo .duo__pane:focus-within { flex-grow: 1.3; }
}
.duo__cover { position: absolute; inset: 0; z-index: 3; }
.duo__img {
  position: absolute;
  left: 50%;
  top: 44%;
  z-index: 1;
  width: auto;
  height: min(70%, 560px);
  max-width: none;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 24px 28px rgba(12, 74, 47, .2));
  transition: height .9s var(--spring);
  pointer-events: none;
}
.duo__pane:hover .duo__img { height: min(76%, 600px); }
.duo__info {
  position: relative;
  z-index: 4;
  display: grid;
  gap: 6px;
  padding: clamp(20px, 2.4vw, 32px);
  pointer-events: none;
}
.duo__info a { pointer-events: auto; }
.duo__worn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--forest);
  font-size: .9rem;
  font-weight: 700;
}
.duo__worn .icon { width: 18px; height: 18px; }
.duo__name { color: var(--ink); font-size: clamp(1.6rem, 2.3vw, 2.3rem); letter-spacing: -.03em; line-height: 1.05; }
.duo__link { --focus: var(--forest); }
.duo__link:focus-visible { outline-offset: 6px; }
.duo__line {
  max-width: 30em;
  color: var(--ink-2);
  font-size: 1rem;
  line-height: 1.45;
}
.duo__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.duo__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: var(--forest);
  font-family: var(--display);
  font-size: clamp(1.6rem, 2.2vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.03em;
}
.duo__price span { color: var(--ink-2); font-family: var(--body); font-size: .9rem; font-weight: 700; letter-spacing: 0; }
.duo__go {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  transition: transform .6s var(--spring), background-color .3s;
}
.duo__go .icon { width: 22px; height: 22px; }
.duo__pane:hover .duo__go { transform: rotate(45deg); background: var(--night); }

/* ==========================================================================
   SHOP: fit finder + bays
   ========================================================================== */
.finder { --focus: var(--forest); padding-block: var(--section) clamp(64px, 8vw, 120px); background: #fff; }
.finder__head { max-width: 40em; margin-inline: auto; text-align: center; display: grid; gap: 14px; }
.finder__head p { margin-inline: auto; }

.seg {
  position: relative;
  display: flex;
  gap: 2px;
  width: max-content;
  max-width: 100%;
  margin: clamp(28px, 3vw, 40px) auto clamp(36px, 4vw, 56px);
  padding: 6px;
  border-radius: 999px;
  background: var(--sage);
  overflow-x: auto;
  scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__mark {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 0;
  border-radius: 999px;
  background: var(--forest);
  transition: left .6s var(--spring), width .6s var(--spring);
}
.seg__opt {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: .98rem;
  font-weight: 700;
  white-space: nowrap;
  transition: color .4s;
}
.seg__opt .icon { width: 20px; height: 20px; }
.seg__opt:hover { color: var(--ink); }
.seg__opt[aria-checked="true"] { color: #fff; }
.seg__opt[aria-checked="true"] .icon { color: var(--cream); }

.bays {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
  margin: 0;
  padding: 0;
}
.bay {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 32px;
  background: var(--mist);
  outline: 2px solid transparent;
  outline-offset: 6px;
  transition: outline-color .5s, transform .6s var(--spring);
}
.bay--2 { background: var(--cream-soft); }
.bay.is-pick { outline-color: var(--forest); }
.bay__plate {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 12;
  perspective: 900px;
}
.bay__imglink { display: contents; }
.bay__plate img {
  width: auto;
  height: 86%;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 22px 26px rgba(12, 74, 47, .2));
  transition: transform .7s var(--spring), opacity .35s;
  will-change: transform;
}
.bay:hover .bay__plate img { transform: translateY(-8px) scale(1.03); }
.bay__plate img.is-swapping { opacity: 0; }
.bay__index {
  position: absolute;
  right: 26px;
  top: 18px;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(3.4rem, 5vw, 5rem);
  letter-spacing: -.06em;
  line-height: 1;
  color: rgba(12, 74, 47, .12);
}
.bay__pick {
  position: absolute;
  left: 22px;
  top: 22px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px 9px 10px;
  border-radius: 999px;
  background: var(--forest);
  color: #fff;
  font-size: .92rem;
  font-weight: 700;
  opacity: 0;
  transform: translateY(-10px) scale(.92);
  transition: opacity .45s, transform .6s var(--spring);
}
.bay__pick .icon {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 50%;
  background: var(--cream);
  color: var(--forest);
}
.bay.is-pick .bay__pick { opacity: 1; transform: none; }
.bay__finishes {
  position: absolute;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bay__body { display: flex; flex: 1; flex-direction: column; padding: 4px clamp(22px, 2.6vw, 36px) clamp(22px, 2.6vw, 36px); }
.bay__title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.bay__title h3 { font-size: clamp(1.5rem, 2.1vw, 2.05rem); letter-spacing: -.03em; line-height: 1.05; }
.bay__title h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .45s var(--spring); }
.bay__title h3 a:hover { background-size: 100% 1px; }
.bay__price { color: var(--forest); font-family: var(--display); font-size: clamp(1.4rem, 1.9vw, 1.8rem); font-weight: 700; letter-spacing: -.03em; }
.bay__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bay__chips li {
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(12, 74, 47, .09);
  color: var(--forest);
  font-size: .9rem;
  font-weight: 700;
}
.bay__fit { display: grid; margin-top: 20px; }
.bay__fit p {
  grid-area: 1 / 1;
  padding-left: 16px;
  border-left: 2px solid var(--gold);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.5;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity .45s, transform .6s var(--spring), visibility .45s;
}
.bay__fit p.is-on { opacity: 1; visibility: visible; transform: none; }
.bay__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 26px; }

/* ==========================================================================
   SHOP: compare sheet
   ========================================================================== */
.cmp { --focus: var(--forest); padding-block: clamp(72px, 9vw, 128px); background: var(--salt); }
.cmp__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  margin-bottom: clamp(28px, 3vw, 40px);
}
.cmp__head h2 { max-width: 10em; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 700; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch__track {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  background: rgba(11, 31, 22, .16);
  transition: background-color .35s;
}
.switch__dot {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform .5s var(--spring);
}
.switch input:checked + .switch__track { background: var(--forest); }
.switch input:checked + .switch__track .switch__dot { transform: translateX(24px); background: var(--cream); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--forest); outline-offset: 3px; }

.cmp__sheet {
  padding: 6px clamp(16px, 2.4vw, 32px) 16px;
  border-radius: 28px;
  background: #fff;
}
.cmp__row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
  border-bottom: 1px solid rgba(11, 31, 22, .1);
  max-height: 140px;
  transition: max-height .55s var(--spring), opacity .4s, border-color .4s;
}
.cmp.is-diff .cmp__row.is-same { max-height: 0; opacity: 0; overflow: hidden; border-bottom-color: transparent; }
.cmp__row--heads {
  position: sticky;
  top: calc(var(--nav-h) + 6px);
  z-index: 3;
  max-height: none;
  margin: 0 calc(clamp(16px, 2.4vw, 32px) * -1);
  padding: 14px clamp(16px, 2.4vw, 32px);
  border-radius: 22px 22px 0 0;
  background: #fff;
  border-bottom: 1px solid var(--ink);
}
.cmp__term,
.cmp__cell {
  display: flex;
  align-items: center;
  min-height: 64px;
  padding: 10px 14px;
  transition: background-color .3s;
}
.cmp__term { padding-left: 0; color: var(--ink-2); font-weight: 700; font-size: 1rem; }
.cmp__text { font-weight: 700; color: var(--ink); line-height: 1.35; }
.cmp__product {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 14px;
  border-radius: 18px;
  transition: background-color .3s;
}
.cmp__product img {
  width: 64px;
  height: 72px;
  padding: 4px;
  border-radius: 14px;
  background: var(--mist);
  object-fit: contain;
  transition: transform .5s var(--spring);
}
.cmp__product:hover img { transform: rotate(-4deg) scale(1.06); }
.cmp__product strong { display: block; font-family: var(--display); font-size: 1.25rem; letter-spacing: -.02em; line-height: 1.1; }
.cmp__product em { display: block; margin-top: 2px; color: var(--forest); font-style: normal; font-weight: 700; }
.cmp__groupname {
  padding: 26px 0 6px;
  color: var(--forest);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.cmp [data-col].is-hot { background: rgba(12, 74, 47, .055); }
.cmp__note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: none;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: .95rem;
}
.cmp__note .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--forest); }

/* ==========================================================================
   SHOP: ways to buy
   ========================================================================== */
.ways { --focus: var(--forest); padding-block: clamp(72px, 9vw, 128px) calc(clamp(72px, 9vw, 128px) + 40px); background: #fff; }
.ways__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .8fr);
  gap: 20px clamp(24px, 5vw, 80px);
  align-items: end;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.ways__head p { justify-self: end; max-width: 28em; margin-bottom: 6px; }
.ways__list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
}
.way {
  display: flex;
  flex-direction: column;
  min-height: 440px;
  padding: clamp(22px, 2.4vw, 32px);
  border-radius: 28px;
  transition: transform .6s var(--spring);
}
.way:hover { transform: translateY(-6px); }
.way--private { background: var(--night); color: #fff; }
.way--funded { background: var(--cream); color: var(--ink); }
.way--team { background: var(--powder); color: var(--ink); }
.way__icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(12, 74, 47, .12);
  color: var(--forest);
}
.way--private .way__icon { background: rgba(244, 232, 200, .14); color: var(--cream); }
.way__icon .icon { width: 24px; height: 24px; }
.way h3 { margin-top: clamp(40px, 6vw, 72px); font-size: clamp(1.75rem, 2.3vw, 2.3rem); letter-spacing: -.035em; line-height: 1.02; }
.way > p { margin-top: 12px; font-size: 1rem; line-height: 1.5; color: var(--ink-2); }
.way--private > p { color: rgba(243, 245, 239, .8); }
.way__steps { margin: 22px 0 26px; counter-reset: way; }
.way__steps li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(11, 31, 22, .14);
  font-weight: 700;
  font-size: .98rem;
  counter-increment: way;
}
.way__steps li::before {
  content: counter(way);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--forest);
  color: #fff;
  font-family: var(--display);
  font-size: .78rem;
}
.way--private .way__steps li { border-top-color: rgba(243, 245, 239, .16); }
.way--private .way__steps li::before { background: var(--cream); color: var(--forest); }
.way .btn { align-self: flex-start; margin-top: auto; }

/* Balanced cards: the three share one set of rows, so titles, text, each
   step and the buttons sit at the same height in every card. */
@supports (grid-template-rows: subgrid) {
  .way {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span var(--way-rows, 7);
    row-gap: 0;
    align-content: start;
    min-height: 0;
  }
  .way > * { min-width: 0; }
  .way__icon { align-self: start; }
  .way h3 { align-self: start; }
  .way > p { align-self: start; }
  .way__steps {
    display: grid;
    grid-template-rows: subgrid;
    grid-row: span var(--way-steps, 3);
    margin: 22px 0 26px;
  }
  .way__steps li { align-self: stretch; }
  .way .btn { align-self: end; justify-self: start; margin-top: 0; }
}

/* ==========================================================================
   Responsive: shop
   ========================================================================== */
@media (max-width: 1000px) {
  .shop-hero__head { grid-template-columns: 1fr; }
  .duo { flex-direction: column; }
  .duo__pane { flex: none; min-height: 520px; }
  .bays { grid-template-columns: 1fr; }
  .ways__head { grid-template-columns: 1fr; }
  .ways__head p { justify-self: start; }
  .ways__list { grid-template-columns: 1fr; }
  .way { min-height: 0; }
  .way h3 { margin-top: 28px; }
}
@media (max-width: 640px) {
  .shop-hero__frame { padding-top: calc(var(--nav-h) + 36px); }
  .shop-hero__title { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .duo__pane { min-height: 460px; }
  .seg { width: 100%; justify-content: flex-start; }
  .bay__plate { aspect-ratio: 1; }
  .bay__actions .btn { width: 100%; }
  .cmp__row { grid-template-columns: minmax(96px, .9fr) minmax(0, 1fr) minmax(0, 1fr); }
  .cmp__term, .cmp__cell { padding: 8px; font-size: .92rem; }
  .cmp__product { flex-direction: column; align-items: flex-start; gap: 6px; padding: 0 8px; }
  .cmp__product img { width: 48px; height: 56px; }
  .cmp__product strong { font-size: 1rem; }
  .pending { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
}

/* Pointer tilt (set by shop.js) */
.duo__img {
  transform: translate(-50%, -50%) perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: height .9s var(--spring), transform .9s var(--spring);
}
.duo__img.is-tilting { transition: height .9s var(--spring), transform .25s ease-out; }
.bay__plate img {
  transform: translateY(var(--lift, 0)) scale(var(--sc, 1)) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
}
.bay:hover .bay__plate img { --lift: -8px; --sc: 1.03; transform: translateY(var(--lift)) scale(var(--sc)) perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.bay__plate img.is-tilting { transition: transform .25s ease-out, opacity .35s; }

/* Duo panes: the device gets its own zone above the info block */
.duo { min-height: 540px; }
.duo__pane { --info: 196px; }

.duo__img {
  top: calc((100% - var(--info)) / 2 + 18px);
  height: min(calc(100% - var(--info) - 24px), 560px);
}
.duo__pane:hover .duo__img { height: min(calc(100% - var(--info) + 8px), 600px); }
.shop-hero__title { font-size: min(clamp(2.6rem, 5vw, 4.6rem), 8.4vh); }
@media (max-width: 640px) {
  .duo__pane { --info: 220px; }
  .shop-hero__title { font-size: clamp(2.2rem, 10vw, 2.8rem); }
}
.bay__plate { aspect-ratio: 16 / 10.5; }
.bay__plate img { height: 84%; }
.mark--no { display: inline-block; width: 14px; height: 2px; border-radius: 2px; background: rgba(11, 31, 22, .3); }
.cmp__note a { color: var(--forest); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

/* Tablet: keep the two product bays side by side, smaller plates */
@media (min-width: 641px) and (max-width: 1000px) {
  .bays { grid-template-columns: 1fr 1fr; }
  .bay__plate { aspect-ratio: 1; }
  .bay__plate img { height: 78%; }
  .bay__actions .btn { flex: 1 1 100%; }
  .ways__list { grid-template-columns: 1fr 1fr; }
  .way--team { grid-column: 1 / -1; }
}

/* Ready for more products: the compare sheet takes one column per product */
.cmp__scroll { overflow-x: auto; margin-inline: -4px; padding-inline: 4px; }
.cmp__sheet { min-width: calc(200px + var(--n, 2) * 170px); }
.cmp__row { grid-template-columns: minmax(140px, 1fr) repeat(var(--n, 2), minmax(0, 1fr)); }
.cmp__text--na { color: var(--ink-2); font-weight: 400; }
.bays { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
@media (max-width: 640px) {
  .cmp__sheet { min-width: calc(120px + var(--n, 2) * 120px); }
  .cmp__row { grid-template-columns: minmax(96px, .9fr) repeat(var(--n, 2), minmax(0, 1fr)); }
}
