/**
 * Al-Tareekhiyah — Shop / category archive (Salla-accurate layout)
 * All selectors are scoped with .alt-shop-
 */

.alt-shop-page {
    background: var(--sp-cream, #faf7f2);
    color: var(--sp-ink, #2b0f13);
    padding-bottom: 70px;
}

.alt-shop-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------------------------------------------------
 * Breadcrumbs
 * ------------------------------------------------------- */
.alt-shop-crumbs-bar {
    border-bottom: 1px solid var(--sp-line, #ece4d7);
    background: #fff;
    margin-bottom: 22px;
}

.alt-shop-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--sp-muted, #7a6f63);
}

.alt-shop-crumbs a {
    color: var(--sp-muted, #7a6f63);
    text-decoration: none;
    transition: color .2s ease;
}

.alt-shop-crumbs a:hover {
    color: var(--sp-gold, #a9822b);
}

.alt-shop-crumb-sep {
    color: #cbbfa9;
    font-size: 11px;
}

.alt-shop-crumb-current {
    color: var(--sp-ink, #2b0f13);
    font-weight: 700;
}

/* ---------------------------------------------------------
 * Page head
 * ------------------------------------------------------- */
.alt-shop-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 26px 28px;
    background:
        radial-gradient(120% 160% at 100% 0%, rgba(169, 130, 43, .10) 0%, rgba(169, 130, 43, 0) 55%),
        #fff;
    border: 1px solid var(--sp-line, #ece4d7);
    border-radius: 20px;
    margin-bottom: 18px;
    position: relative;
    overflow: hidden;
}

.alt-shop-head::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--sp-gold-2, #c9a961), rgba(201, 169, 97, 0));
}

.alt-shop-kicker {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--sp-gold, #a9822b);
    margin-bottom: 6px;
}

.alt-shop-title {
    font-size: clamp(24px, 2.6vw, 34px);
    font-weight: 800;
    line-height: 1.3;
    margin: 0;
    color: var(--sp-ink, #2b0f13);
}

.alt-shop-desc {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.9;
    color: #5d5348;
    max-width: 70ch;
}

.alt-shop-desc p {
    margin: 0 0 8px;
}

.alt-shop-desc p:last-child {
    margin: 0;
}

.alt-shop-head-count {
    flex: 0 0 auto;
    text-align: center;
    min-width: 86px;
    padding: 10px 14px;
    border-radius: 14px;
    background: #f8f3e9;
    border: 1px solid rgba(169, 130, 43, .25);
}

.alt-shop-head-count strong {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: var(--sp-brand, #411017);
    line-height: 1.1;
}

.alt-shop-head-count span {
    font-size: 11px;
    color: var(--sp-muted, #7a6f63);
}

/* ---------------------------------------------------------
 * Toolbar
 * ------------------------------------------------------- */
.alt-shop-toolbar {
    position: sticky;
    top: var(--alt-shop-top, 92px);
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(8px);
    border: 1px solid var(--sp-line, #ece4d7);
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 18px;
    transition: box-shadow .25s ease, border-color .25s ease;
}

.alt-shop-toolbar.is-stuck {
    box-shadow: 0 18px 40px -32px rgba(65, 16, 23, .8);
    border-color: #e2d7c5;
}

.alt-shop-toolbar-start,
.alt-shop-toolbar-end {
    display: flex;
    align-items: center;
    gap: 12px;
}

.alt-shop-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 16px;
    border-radius: 10px;
    border: 1px solid #ddd3c3;
    background: #fff;
    color: var(--sp-brand, #411017);
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: all .2s ease;
    position: relative;
}

.alt-shop-filter-btn:hover {
    border-color: var(--sp-gold, #a9822b);
    color: var(--sp-gold, #a9822b);
}

.alt-shop-filter-btn i {
    font-size: 15px;
}

.alt-shop-filter-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #c0483f;
    position: absolute;
    top: 9px;
    inset-inline-end: 9px;
}

.alt-shop-count {
    font-size: 12.5px;
    color: var(--sp-muted, #7a6f63);
    font-weight: 500;
}

.alt-shop-count strong {
    color: var(--sp-ink, #2b0f13);
    font-weight: 800;
}

/* WooCommerce ordering select */
.alt-shop-sort .woocommerce-ordering {
    margin: 0;
}

.alt-shop-sort select,
.alt-shop-sort .orderby {
    height: 40px;
    min-width: 190px;
    padding: 0 14px;
    border: 1px solid #ddd3c3;
    border-radius: 10px;
    background-color: #fff;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23411017' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--sp-ink, #2b0f13);
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    outline: none;
}

.alt-shop-sort select:focus {
    border-color: var(--sp-gold, #a9822b);
    box-shadow: 0 0 0 3px rgba(169, 130, 43, .14);
}

/* View toggle */
.alt-shop-view {
    display: inline-flex;
    padding: 3px;
    border: 1px solid #ddd3c3;
    border-radius: 10px;
    background: #fff;
    gap: 2px;
}

.alt-shop-view-btn {
    width: 34px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #a1968a;
    font-size: 15px;
    cursor: pointer;
    transition: all .18s ease;
}

.alt-shop-view-btn:hover {
    color: var(--sp-brand, #411017);
}

.alt-shop-view-btn.is-active {
    background: var(--sp-brand, #411017);
    color: #fff;
}

/* ---------------------------------------------------------
 * Layout
 * ------------------------------------------------------- */
.alt-shop-layout {
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

/* ---------------------------------------------------------
 * Sidebar
 * ------------------------------------------------------- */
.alt-shop-sidebar {
    background: #fff;
    border: 1px solid var(--sp-line, #ece4d7);
    border-radius: 18px;
    padding: 6px 0 10px;
    position: sticky;
    top: calc(var(--alt-shop-top, 92px) + 62px);
}

.alt-shop-sidebar-head {
    display: none;
}

.alt-shop-filter-group {
    border-bottom: 1px solid #f1ebe1;
    padding: 0 18px;
}

.alt-shop-filter-group:last-of-type {
    border-bottom: 0;
}

.alt-shop-filter-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px 0;
    border: 0;
    background: transparent;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--sp-ink, #2b0f13);
    cursor: pointer;
}

.alt-shop-filter-head i {
    font-size: 13px;
    color: #a89c8b;
    transition: transform .25s ease;
}

.alt-shop-filter-head[aria-expanded="false"] i {
    transform: rotate(-90deg);
}

.alt-shop-filter-body {
    padding-bottom: 16px;
}

.alt-shop-filter-head[aria-expanded="false"] + .alt-shop-filter-body {
    display: none;
}

/* Categories */
.alt-shop-cats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.alt-shop-cats a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 9px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #5d5348;
    text-decoration: none;
    transition: all .18s ease;
}

.alt-shop-cats a:hover {
    background: #faf6ee;
    color: var(--sp-gold, #a9822b);
}

.alt-shop-cats a.is-active {
    background: rgba(169, 130, 43, .12);
    color: var(--sp-brand, #411017);
    font-weight: 800;
}

.alt-shop-cats em {
    font-style: normal;
    font-size: 11px;
    font-weight: 700;
    color: #a1968a;
    background: #f6f1e8;
    border-radius: 999px;
    padding: 1px 7px;
    flex: 0 0 auto;
}

.alt-shop-subcats {
    list-style: none;
    margin: 2px 0 6px;
    padding: 0 14px 0 0;
    display: grid;
    gap: 1px;
    border-inline-start: 1px solid #f1ebe1;
    margin-inline-start: 12px;
}

.alt-shop-subcats a {
    font-size: 12.5px;
    font-weight: 500;
    padding: 5px 8px;
}

/* Price */
.alt-shop-price-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.alt-shop-price-inputs label {
    flex: 1 1 0;
    display: block;
}

.alt-shop-price-inputs label span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--sp-muted, #7a6f63);
    margin-bottom: 5px;
}

.alt-shop-price-inputs input {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd3c3;
    border-radius: 9px;
    background: #fdfbf7;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-ink, #2b0f13);
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.alt-shop-price-inputs input:focus {
    border-color: var(--sp-gold, #a9822b);
    box-shadow: 0 0 0 3px rgba(169, 130, 43, .14);
}

.alt-shop-price-dash {
    color: #c3b8a8;
    padding-bottom: 12px;
}

.alt-shop-price-note {
    margin: 8px 0 0;
    font-size: 11px;
    color: #a1968a;
}

/* Checkbox */
.alt-shop-check {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #5d5348;
    padding: 4px 0;
}

.alt-shop-check input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.alt-shop-check-box {
    width: 19px;
    height: 19px;
    border: 1px solid #d6cbb9;
    border-radius: 6px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    transition: all .18s ease;
    flex: 0 0 auto;
}

.alt-shop-check-box i {
    opacity: 0;
    transform: scale(.6);
    transition: all .18s ease;
}

.alt-shop-check input:checked + .alt-shop-check-box {
    background: var(--sp-brand, #411017);
    border-color: var(--sp-brand, #411017);
}

.alt-shop-check input:checked + .alt-shop-check-box i {
    opacity: 1;
    transform: scale(1);
}

.alt-shop-check input:focus-visible + .alt-shop-check-box {
    box-shadow: 0 0 0 3px rgba(169, 130, 43, .25);
}

/* Actions */
.alt-shop-filter-actions {
    padding: 14px 18px 6px;
    display: grid;
    gap: 8px;
}

.alt-shop-apply {
    height: 42px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--sp-brand, #411017), #5a1a25);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    transition: filter .2s ease;
}

.alt-shop-apply:hover {
    filter: brightness(1.07);
}

.alt-shop-reset {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--sp-muted, #7a6f63);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.alt-shop-reset:hover {
    color: #c0483f;
}

/* ---------------------------------------------------------
 * Products grid
 * ------------------------------------------------------- */
.alt-shop-main {
    min-width: 0;
}

.alt-shop-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

@media (min-width: 1200px) {
    .alt-shop-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.alt-shop-grid .alt-product-card {
    height: 100%;
}

/* List view */
.alt-shop-grid.is-list {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.alt-shop-grid.is-list .alt-product-card {
    flex-direction: row !important;
    align-items: stretch;
    padding: 0;
}

.alt-shop-grid.is-list .alt-product-thumb {
    width: 190px;
    min-width: 190px;
    aspect-ratio: 1 / 1;
    border-bottom: 0;
    border-inline-end: 1px solid #f4efe6;
    padding: 10px;
}

.alt-shop-grid.is-list .alt-product-details {
    justify-content: center;
    gap: 4px;
}

.alt-shop-grid.is-list .alt-product-title {
    height: auto !important;
    -webkit-line-clamp: 2;
    margin-bottom: 6px !important;
    font-size: 1rem !important;
}

.alt-shop-grid.is-list .alt-btn-cart {
    width: auto !important;
    align-self: flex-start;
    padding: 10px 22px !important;
    margin-top: 6px;
}

/* Pagination + notices */
.alt-shop-pagination {
    margin-top: 30px;
}

.alt-shop-notices,
.woocommerce-notices-wrapper {
    margin-bottom: 14px;
}

/* ---------------------------------------------------------
 * Empty state
 * ------------------------------------------------------- */
.alt-shop-empty {
    background: #fff;
    border: 1px dashed #ddd3c3;
    border-radius: 20px;
    padding: 60px 24px;
    text-align: center;
}

.alt-shop-empty i {
    font-size: 40px;
    color: #d8cbb4;
}

.alt-shop-empty h2 {
    font-size: 19px;
    font-weight: 800;
    margin: 14px 0 6px;
    color: var(--sp-ink, #2b0f13);
}

.alt-shop-empty p {
    font-size: 13.5px;
    color: var(--sp-muted, #7a6f63);
    margin: 0 0 18px;
}

.alt-shop-empty-btn {
    display: inline-flex;
    align-items: center;
    height: 44px;
    padding: 0 22px;
    border-radius: 11px;
    background: var(--sp-brand, #411017);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    margin: 0 6px;
}

.alt-shop-empty .alt-shop-reset {
    display: inline-block;
    margin-inline-start: 12px;
}

/* Overlay (mobile drawer) */
.alt-shop-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(24, 9, 12, .5);
    z-index: 900;
    opacity: 0;
    transition: opacity .25s ease;
}

/* ---------------------------------------------------------
 * Responsive
 * ------------------------------------------------------- */
@media (max-width: 1080px) {
    .alt-shop-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .alt-shop-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        inset-inline-start: 0;
        width: 340px;
        max-width: 88vw;
        z-index: 950;
        border-radius: 0;
        border: 0;
        overflow-y: auto;
        transform: translateX(-105%);
        transition: transform .3s cubic-bezier(.22, .61, .36, 1);
        padding-top: 0;
        box-shadow: 0 0 60px rgba(0, 0, 0, .25);
    }

    html[dir="rtl"] .alt-shop-sidebar {
        transform: translateX(105%);
    }

    .alt-shop-sidebar.is-open,
    html[dir="rtl"] .alt-shop-sidebar.is-open {
        transform: translateX(0);
    }

    .alt-shop-sidebar-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 18px;
        border-bottom: 1px solid #f1ebe1;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 2;
    }

    .alt-shop-sidebar-head h2 {
        margin: 0;
        font-size: 15px;
        font-weight: 800;
    }

    .alt-shop-sidebar-close {
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid #e6ddcd;
        background: #fff;
        color: var(--sp-brand, #411017);
        font-size: 16px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .alt-shop-overlay.is-open {
        display: block;
        opacity: 1;
    }

    .alt-shop-toolbar {
        top: var(--alt-shop-top, 92px);
    }
}

@media (max-width: 900px) {
    .alt-shop-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .alt-shop-container {
        padding: 0 16px;
    }

    .alt-shop-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 20px 18px;
        border-radius: 16px;
    }

    .alt-shop-head-count {
        align-self: stretch;
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
        padding: 8px 12px;
    }

    .alt-shop-head-count strong {
        font-size: 17px;
    }

    .alt-shop-toolbar {
        padding: 10px 12px;
        gap: 10px;
        border-radius: 14px;
        flex-wrap: nowrap;
    }

    .alt-shop-toolbar-start {
        flex: 0 0 auto;
    }

    .alt-shop-toolbar-end {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .alt-shop-count {
        display: none;
    }

    .alt-shop-sort select,
    .alt-shop-sort .orderby {
        min-width: 0;
        width: 100%;
        font-size: 12px;
    }

    .alt-shop-toolbar-end {
        width: 100%;
        justify-content: space-between;
    }

    .alt-shop-sort {
        flex: 1 1 auto;
    }

    .alt-shop-view {
        display: none;
    }

    .alt-shop-grid.is-list .alt-product-thumb {
        width: 120px;
        min-width: 120px;
    }

    .alt-shop-grid.is-list .alt-product-title {
        font-size: .9rem !important;
    }

    .alt-shop-grid {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .alt-shop-sidebar,
    .alt-shop-overlay,
    .alt-shop-toolbar {
        transition: none !important;
    }
}

body.alt-shop-locked {
    overflow: hidden;
}

/* Widgets inside the shop sidebar */
.alt-shop-widgets {
    padding: 6px 18px 4px;
    border-bottom: 1px solid #f1ebe1;
}

.alt-shop-widgets .alt-widget {
    padding: 12px 0;
    border-bottom: 1px dashed #f1ebe1;
}

.alt-shop-widgets .alt-widget:last-child {
    border-bottom: 0;
}

.alt-shop-widgets .alt-widget-title {
    margin: 0 0 10px;
    font-size: 13.5px;
    font-weight: 800;
    color: #2b0f13;
}

.alt-shop-widgets ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.alt-shop-widgets ul li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 9px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: #5d5348;
    text-decoration: none;
    transition: all .18s ease;
}

.alt-shop-widgets ul li a:hover {
    background: #faf6ee;
    color: #a9822b;
}

.alt-shop-widgets select,
.alt-shop-widgets input[type="text"],
.alt-shop-widgets input[type="search"],
.alt-shop-widgets input[type="number"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ddd3c3;
    border-radius: 9px;
    background: #fdfbf7;
    padding: 0 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #2b0f13;
}

.alt-shop-widgets button,
.alt-shop-widgets input[type="submit"] {
    height: 38px;
    margin-top: 8px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    background: #411017;
    color: #fff;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
}

.alt-shop-widgets .star-rating {
    display: inline-block;
    color: #c9a961;
}

@media (max-width: 1080px) {
    .alt-shop-widgets {
        padding-top: 10px;
    }
}
