/**
 * PDP theme color guard — must load AFTER styles.css (via acme-head-performance.phtml).
 * styles.css loads last and can reset page shell / pill / ATC colors to non-theme values.
 */

body.acme-pdp-page,
body.catalog-product-view {
    --acme-ink: #0f2d52;
    --acme-cta: #ad2733;
    --acme-blue: #1f99ce;
    --acme-stage: #f8f9fc;
}

body.acme-pdp-page .page-wrapper,
body.catalog-product-view .page-wrapper {
    background: #f8f9fc !important;
}

body.acme-pdp-page .acme-pdp__hero,
body.acme-pdp-page .acme-pdp__info,
body.acme-pdp-page .acme-pdp__panel,
body.catalog-product-view .acme-pdp__hero,
body.catalog-product-view .acme-pdp__info,
body.catalog-product-view .acme-pdp__panel {
    background: transparent !important;
    background-color: transparent !important;
}

body.acme-pdp-page .acme-pdp__title,
body.acme-pdp-page .acme-pdp__title-wrap .page-title,
body.acme-pdp-page .acme-pdp__option-label,
body.acme-pdp-page .acme-pdp-tiers__heading {
    color: #0f2d52 !important;
}

/* Match production HTML Head lock (acmetextiles.com): title stays 26px, not clamp→2rem. */
body.acme-pdp-page .acme-pdp__title,
body.acme-pdp-page .acme-pdp__title-wrap .page-title {
    font-size: 26px !important;
    line-height: 1.2 !important;
}

body.acme-pdp-page .acme-pdp-tiers__brand,
body.acme-pdp-page .acme-pdp-tiers__brand-text,
body.acme-pdp-page .acme-pdp-tiers__brand-strong,
body.acme-pdp-page .acme-pdp-tiers__brand-light {
    color: #ffffff !important;
}

body.acme-pdp-page .acme-pdp__price-row .price-box .price,
body.acme-pdp-page .acme-pdp__price-row .special-price .price,
body.acme-pdp-page .acme-pdp__price-row .normal-price .price,
body.acme-pdp-page .acme-pdp__price .price-box .price,
body.acme-pdp-page span.price {
    color: #0f2d52 !important;
}

body.acme-pdp-page .acme-pdp__price-row .old-price .price,
body.acme-pdp-page .acme-pdp__price .old-price .price {
    color: #374151 !important;
    -webkit-text-fill-color: #374151 !important;
    text-decoration-color: #374151 !important;
}

/* Beat stale pub/static acme-pdp / audit-fixes (#9aa3af / rgba 0.38) — guard is symlinked */
html body.acme-pdp-page .acme-pdp-similar .acme-product-card__price .old-price .price,
html body.acme-pdp-page .acme-pdp-similar .acme-product-card__price span.old-price .price {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    opacity: 1 !important;
    text-decoration: line-through !important;
    text-decoration-color: #6b7280 !important;
}

body.acme-pdp-page .acme-pdp__pill,
body.acme-pdp-page button.acme-pdp__pill,
body.acme-pdp-page a.acme-pdp__pill {
    border: 1px solid rgba(31, 153, 206, 0.7) !important;
    background: linear-gradient(180deg, rgba(31, 153, 206, 0.0028) 0%, rgba(31, 153, 206, 0.028) 100%), #ffffff !important;
    color: #001a1e !important;
}

body.acme-pdp-page .acme-pdp__pill.is-selected,
body.acme-pdp-page .acme-pdp__pill[aria-selected="true"] {
    background: #1f99ce !important;
    border-color: #1f99ce !important;
    color: #ffffff !important;
}

body.acme-pdp-page .acme-pdp__atc {
    background: #ad2733 !important;
    color: #ffffff !important;
}

body.acme-pdp-page .acme-pdp__atc:hover {
    background: #961f2a !important;
}

body.acme-pdp-page .acme-pdp__gallery #gallery-main,
body.acme-pdp-page .acme-pdp__gallery [data-track] {
    background: #f8f9fc !important;
}

body.acme-pdp-page .acme-pdp-tiers__item {
    border-left-color: #1f99ce !important;
}

/* v22 — mobile main stage 1:1 (loads after styles.css) */
@media (max-width: 1023px) {
    html body.acme-pdp-page .acme-pdp__gallery .snap-slider > .relative {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: 1 / 1 !important;
    }

    html body.acme-pdp-page .acme-pdp__gallery #gallery-main img,
    html body.acme-pdp-page .acme-pdp__gallery [data-track] img {
        object-fit: contain !important;
        object-position: center center !important;
    }
}
