/* Exact live token layer for the approved Safqa Fashion category preview. */
html body.theme-safqa:has(.sq-fashion-hero) {
    --sq-commerce-ink: #0f1111;
    --sq-commerce-muted: #565959;
    --sq-commerce-link: #007185;
    --sq-commerce-link-hover: #c7511f;
    --sq-commerce-success: #067d62;
    --sq-commerce-danger: #b12704;
    --sq-commerce-gold: #ffd814;
    --sq-commerce-gold-hover: #f7ca00;
    --sq-commerce-orange: #ffa41c;
    --sq-commerce-line: #d5d9d9;
    --sq-commerce-line-soft: #e7e7e7;
    --sq-commerce-subtle: #f7f8f8;
    --sq-commerce-surface: #ffffff;
    --sq-commerce-radius-sm: 4px;
    --sq-commerce-radius-md: 8px;
    --sq-commerce-shadow: 0 1px 2px rgba(15, 17, 17, .08);
    --sq-commerce-shadow-raised: 0 3px 10px rgba(15, 17, 17, .09);
    --sq-commerce-font: "Noto Sans Arabic", sans-serif;
    --sq-commerce-numbers: "Outfit", sans-serif;
    --sq-fashion-canvas: #f4f2ed;
    --sq-fashion-ink: #18231e;
    --sq-fashion-forest: #214e3d;
    --sq-fashion-sage: #dce4d5;
    --sq-fashion-sand: #e8d9c5;
    --sq-fashion-rust: #9a4738;
    background: var(--sq-fashion-canvas);
    color: var(--sq-commerce-ink);
    line-height: 1.5;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-classic-cat-page.sq-fashion-category {
    width: min(1580px, calc(100% - 28px)) !important;
    max-width: none !important;
    padding: 16px 0 54px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-breadcrumbs {
    gap: 8px !important;
    margin-bottom: 12px !important;
    color: var(--sq-commerce-muted) !important;
    font-size: 11px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-hero-copy {
    padding: clamp(28px, 4vw, 62px) !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-hero h1 {
    max-width: 500px !important;
    font-size: clamp(32px, 4vw, 55px) !important;
    line-height: 1.18 !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-hero p {
    max-width: 470px !important;
    margin-bottom: 22px !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-hero-visual > img {
    object-position: center 40% !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-service {
    padding-inline: 16px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-section-heading {
    margin: 22px 0 13px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-section-heading strong {
    font-size: 20px !important;
    font-weight: 700 !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-section-heading small {
    font-size: 11px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-department strong {
    font-size: 15px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .sq-fashion-department small {
    font-size: 10px !important;
}

/* Toolbar and filter measurements match the preview's compact catalog system. */
html body.theme-safqa:has(.sq-fashion-hero) .ty-sort-container {
    min-height: 64px;
    padding: 14px 16px;
    border: 1px solid var(--sq-commerce-line);
    border-radius: var(--sq-commerce-radius-md);
    background: var(--sq-commerce-surface);
}

html body.theme-safqa:has(.sq-fashion-hero) .ut2-sort-label,
html body.theme-safqa:has(.sq-fashion-hero) .ty-sort-dropdown__wrapper {
    font-size: 11px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar.filters {
    border-color: var(--sq-commerce-line) !important;
    border-radius: var(--sq-commerce-radius-md) !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar .filters-head strong {
    font-size: 13px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar .filter-title {
    font-size: 11.5px !important;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar .ty-product-filters__item {
    font-size: 10.5px !important;
}

/* The live native sort links stay functional inside the preview's catalog toolbar. */
html body.theme-safqa .safqa-fashion-catalog-toolbar {
    display: flex;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 14px;
    padding: 14px 16px;
    border: 1px solid var(--sq-commerce-line, #d5d9d9);
    border-radius: var(--sq-commerce-radius-md, 8px);
    background: var(--sq-commerce-surface, #fff);
    box-sizing: border-box;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar__title h2 {
    margin: 0;
    color: var(--sq-commerce-ink, #0f1111);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.25;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar__title p {
    margin: 3px 0 0;
    color: var(--sq-commerce-muted, #565959);
    font-size: 10.5px;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar__tools,
html body.theme-safqa .safqa-fashion-catalog-toolbar .ut2-sorting-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar .ty-sort-container {
    display: contents;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
}

html body.theme-safqa .safqa-fashion-toolbar-button,
html body.theme-safqa .safqa-fashion-toolbar-filter,
html body.theme-safqa .safqa-fashion-catalog-toolbar .ty-sort-dropdown__wrapper {
    min-height: 34px;
    box-sizing: border-box;
    border: 1px solid var(--sq-commerce-line, #d5d9d9);
    border-radius: 5px;
    background: #fff;
    color: var(--sq-commerce-ink, #0f1111);
    font-family: "Noto Sans Arabic", sans-serif;
    font-size: 11px !important;
    line-height: 1;
}

html body.theme-safqa .safqa-fashion-toolbar-button {
    display: grid;
    width: 34px;
    padding: 0;
    place-items: center;
    cursor: pointer;
}

html body.theme-safqa .safqa-fashion-toolbar-button.is-active {
    border-color: var(--sq-fashion-forest, #214e3d);
    background: var(--sq-fashion-forest, #214e3d);
    color: #fff;
}

html body.theme-safqa .safqa-fashion-toolbar-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 11px;
    cursor: pointer;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar .ty-sort-dropdown__wrapper {
    display: inline-flex !important;
    min-width: 118px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 10px;
    text-decoration: none;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar .ut2-sort-label {
    display: none !important;
}

html body.theme-safqa .safqa-fashion-catalog-toolbar .ut2-selected-product-filters {
    display: none;
}

html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-catalog__grid {
    grid-template-columns: 1fr !important;
}

html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
}

html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card__media {
    min-height: 210px;
}

html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card__info {
    min-height: 210px;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar .filters-head {
    position: relative;
}

html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-filter-close,
html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-filter-backdrop {
    display: none;
}

@media (max-width: 920px) {
    html body.theme-safqa .safqa-fashion-catalog-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    html body.theme-safqa .safqa-fashion-catalog-toolbar__tools {
        width: 100%;
        flex-wrap: wrap;
    }

    html body.theme-safqa .safqa-fashion-catalog-toolbar .ut2-sorting-wrap {
        flex: 1;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .cat-content-grid > .container-fluid-row > .row-fluid {
        display: block !important;
        width: min(100% - 20px, 1580px) !important;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .cat-content-grid .side-grid,
    html body.theme-safqa:has(.sq-fashion-hero) .cat-content-grid .span16.side-grid {
        display: block !important;
        width: 0 !important;
        height: 0 !important;
        margin: 0 !important;
        overflow: visible !important;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .cat-content-grid .main-content-grid,
    html body.theme-safqa:has(.sq-fashion-hero) .cat-content-grid .span9.main-content-grid {
        width: 100% !important;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-sidebar.filters {
        position: fixed !important;
        z-index: 1001 !important;
        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: min(330px, 88vw) !important;
        max-height: none !important;
        border-radius: 0 !important;
        transform: translateX(105%);
        transition: transform .22s ease;
    }

    html body.theme-safqa.safqa-filters-open {
        overflow: hidden;
    }

    html body.theme-safqa.safqa-filters-open .safqa-fashion-sidebar.filters {
        transform: none;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-filter-close {
        display: grid;
        width: 30px;
        height: 30px;
        padding: 0;
        place-items: center;
        border: 0;
        border-radius: 50%;
        background: #eef0f0;
        color: #172434;
        cursor: pointer;
    }

    html body.theme-safqa:has(.sq-fashion-hero) .safqa-fashion-filter-backdrop {
        position: fixed;
        z-index: 1000;
        inset: 0;
        background: rgba(15, 17, 17, .48);
    }

    html body.theme-safqa.safqa-filters-open .safqa-fashion-filter-backdrop {
        display: block;
    }
}

@media (max-width: 680px) {
    html body.theme-safqa .safqa-fashion-catalog-toolbar {
        min-height: 0;
        padding: 12px;
        gap: 10px;
    }

    html body.theme-safqa .safqa-fashion-catalog-toolbar__title h2 {
        font-size: 17px;
    }

    html body.theme-safqa .safqa-fashion-catalog-toolbar__tools,
    html body.theme-safqa .safqa-fashion-catalog-toolbar .ut2-sorting-wrap {
        gap: 6px;
    }

    html body.theme-safqa .safqa-fashion-toolbar-filter span {
        display: none;
    }

    html body.theme-safqa .safqa-fashion-toolbar-filter {
        width: 34px;
        justify-content: center;
        padding: 0;
    }

    html body.theme-safqa .safqa-fashion-catalog-toolbar .ty-sort-dropdown__wrapper {
        min-width: 0;
        flex: 1;
    }

    html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card__media,
    html body.theme-safqa .safqa-fashion-catalog--list .safqa-fashion-card__info {
        min-height: 120px;
    }
}

@media (max-width: 1180px) {
    html body.theme-safqa:has(.sq-fashion-hero) .sq-classic-cat-page.sq-fashion-category {
        width: min(100% - 20px, 1580px) !important;
    }
}

@media (max-width: 767px) {
    html body.theme-safqa:has(.sq-fashion-hero) .sq-classic-cat-page.sq-fashion-category {
        width: min(100% - 12px, 1580px) !important;
        padding-block: 10px 34px !important;
    }
}
