/* Corano shop — filter sidebar, colour swatches, price slider, AJAX states.
   Loaded by pages/shop.blade.php. Primary accent falls back to the theme gold. */
:root { --shop-accent: var(--theme-primary, #c29958); }

/* ---- Custom checkbox / radio filter rows ---- */
.shop-categories,
.checkbox-container.categories-list,
.shop-color-filter { list-style: none; margin: 0; padding: 0; }
.shop-categories li,
.checkbox-container.categories-list li { margin-bottom: 10px; }
.shop-categories li:last-child,
.checkbox-container.categories-list li:last-child { margin-bottom: 0; }

.filter-check {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    color: #555;
    user-select: none;
}
.filter-check input { position: absolute; opacity: 0; height: 0; width: 0; }
.filter-check .checkmark {
    position: relative;
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
    margin-right: 10px;
    border: 1px solid #d5d5d5;
    background: #fff;
    border-radius: 3px;
    transition: .2s;
}
.filter-check .checkmark.radio { border-radius: 50%; }
.filter-check .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.filter-check .checkmark.radio:after { left: 4px; top: 4px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.filter-check input:checked ~ .checkmark { background: var(--shop-accent); border-color: var(--shop-accent); }
.filter-check input:checked ~ .checkmark:after { display: block; }
.filter-check:hover .filter-label { color: var(--shop-accent); }
.filter-check .filter-label { flex: 1 1 auto; text-transform: capitalize; }
.filter-check .filter-count { color: #999; font-size: 12px; margin-left: 4px; }

/* ---- Colour swatch filter ---- */
.shop-color-filter { display: flex; flex-wrap: wrap; gap: 12px; }
.shop-color-filter li { margin: 0; }
.color-filter-item { display: inline-flex; flex-direction: column; align-items: center; cursor: pointer; margin: 0; width: 46px; text-align: center; }
.color-filter-item input { position: absolute; opacity: 0; height: 0; width: 0; }
.color-filter-item .color-swatch {
    height: 26px;
    width: 26px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #eee;
    box-shadow: 0 0 0 2px transparent;
    transition: .2s;
}
.color-filter-item input:checked ~ .color-swatch { box-shadow: 0 0 0 2px var(--shop-accent); border-color: #fff; }
.color-filter-item .color-name { font-size: 11px; color: #777; margin-top: 4px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46px; }

/* ---- Price slider ---- */
.price-filter .ui-slider {
    position: relative;
    height: 5px;
    background: #eaeaea;
    border: 0;
    border-radius: 3px;
    margin: 12px 5px 0;
}
.price-filter .ui-slider .ui-slider-range { position: absolute; height: 100%; background: var(--shop-accent); border-radius: 3px; }
.price-filter .ui-slider .ui-slider-handle {
    position: absolute;
    top: 50%;
    width: 15px;
    height: 15px;
    margin-left: -7px;
    transform: translateY(-50%);
    background: #fff;
    border: 2px solid var(--shop-accent);
    border-radius: 50%;
    cursor: grab;
    outline: none;
}
.price-filter .price-label span { font-size: 13px; font-weight: 500; color: #222; }
.price-filter .filter-btn {
    border: 0;
    background: var(--shop-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 8px 20px;
    border-radius: 3px;
    transition: .2s;
}
.price-filter .filter-btn:hover { opacity: .88; }

.reset-filters { font-size: 13px; color: #888; text-decoration: underline; }
.reset-filters:hover { color: var(--shop-accent); }

/* ---- AJAX loading state ---- */
.shop-products-ajax { position: relative; min-height: 200px; transition: opacity .2s; }
.shop-products-ajax.is-loading { opacity: .45; pointer-events: none; }
.shop-products-ajax.is-loading:after {
    content: "";
    position: absolute;
    top: 80px;
    left: 50%;
    width: 34px;
    height: 34px;
    margin-left: -17px;
    border: 3px solid #e5e5e5;
    border-top-color: var(--shop-accent);
    border-radius: 50%;
    animation: coranoSpin .7s linear infinite;
}
@keyframes coranoSpin { to { transform: rotate(360deg); } }

/* ---- Pagination: keep numbers + arrows aligned, gold active ---- */
.paginatoin-area .pagination-box { flex-wrap: wrap; align-items: center; }
.paginatoin-area .pagination-box li a { display: flex; align-items: center; justify-content: center; }
.paginatoin-area .pagination-box li.disabled a { opacity: .4; cursor: default; }
.paginatoin-area .pagination-box li.disabled a:hover { color: #222; background: #f5f5f5; }
.paginatoin-area .pagination-box li a i { font-size: 20px; line-height: 1; }

/* ---- Mobile filter drawer (off-canvas sheet) ---- */
.shop-filter-toggle { display: none; }
.shop-filter-close-bar { display: none; }
@media (max-width: 991px) {
    .shop-filter-toggle { display: inline-block; }
    .shop-filter-close-bar { display: block; }
    #shopFilterCol {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 86%;
        background: #fff;
        z-index: 1080;
        overflow-y: auto;
        padding: 20px;
        transform: translateX(-100%);
        transition: transform .28s ease;
        box-shadow: 0 0 24px rgba(0, 0, 0, .25);
    }
    #shopFilterCol.open { transform: translateX(0); }
    .shop-filter-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .5);
        z-index: 1075;
        display: none;
    }
    .shop-filter-backdrop.open { display: block; }
}

/* ---- List view: card lays out horizontally ---- */
.shop-product-wrap.list-view .product-item { display: flex; align-items: center; }
.shop-product-wrap.list-view { display: block; }
.shop-product-wrap.list-view > [class*="col-"] { width: 100%; max-width: 100%; flex: 0 0 100%; }
