/*
Theme Name: Doumaak Heritage for Astra
Theme URI: https://doumaak.com/
Description: A Persian heritage presentation layer for Astra, Astra Pro, Elementor, and WooCommerce. Parent templates and business functionality are inherited from Astra.
Author: Doumaak
Template: astra
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doumaak-astra-child
Tags: e-commerce, custom-menu, custom-logo, rtl-language-support
*/

@font-face {
    font-family: DoumaakAstraBody;
    src: url('assets/fonts/PeydaWebFaNum-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: DoumaakAstraBody;
    src: url('assets/fonts/PeydaWebFaNum-SemiBold.woff2') format('woff2');
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
}
@font-face {
    font-family: DoumaakAstraDisplay;
    src: url('assets/fonts/Pinar-FD-Regular.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 500;
    font-display: swap;
}
@font-face {
    font-family: DoumaakAstraDisplay;
    src: url('assets/fonts/Pinar-FD-Bold.woff2') format('woff2');
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
}

/* Tokens are local to the active child theme's body, including Woo blocks. */
body.doumaak-astra-heritage {
    --dm-astra-paper: #f4edde;
    --dm-astra-light: #f9f4e9;
    --dm-astra-ink: #392b23;
    --dm-astra-wine: #762f32;
    --dm-astra-wine-hover: #5e2227;
    --dm-astra-gold: #ad8857;
    --dm-astra-line: #d9cbb5;
    --dm-astra-muted: #766550;
    --wp--preset--color--contrast: #392b23;
    --wp--preset--color--base: #f9f4e9;
    --wp--preset--color--accent: #762f32;
    color: var(--dm-astra-ink);
    background: var(--dm-astra-paper);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    line-height: 1.95;
}

body.doumaak-astra-heritage :is(input, select, textarea, button) {
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage :is(a, button, input, select, textarea, summary):focus-visible {
    outline: 2px solid var(--dm-astra-wine);
    outline-offset: 4px;
}
body.doumaak-astra-heritage :is(.site-content, .ast-separate-container, .ast-plain-container) {
    background-color: var(--dm-astra-paper);
}
body.doumaak-astra-heritage :is(.ast-separate-container .ast-article-single, .ast-separate-container .ast-article-post, .ast-separate-container .ast-woocommerce-container) {
    background-color: var(--dm-astra-light);
}
body.doumaak-astra-heritage :is(.entry-title, .page-title, .woocommerce-products-header__title) {
    color: var(--dm-astra-wine);
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    font-weight: 500;
    line-height: 1.7;
}

/* The native Astra Header Builder remains responsible for layout and behavior. */
body.doumaak-astra-heritage .dm-astra-order-ribbon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 7px 18px;
    min-height: 36px;
    color: #f5e9d6;
    background: var(--dm-astra-wine);
    text-align: center;
    font-size: 11px;
    line-height: 1.9;
}
body.doumaak-astra-heritage .dm-astra-ribbon-motif {
    color: #d5b580;
    font-size: 18px;
    line-height: 1;
}
body.doumaak-astra-heritage :is(.main-header-bar, .ast-primary-header-bar, .ast-above-header-bar, .ast-below-header-bar) {
    background: var(--dm-astra-paper);
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage :is(.main-header-bar, .ast-primary-header-bar) {
    border-bottom: 1px solid var(--dm-astra-line);
}
body.doumaak-astra-heritage :is(.site-title, .site-title a) {
    color: var(--dm-astra-wine);
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    font-size: clamp(30px, 3.2vw, 46px);
    font-weight: 700;
    line-height: 1.35;
}
body.doumaak-astra-heritage .site-description {
    color: var(--dm-astra-muted);
    font-size: 11px;
    line-height: 1.9;
}
body.doumaak-astra-heritage .main-header-menu > .menu-item > .menu-link {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    font-size: 13px;
    transition: color 180ms ease;
}
body.doumaak-astra-heritage .main-header-menu :is(.menu-link:hover, .current-menu-item > .menu-link, .current-menu-ancestor > .menu-link) {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .main-header-menu .sub-menu {
    background: var(--dm-astra-light);
    border-color: var(--dm-astra-gold);
    box-shadow: 0 12px 28px #392b2312;
}
body.doumaak-astra-heritage .main-header-menu .sub-menu .menu-link {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage .main-header-menu .sub-menu .menu-link:hover {
    color: var(--dm-astra-wine);
    background: #e9dfcd;
}
body.doumaak-astra-heritage :is(.ast-header-account-link, .ast-header-search .ast-search-menu-icon, .ast-site-header-cart .ast-cart-menu-wrap, .ast-site-header-cart .ast-addon-cart-wrap, .ast-button-wrap .menu-toggle) {
    color: var(--dm-astra-wine);
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage :is(.ast-mobile-popup-drawer .ast-mobile-popup-content, .ast-header-break-point .ast-mobile-header-content, .ast-header-break-point .main-header-menu) {
    background-color: var(--dm-astra-paper);
}
body.doumaak-astra-heritage .ast-mobile-popup-drawer .menu-link {
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    color: var(--dm-astra-ink);
}

/* Shared controls preserve Woo/Astra scripts, event targets, notices and labels. */
body.doumaak-astra-heritage :is(.ast-button, .ast-custom-button, .button, button.button, input[type='submit'], input[type='button'], .wp-element-button) {
    background-color: var(--dm-astra-wine);
    border: 1px solid var(--dm-astra-wine);
    border-radius: 2px;
    color: var(--dm-astra-light);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
    box-shadow: none;
    transition: background-color 180ms ease, border-color 180ms ease;
}
body.doumaak-astra-heritage :is(.ast-button, .ast-custom-button, .button, button.button, input[type='submit'], input[type='button'], .wp-element-button):hover {
    background-color: var(--dm-astra-wine-hover);
    border-color: var(--dm-astra-wine-hover);
    color: var(--dm-astra-light);
}
body.doumaak-astra-heritage :is(input[type='text'], input[type='email'], input[type='tel'], input[type='number'], input[type='password'], input[type='search'], input[type='url'], textarea, select) {
    background-color: var(--dm-astra-light);
    border-color: var(--dm-astra-line);
    border-radius: 2px;
    color: var(--dm-astra-ink);
    box-shadow: none;
}
body.doumaak-astra-heritage :is(input[type='checkbox'], input[type='radio']) {
    accent-color: var(--dm-astra-wine);
}

/* Product archives. Astra chooses the columns and breakpoints. */
body.doumaak-astra-heritage .woocommerce-breadcrumb {
    color: var(--dm-astra-muted);
    font-size: 12px;
}
body.doumaak-astra-heritage .woocommerce-breadcrumb a {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .woocommerce :is(.woocommerce-result-count, .woocommerce-ordering) {
    color: var(--dm-astra-muted);
    font-size: 13px;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product {
    background: transparent;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    /* Keep overflow visible for Astra Pro sale badges and quick-view controls. */
    border: 1px solid var(--dm-astra-line);
    border-radius: 46% 46% 2px 2px;
    background: #e9dfcd;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product a img {
    border-radius: 46% 46% 2px 2px;
    transition: filter 350ms ease;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product:hover a img {
    filter: saturate(1.06);
}
body.doumaak-astra-heritage .woocommerce ul.products li.product :is(.woocommerce-loop-product__title, .woocommerce-loop-category__title) {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    font-size: 15px;
    line-height: 1.9;
    font-weight: 600;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product :is(.price, .price ins) {
    color: var(--dm-astra-wine);
    background: transparent;
    font-size: 14px;
}
body.doumaak-astra-heritage .woocommerce ul.products li.product .ast-woo-product-category {
    color: var(--dm-astra-muted);
    font-size: 11px;
}
body.doumaak-astra-heritage .woocommerce span.onsale {
    color: var(--dm-astra-light);
    background: var(--dm-astra-wine);
    border: 1px solid #d6b68c;
    border-radius: 2px;
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
    font-weight: 400;
}
body.doumaak-astra-heritage .woocommerce .star-rating {
    color: var(--dm-astra-gold);
}
body.doumaak-astra-heritage .woocommerce :is(.page-numbers, nav.woocommerce-pagination ul) {
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage .woocommerce nav.woocommerce-pagination ul li :is(span.current, a:hover) {
    color: var(--dm-astra-light);
    background: var(--dm-astra-wine);
}
body.doumaak-astra-heritage :is(.woocommerce .widget-title, .widget_product_categories .widget-title, .widget_price_filter .widget-title) {
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .woocommerce .widget_price_filter :is(.ui-slider .ui-slider-handle, .ui-slider .ui-slider-range) {
    background-color: var(--dm-astra-wine);
}

/* Native product pages, variations, tabs, notices, cart and checkout. */
body.doumaak-astra-heritage .woocommerce div.product .product_title {
    color: var(--dm-astra-wine);
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    font-size: clamp(25px, 2.8vw, 38px);
    line-height: 1.7;
}
body.doumaak-astra-heritage .woocommerce div.product :is(p.price, span.price) {
    color: var(--dm-astra-wine);
    font-size: 20px;
}
body.doumaak-astra-heritage .dm-astra-product-lead-time {
    display: block;
    color: var(--dm-astra-muted);
    background: var(--dm-astra-light);
    border-inline-start: 2px solid var(--dm-astra-gold);
    padding: 12px 16px;
    margin-block: 20px;
    font-size: 13px;
    line-height: 2;
}
body.doumaak-astra-heritage .dm-astra-product-lead-time > span {
    color: var(--dm-astra-wine);
    margin-inline-end: 5px;
}
body.doumaak-astra-heritage .woocommerce div.product .woocommerce-product-gallery__wrapper {
    border: 1px solid var(--dm-astra-line);
    border-radius: 2px;
    overflow: hidden;
}
body.doumaak-astra-heritage .woocommerce div.product :is(.woocommerce-tabs .panel h2, .related > h2, .upsells > h2, .woocommerce-Reviews-title) {
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    color: var(--dm-astra-wine);
    line-height: 1.7;
}
body.doumaak-astra-heritage .woocommerce div.product .woocommerce-tabs ul.tabs::before {
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage .woocommerce div.product .woocommerce-tabs ul.tabs li.active::before {
    background-color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage .woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .woocommerce :is(table.shop_table, table.shop_table th, table.shop_table td, .cart-collaterals .cart_totals, .woocommerce-checkout-review-order-table, .woocommerce-MyAccount-navigation li) {
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage .woocommerce :is(table.shop_table thead, .cart-collaterals .cart_totals > h2, #payment, #payment .payment_box) {
    background: #e9dfcd;
    color: var(--dm-astra-ink);
}
body.doumaak-astra-heritage .woocommerce :is(.cart-collaterals .cart_totals > h2, #order_review_heading, .woocommerce-billing-fields > h3, .woocommerce-additional-fields > h3) {
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    color: var(--dm-astra-wine);
    line-height: 1.7;
}
body.doumaak-astra-heritage .woocommerce #payment div.payment_box::before {
    border-bottom-color: #e9dfcd;
}
body.doumaak-astra-heritage .woocommerce :is(.woocommerce-info, .woocommerce-message) {
    color: var(--dm-astra-ink);
    background: var(--dm-astra-light);
    border-top-color: var(--dm-astra-gold);
}
body.doumaak-astra-heritage .woocommerce :is(.woocommerce-info::before, .woocommerce-message::before) {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage .woocommerce .woocommerce-error {
    background: #fbefea;
    border-top-color: var(--dm-astra-wine);
    color: #70292c;
}
body.doumaak-astra-heritage .woocommerce :is(.woocommerce-MyAccount-navigation a, .product_meta a, .reset_variations, .woocommerce-terms-and-conditions-wrapper a) {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage :is(.select2-container--default .select2-selection--single, .select2-dropdown) {
    background: var(--dm-astra-light);
    border-color: var(--dm-astra-line);
    border-radius: 2px;
    color: var(--dm-astra-ink);
}
body.doumaak-astra-heritage .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--dm-astra-wine);
}
body.doumaak-astra-heritage :is(.ast-site-header-cart .widget_shopping_cart, .astra-cart-drawer) {
    background-color: var(--dm-astra-light);
    color: var(--dm-astra-ink);
    border-color: var(--dm-astra-line);
}

/* Woo Cart/Checkout Blocks keep their layout, validation and payment logic. */
body.doumaak-astra-heritage :is(.wc-block-cart, .wc-block-checkout, .wp-block-woocommerce-mini-cart) {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage :is(.wc-block-cart, .wc-block-checkout) :is(h2, h3, .wc-block-components-title) {
    color: var(--dm-astra-wine);
    font-family: DoumaakAstraDisplay, Tahoma, serif;
}
body.doumaak-astra-heritage :is(.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button) {
    color: var(--dm-astra-light);
    background-color: var(--dm-astra-wine);
    border: 1px solid var(--dm-astra-wine);
    border-radius: 2px;
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage .wc-block-components-button:not(.is-link):hover {
    color: var(--dm-astra-light);
    background-color: var(--dm-astra-wine-hover);
    border-color: var(--dm-astra-wine-hover);
}
body.doumaak-astra-heritage :is(.wc-block-components-text-input input, .wc-block-components-combobox .components-combobox-control__input, .wc-blocks-components-select .wc-blocks-components-select__select) {
    background-color: var(--dm-astra-light);
    color: var(--dm-astra-ink);
    border-color: var(--dm-astra-line);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage :is(.wc-block-components-totals-wrapper, .wc-block-components-order-summary, .wc-block-components-sidebar, .wc-block-components-checkout-step) {
    border-color: var(--dm-astra-line);
}
body.doumaak-astra-heritage :is(.wc-block-components-product-name, .wc-block-cart-item__remove-link, .wc-block-components-totals-coupon-link) {
    color: var(--dm-astra-wine);
}

/* Native Footer Builder retains its widgets, menus, rows and responsive layout. */
body.doumaak-astra-heritage :is(.site-above-footer-wrap, .site-primary-footer-wrap, .site-below-footer-wrap) {
    background-color: #e9dfcd;
    color: var(--dm-astra-ink);
    border-color: #c6b595;
}
body.doumaak-astra-heritage .site-primary-footer-wrap {
    border-top: 1px solid #c6b595;
}
body.doumaak-astra-heritage :is(.site-footer .widget-title, .site-footer .site-title) {
    color: var(--dm-astra-wine);
    font-family: DoumaakAstraDisplay, Tahoma, serif;
    line-height: 1.7;
}
body.doumaak-astra-heritage .site-footer :is(a, p, li, .ast-footer-copyright) {
    color: var(--dm-astra-ink);
    font-family: DoumaakAstraBody, Tahoma, sans-serif;
}
body.doumaak-astra-heritage .site-footer a:hover {
    color: var(--dm-astra-wine);
}
body.doumaak-astra-heritage #ast-scroll-top {
    color: var(--dm-astra-light);
    background: var(--dm-astra-wine);
    border: 1px solid var(--dm-astra-gold);
    border-radius: 2px;
}

@media (max-width: 544px) {
    body.doumaak-astra-heritage .dm-astra-order-ribbon {
        gap: 10px;
        padding: 8px 14px;
        font-size: 10px;
    }
    body.doumaak-astra-heritage .dm-astra-ribbon-motif {
        font-size: 15px;
    }
    body.doumaak-astra-heritage .woocommerce ul.products li.product :is(.woocommerce-loop-product__title, .woocommerce-loop-category__title) {
        font-size: 13px;
    }
}
@media (prefers-reduced-motion: reduce) {
    body.doumaak-astra-heritage .main-header-menu > .menu-item > .menu-link,
    body.doumaak-astra-heritage .woocommerce ul.products li.product a img,
    body.doumaak-astra-heritage :is(.ast-button, .ast-custom-button, .button, button.button, input[type='submit'], input[type='button'], .wp-element-button) {
        transition: none;
    }
}
