/* WooCommerce page manager — v1.10.0 */

/* Width presets shared by archive templates and shortcode-based Woo pages. */
body.shahin-woo-width-boxed .shahin-commerce-container,
body.shahin-woo-width-boxed .content-body-section .content-container {
    width:min(1040px,calc(100% - 32px));
    max-width:1040px;
}

body.shahin-woo-width-wide .shahin-commerce-container,
body.shahin-woo-width-wide .content-body-section .content-container {
    width:min(1380px,calc(100% - 32px));
    max-width:1380px;
}

body.shahin-woo-width-full .shahin-commerce-container,
body.shahin-woo-width-full .content-body-section .content-container {
    width:calc(100% - 32px);
    max-width:none;
}

/* Removing both title and breadcrumbs should not leave an empty hero gap. */
body.shahin-woo-no-page-hero .content-body-section {
    padding-top:48px;
}

body.shahin-woo-hide-title.single-product .product_title,
body.shahin-woo-hide-title.single-product .entry-title {
    display:none!important;
}

body.shahin-woo-hide-product-meta.single-product .product_meta {
    display:none!important;
}

/* Explicit physical sidebar positions, independent of RTL auto-placement. */
body.shahin-woo-context-shop .shahin-commerce-layout,
body.shahin-woo-context-product .shahin-commerce-layout {
    direction:ltr;
}

body.shahin-woo-context-shop .shahin-commerce-content,
body.shahin-woo-context-product .shahin-commerce-content,
body.shahin-woo-context-shop .shahin-commerce-sidebar,
body.shahin-woo-context-product .shahin-commerce-sidebar {
    direction:rtl;
}

body.shahin-woo-sidebar-right .shahin-commerce-layout {
    grid-template-columns:292px minmax(0,1fr);
    grid-template-areas:"sidebar content";
}

body.shahin-woo-sidebar-left .shahin-commerce-layout {
    grid-template-columns:minmax(0,1fr) 292px;
    grid-template-areas:"content sidebar";
}

body.shahin-woo-sidebar-none .shahin-commerce-layout {
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:"content";
}

body.shahin-woo-sidebar-right .shahin-commerce-content,
body.shahin-woo-sidebar-left .shahin-commerce-content,
body.shahin-woo-sidebar-none .shahin-commerce-content {
    grid-area:content;
}

body.shahin-woo-sidebar-right .shahin-commerce-sidebar,
body.shahin-woo-sidebar-left .shahin-commerce-sidebar {
    grid-area:sidebar;
}

/* Shop column controls are final authority over older catalog CSS. */
body.shahin-woo-columns-2.woocommerce ul.products,
body.shahin-woo-columns-2.woocommerce-page ul.products {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

body.shahin-woo-columns-3.woocommerce ul.products,
body.shahin-woo-columns-3.woocommerce-page ul.products {
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
}

body.shahin-woo-columns-4.woocommerce ul.products,
body.shahin-woo-columns-4.woocommerce-page ul.products {
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
}

/* Optional premium sticky purchase/order panels. */
@media (min-width:921px) {
    body.shahin-woo-sticky-product-summary.single-product div.product .summary {
        position:sticky;
        top:112px;
        align-self:start;
    }

    body.admin-bar.shahin-woo-sticky-product-summary.single-product div.product .summary {
        top:144px;
    }

    body.shahin-woo-sticky-checkout-summary form.checkout #order_review,
    body.shahin-woo-sticky-checkout-summary form.checkout .woocommerce-checkout-review-order {
        position:sticky;
        top:112px;
        align-self:start;
    }

    body.admin-bar.shahin-woo-sticky-checkout-summary form.checkout #order_review,
    body.admin-bar.shahin-woo-sticky-checkout-summary form.checkout .woocommerce-checkout-review-order {
        top:144px;
    }
}

/* My Account navigation presets. */
body.shahin-woo-account-nav-side .woocommerce-MyAccount-navigation {
    float:right!important;
    width:250px!important;
}

body.shahin-woo-account-nav-side .woocommerce-MyAccount-content {
    float:left!important;
    width:calc(100% - 280px)!important;
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation,
body.shahin-woo-account-nav-top .woocommerce-MyAccount-content {
    float:none!important;
    width:100%!important;
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation ul {
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    margin:0 0 24px!important;
    padding:12px!important;
    border:1px solid var(--line);
    border-radius:18px;
    background:rgba(255,255,255,.025);
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation li {
    margin:0!important;
    border:0!important;
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation a {
    display:inline-flex;
    align-items:center;
    min-height:42px;
    padding:0 14px;
    border:1px solid transparent;
    border-radius:12px;
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation li.is-active a,
body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation a:hover {
    border-color:rgba(0,212,255,.24);
    background:rgba(0,212,255,.07);
}

@media (max-width:1120px) {
    body.shahin-woo-sidebar-right .shahin-commerce-layout {
        grid-template-columns:270px minmax(0,1fr);
    }

    body.shahin-woo-sidebar-left .shahin-commerce-layout {
        grid-template-columns:minmax(0,1fr) 270px;
    }

    body.shahin-woo-columns-4.woocommerce ul.products,
    body.shahin-woo-columns-4.woocommerce-page ul.products {
        grid-template-columns:repeat(3,minmax(0,1fr))!important;
    }
}

@media (max-width:920px) {
    body.shahin-woo-sidebar-right .shahin-commerce-layout,
    body.shahin-woo-sidebar-left .shahin-commerce-layout,
    body.shahin-woo-sidebar-none .shahin-commerce-layout {
        grid-template-columns:1fr;
        grid-template-areas:"content" "sidebar";
    }

    body.shahin-woo-columns-3.woocommerce ul.products,
    body.shahin-woo-columns-3.woocommerce-page ul.products,
    body.shahin-woo-columns-4.woocommerce ul.products,
    body.shahin-woo-columns-4.woocommerce-page ul.products {
        grid-template-columns:repeat(2,minmax(0,1fr))!important;
    }

    body.shahin-woo-account-nav-side .woocommerce-MyAccount-navigation,
    body.shahin-woo-account-nav-side .woocommerce-MyAccount-content {
        float:none!important;
        width:100%!important;
    }
}

@media (max-width:640px) {
    body.shahin-woo-width-boxed .shahin-commerce-container,
    body.shahin-woo-width-wide .shahin-commerce-container,
    body.shahin-woo-width-full .shahin-commerce-container,
    body.shahin-woo-width-boxed .content-body-section .content-container,
    body.shahin-woo-width-wide .content-body-section .content-container,
    body.shahin-woo-width-full .content-body-section .content-container {
        width:calc(100% - 24px);
    }

    body.shahin-woo-columns-2.woocommerce ul.products,
    body.shahin-woo-columns-2.woocommerce-page ul.products,
    body.shahin-woo-columns-3.woocommerce ul.products,
    body.shahin-woo-columns-3.woocommerce-page ul.products,
    body.shahin-woo-columns-4.woocommerce ul.products,
    body.shahin-woo-columns-4.woocommerce-page ul.products {
        grid-template-columns:1fr!important;
    }
}

.shahin-commerce-topbar.has-cart-only {
    justify-content:flex-end;
}

body.shahin-woo-hide-header.shahin-woo-sticky-product-summary.single-product div.product .summary,
body.shahin-woo-hide-header.shahin-woo-sticky-checkout-summary form.checkout #order_review,
body.shahin-woo-hide-header.shahin-woo-sticky-checkout-summary form.checkout .woocommerce-checkout-review-order {
    top:24px;
}

body.shahin-woo-account-nav-top .woocommerce-MyAccount-navigation ul,
body.shahin-woo-account-nav-side .woocommerce-MyAccount-navigation ul {
    list-style:none;
}
