/* Shared light surfaces for the existing product and retail checkout templates.
 * Legacy utility classes are mapped here so server and JavaScript validation,
 * stock, selection and visibility states keep their original behaviour.
 */
.commerce-surface {
    --commerce-ink: #1d1d1f;
    --commerce-muted: #626267;
    --commerce-line: #d9d9d6;
    --commerce-surface: #f5f5f3;
    --commerce-gold: #8a651e;
    background: #fff;
    color: var(--commerce-ink);
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

.commerce-surface [id] { scroll-margin-top: calc(var(--site-header-height, 120px) + 20px); }
.commerce-surface :is(h1, h2, h3, h4) { color: var(--commerce-ink); letter-spacing: -.025em; }
.commerce-surface :is(.text-white, .text-gray-100, .text-gray-200, .text-black) { color: var(--commerce-ink); }
.commerce-surface .text-gray-300 { color: #48484e; }
.commerce-surface :is(.text-gray-400, .text-gray-500) { color: var(--commerce-muted); }
.commerce-surface :is(.text-yellow-100, .text-yellow-200, .text-yellow-300, .text-yellow-400, [class~="text-yellow-200/90"]) { color: var(--commerce-gold); }
.commerce-surface :is(.text-green-200, .text-green-300, .text-green-400, [class~="text-green-300/90"]) { color: #226143; }
.commerce-surface :is(.text-red-200, .text-red-300, .text-red-400, [class~="text-red-300/90"]) { color: #a42630; }
.commerce-surface :is(.text-blue-300, .text-blue-400, .text-sky-200) { color: #205d83; }
.commerce-surface .text-pink-200 { color: #91385e; }
.commerce-surface .text-orange-100 { color: #825911; }

.commerce-surface :is(.bg-gray-800, [class~="bg-gray-800/30"], [class~="bg-gray-800/50"], [class~="bg-gray-900/60"], [class~="bg-gray-900/70"]) { background-color: var(--commerce-surface); }
.commerce-surface .bg-gray-900 { background-color: #fff; }
.commerce-surface .bg-gray-950 { background-color: #f0f0ee; }
.commerce-retail .bg-black { background-color: var(--commerce-surface); }
.commerce-surface :is(.bg-gradient-to-r, .bg-gradient-to-br) { background-image: none; }
.commerce-surface :is(.border-gray-600, .border-gray-700) { border-color: var(--commerce-line); }
.commerce-surface :is(.border-yellow-400, .border-yellow-500) { border-color: #ad8840; }
.commerce-surface :is([class~="border-yellow-400/40"], [class~="border-yellow-400/70"], [class~="border-yellow-500/30"], [class~="border-yellow-500/40"], [class~="border-yellow-500/50"], [class~="border-yellow-500/60"], [class~="border-yellow-500/70"]) { border-color: #d9c596; }
.commerce-surface :is(.bg-yellow-400, .bg-yellow-500) { background-color: #e3c78e; color: var(--commerce-ink); }
.commerce-surface :is([class~="bg-yellow-500/10"], [class~="bg-yellow-900/20"], [class~="bg-orange-500/20"]) { background-color: #fcf6e9; }
.commerce-surface :is([class~="bg-blue-500/10"], [class~="bg-blue-900/20"], [class~="bg-sky-400/15"]) { background-color: #edf4fa; }
.commerce-surface [class~="bg-pink-400/15"] { background-color: #faedf2; }
.commerce-surface [class~="border-orange-400/80"] { border-color: #d9c596; box-shadow: none; }
.commerce-surface :is([class~="bg-red-500/10"], [class~="bg-red-900/20"]) { background-color: #fff0f0; }
.commerce-surface [class~="bg-green-500/10"] { background-color: #edf8f2; }
.commerce-surface .bg-red-500 { background-color: #b4232c; color: #fff; }
.commerce-surface .bg-green-500 { background-color: #23744a; color: #fff; }

.commerce-surface a:is([class~="hover:text-yellow-200"], [class~="hover:text-yellow-300"]):hover { color: #614613; }
.commerce-surface :is(a, button, summary):focus-visible {
    outline: 2px solid var(--commerce-gold);
    outline-offset: 4px;
}

/* Calm product presentation, while retaining the full purchase information. */
.commerce-product { max-width: 1184px; padding: 32px 32px 72px; }
.commerce-product > nav { margin-bottom: 26px; }
.commerce-product-grid { gap: 36px; }
.commerce-product-grid > * { min-width: 0; }
.commerce-product-heading h1 { font-size: clamp(27px, 3vw, 42px); font-weight: 600; line-height: 1.13; letter-spacing: -.04em; }
.commerce-product-heading > p { font-size: 15px; line-height: 1.7; margin-top: 18px; }
.commerce-product-heading > span { margin-top: 12px; font-size: 10px; font-weight: 600; letter-spacing: .035em; }
.commerce-product .commerce-gallery-main { border-color: #e6e6e3; border-radius: 20px; box-shadow: none; }
.commerce-product #thumbnailGallery { gap: 10px; }
.commerce-product #thumbnailGallery button { border-radius: 12px; }
.commerce-product #thumbnailGallery button.border-yellow-400 { border-color: var(--commerce-gold); }
.commerce-product #thumbnailGallery button:hover { border-color: var(--commerce-gold); }
.commerce-product #thumbnailGallery .bg-yellow-400 { background-color: #e3c78e; }
.commerce-product .commerce-details { margin-top: 64px; }
.commerce-product .commerce-details > div:first-child { border-color: var(--commerce-line); }
.commerce-product .tab-button { min-height: 46px; color: var(--commerce-muted); font-size: 14px; font-weight: 500; }
.commerce-product .tab-button:hover { color: var(--commerce-ink); }
.commerce-product .tab-button[aria-selected="true"] { border-color: var(--commerce-gold); color: var(--commerce-ink); font-weight: 650; }
.commerce-product .tab-content > div { border-radius: 18px; }
.commerce-product #content-specs dl > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.commerce-product #content-specs dd { overflow-wrap: anywhere; }

/* Form states remain driven by the original inputs, Twig and JavaScript. */
.commerce-surface .commerce-checkout-panel { padding: 26px; border: 1px solid #e3e3df; border-radius: 20px; background: var(--commerce-surface); }
.commerce-surface .commerce-pack-option { min-width: 0; padding: 16px; border-radius: 12px; background-color: #fff; }
.commerce-surface .commerce-pack-option > div { min-width: 0; }
.commerce-surface .commerce-pack-option:has(input[type="radio"]:checked) { border-color: var(--commerce-gold); background-color: #fcf8ef; box-shadow: inset 0 0 0 1px var(--commerce-gold); }
.commerce-surface .commerce-pack-option:has(input[type="radio"]:focus-visible) { outline: 2px solid var(--commerce-gold); outline-offset: 3px; }
.commerce-surface .commerce-pack-option:has(input[type="radio"]:disabled) { background-color: #eee; box-shadow: none; }
.commerce-surface .commerce-pack-option .text-yellow-400,
.commerce-retail .commerce-pack-option .text-yellow-300 { color: var(--commerce-ink); }
.commerce-surface input[type="radio"] { flex-shrink: 0; accent-color: var(--commerce-gold); }
.commerce-surface :where(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select, textarea) {
    min-width: 0;
    min-height: 44px;
    border-color: #c9c9c6;
    border-radius: 9px;
    background: #fff;
    color: var(--commerce-ink);
}
.commerce-surface :is(input, textarea)::placeholder { color: #79797e; opacity: 1; }
.commerce-surface :where(input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]), select, textarea):focus-visible {
    outline: 2px solid var(--commerce-gold);
    outline-offset: 2px;
    border-color: var(--commerce-gold);
    box-shadow: none;
}
.commerce-surface :is(input, select, textarea).border-red-500 { border-color: #b4232c; }
.commerce-surface :is(input, select, textarea).border-red-500:focus-visible { outline-color: #b4232c; border-color: #b4232c; }
.commerce-surface :is(input, select, textarea):disabled { background: #ededeb; color: #68686d; }
.commerce-surface #applyDiscountButton { min-height: 44px; border: 1px solid #d3ba85; background: #ead6ad; color: #3b2e16; }
.commerce-surface #applyDiscountButton:hover { background: #e3c78e; }
.commerce-surface #billing_details_toggle { min-height: 44px; border-color: #b89855; color: #765418; }
.commerce-surface #billing_details_toggle:hover { background: #f7efdf; }

.commerce-surface :is(.product-purchase-button, .retail-purchase-button, .commerce-button) {
    display: inline-flex;
    min-height: 50px;
    align-items: center;
    justify-content: center;
    padding: 13px 25px;
    border: 1px solid var(--commerce-ink);
    border-radius: 999px;
    background: var(--commerce-ink);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    box-shadow: none;
    transform: none;
}
.commerce-surface :is(.product-purchase-button, .retail-purchase-button, .commerce-button):hover:not(:disabled) { border-color: #39393d; background: #39393d; color: #fff; box-shadow: none; transform: none; }
.commerce-surface :is(.product-purchase-button, .retail-purchase-button):disabled { cursor: not-allowed; opacity: .55; }
.commerce-surface :is(.success-badge, .error-badge) { box-shadow: none; }
.commerce-surface .success-badge { border-color: #9bc9ae; background: #edf8f2; }
.commerce-surface .error-badge { border-color: #e0a8ab; background: #fff0f0; }
.commerce-surface #checkoutCancelBadge { border-color: #d9c596; background: #fcf6e9; }

/* Retail has the same light palette and a quieter product-led introduction. */
.commerce-retail > section:not(.commerce-retail-hero) { max-width: 1184px; }
.commerce-retail .commerce-retail-hero { border-color: #e5e5e1; background: #f5f5f3; }
.commerce-retail-hero > div { max-width: 1184px; padding-top: 58px; padding-bottom: 58px; }
.commerce-retail-hero h1 { font-size: clamp(34px, 4.5vw, 58px); font-weight: 600; line-height: 1.12; letter-spacing: -.045em; }
.commerce-retail-hero h1 + p { color: #55555c; font-size: 18px; line-height: 1.65; }
.commerce-retail-hero img { border-color: #e1e1dc; border-radius: 18px; box-shadow: none; }
.commerce-retail :is(h2, h3) { font-weight: 600; }
.commerce-retail h2 { letter-spacing: -.035em; line-height: 1.2; }
.commerce-retail #packs { padding-top: 52px; }
.commerce-retail #packs > h2 { font-size: clamp(27px, 3vw, 40px); }
.commerce-retail #packs > p { max-width: 640px; line-height: 1.65; }
.commerce-retail .commerce-pack-option .text-2xl { font-size: 24px; }
.commerce-retail > section:last-child > div { background: #f4f0e7; }

/* Keep the video overlay dark and above the shared sticky header. */
.site-commerce .commerce-video-modal { z-index: 1000; background: rgba(0, 0, 0, .92); }
.site-commerce .commerce-video-modal button { color: #fff; }
.site-commerce .commerce-video-modal button:hover { color: #e3c78e; }

@media (max-width: 1023px) {
    .commerce-product-grid { gap: 36px; }
    .commerce-product-heading h1 { max-width: 660px; }
    .commerce-product .commerce-gallery-main { max-width: 760px; margin-inline: auto; }
}

@media (max-width: 599px) {
    .commerce-product { padding: 24px 18px 48px; }
    .commerce-product > nav { margin-bottom: 22px; font-size: 12px; }
    .commerce-product-heading h1 { font-size: 28px; }
    .commerce-product-heading > p { font-size: 14px; margin-top: 14px; }
    .commerce-product .commerce-gallery-main { border-radius: 15px; }
    .commerce-product #thumbnailGallery { gap: 7px; }
    .commerce-product .commerce-details { margin-top: 42px; }
    .commerce-product .tab-content > div { padding: 20px 16px; }
    .commerce-product #content-specs dl > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
    .commerce-product #content-specs dd { font-size: 14px; }
    .commerce-surface .commerce-checkout-panel { padding: 18px 14px; border-radius: 16px; }
    .commerce-surface .commerce-pack-option { padding: 14px 10px; }
    .commerce-product .commerce-pack-option { gap: 8px; }
    .commerce-product .commerce-pack-option > div { gap: 8px; }
    .commerce-product .commerce-pack-option .package-total-price { font-size: 15px; }
    .commerce-surface :is(.product-purchase-button, .retail-purchase-button, .commerce-button) { padding-inline: 20px; }
    .commerce-retail-hero > div { padding-top: 36px; padding-bottom: 38px; }
    .commerce-retail-hero h1 { font-size: 34px; }
    .commerce-retail-hero h1 + p { font-size: 16px; }
    .commerce-retail .commerce-pack-option { flex-direction: column; gap: 12px; }
    .commerce-retail .commerce-pack-option > .shrink-0 { margin-left: 32px; text-align: left; }
    .commerce-retail #packs { padding-top: 36px; }
}

@media (prefers-reduced-motion: reduce) {
    .commerce-surface *, .commerce-video-modal * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
