.gift-page {
  --gift-ink: var(--color-copy, #fff);
  --gift-paper: var(--color-elevated, #1c1c1a);
  --gift-soft: var(--color-muted, #b4b3aa);
  --gift-line: var(--color-line, #373733);
  --gift-gold: var(--color-accent-fill, #fcc11c);
  --gift-black: var(--color-on-accent, #0a0a0a);
  color: var(--gift-ink);
  margin: 0 auto;
  max-width: 80rem;
}
.gift-page [hidden] { display: none !important; }
.gift-page :is(a, button, select):focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.gift-page button:not(:disabled), .gift-page select { cursor: pointer; }
.gift-page button:disabled { opacity: .55; cursor: default; }
.gift-crumb { display: flex; align-items: center; gap: .65rem; font-size: .82rem; color: var(--gift-soft); margin: 0 0 1rem; }
.gift-crumb a:hover { color: var(--gift-ink); text-decoration: underline; }
.gift-notice { margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid var(--gift-line); border-radius: .75rem; background: var(--gift-paper); }
.gift-notice a { text-decoration: underline; text-underline-offset: .15em; }
.gift-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  overflow: hidden;
  min-height: 17rem;
  border-radius: var(--store-panel-radius);
  background: var(--gift-gold);
  color: var(--gift-black);
}
.gift-hero-copy { min-width: 0; overflow-wrap: anywhere; align-self: center; padding: clamp(1.5rem, 3.3vw, 3.75rem); }
.gift-hero h1 { font-size: clamp(3.25rem, 6vw, 6.2rem); font-stretch: 76%; font-weight: 900; letter-spacing: -.055em; line-height: .98; margin: 0 0 1rem; }
.gift-hero p { max-width: 34rem; font-size: clamp(.95rem, 1.25vw, 1.08rem); line-height: 1.45; }
.gift-primary, .gift-secondary, .gift-add {
  display: inline-flex; align-items: center; justify-content: center; gap: .7rem;
  min-height: 2.75rem; padding: .55rem 1rem; border-radius: var(--radius-button);
  font-size: .88rem; line-height: 1.25; font-weight: 750; text-align: center;
}
.gift-primary { background: var(--gift-gold); color: var(--gift-black); }
.gift-primary:hover:not(:disabled) { background: var(--color-accent-fill-hover); }
.gift-secondary, .gift-add { border: 1px solid var(--color-control-line); color: var(--gift-ink); }
.gift-secondary:hover:not(:disabled), .gift-add:hover:not(:disabled) { border-color: var(--gift-gold); color: var(--gift-gold); }
.gift-hero .gift-primary { background: var(--gift-black); color: var(--gift-ink); margin-top: 1.2rem; }
.gift-hero .gift-primary:hover { background: var(--gift-paper); }
.gift-hero .gift-primary:focus-visible { outline-color: var(--gift-black); }
.gift-hero .gift-primary span { font-size: 1.13rem; line-height: 1; }
.gift-art { position: relative; display: grid; place-items: center; min-width: 0; overflow: hidden; pointer-events: none; }
.gift-art::before {
  content: ""; position: absolute; width: 150%; aspect-ratio: 1; border-radius: 50%;
  background: repeating-radial-gradient(ellipse at center, transparent 0 19px, rgb(35 25 4 / .25) 20px 21px, transparent 22px 34px);
  transform: skewX(-22deg) rotate(-10deg) translateX(7%);
}
.gift-parcel {
  position: relative; width: 58%; max-width: 18rem; aspect-ratio: 1.48;
  background: #282722; border: 2px solid #10100e; border-radius: 5px;
  transform: rotate(-13deg) skewX(7deg); box-shadow: -1px 4px #161614, -3px 8px #161614, -5px 12px #161614, -7px 16px #161614, -12px 20px 0 rgb(52 36 8 / .25);
}
.gift-parcel::before, .gift-parcel::after, .gift-ribbon { content: ""; position: absolute; background: var(--gift-gold); }
.gift-parcel::before { left: 27%; width: 12%; top: -1px; bottom: -1px; }
.gift-parcel::after { top: 57%; height: 15%; left: -1px; right: -1px; }
.gift-ribbon { top: 58%; height: 12%; left: 0; right: 0; z-index: 1; background: repeating-linear-gradient(115deg, transparent 0 12px, #282722 12px 14px, transparent 14px 19px); }
.gift-parcel img { position: absolute; top: 17%; right: 9%; width: 30%; height: 24%; object-fit: contain; }
.gift-presets, .gift-build { margin-top: clamp(2.1rem, 4vw, 4.1rem); }
.gift-build { scroll-margin-top: 1rem; }
.gift-page h2 { font-size: clamp(1.9rem, 3.3vw, 3.2rem); line-height: 1.05; margin: 0 0 1.05rem; }
.gift-preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.75rem, 1.3vw, 1.2rem); }
.gift-preset, .gift-tray, .gift-product { border: 1px solid var(--gift-line); border-radius: var(--store-panel-radius); background: var(--gift-paper); overflow: hidden; }
.gift-preset { display: flex; flex-direction: column; }
.gift-preset-photo { aspect-ratio: 1.95; background: var(--color-surface-muted); overflow: hidden; }
.gift-preset-photo img, .gift-product-photo img { width: 100%; height: 100%; object-fit: cover; }
.gift-preset-body { flex: 1; display: flex; flex-direction: column; padding: clamp(.9rem, 1.5vw, 1.4rem); }
.gift-preset h3 { font-size: clamp(1.22rem, 2.2vw, 1.85rem); font-stretch: 80%; font-weight: 800; line-height: 1.1; margin-bottom: .55rem; }
.gift-preset ul { margin: 0 0 1rem; padding: 0; font-size: .85rem; color: var(--gift-soft); line-height: 1.55; list-style: none; }
.gift-preset-order, .gift-product-actions, .gift-fee, .gift-total { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.gift-preset-order { margin-top: auto; flex-wrap: wrap; padding-top: .8rem; border-top: 1px solid var(--gift-line); }
.gift-preset-order strong { font-size: clamp(1.15rem, 1.8vw, 1.55rem); white-space: nowrap; }
.gift-build h2 { margin-bottom: .4rem; }
.gift-build-note, .gift-empty-shelf { color: var(--gift-soft); font-size: .94rem; }
.gift-builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(17rem, 26%); align-items: start; gap: clamp(1rem, 2vw, 2rem); margin-top: 1.5rem; }
.gift-shelves, .gift-shelf { min-width: 0; }
.gift-shelf + .gift-shelf { margin-top: 1.6rem; }
.gift-shelf-heading { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .65rem; }
.gift-shelf h3, .gift-tray h3 { font-size: 1.4rem; font-weight: 800; font-stretch: 82%; line-height: 1.15; }
.gift-scroll-controls { display: flex; gap: .35rem; }
.gift-scroll-controls button { width: 2.75rem; height: 2.75rem; border: 1px solid var(--gift-line); border-radius: 50%; font-size: 1.1rem; }
.gift-products { display: grid; grid-auto-flow: column; grid-auto-columns: clamp(10rem, 27%, 15rem); gap: .7rem; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: .55rem; scrollbar-width: thin; scrollbar-color: var(--color-control-line) transparent; }
.gift-product { display: flex; flex-direction: column; scroll-snap-align: start; border-radius: 1rem; }
.gift-product-photo { aspect-ratio: 1.36; background: var(--color-surface-muted); }
.gift-product-body { flex: 1; display: flex; flex-direction: column; padding: .85rem; gap: .6rem; }
.gift-product h4 { font-size: .98rem; font-weight: 730; line-height: 1.2; overflow-wrap: anywhere; }
.gift-single-variant { margin-top: auto; font-size: .85rem; color: var(--gift-soft); }
.gift-preset-field { display: grid; gap: .35rem; flex-basis: 100%; font-size: .85rem; }
.gift-select, .gift-preset-size { margin-top: auto; display: block; width: 100%; min-height: 2.75rem; background: var(--color-surface-muted); color: var(--gift-ink); border: 1px solid var(--gift-line); border-radius: .6rem; padding-inline: .4rem; font-size: .85rem; }
.gift-product-actions { flex-wrap: wrap; }
.gift-product-actions strong { white-space: nowrap; }
.gift-add { padding: .4rem .7rem; font-size: .82rem; }
.gift-tray { position: sticky; top: 1rem; }
.gift-tray-toggle { display: none; }
.gift-tray-body { padding: 1.15rem; }
.gift-remaining { color: var(--gift-soft); font-size: .82rem; margin: .35rem 0 1rem; }
.gift-tray-empty { padding: 1.2rem .65rem; text-align: center; color: var(--gift-soft); border: 1px dashed var(--color-control-line); border-radius: .85rem; font-size: .85rem; }
.gift-lines { max-height: 32vh; overflow: auto; display: grid; gap: .6rem; list-style: none; }
.gift-line { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: .6rem; align-items: start; }
.gift-line img, .gift-line-placeholder { width: 2.75rem; height: 2.75rem; object-fit: cover; border-radius: .4rem; background: var(--color-surface-muted); }
.gift-line strong { display: block; font-size: .83rem; line-height: 1.3; }
.gift-line-warning { display: block; color: var(--color-danger); font-size: .78rem; }
.gift-stepper { display: flex; gap: .25rem; align-items: center; color: var(--gift-soft); font-size: .83rem; }
.gift-stepper button { min-width: 2.75rem; min-height: 2.75rem; font-size: 1.18rem; color: var(--gift-ink); }
.gift-fee { color: var(--gift-soft); font-size: .82rem; margin-top: .9rem; }
.gift-total { border-top: 1px solid var(--gift-line); margin: .8rem 0 .9rem; padding-top: .7rem; font-weight: 700; }
.gift-total strong { font-size: 1.45rem; }
.gift-tray-body :is(.gift-primary, .gift-secondary) { width: 100%; }
.gift-tray-body .gift-secondary { margin-top: .45rem; }
@media (min-width: 1024px) {
  .gift-build { scroll-margin-top: 5.5rem; }
  .gift-tray { top: 5.5rem; }
}
@media (max-width: 767px) {
  .gift-page { padding-bottom: 4.7rem; }
  .gift-hero { grid-template-columns: 1fr; min-height: 0; }
  .gift-hero-copy { position: relative; z-index: 1; padding: 1.3rem; }
  .gift-hero h1 { max-width: 70%; margin-bottom: .8rem; font-size: clamp(2.45rem, 9.8vw, 4rem); }
  .gift-hero p { max-width: 32rem; }
  .gift-art { position: absolute; top: 0; right: 0; width: 31%; height: 5.8rem; }
  .gift-parcel { width: 64%; }
  .gift-preset-grid { display: grid; grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: min(84%, 20rem); overflow-x: auto; scroll-snap-type: x mandatory; gap: .7rem; padding-bottom: .5rem; }
  .gift-preset { scroll-snap-align: start; }
  .gift-preset-photo { aspect-ratio: 1.95; }
  .gift-preset h3 { font-size: 1.45rem; }
  .gift-builder { display: block; }
  .gift-products { grid-auto-columns: min(64%, 13rem); }
  .gift-scroll-controls { display: none; }
  .gift-tray { position: fixed; z-index: 44; inset: auto 0 var(--store-tabs-height, 0px); border-radius: 1rem 1rem 0 0; border-bottom: 0; box-shadow: 0 -4px 24px rgb(0 0 0 / .4); }
  .gift-tray-toggle { display: flex; align-items: center; gap: .7rem; width: 100%; min-height: 3.8rem; padding: .5rem max(1rem, env(safe-area-inset-right)) .5rem max(1rem, env(safe-area-inset-left)); text-align: left; }
  .gift-tray-toggle > span:first-child { flex: 1; font-weight: 800; font-size: 1.05rem; }
  .gift-tray-toggle small { display: block; font-weight: 450; font-size: .75rem; color: var(--gift-soft); }
  .gift-tray-toggle strong { color: var(--gift-gold); font-size: 1.2rem; }
  .gift-chevron { font-size: 1.2rem; line-height: 1; }
  .gift-tray-toggle[aria-expanded="true"] .gift-chevron { transform: rotate(180deg); }
  .gift-tray-toggle[aria-expanded="false"] + .gift-tray-body { display: none; }
  .gift-tray-body { overflow-y: auto; max-height: calc(80dvh - var(--store-tabs-height, 0px) - 4rem); border-top: 1px solid var(--gift-line); padding: .8rem 1rem; }
  .gift-tray-body h3 { display: none; }
  .gift-tray-body .gift-remaining { margin-top: 0; }
  .gift-tray-body .gift-lines { max-height: 25dvh; }
}
