/* Product detail page only; the shared home/catalog cards keep their own styles. */
.gift-page { padding-top: 48px; padding-bottom: 80px; }
.gift-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.gift-breadcrumbs { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 12px 18px; font-size: 14px; line-height: 20px; }
.gift-breadcrumbs a { text-decoration: none; }
.gift-breadcrumbs a:hover { text-decoration: underline; }
.gift-breadcrumbs [aria-current] { min-width: 0; overflow-wrap: anywhere; }
.gift-overview { display: grid; grid-template-columns: minmax(0, 580px) minmax(0, 1fr); gap: 48px; align-items: start; }
.gift-gallery { display: flex; flex-direction: column; min-width: 0; aspect-ratio: 1; padding: 16px 16px 8px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.gift-gallery__stage { position: relative; flex: 1; min-height: 0; overflow: hidden; border-radius: 12px; background: var(--surface); }
.gift-photo-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; background: var(--page); color: var(--muted); font-size: 14px; text-align: center; }
.gift-gallery__main { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.gift-gallery__thumbnails { display: flex; flex: 0 0 auto; gap: 12px; width: fit-content; max-width: 100%; margin: 12px auto 0; padding: 0; overflow-x: auto; overscroll-behavior-x: contain; }
.gift-gallery__thumbnail { position: relative; flex: 0 0 72px; width: 72px; height: 72px; overflow: hidden; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.gift-gallery__thumbnail img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
/* Red border indicates the selected photo; it is not a mouse-focus outline. */
.gift-gallery__thumbnail.is-current { border: 2px solid var(--red); }
.gift-gallery__thumbnail .gift-photo-placeholder { padding: 4px; font-size: 12px; }
.gift-details { min-width: 0; padding: 30px 23px 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.gift-details h1 { margin: 0; font-size: 32px; line-height: 44px; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.gift-details__meta { margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 24px; }
.gift-details__price { margin: 24px 0 0; font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.01em; }
.gift-order-note { display: flex; align-items: baseline; gap: 8px; margin-top: 20px; font-size: 16px; line-height: 24px; }
.gift-order-note__icon { flex: 0 0 18px; color: var(--muted); }
.gift-order-note p { margin: 0; }
.gift-order-note .gift-order-note__extra { margin-top: 4px; font-size: 14px; line-height: 20px; }
.gift-purchase { margin-top: 20px; }
.gift-purchase__label { display: block; margin-bottom: 8px; font-size: 16px; line-height: 24px; }
.gift-purchase__controls { display: flex; align-items: stretch; gap: 16px; }
.gift-purchase__button { flex: 1; min-width: 0; min-height: 48px; padding: 10px 16px; border-radius: 20px; color: var(--page); font-size: 18px; line-height: 24px; font-weight: 600; }
.gift-purchase__status, .gift-purchase__notice { margin: 12px 0 0; font-size: 14px; line-height: 20px; }
.gift-purchase__status { color: var(--green); }
.gift-purchase__status.is-error { color: var(--red); }
.gift-specifications { margin-top: 28px; }
.gift-specifications h2 { margin: 0 0 12px; font-size: 18px; line-height: 26px; font-weight: 500; }
.gift-specifications dl { display: flex; flex-direction: column; gap: 8px; margin: 0; color: var(--muted); font-size: 16px; line-height: 24px; }
.gift-specifications dl > div { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: 16px; }
.gift-specifications dt, .gift-specifications dd { margin: 0; overflow-wrap: anywhere; }
.gift-specifications .gift-stock { color: #238464; }
.gift-empty-note { margin: 18px 0 0; color: var(--muted); font-size: 14px; line-height: 22px; }
.gift-composition { margin-top: 32px; padding: 18px 0 24px; border-radius: 20px; background: var(--surface); scroll-margin-top: 116px; }
.gift-composition > h2 { margin: 0 16px; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -.025em; text-align: center; }
.gift-composition__summary { margin: 8px 16px 32px; color: var(--muted); font-size: 16px; line-height: 24px; text-align: center; }
.gift-candy-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.candy-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 16px 14px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: center; }
.candy-card__quantity { position: absolute; top: 0; right: 0; z-index: 1; padding: 1px 4px; border: solid var(--border); border-width: 0 0 1px 1px; border-radius: 0 11px 0 4px; background: var(--surface); color: var(--muted); font-size: 14px; line-height: 20px; }
.candy-card__image { position: relative; flex-shrink: 0; width: 100%; aspect-ratio: 1; overflow: hidden; }
.candy-card__image img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; background: var(--surface); }
.candy-card__name { margin: 16px 0 2px; font-size: 16px; line-height: 22px; font-weight: 500; overflow-wrap: anywhere; }
.candy-card__manufacturer { margin: auto 0 0; padding-top: 2px; color: var(--muted); font-size: 14px; line-height: 20px; overflow-wrap: anywhere; }
.gift-composition__toggle { display: block; max-width: calc(100% - 32px); margin: 16px auto 0; padding: 8px 4px; border: 0; background: none; color: var(--text); font-size: 14px; line-height: 20px; cursor: pointer; }
.gift-composition__toggle:hover { color: var(--red); }
.gift-composition__empty { margin: 24px 16px 8px; color: var(--muted); text-align: center; }
@media (min-width: 1024px) and (max-width: 1279px) {
    .gift-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
    .gift-details { padding: 24px 20px; }
    .gift-details h1 { font-size: 28px; line-height: 36px; }
}
@media (max-width: 1023px) {
    .gift-page { padding-top: 26px; padding-bottom: 56px; }
    .gift-breadcrumbs { margin: 0 0 8px; gap: 2px 8px; font-size: 13px; line-height: 18px; }
    .gift-overview { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .gift-gallery { width: 100%; max-width: 580px; margin: 0 auto; padding: 0; aspect-ratio: auto; border: 0; background: none; }
    .gift-gallery__stage { flex: none; width: 100%; aspect-ratio: 1; border: 1px solid var(--border); border-radius: 18px; }
    .gift-gallery__thumbnails { gap: 20px; margin-top: 12px; }
    .gift-gallery__thumbnail { flex-basis: 64px; width: 64px; height: 64px; }
    .gift-details { padding: 20px; border-radius: 18px; }
    .gift-details h1 { font-size: 28px; line-height: 36px; }
    .gift-details__meta { margin-top: 14px; font-size: 15px; line-height: 22px; }
    .gift-details__price { margin-top: 20px; font-size: 30px; line-height: 38px; }
    .gift-order-note { margin-top: 18px; font-size: 14px; line-height: 20px; gap: 6px; }
    .gift-order-note__extra { display: none; }
    .gift-purchase { margin-top: 18px; }
    .gift-purchase__label { font-size: 15px; line-height: 22px; }
    .gift-purchase__controls { gap: 12px; }
    .quantity-selector { flex-basis: 112px; width: 112px; height: 48px; }
    .quantity-selector button { flex-basis: 36px; }
    .quantity-selector input { font-size: 15px; }
    .gift-purchase__button { min-height: 48px; padding-inline: 8px; border-radius: 12px; font-size: 15px; line-height: 20px; }
    .gift-specifications { margin-top: 28px; }
    .gift-specifications h2 { font-size: 18px; line-height: 26px; }
    .gift-specifications dl { font-size: 14px; line-height: 22px; gap: 8px; }
    .gift-specifications dl > div { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 12px; }
    .gift-composition { margin-top: 48px; padding-top: 16px; scroll-margin-top: 90px; }
    .gift-composition > h2 { font-size: 26px; line-height: 34px; }
    .gift-composition__summary { margin: 8px 12px 20px; font-size: 14px; line-height: 20px; }
    .gift-candy-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 767px) {
    .gift-candy-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .candy-card { padding: 12px 8px 8px; border-radius: 8px; }
    .candy-card__name { margin-top: 12px; font-size: 12px; line-height: 16px; font-weight: 500; }
    .candy-card__manufacturer { font-size: 12px; line-height: 16px; }
    .candy-card__quantity { padding: 0 3px; border-radius: 0 7px 0 3px; font-size: 12px; line-height: 16px; }
    .candy-card .gift-photo-placeholder { padding: 4px; font-size: 12px; line-height: 16px; }
}
@media (max-width: 359px) {
    .gift-details { padding: 16px; }
    .gift-details h1 { font-size: 26px; line-height: 34px; }
    .gift-purchase__controls { gap: 8px; }
    .quantity-selector { flex-basis: 104px; width: 104px; }
    .quantity-selector button { flex-basis: 32px; }
}

/* Enlarged gallery: native modal keeps keyboard focus inside the viewer. */
.gift-gallery__zoom { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.gift-gallery__zoom span { position: absolute; bottom: 12px; right: 12px; display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 50%; background: #fff; color: var(--red); font-size: 26px; box-shadow: 0 2px 10px #0000000d; }
.gift-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 24px; border: 0; background: transparent; color: var(--text); overflow: auto; }
.gift-lightbox[open] { display: grid; place-items: center; }
.gift-lightbox::backdrop { background: rgb(10 20 16 / 78%); backdrop-filter: blur(5px); }
.gift-lightbox__panel { position: relative; width: min(940px, 100%); padding: 48px 20px 12px; border-radius: 20px; background: #fff; box-shadow: 0 16px 70px #00000040; }
.gift-lightbox__close { position: absolute; z-index: 1; top: 8px; right: 8px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--page); color: var(--text); font-size: 30px; line-height: 1; cursor: pointer; }
.gift-lightbox__stage { position: relative; height: min(76vh, 820px); height: min(76dvh, 820px); min-height: 100px; }
.gift-lightbox__image { display: block; width: 100%; height: 100%; object-fit: contain; }
.gift-lightbox__message { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px; color: var(--muted); text-align: center; }
.gift-lightbox__navigation { display: flex; justify-content: center; align-items: center; gap: 20px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.gift-lightbox__navigation button { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 50%; background: var(--page); color: var(--red); font-size: 24px; cursor: pointer; }
.gift-lightbox__close:hover, .gift-lightbox__navigation button:hover { background: #eee9e1; }
@media (max-width: 767px) {
    .gift-lightbox { padding: 12px; }
    .gift-lightbox__panel { padding: 48px 8px 12px; border-radius: 16px; }
    .gift-lightbox__stage { height: min(68vh, 700px); height: min(68dvh, 700px); }
}
