/* Public catalogue and product surfaces. Photography, swatch fills and
 * their neutral image backgrounds retain their original colours.
 * Screen-only rules leave printed product information on its light theme. */
@media screen {
    html.aphro-dark body.aphro-theme-enabled .shop-page {
        background: var(--aphro-theme-bg);
    }

    html.aphro-dark body.aphro-theme-enabled .feature-strip {
        background: var(--aphro-theme-surface);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-catalog-intro h1, .aphro-premium-catalog-trust strong, .product-card__title, .account-wishlist-product__body > a) {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-catalog-intro > p:last-child, .aphro-premium-collection-links__label, .aphro-premium-catalog-trust span, .woocommerce-breadcrumb, .product-card__price del) {
        color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-catalog-intro__kicker, .product-card__price, .product-card__price ins) {
        color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-catalog-trust, .aphro-premium-catalog-trust > div + div, .shop-toolbar) {
        border-color: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-collection-links a, .aphro-premium-search-recovery a, .aphro-breadcrumb__item) {
        background-color: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.aphro-premium-collection-links a, .aphro-premium-search-recovery a):is(:hover, :focus-visible, [aria-current="page"]) {
        background-color: var(--aphro-theme-accent);
        border-color: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .aphro-breadcrumb__separator {
        border-color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled .woocommerce-ordering select.orderby {
        background-color: var(--aphro-theme-surface);
        background-image: url("data:image/svg+xml,%3Csvg width='18' height='18' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 9L12 15L18 9' stroke='%23f0a1b2' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
        color-scheme: dark;
    }

    html.aphro-dark body.aphro-theme-enabled .woocommerce-ordering select.orderby:is(:hover, :focus, :focus-visible) {
        border-color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.product-card, .account-wishlist-product) {
        background: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
        box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card:is(:hover, :focus-within) {
        border-color: var(--aphro-theme-accent);
        box-shadow: 0 16px 34px rgba(0, 0, 0, .2);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__price small {
        color: var(--aphro-theme-accent);
        background-color: var(--aphro-theme-raised);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__badge {
        background: var(--aphro-theme-surface);
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.product-card__button, .account-wishlist-cart) {
        background-color: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
        border-color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.product-card__button, .account-wishlist-cart):is(:hover, :focus-visible) {
        background-color: #f8bcc9;
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__wishlist {
        background: var(--aphro-theme-surface);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .22);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__wishlist-icon {
        stroke: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__wishlist:is(:hover, :focus-visible) .product-card__wishlist-icon {
        stroke: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .product-card__wishlist.is-active .product-card__wishlist-icon {
        fill: var(--aphro-theme-accent);
        stroke: var(--aphro-theme-accent);
    }

    /* Search suggestions use the same palette as the catalogue; images stay
     * on their original neutral background. */
    html.aphro-dark body.aphro-theme-enabled .site-search-results {
        background: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled .site-search-result {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled .site-search-result:is(:hover, :focus-visible) {
        background: var(--aphro-theme-raised);
    }

    html.aphro-dark body.aphro-theme-enabled .site-search-result small {
        color: var(--aphro-theme-accent);
    }

    /* Match the specificity of the optional product refinement stylesheet. */
    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) {
        --aphro-refine-ink: var(--aphro-theme-text);
        --aphro-refine-muted: var(--aphro-theme-muted);
        --aphro-refine-line: var(--aphro-theme-border);
        --aphro-refine-rose: var(--aphro-theme-accent);
        --aphro-refine-cream: var(--aphro-theme-bg);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-summary-custom h1, .product-price-large, .product-price-large__sale, .product-color > span, .aphro-color-picker__label, .pairs-well__head h2, .pairs-well__item, .pairs-well__info strong, .pairs-well__price, .pairs-well__price ins, .detail-accordions summary, .customer-reviews article strong, .comment-reply-title, .review-image-dropzone__title) {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-subtitle, .woocommerce-product-rating, .product-price-large__regular, .pairs-well__price del, .detail-accordion__content, .detail-accordion__content p, .detail-benefits span, .customer-reviews article, .customer-review__body p, .customer-reviews__empty, .review-score, .review-score small, .customer-reviews__nav a, .comment-form-review-images__hint, .review-image-dropzone__subtitle) {
        color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .woocommerce-product-rating .rating-star {
        --color-rating-star-soft: #74636e;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-discount-note, .detail-benefits, .feature-strip__item, .customer-reviews article, .customer-review-form .comment-respond, .review-image-dropzone) {
        background: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.detail-benefits div + div, .detail-accordions details, .customer-reviews__nav, .review-score, .customer-review-form) {
        border-color: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .pairs-well__head span {
        background: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-actions .button, .product-variation-form .single_add_to_cart_button, .customer-review-form .form-submit .submit) {
        background: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-actions .button, .product-variation-form .single_add_to_cart_button, .customer-review-form .form-submit .submit):is(:hover, :focus-visible) {
        background: #f8bcc9;
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-actions .buy-now, .product-variation-form .buy-now, .customer-reviews__nav a, .product-gallery-control) {
        background: var(--aphro-theme-raised);
        color: var(--aphro-theme-text);
        border-color: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.product-actions .buy-now, .product-variation-form .buy-now, .customer-reviews__nav a, .product-gallery-control):is(:hover, :focus-visible) {
        background: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
        border-color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.customer-reviews__nav h2, .review-score strong, .customer-review__author span) {
        color: var(--aphro-theme-accent);
        border-color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .customer-review-form label {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) .review-image-dropzone:is(:hover, :focus-visible, .is-dragging) {
        background: var(--aphro-theme-raised);
        color: var(--aphro-theme-text);
        border-color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .review-image-dropzone__icon {
        background: var(--aphro-theme-raised);
        color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .comment-form-review-images__error {
        color: #ffb4b4;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .woocommerce-verification-required {
        background: #382c20;
        color: #f2d2a3;
    }

    /* These img selectors identify monochrome interface icons only, never
     * a product image, customer photograph, video or colour swatch. */
    html.aphro-dark body.aphro-theme-enabled :is(.aphro-breadcrumb__icon, .product-carousel-arrow > img, .pairs-well__arrow > img),
    html.aphro-dark body.aphro-theme-enabled.single-product:not(.woocommerce-cart):not(.woocommerce-checkout) :is(.detail-benefits > .container > div > img, .detail-accordions summary > img, .feature-strip__item > img) {
        filter: brightness(0) invert(1);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .product-thumb:is(.is-active, :hover, :focus-visible) {
        border-color: var(--aphro-theme-accent);
        box-shadow: 0 0 0 2px var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .aphro-color-picker__option:is(.is-active, :focus-visible) {
        box-shadow: 0 0 0 3px var(--aphro-theme-bg), 0 0 0 5px var(--aphro-theme-accent);
    }

    /* All-reviews and saved items share the same card palette. */
    html.aphro-dark body.aphro-theme-enabled :is(.all-reviews-page .review-card, .account-wishlist-card__head) {
        background: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.all-reviews-page .review-card strong, .all-reviews-page .review-card__product, .account-wishlist-card__head h2, .account-wishlist-pager) {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.all-reviews-page .review-card p, .account-wishlist-card__head p, .account-wishlist-product__body p, .account-wishlist-product__body del, .account-wishlist-empty, .account-wishlist-pager button) {
        color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled :is(.account-wishlist-product__body > span, .all-reviews__pagination .page-numbers) {
        background: var(--aphro-theme-raised);
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled .all-reviews__pagination .page-numbers:is(.current, :hover, :focus-visible) {
        background: var(--aphro-theme-accent);
        border-color: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .account-wishlist-product__body strong {
        color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .account-wishlist-cart__icon {
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .account-wishlist-remove {
        background: var(--aphro-theme-surface);
        color: var(--aphro-theme-text);
    }
}


/* --- Aphro fixes (2026-09) ------------------------------------------------
 * Checkout form labels inherited the light palette's ink colour and were
 * unreadable on the dark surface. The coupon prompt is a neutral prompt, not
 * a success message, so it takes the surface colour instead of green. */
@media screen {
    html.aphro-dark body.aphro-theme-enabled.woocommerce-checkout :is(.form-row label, .woocommerce-form label, .woocommerce-terms-and-conditions-wrapper p) {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled.woocommerce-checkout .form-row label .optional {
        color: var(--aphro-theme-muted);
        font-weight: 400;
    }

    html.aphro-dark body.aphro-theme-enabled.woocommerce-checkout :is(.woocommerce-privacy-policy-text, .woocommerce-privacy-policy-text p) {
        color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
        background: var(--aphro-theme-surface);
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info a {
        color: var(--aphro-theme-accent);
    }

    /* The floating "revisit consent" bubble sat on top of add-to-cart and
     * checkout buttons on phones. Consent can be reopened from the footer link. */
    .cky-btn-revisit-wrapper {
        display: none !important;
    }
}


/* Related products on the product page: match the "Customer reviews" heading scale. */
@media screen {
    html.aphro-dark body.aphro-theme-enabled.single-product .related-products {
        padding: 36px 0 60px;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .related-products .section-head {
        margin-bottom: 20px;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .related-products .section-head__title {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .related-products .section-head h2 {
        margin: 0;
        color: var(--aphro-theme-accent);
        font-size: clamp(24px, 3vw, 30px);
        font-weight: 500;
        line-height: 1.2;
    }

    html.aphro-dark body.aphro-theme-enabled.single-product .related-products .section-head a {
        color: var(--aphro-theme-muted);
        font-size: 14px;
        text-decoration: underline;
        text-underline-offset: 4px;
        white-space: nowrap;
    }
}


/* Sign-up modal and utility pages: labels and primary buttons inherited light-palette colours. */
@media screen {
    html.aphro-dark body.aphro-theme-enabled .auth-modal :is(.auth-register-form label > span, .auth-register-form__check span) {
        color: var(--aphro-theme-text);
    }

    html.aphro-dark body.aphro-theme-enabled .auth-modal .auth-register-form__signin {
        color: var(--aphro-theme-muted);
    }

    html.aphro-dark body.aphro-theme-enabled .auth-modal .auth-register-form__signin a {
        color: var(--aphro-theme-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .aphro-premium-404__actions a:not(:last-child),
    html.aphro-dark body.aphro-theme-enabled.woocommerce-account .order-item__actions a {
        background: var(--aphro-theme-accent);
        color: var(--aphro-theme-on-accent);
    }

    html.aphro-dark body.aphro-theme-enabled .aphro-premium-404__actions a:last-child {
        border-color: var(--aphro-theme-border);
        color: var(--aphro-theme-text);
    }
}


/* Cookie banner on phones: one compact card with the three choices on a single row,
 * so it covers a third less of the screen on first visit. */
@media screen and (max-width: 767px) {
    body.aphro-theme-enabled .cky-consent-container.cky-box-bottom-left {
        width: calc(100% - 20px) !important;
        max-width: none !important;
        left: 10px !important;
        right: 10px !important;
        bottom: 10px !important;
    }

    body.aphro-theme-enabled .cky-consent-container .cky-consent-bar {
        padding: 12px 14px !important;
    }

    body.aphro-theme-enabled .cky-consent-container .cky-title {
        margin: 0 0 4px !important;
        font-size: 14px !important;
    }

    body.aphro-theme-enabled .cky-consent-container :is(.cky-notice-des, .cky-notice-des p) {
        margin: 0 !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    body.aphro-theme-enabled .cky-consent-container .cky-notice-group {
        display: block !important;
    }

    body.aphro-premium-ux.aphro-theme-enabled .cky-consent-container .cky-notice-btn-wrapper {
        display: grid !important;
        grid-template-columns: auto 1fr 1fr !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }

    body.aphro-premium-ux.aphro-theme-enabled .cky-consent-container .cky-notice-btn-wrapper .cky-btn {
        grid-area: auto !important;
        order: 0 !important;
        width: auto !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 9px 10px !important;
        font-size: 13px !important;
        white-space: nowrap;
    }
}


/* Product page: the "Pairs well with" carousel could force the summary column wider than
 * the phone screen, pushing "Buy now" off the edge. Keep the grid column at container width. */
@media screen {
    body.aphro-theme-enabled.single-product .product-detail {
        grid-template-columns: minmax(0, 1fr);
    }

    body.aphro-theme-enabled.single-product :is(.product-summary-custom, .product-gallery-custom, .pairs-well) {
        min-width: 0;
        max-width: 100%;
    }

    body.aphro-theme-enabled.single-product .pairs-well__viewport {
        overflow: hidden;
    }
}

@media screen and (min-width: 901px) {
    body.aphro-theme-enabled.single-product .product-detail {
        grid-template-columns: minmax(0, 1.14fr) minmax(0, .86fr);
    }
}


/* Static page banners (Contact, About, Reviews) reused a "new arrivals" promo graphic with
 * baked-in text behind the title. Use the brand hero photograph with a soft veil instead. */
@media screen {
    body.aphro-theme-enabled .page-banner {
        min-height: 200px;
        overflow: hidden;
        background-image: url('../aphro/hero-1280.webp') !important;
        background-position: 62% 40% !important;
    }

    body.aphro-theme-enabled .page-banner::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(21, 16, 22, .35) 0%, rgba(21, 16, 22, .72) 100%);
    }

    body.aphro-theme-enabled .page-banner__inner {
        position: relative;
        z-index: 1;
    }

    body.aphro-theme-enabled .page-banner h1 {
        font-family: Cardo, Georgia, 'Times New Roman', serif;
        font-size: clamp(38px, 6vw, 64px);
        font-weight: 400;
        letter-spacing: -.03em;
        text-shadow: 0 2px 18px rgba(0, 0, 0, .35);
    }
}


/* Footer social icons currently point at facebook.com / instagram.com home pages (placeholders).
 * Hidden until real profile links are entered in Theme Options > Footer > Socials; delete this
 * rule to show them again. */
@media screen {
    body.aphro-theme-enabled .site-footer .footer-socials {
        display: none;
    }
}
