/*
Theme Name: Asalat Alotoor
Section: PATCH-009C Shop / Product Archive
*/


/* =========================================================
   ROOT
   ========================================================= */

.asala-shop-page,
.asala-shop-page * {
    box-sizing: border-box;
}

.asala-shop-page {
    width: 100%;
    direction: rtl;
    overflow-x: hidden;

    background: #ffffff;
    color: #2b1d18;
}

.asala-shop-container {
    width: min(1280px, calc(100% - 40px));
    margin-inline: auto;
}


/* =========================================================
   HERO
   ========================================================= */

.asala-shop-hero {
    position: relative;

    width: 100%;
    min-height: 190px;

    overflow: hidden;
    isolation: isolate;

    background: #2f1710;
}

.asala-shop-hero-media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.asala-shop-hero-media picture { display:block; }

.asala-shop-hero-media img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: center;
}

.asala-shop-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    background:
        linear-gradient(
            270deg,
            rgba(38, 16, 10, 0.82) 0%,
            rgba(45, 20, 12, 0.58) 40%,
            rgba(45, 20, 12, 0.15) 75%
        );
}

.asala-shop-hero-inner {
    position: relative;
    z-index: 2;

    min-height: 190px;

    display: flex;
    align-items: center;
}

.asala-shop-hero-content {
    width: min(560px, 55%);

    color: #ffffff;
}

.asala-shop-hero-content h1 {
    margin: 0;

    color: #ffffff;

    font-size: clamp(34px, 4vw, 54px);
    line-height: 1.25;
    font-weight: 800;
}

.asala-shop-hero-description {
    max-width: 520px;

    margin-top: 9px;

    color: #f7eee8;

    font-size: 15px;
    line-height: 1.8;
}

.asala-shop-hero-description p {
    margin: 0;
}


/* =========================================================
   CONTENT
   ========================================================= */

.asala-shop-content {
    padding: 20px 0 65px;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.asala-shop-breadcrumb {
    margin-bottom: 18px;

    color: #8b7770;

    font-size: 13px;
}

.asala-shop-breadcrumb-nav a {
    color: #5d3c2e;
    text-decoration: none;
}

.asala-shop-breadcrumb-nav a:hover {
    color: #981838;
}

.asala-shop-breadcrumb-separator {
    display: inline-block;
    margin: 0 7px;

    color: #b79a87;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.asala-shop-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 16px;

    margin-bottom: 20px;
}

.asala-shop-results {
    color: #56473f;

    font-size: 14px;
    font-weight: 600;
}

.asala-shop-control-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


/* Sorting */

.asala-shop-ordering {
    min-width: 235px;
}

.asala-shop-ordering .woocommerce-ordering {
    float: none !important;

    width: 100%;

    margin: 0 !important;
}

.asala-shop-ordering select {
    width: 100%;
    height: 46px;

    margin: 0 !important;

    padding: 0 14px !important;

    border: 1px solid #ded2ca !important;
    border-radius: 9px !important;

    background: #ffffff;

    color: #3d2b23;

    font-family: inherit;
    font-size: 14px;

    outline: none;
}


/* Mobile filter button */

.asala-filter-open {
    display: none;

    min-height: 46px;

    align-items: center;
    justify-content: center;

    gap: 8px;

    padding: 0 18px;

    border: 0;
    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            #71371d,
            #995425
        );

    color: #ffffff;

    font-family: inherit;
    font-size: 14px;
    font-weight: 800;

    cursor: pointer;
}

.asala-filter-open svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
    stroke-linecap: round;
}


/* =========================================================
   SHOP LAYOUT
   ========================================================= */

.asala-shop-layout {
    display: grid;

    grid-template-columns:
        255px
        minmax(0, 1fr);

    gap: 24px;

    align-items: start;
}


/* =========================================================
   FILTER SIDEBAR
   ========================================================= */

.asala-shop-sidebar {
    min-width: 0;
}

.asala-filter-panel {
    overflow: hidden;

    border: 1px solid #e8ddd6;
    border-radius: 14px;

    background: #ffffff;

    box-shadow:
        0 5px 18px
        rgba(63, 32, 20, 0.04);
}

.asala-filter-heading {
    padding: 17px 18px;

    border-bottom: 1px solid #eee3dc;

    background:
        linear-gradient(
            135deg,
            #fffaf6,
            #f8eee7
        );

    color: #47291d;

    font-size: 17px;
}

.asala-filter-form {
    margin: 0;

    padding: 0 17px 18px;
}

.asala-filter-section {
    padding: 18px 0;

    border-bottom: 1px solid #eee5df;
}

.asala-filter-section:last-of-type {
    border-bottom: 0;
}

.asala-filter-section h3 {
    margin: 0 0 13px;

    color: #3c2921;

    font-size: 15px;
    font-weight: 800;
}


/* Price */

.asala-filter-price-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;
}

.asala-filter-price-fields label {
    display: block;
}

.asala-filter-price-fields label > span {
    display: block;

    margin-bottom: 5px;

    color: #86736a;

    font-size: 11px;
}

.asala-filter-price-fields input {
    width: 100%;
    height: 39px;

    padding: 0 9px !important;

    border: 1px solid #ddd1c9 !important;
    border-radius: 7px !important;

    font-size: 12px;
}


/* Filter options */

.asala-filter-options {
    display: grid;

    gap: 9px;
}

.asala-filter-checkbox {
    display: flex;
    align-items: center;

    gap: 8px;

    margin: 0;

    color: #5a4840;

    font-size: 13px;

    cursor: pointer;
}

.asala-filter-checkbox input[type="checkbox"] {
    flex: 0 0 17px;

    width: 17px;
    height: 17px;

    margin: 0;
}


/* Apply */

.asala-filter-submit {
    width: 100%;
    min-height: 44px;

    margin-top: 17px;

    border-radius: 8px !important;

    background:
        linear-gradient(
            135deg,
            #71371d,
            #955022
        ) !important;

    color: #ffffff !important;

    font-size: 14px;
}

.asala-filter-reset {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    margin-top: 7px;

    color: #8a3b2a;

    font-size: 12px;
    font-weight: 700;

    text-decoration: none !important;
}


/* =========================================================
   PRODUCT GRID
   ========================================================= */

.asala-shop-products {
    min-width: 0;
}

.asala-shop-products ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;

    width: 100%;

    margin: 0 !important;
    padding: 0 !important;

    list-style: none;
}

.asala-shop-products ul.products::before,
.asala-shop-products ul.products::after {
    display: none !important;
}


/* Reset WooCommerce floats */

.asala-shop-products ul.products
li.product.asala-loop-product-item {
    width: auto !important;

    min-width: 0;

    float: none !important;

    clear: none !important;

    margin: 0 !important;
    padding: 0 !important;

    text-align: right;
}


/* =========================================================
   PRODUCT CARD
   ========================================================= */

.asala-loop-card {
    position: relative;

    height: 100%;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    border: 1px solid #e9e0da;
    border-radius: 11px;

    background: #ffffff;

    box-shadow:
        0 3px 12px
        rgba(50, 25, 16, 0.035);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.asala-loop-card:hover {
    transform: translateY(-2px);

    border-color: #dac8bc;

    box-shadow:
        0 8px 20px
        rgba(50, 25, 16, 0.08);
}


/* =========================================================
   PRODUCT IMAGE
   ========================================================= */

.asala-loop-image-wrap {
    position: relative;

    width: 100%;
    aspect-ratio: 1 / 1;

    overflow: hidden;

    background: #fff;
}

.asala-loop-image-link {
    display: block;

    width: 100%;
    height: 100%;
}

.asala-loop-image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    padding: 7px;

    transition: transform 0.25s ease;
}

.asala-loop-card:hover .asala-loop-image {
    transform: scale(1.025);
}


/* =========================================================
   BADGES
   ========================================================= */

.asala-loop-badges {
    position: absolute;

    top: 9px;
    right: 9px;

    z-index: 3;

    display: flex;
    flex-direction: column;

    gap: 5px;

    pointer-events: none;
}

.asala-loop-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 27px;

    padding: 4px 9px;

    border-radius: 7px;

    color: #ffffff;

    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.asala-loop-badge-featured {
    background: #a30637;
}

.asala-loop-badge-sale {
    background: #a30637;
}

.asala-loop-badge-custom {
    max-width: 150px;
    background: #a30637;
    box-shadow: 0 4px 12px rgba(163, 6, 55, 0.18);
    white-space: normal;
    text-align: center;
}

.asala-loop-badge-stock {
    background: #685a53;
}


/* =========================================================
   FAVORITE
   ========================================================= */

.asala-loop-favorite {
    position: absolute;

    top: 8px;
    left: 8px;

    z-index: 4;

    width: 33px;
    height: 33px;

    display: grid;
    place-items: center;

    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: rgba(255, 255, 255, 0.92) !important;

    color: #28231f !important;

    box-shadow:
        0 1px 4px
        rgba(0, 0, 0, 0.06);

    cursor: pointer;
}

.asala-loop-favorite:hover {
    background: #ffffff !important;
    color: #a30637 !important;
}

.asala-loop-favorite svg {
    width: 21px;
    height: 21px;

    fill: none;
    stroke: currentColor;

    stroke-width: 1.8;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.asala-loop-content {
    flex: 1;

    display: flex;
    flex-direction: column;

    padding: 10px 10px 9px;

    text-align: right;
}

.asala-loop-title {
    margin: 0;

    min-height: 27px;

    font-size: 15px;
    font-weight: 800;
    line-height: 1.45;
}

.asala-loop-title a {
    color: #261b17 !important;
    text-decoration: none !important;
}

.asala-loop-title a:hover {
    color: #8c3c26 !important;
}

.asala-loop-subtitle {
    display: -webkit-box;
    margin-top: 4px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: #6e5b50;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.55;
    text-align: center;
}


/* Legacy description styles retained defensively; PATCH-043U no longer renders descriptions in catalog cards. */

.asala-loop-description {
    display: -webkit-box;

    min-height: 36px;
    max-height: 36px;

    margin-top: 3px;

    overflow: hidden;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;

    color: #75675f;

    font-size: 11.5px;
    line-height: 1.55;
}


/* =========================================================
   PRICE
   ========================================================= */

.asala-loop-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;

    gap: 5px;

    margin-top: 7px;
}

.asala-loop-current-price {
    color: #a50035;

    font-size: 16px;
    font-weight: 900;
    line-height: 1.35;
}

.asala-loop-current-price span {
    font-size: 12px;
}

.asala-loop-regular-price {
    color: #9a918c;

    font-size: 12px;
    line-height: 1.35;
}

.asala-loop-regular-price span {
    font-size: 10px;
}

.asala-loop-yemeni-price {
    margin-top: 1px;

    color: #b4003b;

    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
}


/* =========================================================
   ADD TO CART
   ========================================================= */

.asala-loop-actions {
    margin-top: auto;
    padding-top: 9px;
}

.asala-loop-add-to-cart {
    width: 100%;
    min-height: 40px;

    display: flex !important;
    align-items: center;
    justify-content: center;

    gap: 6px;

    margin: 0 !important;
    padding: 8px 8px !important;

    border: 0 !important;
    border-radius: 7px !important;

    background:
        linear-gradient(
            135deg,
            #713719,
            #995226
        ) !important;

    color: #ffffff !important;

    text-decoration: none !important;

    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.3;

    text-align: center;
}

.asala-loop-add-to-cart:hover {
    color: #ffffff !important;
    opacity: 0.93;
}

.asala-loop-add-to-cart svg {
    width: 18px;
    height: 18px;

    fill: currentColor;
}


/* WooCommerce ajax checkmark / loading */

.asala-loop-actions .added_to_cart {
    display: block;

    margin-top: 5px;

    color: #824222;

    font-size: 11px;
    text-align: center;
}

.asala-loop-add-to-cart.loading {
    opacity: 0.65;
}


/* =========================================================
   PAGINATION
   ========================================================= */

.asala-shop-pagination {
    margin-top: 30px;
}

.asala-shop-pagination
.woocommerce-pagination {
    float: none;
}

.asala-shop-pagination
.woocommerce-pagination ul.page-numbers {
    display: flex;

    justify-content: center;
    align-items: center;

    gap: 5px;

    border: 0 !important;
}

.asala-shop-pagination
.woocommerce-pagination
ul.page-numbers li {
    border: 0 !important;
}

.asala-shop-pagination
.page-numbers a,
.asala-shop-pagination
.page-numbers span {
    min-width: 38px;
    height: 38px;

    display: grid !important;
    place-items: center;

    padding: 0 8px !important;

    border: 1px solid #e1d4cb !important;
    border-radius: 7px;

    background: #ffffff !important;

    color: #54382a !important;
}

.asala-shop-pagination
.page-numbers .current {
    border-color: #81401f !important;

    background: #81401f !important;

    color: #ffffff !important;
}


/* =========================================================
   EMPTY
   ========================================================= */

.asala-shop-empty {
    padding: 45px 20px;

    border: 1px solid #eadfd8;
    border-radius: 12px;

    text-align: center;
}


/* =========================================================
   MOBILE FILTER DRAWER
   ========================================================= */

.asala-filter-drawer {
    visibility: hidden;

    position: fixed;
    inset: 0;

    z-index: 99999;

    pointer-events: none;
}

.asala-filter-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.asala-filter-backdrop {
    position: absolute;
    inset: 0;

    width: 100%;
    height: 100%;

    padding: 0 !important;

    border: 0 !important;
    border-radius: 0 !important;

    background:
        rgba(30, 17, 12, 0.46) !important;

    opacity: 0;

    transition: opacity 0.2s ease;
}

.asala-filter-drawer.is-open
.asala-filter-backdrop {
    opacity: 1;
}

.asala-filter-sheet {
    position: absolute;

    right: 0;
    bottom: 0;
    left: 0;

    max-height: min(82vh, 760px);

    overflow: hidden;

    border-radius: 20px 20px 0 0;

    background: #ffffff;

    transform: translateY(102%);

    transition:
        transform 0.25s ease;
}

.asala-filter-drawer.is-open
.asala-filter-sheet {
    transform: translateY(0);
}

.asala-filter-sheet-header {
    min-height: 58px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 10px 18px;

    border-bottom: 1px solid #eee2da;

    color: #3a271f;

    font-size: 17px;
}

.asala-filter-close {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    padding: 0 !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: #f5eee9 !important;

    color: #3d2921 !important;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;
}

.asala-filter-sheet-content {
    max-height:
        calc(
            min(82vh, 760px)
            - 58px
        );

    overflow-y: auto;

    padding: 0 18px 22px;

    -webkit-overflow-scrolling: touch;
}

.asala-filter-sheet
.asala-filter-form {
    padding: 0;
}

html.asala-filter-opened,
html.asala-filter-opened body {
    overflow: hidden !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 768px) and (max-width: 1100px) {

    .asala-shop-container {
        width:
            min(
                100% - 32px,
                1050px
            );
    }

    .asala-shop-layout {
        grid-template-columns:
            220px
            minmax(0, 1fr);

        gap: 18px;
    }

    .asala-shop-products ul.products {
        grid-template-columns:
            repeat(
                3,
                minmax(0, 1fr)
            );

        gap: 12px;
    }

    .asala-loop-content {
        padding-left: 8px;
        padding-right: 8px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .asala-shop-container {
        width: calc(100% - 24px);
    }


    /* Hero */

    .asala-shop-hero {
        min-height: 132px;
    }

    .asala-shop-hero-inner {
        min-height: 132px;
    }

    .asala-shop-hero-content {
        width: 65%;
    }

    .asala-shop-hero-content h1 {
        font-size: 31px;
    }

    .asala-shop-hero-description {
        display: none;
    }


    /* Content */

    .asala-shop-content {
        padding-top: 14px;
        padding-bottom: 45px;
    }

    .asala-shop-breadcrumb {
        margin-bottom: 13px;

        font-size: 11px;
    }


    /* Controls */

    .asala-shop-controls {
        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 9px;

        margin-bottom: 14px;
    }

    .asala-shop-results {
        grid-column: 1 / -1;

        font-size: 12px;
    }

    .asala-shop-control-actions {
        grid-column: 1 / -1;

        display: grid;

        grid-template-columns:
            1fr 1fr;

        gap: 8px;
    }

    .asala-shop-ordering {
        min-width: 0;
    }

    .asala-shop-ordering select {
        height: 43px;

        font-size: 12px;
    }

    .asala-filter-open {
        display: flex;

        min-height: 43px;

        padding: 0 10px;

        font-size: 12px;
    }


    /* Remove desktop sidebar */

    .asala-shop-layout {
        display: block;
    }

    .asala-shop-sidebar {
        display: none;
    }


    /* 2-column product grid */

    .asala-shop-products ul.products {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 9px;
    }


    /* Cards */

    .asala-loop-card {
        border-radius: 9px;
    }

    .asala-loop-image {
        padding: 4px;
    }

    .asala-loop-badges {
        top: 6px;
        right: 6px;
    }

    .asala-loop-badge {
        min-height: 23px;

        padding: 3px 7px;

        border-radius: 6px;

        font-size: 9px;
    }

    .asala-loop-favorite {
        top: 5px;
        left: 5px;

        width: 29px;
        height: 29px;
    }

    .asala-loop-favorite svg {
        width: 18px;
        height: 18px;
    }

    .asala-loop-content {
        padding: 7px 7px 7px;
    }

    .asala-loop-title {
        min-height: 23px;

        font-size: 13px;
        line-height: 1.4;
    }

    .asala-loop-description {
        min-height: 31px;
        max-height: 31px;

        margin-top: 2px;

        font-size: 10px;
        line-height: 1.55;
    }

    .asala-loop-price {
        gap: 4px;

        margin-top: 5px;
    }

    .asala-loop-current-price {
        font-size: 14px;
    }

    .asala-loop-current-price span {
        font-size: 10px;
    }

    .asala-loop-regular-price {
        font-size: 10px;
    }

    .asala-loop-yemeni-price {
        font-size: 10.5px;
    }

    .asala-loop-actions {
        padding-top: 6px;
    }

    .asala-loop-add-to-cart {
        min-height: 36px;

        gap: 4px;

        padding: 6px 4px !important;

        font-size: 10.5px !important;
    }

    .asala-loop-add-to-cart svg {
        width: 15px;
        height: 15px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .asala-shop-container {
        width: calc(100% - 18px);
    }

    .asala-shop-products ul.products {
        gap: 7px;
    }

    .asala-loop-content {
        padding-left: 6px;
        padding-right: 6px;
    }

    .asala-loop-title {
        font-size: 12px;
    }

    .asala-loop-description {
        font-size: 9.5px;
    }

    .asala-loop-current-price {
        font-size: 13px;
    }

    .asala-loop-add-to-cart {
        font-size: 10px !important;
    }

}


/* =========================================================
   PATCH-010
   Mobile Filter Bottom Sheet - Visual Refinement
   Asalat Alotoor
   ========================================================= */

@media (max-width: 767px) {

    /* -----------------------------------------
       Bottom Sheet
       ----------------------------------------- */

    .asala-filter-sheet {
        max-height: min(76dvh, 680px);

        border-radius: 22px 22px 0 0;

        box-shadow:
            0 -14px 38px
            rgba(48, 25, 17, 0.14);
    }


    /* -----------------------------------------
       Header
       ----------------------------------------- */

    .asala-filter-sheet-header {
        min-height: 60px;

        padding: 9px 16px;

        font-size: 18px;
        font-weight: 800;
    }


    .asala-filter-close {
        width: 40px;
        height: 40px;

        font-size: 24px;
    }


    /* -----------------------------------------
       Scrollable Content
       ----------------------------------------- */

    .asala-filter-sheet-content {
        max-height:
            calc(
                min(76dvh, 680px)
                - 60px
            );

        padding:
            0
            16px
            18px;
    }


    /* -----------------------------------------
       Filter Sections
       ----------------------------------------- */

    .asala-filter-sheet
    .asala-filter-section {
        padding: 14px 0;
    }


    .asala-filter-sheet
    .asala-filter-section h3 {
        margin-bottom: 10px;

        font-size: 16px;
        line-height: 1.5;
    }


    /* -----------------------------------------
       Price Fields
       ----------------------------------------- */

    .asala-filter-sheet
    .asala-filter-price-fields {
        gap: 10px;
    }


    .asala-filter-sheet
    .asala-filter-price-fields label > span {
        margin-bottom: 6px;

        font-size: 12px;
    }


    .asala-filter-sheet
    .asala-filter-price-fields input {
        height: 42px;

        padding: 0 10px !important;

        border-radius: 9px !important;

        font-size: 13px;
    }


    /* -----------------------------------------
       Checkboxes
       ----------------------------------------- */

    .asala-filter-sheet
    .asala-filter-options {
        gap: 10px;
    }


    .asala-filter-sheet
    .asala-filter-checkbox {
        gap: 9px;

        font-size: 14px;
        line-height: 1.6;
    }


    .asala-filter-sheet
    .asala-filter-checkbox
    input[type="checkbox"] {
        flex: 0 0 19px;

        width: 19px;
        height: 19px;
    }


    /* -----------------------------------------
       Buttons
       ----------------------------------------- */

    .asala-filter-sheet
    .asala-filter-submit {
        min-height: 48px;

        margin-top: 14px;

        border-radius: 10px !important;

        font-size: 15px;
        font-weight: 800;
    }


    .asala-filter-sheet
    .asala-filter-reset {
        min-height: 40px;

        margin-top: 6px;

        font-size: 13px;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   320px - 360px
   ========================================================= */

@media (max-width: 360px) {

    .asala-filter-sheet {
        max-height: 80dvh;
    }


    .asala-filter-sheet-content {
        max-height:
            calc(
                80dvh
                - 58px
            );

        padding-left: 13px;
        padding-right: 13px;
    }


    .asala-filter-sheet-header {
        min-height: 58px;

        padding-left: 13px;
        padding-right: 13px;

        font-size: 17px;
    }


    .asala-filter-sheet
    .asala-filter-section {
        padding: 12px 0;
    }


    .asala-filter-sheet
    .asala-filter-section h3 {
        font-size: 15px;
    }


    .asala-filter-sheet
    .asala-filter-checkbox {
        font-size: 13px;
    }

}


/* =========================================================
   PATCH-011
   Product Card / Product Grid Pixel Matching
   Asalat Alotoor
   ========================================================= */


/* =========================================================
   GLOBAL CARD REFINEMENT
   ========================================================= */

.asala-loop-card {
    border: 1px solid #e7ddd6;
    border-radius: 12px;

    background: #ffffff;

    box-shadow:
        0 3px 10px
        rgba(58, 30, 18, 0.045);
}


/* صورة المنتج */

.asala-loop-image-wrap {
    background: #ffffff;
}

.asala-loop-image {
    padding: 4px;
    object-fit: contain;
}


/* Badge */

.asala-loop-badge {
    border-radius: 7px;

    font-weight: 800;
}


/* القلب */

.asala-loop-favorite {
    background:
        rgba(
            255,
            255,
            255,
            0.96
        ) !important;

    border:
        1px solid
        #eadfd8 !important;

    box-shadow:
        0 2px 7px
        rgba(50, 24, 15, 0.08);
}


/* محتوى البطاقة */

.asala-loop-content {
    padding:
        9px
        9px
        8px;

    text-align: center;
}


/* اسم المنتج */

.asala-loop-title {
    min-height: 25px;

    font-size: 14px;
    font-weight: 800;

    line-height: 1.45;

    text-align: center;
}


/* السطر الاختياري للبطاقة */

.asala-loop-subtitle {
    margin-top: 4px;
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.5;
    text-align: center;
}

/* الوصف القديم — لا يتم إخراجه من القالب بعد PATCH-043U */

.asala-loop-description {
    min-height: 34px;
    max-height: 34px;

    margin-top: 3px;

    color: #74665f;

    font-size: 11px;
    line-height: 1.55;

    text-align: center;
}


/* الأسعار */

.asala-loop-price {
    justify-content: center;

    gap: 5px;

    margin-top: 6px;

    text-align: center;
}


.asala-loop-current-price {
    color: #a30035;

    font-size: 15px;
    font-weight: 900;
}


.asala-loop-current-price span {
    font-size: 11px;
}


.asala-loop-regular-price {
    color: #9c918b;

    font-size: 11px;
}


.asala-loop-yemeni-price {
    width: 100%;

    margin-top: 1px;

    color: #b4003a;

    font-size: 11.5px;
    font-weight: 800;

    text-align: center;
}


/* زر السلة */

.asala-loop-actions {
    padding-top: 8px;
}


.asala-loop-add-to-cart {
    min-height: 39px;

    border-radius: 7px !important;

    background:
        linear-gradient(
            135deg,
            #783a1c,
            #a35725
        ) !important;

    font-size: 11.5px !important;

    box-shadow:
        inset 0 0 0 1px
        rgba(255,255,255,0.08);
}


.asala-loop-add-to-cart svg {
    width: 17px;
    height: 17px;
}


/* =========================================================
   DESKTOP
   ========================================================= */

@media (min-width: 1101px) {

    .asala-shop-products ul.products {
        gap: 15px;
    }


    .asala-loop-content {
        padding:
            10px
            10px
            9px;
    }


    .asala-loop-title {
        font-size: 15px;
    }


    .asala-loop-description {
        font-size: 11.5px;
    }


    .asala-loop-current-price {
        font-size: 16px;
    }


    .asala-loop-add-to-cart {
        min-height: 41px;

        font-size: 12px !important;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (min-width: 768px) and (max-width: 1100px) {

    .asala-shop-products ul.products {
        gap: 12px;
    }


    .asala-loop-title {
        font-size: 14px;
    }


    .asala-loop-description {
        font-size: 10.8px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .asala-shop-products ul.products {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 10px;
    }


    .asala-loop-card {
        border-radius: 10px;
    }


    .asala-loop-image {
        padding: 3px;
    }


    .asala-loop-badges {
        top: 6px;
        right: 6px;
    }


    .asala-loop-badge {
        min-height: 23px;

        padding:
            3px
            7px;

        font-size: 9px;
    }


    .asala-loop-favorite {
        top: 6px;
        left: 6px;

        width: 30px;
        height: 30px;
    }


    .asala-loop-favorite svg {
        width: 18px;
        height: 18px;
    }


    .asala-loop-content {
        padding:
            8px
            7px
            7px;
    }


    .asala-loop-title {
        min-height: 24px;

        font-size: 13.5px;

        line-height: 1.45;
    }


    .asala-loop-description {
        min-height: 32px;
        max-height: 32px;

        font-size: 10.5px;
        line-height: 1.5;
    }


    .asala-loop-price {
        margin-top: 5px;

        gap: 4px;
    }


    .asala-loop-current-price {
        font-size: 14.5px;
    }


    .asala-loop-current-price span {
        font-size: 10px;
    }


    .asala-loop-regular-price {
        font-size: 10px;
    }


    .asala-loop-yemeni-price {
        font-size: 10.8px;
    }


    .asala-loop-actions {
        padding-top: 7px;
    }


    .asala-loop-add-to-cart {
        min-height: 38px;

        padding:
            7px
            5px !important;

        font-size: 11px !important;
    }


    .asala-loop-add-to-cart svg {
        width: 15px;
        height: 15px;
    }

}


/* =========================================================
   SMALL MOBILE
   320px - 360px
   ========================================================= */

@media (max-width: 360px) {

    .asala-shop-products ul.products {
        gap: 7px;
    }


    .asala-loop-content {
        padding:
            7px
            5px
            6px;
    }


    .asala-loop-title {
        font-size: 12px;
    }


    .asala-loop-description {
        font-size: 9.5px;
    }


    .asala-loop-current-price {
        font-size: 13px;
    }


    .asala-loop-yemeni-price {
        font-size: 10px;
    }


    .asala-loop-add-to-cart {
        min-height: 36px;

        font-size: 10px !important;
    }

}


/* =========================================================
   PATCH-037
   Store + Category Archive Final Responsive Polish
   - Unified luxury product cards
   - Ratings + stock visibility
   - Add to cart + Buy now actions
   - Mobile-first catalog refinement
   ========================================================= */

.asala-shop-page {
    --asala-catalog-brown: #6d321b;
    --asala-catalog-brown-2: #9a4b22;
    --asala-catalog-red: #aa0035;
    --asala-catalog-gold: #d8aa54;
    --asala-catalog-gold-soft: #f3d68b;
    --asala-catalog-green: #1a9552;
    --asala-catalog-text: #241a16;
    --asala-catalog-muted: #766961;
    --asala-catalog-line: #eadfd7;
    --asala-catalog-soft: #fffaf6;
}

/* Catalog frame */
.asala-shop-content {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #ffffff 70%,
            #fcfaf8 100%
        );
}

.asala-shop-breadcrumb {
    font-weight: 700;
    line-height: 1.75;
}

.asala-shop-results {
    color: #5d4a40;
    font-weight: 800;
}

.asala-shop-ordering select {
    border-color: #e4d8d0 !important;
    color: #3a2921;
    font-weight: 700;
}

/* Desktop filter panel */
@media (min-width: 768px) {
    .asala-shop-sidebar {
        position: sticky;
        top: 18px;
    }

    .asala-filter-panel {
        border-color: #e8ddd6;
        box-shadow: 0 8px 24px rgba(75, 38, 23, 0.055);
    }
}

/* Product cards */
.asala-loop-card {
    overflow: hidden;
    border: 1px solid #e9ded5;
    border-radius: 16px;
    background: #fffefd;
    box-shadow: 0 7px 22px rgba(58, 29, 17, 0.055);
}

.asala-loop-card:hover {
    transform: translateY(-2px);
    border-color: #cfb5a5;
    box-shadow: 0 16px 34px rgba(58, 29, 17, 0.105);
}

.asala-loop-image-wrap {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fdfbf9 100%
        );
}

.asala-loop-image {
    padding: 8px;
    object-fit: contain;
}

.asala-loop-content {
    padding: 11px 11px 10px;
    text-align: center;
}

.asala-loop-title {
    display: -webkit-box;
    min-height: 43px;
    margin: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: var(--asala-catalog-text);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.45;
    text-align: center;
}

.asala-loop-title a {
    color: inherit !important;
}

.asala-loop-description {
    min-height: 35px;
    max-height: 35px;
    margin-top: 3px;
    color: var(--asala-catalog-muted);
    font-size: 11.5px;
    line-height: 1.55;
    text-align: center;
}

/* Ratings */
.asala-loop-rating {
    min-height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
    color: #9a8a81;
    font-size: 10.5px;
    line-height: 1;
}

.asala-loop-rating-stars {
    direction: ltr;
    display: inline-flex;
    align-items: center;
}

.asala-loop-rating .star-rating {
    float: none !important;
    margin: 0 !important;
    color: #e4ae35;
    font-size: 0.92em;
}

.asala-loop-rating-count {
    color: #8f8178;
    font-weight: 700;
}

.asala-loop-rating-empty {
    color: #9c8f87;
    font-weight: 700;
}

/* Price */
.asala-loop-price {
    justify-content: center;
    margin-top: 6px;
}

.asala-loop-current-price {
    color: var(--asala-catalog-red);
    font-size: 17px;
    font-weight: 900;
}

.asala-loop-yemeni-price {
    color: #b1003b;
    font-weight: 800;
}

/* Stock */
.asala-loop-stock {
    min-height: 18px;
    margin-top: 5px;
    font-size: 10.5px;
    font-weight: 800;
    line-height: 1.4;
    text-align: center;
}

.asala-loop-stock.is-in-stock {
    color: var(--asala-catalog-green);
}

.asala-loop-stock.is-out-of-stock {
    color: #8e3b34;
}

/* Actions */
.asala-loop-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
    margin-top: auto;
    padding-top: 9px;
}

.asala-loop-actions.has-buy-now {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.asala-loop-add-to-cart,
.asala-loop-buy-now {
    min-width: 0;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 !important;
    padding: 8px 6px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-family: inherit;
    font-size: 11px !important;
    font-weight: 800 !important;
    line-height: 1.3;
    text-align: center;
    transition: transform .18s ease, opacity .18s ease, box-shadow .18s ease;
}

.asala-loop-add-to-cart {
    border: 0 !important;
    background:
        linear-gradient(
            135deg,
            #713719,
            #9d4d21
        ) !important;
    color: #ffffff !important;
}

.asala-loop-buy-now {
    border: 1px solid #e8c778 !important;
    background:
        linear-gradient(
            135deg,
            #f2d47f,
            #e8b84f
        ) !important;
    color: #3b2516 !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}

.asala-loop-add-to-cart:hover,
.asala-loop-buy-now:hover {
    transform: translateY(-1px);
    opacity: .95;
}

.asala-loop-add-to-cart svg,
.asala-loop-buy-now svg {
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Keep cards visually balanced */
.asala-shop-products ul.products li.product.asala-loop-product-item {
    display: flex;
}

.asala-shop-products ul.products li.product.asala-loop-product-item > .asala-loop-card {
    width: 100%;
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1100px) {
    .asala-shop-products ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 13px;
    }

    .asala-loop-content {
        padding: 9px 9px 8px;
    }

    .asala-loop-title {
        min-height: 40px;
        font-size: 14px;
    }

    .asala-loop-description {
        font-size: 10.8px;
    }

    .asala-loop-actions.has-buy-now {
        grid-template-columns: 1fr;
    }
}

/* Mobile-first card layout */
@media (max-width: 767px) {
    .asala-shop-container {
        width: calc(100% - 20px);
    }

    .asala-shop-hero {
        min-height: 118px;
    }

    .asala-shop-hero-inner {
        min-height: 118px;
    }

    .asala-shop-hero-content {
        width: min(78%, 330px);
    }

    .asala-shop-hero-content h1 {
        font-size: clamp(26px, 8.4vw, 32px);
        line-height: 1.25;
    }

    .asala-shop-breadcrumb {
        margin-bottom: 11px;
        font-size: 11.5px;
    }

    .asala-shop-controls {
        margin-bottom: 12px;
    }

    .asala-shop-products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .asala-loop-card {
        border-radius: 10px;
        box-shadow: 0 3px 10px rgba(58, 29, 17, 0.04);
    }

    .asala-loop-image {
        padding: 4px;
    }

    .asala-loop-content {
        padding: 8px 7px 7px;
    }

    .asala-loop-title {
        min-height: 38px;
        font-size: 13px;
        line-height: 1.42;
    }

    .asala-loop-description {
        min-height: 31px;
        max-height: 31px;
        font-size: 10px;
        line-height: 1.5;
    }

    .asala-loop-rating {
        min-height: 17px;
        gap: 3px;
        margin-top: 4px;
        font-size: 9px;
    }

    .asala-loop-current-price {
        font-size: 14.5px;
    }

    .asala-loop-stock {
        margin-top: 4px;
        font-size: 9.7px;
    }

    .asala-loop-actions {
        gap: 5px;
        padding-top: 7px;
    }

    .asala-loop-add-to-cart,
    .asala-loop-buy-now {
        min-height: 36px;
        padding: 6px 4px !important;
        font-size: 9.8px !important;
    }

    .asala-loop-add-to-cart svg,
    .asala-loop-buy-now svg {
        display: none;
    }

    .asala-filter-open {
        background:
            linear-gradient(
                135deg,
                #713719,
                #9d4d21
            );
    }
}

/* Narrow phones */
@media (max-width: 380px) {
    .asala-shop-products ul.products {
        gap: 7px;
    }

    .asala-loop-content {
        padding-left: 5px;
        padding-right: 5px;
    }

    .asala-loop-title {
        font-size: 12px;
    }

    .asala-loop-actions.has-buy-now {
        grid-template-columns: 1fr;
    }

    .asala-loop-add-to-cart,
    .asala-loop-buy-now {
        font-size: 10px !important;
    }
}

/* PATCH-037 AJAX add-to-cart follow-up link stays full width. */
.asala-loop-actions .added_to_cart {
    grid-column: 1 / -1;
    width: 100%;
}


/* =========================================================
   PATCH-040E2F — FUNCTIONAL WISHLIST STATE
   ========================================================= */

.asala-loop-favorite.is-active {
    border-color: #dba9b7 !important;
    background: #ffffff !important;
    color: #a30637 !important;
}

.asala-loop-favorite.is-active svg {
    fill: currentColor !important;
    stroke: currentColor !important;
}

.asala-loop-favorite.is-loading {
    opacity: .55 !important;
    pointer-events: none !important;
}

/* PATCH-043T — Brand archive cards: title-focused presentation. */
.asala-brand-archive-product .asala-loop-description{
    display:none !important;
}
.asala-brand-archive-product .asala-loop-title{
    margin-bottom:10px !important;
    font-size:20px !important;
    font-weight:800 !important;
    line-height:1.55 !important;
    letter-spacing:0 !important;
}
.asala-brand-archive-product .asala-loop-title a{
    color:#261610 !important;
    font-weight:800 !important;
}
.asala-brand-archive-product .asala-loop-title a:hover,
.asala-brand-archive-product .asala-loop-title a:focus-visible{
    color:#8f431d !important;
}
@media(max-width:767px){
    .asala-brand-archive-product .asala-loop-title{
        font-size:18px !important;
        line-height:1.6 !important;
    }
}

/* PATCH-045M — rotating archive / shop hero banners */
.asala-shop-hero-media{isolation:isolate}.asala-shop-hero-media .asala-shop-hero-slide{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;visibility:hidden;transition:opacity .65s ease,visibility .65s ease}.asala-shop-hero-media .asala-shop-hero-slide.is-active{opacity:1;visibility:visible}.asala-shop-hero-media>.asala-shop-hero-slide:first-child{position:absolute}.asala-shop-hero-media .asala-shop-hero-dots{z-index:3}
@media(prefers-reduced-motion:reduce){.asala-shop-hero-media .asala-shop-hero-slide{transition:none!important}}

/* PATCH-048N — unobtrusive attribute chips on all reusable product cards. */
.asala-loop-card .asala-vc-card-meta{display:flex;flex-wrap:wrap;gap:5px 7px;align-items:center;justify-content:center;margin:5px 0 8px;min-height:22px}
.asala-loop-card .asala-vc-card-meta span{font-family:inherit;font-size:clamp(10px,2.6vw,12px);font-weight:700;line-height:1.6;padding:2px 9px;border:1px solid #e4d0bc;border-radius:999px;color:#66442d;background:#fff8f1;overflow-wrap:anywhere;max-width:100%}
@media(min-width:768px){.asala-loop-card .asala-vc-card-meta span{font-size:12px}}

/* PATCH-048O — native Woo variant card purchase feedback, row span only. */
.asala-loop-actions [data-asala-card-error]{grid-column:1/-1;margin:0;padding:6px 8px;border-radius:6px;background:#fff1ef;color:#8b261e;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.asala-loop-actions [data-asala-card-error][hidden]{display:none!important}
.asala-loop-actions .asala-vc-direct-add[aria-disabled=true]{opacity:.65;pointer-events:none}
