/* PATCH-048Z — Arabian Oud-inspired palette, visual changes only.
 * REFERENCE: https://sa.arabianoud.com/ar (2026-10-16).
 * IMPORTANT: sampled CSS / pixel-perfect values cannot be verified remotely;
 * these are APPROXIMATE role-based colors, NOT claims of 100% identical HEX.
 * Do not affect business logic, statuses, discounts, focus, layout, or images.
 * Merchant-controlled appearance/product overrides remain authoritative via
 * wp_head's late asala-final-design-controls inline stylesheet.
 */
html body#asala-page {
    --asala-ao-primary: #7b4022;
    --asala-ao-primary-hover: #63321c;
    --asala-ao-primary-active: #502615;
    --asala-ao-ink: #202020;
    --asala-ao-muted: #717171;
    --asala-ao-page: #ffffff;
    --asala-ao-surface: #ffffff;
    --asala-ao-soft: #f5f5f5;
    --asala-ao-soft-alt: #fafafa;
    --asala-ao-line: #e5e5e5;
    --asala-ao-secondary-border: #c8b7ad;
    --asala-ao-on-primary: #ffffff;
    --asala-text: var(--asala-ao-ink);
    --asala-muted: var(--asala-ao-muted);
    --asala-soft: var(--asala-ao-soft);
    --asala-border: var(--asala-ao-line);
    --asala-accent: var(--asala-ao-primary);
    --asala-dark: var(--asala-ao-primary);
    --atelier-paper: var(--asala-ao-page);
    --atelier-surface: var(--asala-ao-surface);
    --atelier-ink: var(--asala-ao-ink);
    --atelier-line: var(--asala-ao-line);
    --atelier-gold: var(--asala-ao-primary);
    --asala-clean-white: var(--asala-ao-surface);
    --asala-clean-ink: var(--asala-ao-ink);
    --asala-clean-deep: var(--asala-ao-primary);
    --asala-clean-deep-2: var(--asala-ao-primary-hover);
    --asala-clean-accent: var(--asala-ao-primary);
    --asala-clean-accent-strong: var(--asala-ao-primary-hover);
    --asala-clean-accent-soft: var(--asala-ao-soft);
    --asala-clean-muted: var(--asala-ao-muted);
    --asala-clean-line: var(--asala-ao-line);
    --asala-clean-soft: var(--asala-ao-soft);
    --asala-clean-wash: var(--asala-ao-soft-alt);
    --asala-luxe-espresso: var(--asala-ao-primary);
    --asala-luxe-cocoa: var(--asala-ao-primary-hover);
    --asala-luxe-mocha: var(--asala-ao-primary);
    --asala-luxe-mocha-dark: var(--asala-ao-primary-hover);
    --asala-luxe-mocha-soft: var(--asala-ao-soft);
    --asala-luxe-paper: var(--asala-ao-page);
    --asala-luxe-wash: var(--asala-ao-soft-alt);
    --asala-luxe-soft: var(--asala-ao-soft);
    --asala-luxe-line: var(--asala-ao-line);
    --asala-luxe-text: var(--asala-ao-ink);
    --asala-luxe-muted: var(--asala-ao-muted);
    color: var(--asala-ao-ink);
}

/* Page and component surface colors. Keep photos, hero imagery and special
 * payment / shipping / validation notices untouched. The existing merchant
 * custom background option has higher priority and must continue to work. */
html body#asala-page.asala-atelier :is(
    .asala-home-v2, .asala-shop-page, .asala-shop-content,
    .asala-product-reference, .asala-cart-page, .asala-checkout-page,
    .asala-account-page, .asala-order-result-page, .asala-order-detail-page,
    .asala-info-page, .asala-public-tracking-main
) {
    --asala-line: var(--asala-ao-line);
    --asala-cream: var(--asala-ao-page);
    --asala-cream-2: var(--asala-ao-soft);
    --asala-text: var(--asala-ao-ink);
    --asala-muted: var(--asala-ao-muted);
}
html body#asala-page.asala-atelier :is(
    .asala-product-gallery-shell, .asala-loop-image-wrap,
    .asala-home-benefits-section-v1, .asala-shop-filter-heading,
    .asala-filter-heading, .asala-filter-sheet-header,
    .asala-cart-trust, .asala-cart-summary-total,
    .asala-account-profile-card, .asala-account-nav-item.is-active a,
    .asala-info-page__hero, .asala-branch-group,
    .asala-order-result-security-note
) {
    background-color: var(--asala-ao-soft) !important;
    border-color: var(--asala-ao-line) !important;
}
html body#asala-page.asala-atelier :is(
    .asala-loop-card, .asala-home-brand-card-v3, .asala-filter-panel,
    .asala-filter-sheet, .asala-cart-item, .asala-cart-summary,
    .asala-cart-shipping-card, .asala-checkout-panel,
    .asala-checkout-section, .asala-checkout-summary,
    .asala-checkout-final-panel, .asala-account-nav,
    .asala-account-section-card, .asala-order-result-card,
    .asala-info-page__article, .asala-product-detail-box
) {
    background-color: var(--asala-ao-surface) !important;
    border-color: var(--asala-ao-line) !important;
}
html body#asala-page.asala-atelier :is(
    .asala-shop-pagination .current, .asala-cart-count
) {
    background: var(--asala-ao-primary) !important;
    color: var(--asala-ao-on-primary) !important;
}

/* Explicit primary actions: do not paint quantity controls, close icons,
 * wishlist toggles, payment providers, state alerts, or destructive buttons. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-add-to-cart,
    .asala-product-reference .single_add_to_cart_button,
    .asala-cart-checkout-button, .asala-mobile-cart-bar__cta,
    .asala-mobile-checkout-submit, #place_order,
    .asala-account-primary-button, .asala-order-result-primary-button,
    .asala-cart-coupon-button, .asala-update-cart-button,
    .asala-filter-submit, .asala-guest-track-form button,
    .asala-info-page__shop-cta, .asala-flex-button,
    .asala-central-bundle .asala-bundle-buy-form button,
    .asala-product-sticky__actions [data-sticky-action="cart"],
    .woocommerce-form-login .button, .woocommerce-form-register .button,
    .lost_reset_password .button, .asala-search-form button.asala-search-submit
) {
    background: var(--asala-ao-primary) !important;
    border-color: var(--asala-ao-primary) !important;
    color: var(--asala-ao-on-primary) !important;
    box-shadow: none !important;
}
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-add-to-cart,
    .asala-product-reference .single_add_to_cart_button,
    .asala-cart-checkout-button, .asala-mobile-cart-bar__cta,
    .asala-mobile-checkout-submit, #place_order,
    .asala-account-primary-button, .asala-order-result-primary-button,
    .asala-cart-coupon-button, .asala-update-cart-button,
    .asala-filter-submit, .asala-guest-track-form button,
    .asala-info-page__shop-cta, .asala-flex-button,
    .asala-central-bundle .asala-bundle-buy-form button,
    .asala-product-sticky__actions [data-sticky-action="cart"],
    .woocommerce-form-login .button, .woocommerce-form-register .button,
    .lost_reset_password .button, .asala-search-form button.asala-search-submit
):not(:disabled):hover {
    background: var(--asala-ao-primary-hover) !important;
    border-color: var(--asala-ao-primary-hover) !important;
    color: var(--asala-ao-on-primary) !important;
}

/* Secondary actions: white/off-white backgrounds rather than gold gradients. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-buy-now,
    .asala-product-reference .asala-buy-now-button,
    .asala-filter-open, .asala-filter-reset,
    .asala-account-secondary-button, .asala-order-result-secondary-button,
    .asala-cart-summary-continue, .asala-cart-continue-shopping,
    .asala-product-sticky__actions [data-sticky-action="buy"]
) {
    background: var(--asala-ao-surface) !important;
    border-color: var(--asala-ao-secondary-border) !important;
    color: var(--asala-ao-primary) !important;
    box-shadow: none !important;
}
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-buy-now,
    .asala-product-reference .asala-buy-now-button,
    .asala-filter-open, .asala-filter-reset,
    .asala-account-secondary-button, .asala-order-result-secondary-button,
    .asala-cart-summary-continue, .asala-cart-continue-shopping,
    .asala-product-sticky__actions [data-sticky-action="buy"]
):not(:disabled):hover {
    background: var(--asala-ao-soft) !important;
    border-color: var(--asala-ao-primary) !important;
    color: var(--asala-ao-primary-hover) !important;
}

/* Hero button stays legible on the unmodified promotional image. */
html body#asala-page.asala-atelier .asala-home-hero-button-v2 {
    background: var(--asala-ao-primary) !important;
    border-color: var(--asala-ao-primary) !important;
    color: #fff !important;
}
html body#asala-page.asala-atelier .asala-home-hero-button-v2:hover {
    background: var(--asala-ao-primary-hover) !important;
    border-color: var(--asala-ao-primary-hover) !important;
    color: #fff !important;
}

/* Keep fields neutral and preserve WC validation indicators. */
html body#asala-page.asala-atelier :is(
    .asala-shop-page, .asala-account-page, .asala-checkout-page,
    .asala-cart-page, .asala-product-reference, .asala-info-page
) :is(input:not([type=hidden]):not([type=submit]):not([type=checkbox]):not([type=radio]), select, textarea) {
    background-color: var(--asala-ao-page) !important;
    border-color: var(--asala-ao-line) !important;
    color: var(--asala-ao-ink);
}
html body#asala-page.asala-atelier :is(.asala-shop-page,.asala-checkout-page,.asala-cart-page,.asala-product-reference) :is(input[type=checkbox],input[type=radio]) {
    accent-color: var(--asala-ao-primary);
}
/* Do not change disabled-state opacity or accessibility outlines. */

/* The product action has page-specific rules with stronger specificity.
 * Keep its intended primary-tone foreground without overriding the dashboard's
 * higher-specificity product-design CSS. */
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-buy-now-button {
    background: var(--asala-ao-surface) !important;
    border-color: var(--asala-ao-secondary-border) !important;
    color: var(--asala-ao-primary) !important;
}
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-buy-now-button:not(:disabled):hover {
    background: var(--asala-ao-soft) !important;
    border-color: var(--asala-ao-primary) !important;
    color: var(--asala-ao-primary-hover) !important;
}

/* Checkout's own scoped ID selector outranks generic :is() actions. */
html body#asala-page.asala-atelier.woocommerce-checkout #place_order {
    background: var(--asala-ao-primary) !important;
    border-color: var(--asala-ao-primary) !important;
    color: var(--asala-ao-on-primary) !important;
}
html body#asala-page.asala-atelier.woocommerce-checkout #place_order:not(:disabled):hover {
    background: var(--asala-ao-primary-hover) !important;
    border-color: var(--asala-ao-primary-hover) !important;
}


/* PATCH-048AB — footer to white + light-gray product media backgrounds + clearer product imagery.
 * Scope: visual only. No layout mode, pricing, stock, cart or gallery logic changes.
 */
html body#asala-page.asala-atelier {
    --asala-ao-product-media-bg: #f3f3f3;
}

/* White global/account footer with darker readable text. */
html body#asala-page.asala-atelier :is(.asala-global-footer, .asala-account-footer) {
    background: #ffffff !important;
    color: var(--asala-ao-ink) !important;
    border-top: 1px solid var(--asala-ao-line) !important;
}
html body#asala-page.asala-atelier :is(.asala-global-footer__bottom, .asala-checkout-mini-footer) {
    background: #ffffff !important;
    color: var(--asala-ao-ink) !important;
    border-top: 1px solid var(--asala-ao-line) !important;
}
html body#asala-page.asala-atelier :is(
    .asala-global-footer__column h2,
    .asala-global-footer__logo strong,
    .asala-account-footer-brand,
    .asala-global-footer__column a,
    .asala-account-footer-links a,
    .asala-global-footer__brand > p,
    .asala-global-footer__contact > p,
    .asala-global-footer__contact-link,
    .asala-global-footer__assurance span,
    .asala-global-footer__bottom,
    .asala-global-footer__bottom *
) {
    color: var(--asala-ao-ink) !important;
}
html body#asala-page.asala-atelier :is(
    .asala-global-footer__column a:hover,
    .asala-account-footer-links a:hover,
    .asala-global-footer__contact-link:hover
) {
    color: var(--asala-ao-primary) !important;
}

/* Product-card / related / product-page media areas: soft gray like reference cards. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-image-wrap,
    .asala-related-products .asala-loop-image-wrap,
    .asala-product-gallery-shell,
    .asala-product-main-image,
    .asala-product-thumb,
    .asala-variation-chip-image img,
    .asala-product-sticky__image
) {
    background: var(--asala-ao-product-media-bg) !important;
}

/* Clearer product images: remove unnecessary dullness and reduce padding so bottles read larger. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-image,
    .asala-related-products .asala-loop-image,
    .asala-related-products ul.products li.product img
) {
    padding: 4px !important;
    opacity: 1 !important;
    filter: none !important;
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}
html body#asala-page.asala-atelier.single-product .asala-product-reference :is(
    .asala-product-main-image > .asala-main-image-link > img,
    #asala-product-main-image,
    .asala-product-thumb img
) {
    opacity: 1 !important;
    filter: none !important;
    image-rendering: auto;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Keep the single-product main gallery surface soft gray while preserving contain-fit. */
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-main-image > .asala-main-image-link,
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-main-image > .asala-main-image-link > img,
html body#asala-page.asala-atelier.single-product .asala-product-reference #asala-product-main-image {
    background: var(--asala-ao-product-media-bg) !important;
}


/* PATCH-048AD — Correct the visible light-gray perfume-photo panels.
 * Root cause: opaque white pixels in WooCommerce image assets cover the
 * parent panel background. A gray container alone cannot recolor them.
 * CSS darken compositing makes those white pixels match the sampled #f2f2f2
 * panel while preserving saturated/dark product colors more faithfully than
 * a global brightness, grayscale, contrast or multiply filter.
 * Scope strictly to catalog/related/single-product images; no media rewriting.
 */
html body#asala-page.asala-atelier {
    --asala-ao-product-media-bg: #f2f2f2;
}

/* Isolate image compositing within each media panel; never blend against
 * price blocks, wish-list badges, text, or the page behind the card. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-image-wrap,
    .asala-related-products .asala-loop-image-wrap,
    .asala-product-reference .asala-product-main-image,
    .asala-product-reference .asala-product-thumb
) {
    background: var(--asala-ao-product-media-bg) !important;
    isolation: isolate;
}

/* Remove white CSS backgrounds from the image element itself, so transparent
 * PNG/WebP edges also show the panel color. White pixels baked into JPEGs are
 * composed using darken: white -> #f2f2f2; darker colors stay unchanged. */
html body#asala-page.asala-atelier :is(
    .asala-loop-product-item .asala-loop-image,
    .asala-related-products .asala-loop-image,
    .asala-product-reference #asala-product-main-image,
    .asala-product-reference .asala-product-main-image > .asala-main-image-link > img,
    .asala-product-reference .asala-product-thumb img
) {
    background: transparent !important;
    mix-blend-mode: darken !important;
}


/* The original palette's broad :is() selector contains a higher-specificity
 * footer/account member; its !important background-color was unexpectedly
 * winning against the previous gray-card shorthand. Use exact targets here. */
html body#asala-page.asala-atelier .asala-loop-product-item .asala-loop-card .asala-loop-image-wrap,
html body#asala-page.asala-atelier .asala-related-products .asala-loop-product-item .asala-loop-image-wrap,
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-main-image,
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-thumb {
    background-color: var(--asala-ao-product-media-bg) !important;
    background-image: none !important;
}

/* Override the single-product rule from PATCH-048AB that colored the <img>
 * box instead of only its containing panel. */
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-main-image > .asala-main-image-link > img,
html body#asala-page.asala-atelier.single-product .asala-product-reference #asala-product-main-image {
    background: transparent !important;
    mix-blend-mode: darken !important;
}


/* PATCH-048AE — Pure-white announcement topbar and single-product sticky
 * purchase panel. All commerce and responsive behavior is unchanged. */
html body#asala-page.asala-atelier .asala-header .asala-topbar {
    background: #ffffff !important;
    background-image: none !important;
    color: var(--asala-ao-ink) !important;
    border-bottom: 1px solid var(--asala-ao-line) !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-topbar-item {
    color: var(--asala-ao-ink) !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-topbar-icon {
    color: var(--asala-ao-primary) !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-topbar-divider {
    background: var(--asala-ao-line) !important;
}
/* The SAR/USD switch previously assumed the surrounding bar was dark. */
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-display-currency-switch {
    background: #f5f5f5 !important;
    border-color: #ded6cf !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-display-currency-switch button {
    color: var(--asala-ao-ink) !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-display-currency-switch button[aria-pressed="true"] {
    background: var(--asala-ao-primary) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}
html body#asala-page.asala-atelier .asala-header .asala-topbar .asala-display-currency-switch button:focus-visible {
    outline-color: var(--asala-ao-primary) !important;
}

/* Container only: preserve the current brown Add to Cart button, the white
 * Buy Now button, price formatting, options and sticky show/hide behavior. */
html body#asala-page.asala-atelier.single-product .asala-product-sticky {
    background: #ffffff !important;
    background-image: none !important;
}


/* PATCH-048AF — Pure-white navigation dropdown and mobile menu drawer.
 * Only navigation surfaces; preserve overlay, focus/active state, RTL,
 * drawer geometry, links, close controls, submenu behavior and animations.
 */
html body#asala-page.asala-atelier .asala-navigation .asala-menu .sub-menu {
    background: #ffffff !important;
    background-image: none !important;
}
@media (max-width: 767px) {
    html body#asala-page.asala-atelier .asala-navigation .asala-menu {
        background: #ffffff !important;
        background-image: none !important;
    }
    html body#asala-page.asala-atelier .asala-navigation .asala-menu::before,
    html body#asala-page.asala-atelier .asala-navigation .asala-mobile-menu-heading {
        background: #ffffff !important;
        background-image: none !important;
    }
    /* Normal menu rows are white too; retain existing hover, keyboard-focus
     * and current-page highlights as separate interaction states. */
    html body#asala-page.asala-atelier .asala-navigation .asala-menu > li:not(.current-menu-item):not(.current_page_item):not(.current-menu-ancestor):not(.asala-current-branch) > a:not(.asala-current-link):not([aria-current="page"]):not(:hover):not(:focus-visible) {
        background-color: #ffffff !important;
        background-image: none !important;
    }
}

/* PATCH-048AI — Asala bundle neutral/white brand palette, RTL gallery. */
html body#asala-page.asala-atelier .asala-central-bundle {
    background: var(--asala-bundle-background, #ffffff);
    border-color: var(--asala-bundle-border, #e5e5e5);
    color: #202020;
}
html body#asala-page.asala-atelier .asala-central-bundle .asala-bundle-offer {
    background: #ffffff;
    border-color: #e5e5e5;
}
html body#asala-page.asala-atelier .asala-central-bundle .asala-bundle-buy-form button {
    background: #7b4022;
    border-color: #7b4022;
    color: #ffffff;
}
html body#asala-page.asala-atelier .asala-central-bundle .asala-bundle-buy-form button:hover:not(:disabled) {
    background: #63321c;
}
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-gallery-shell,
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-product-thumbnails {
    direction: rtl !important;
}
html body#asala-page.asala-atelier.single-product .asala-product-reference .asala-main-image-link {
    touch-action: pan-y pinch-zoom;
}
