/* ==========================================================================
   Search / category listing page
   Loaded only by resources/views/frontend/search/index.blade.php, after
   category.css. Every rule is scoped to .search-page so the other pages that
   share category.css are untouched. Styling only: no display/height rules that
   the page's JS (load-more, collapsible filters, sticky sidebar) depends on.
   ========================================================================== */

.search-page {
    --sp-accent: #d4072e;
    --sp-accent-hover: #b30526;
    --sp-accent-soft: rgba(212, 7, 46, .08);
    --sp-accent-ring: rgba(212, 7, 46, .22);
    --sp-surface: var(--bg-card);
    --sp-line: rgba(15, 23, 42, .08);
    --sp-line-strong: rgba(15, 23, 42, .14);
    --sp-muted: #6b7280;
    --sp-hover: rgba(15, 23, 42, .04);
    --sp-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .04);
    --sp-shadow-lg: 0 12px 32px -12px rgba(15, 23, 42, .22);
    --sp-radius: 16px;
    --sp-radius-sm: 12px;
    --sp-ease: cubic-bezier(.2, .8, .2, 1);
}

[data-theme="dark"] .search-page {
    --sp-line: rgba(255, 255, 255, .08);
    --sp-line-strong: rgba(255, 255, 255, .16);
    --sp-muted: #a1a1aa;
    --sp-hover: rgba(255, 255, 255, .05);
    --sp-accent-soft: rgba(232, 45, 45, .16);
    --sp-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --sp-shadow-lg: 0 14px 34px -12px rgba(0, 0, 0, .6);
}

/* ---------- Page header (title + breadcrumb) ---------- */

/* One compact bar: title on the start side, breadcrumb trail on the end side. */
.search-page .breadcrumb-section {
    padding: 10px 0;
    background-color: transparent;
    box-shadow: none !important;
}

.search-page .breadcrumb-section .row {
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0 !important;
    min-height: 44px;
    padding: 6px 16px;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius-sm);
    box-shadow: var(--sp-shadow);
}

.search-page .breadcrumb-section .row > [class*="col-"] {
    width: auto;
    min-width: 0;
    padding: 0 !important;
}

.search-page .breadcrumb-section .row > [class*="col-"]:first-child {
    flex: 0 1 auto;
}

.search-page .breadcrumb-section .row > [class*="col-"]:last-child {
    flex: 0 1 auto;
    overflow: hidden;
}

.search-page .page-title h1 {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 800;
    line-height: 1.6;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-page .theme-breadcrumb .breadcrumb {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    overflow-x: auto;
    margin: 0;
    padding: 0;
    font-size: 12.5px;
    line-height: 1.6;
    white-space: nowrap;
    scrollbar-width: none;
}

.search-page .theme-breadcrumb .breadcrumb::-webkit-scrollbar {
    display: none;
}

.search-page .breadcrumb li {
    padding: 0 !important;
    color: var(--sp-muted);
}

.search-page .breadcrumb-item + .breadcrumb-item {
    padding: 0 !important;
}

.search-page .breadcrumb-item + .breadcrumb-item::before {
    content: "\2039";
    float: none;
    padding: 0 7px;
    color: var(--sp-muted);
    opacity: .6;
    font-size: 15px;
    line-height: 1;
}

.search-page .breadcrumb-section .breadcrumb a {
    color: var(--sp-muted);
    font-weight: 400;
    transition: color .2s ease;
}

.search-page .breadcrumb-section .breadcrumb a:hover {
    color: var(--sp-accent);
}

.search-page .breadcrumb-item.active {
    color: var(--color-text);
    font-weight: 600;
}

/* Mobile: the same one-line card, just tighter. */
@media screen and (max-width: 767.98px) {
    .search-page .breadcrumb-section {
        padding: 8px 0 4px;
    }

    .search-page .breadcrumb-section .container {
        padding-right: 12px;
        padding-left: 12px;
    }

    .search-page .breadcrumb-section .row {
        gap: 10px;
        min-height: 42px;
        padding: 4px 12px;
    }

    .search-page .breadcrumb-section .row > [class*="col-"]:first-child {
        flex: 0 1 auto;
        max-width: 55%;
    }

    .search-page .breadcrumb-section .row > [class*="col-"]:last-child {
        flex: 0 1 auto;
    }

    .search-page .page-title {
        text-align: start !important;
    }

    .search-page .page-title h1 {
        font-size: 14px !important;
    }

    .search-page .theme-breadcrumb .breadcrumb {
        font-size: 11px;
    }

    .search-page .breadcrumb-item + .breadcrumb-item::before {
        padding: 0 5px;
        font-size: 13px;
    }

    /* The current page is already the title right beside it. */
    .search-page .breadcrumb-item.active {
        display: none;
    }
}

/* ---------- Shop-by-category strip ---------- */

.search-page .top-category {
    padding-top: 0;
    padding-bottom: 6px;
}

.search-page .top-category .mt-3 {
    margin-top: 10px !important;
}

.search-page .top-category .caption-section {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.search-page .grid-cols-cat {
    gap: 12px;
    padding-bottom: 6px;
    scrollbar-width: none;
}

.search-page .grid-cols-cat::-webkit-scrollbar {
    display: none;
}

.search-page .grid-cols-cat .categoryCard_category,
.search-page #loadMore {
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    transition: transform .25s var(--sp-ease), box-shadow .25s ease, border-color .25s ease;
}

.search-page .grid-cols-cat .categoryCard_category:hover,
.search-page #loadMore:hover {
    transform: translateY(-3px);
    border-color: var(--sp-accent-ring);
    box-shadow: var(--sp-shadow-lg);
}

.search-page .grid-cols-cat .categoryCard_categoryCard {
    width: 76px;
    height: 76px;
    margin-bottom: 8px;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--sp-hover);
}

.search-page .grid-cols-cat .categoryCard_categoryCard img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .35s var(--sp-ease);
}

.search-page .grid-cols-cat .categoryCard_category:hover img {
    transform: scale(1.06);
}

.search-page .grid-cols-cat .text-caption-strong {
    font-size: 13px;
    font-weight: 600;
}

.search-page #loadMore .text-caption-strong {
    color: var(--sp-accent);
    font-weight: 700;
}

@media screen and (max-width: 1023.99px) {
    .search-page .grid-cols-cat {
        gap: 10px;
    }

    .search-page .grid-cols-cat .categoryCard_category {
        padding: 10px 8px !important;
        min-width: 96px;
        border-radius: var(--sp-radius-sm);
    }

    .search-page .grid-cols-cat .categoryCard_categoryCard {
        width: 60px;
        height: 60px;
    }

    .search-page .grid-cols-cat .text-caption-strong {
        font-size: 11px;
    }
}

/* ---------- Sort bar (desktop) ---------- */

.search-page .row.row-filter-desc {
    margin-bottom: 16px;
}

.search-page .btn-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}

.search-page .btn-filter .icon-sort {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 4px 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.search-page .btn-filter .icon-sort i {
    color: var(--sp-accent);
    font-size: 15px;
}

.search-page .sort_label {
    margin: 0;
}

.search-page .sort_label span {
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    line-height: 18px;
    font-weight: 500;
    color: var(--sp-muted);
    transition: background-color .2s ease, color .2s ease;
}

.search-page .sort_label span:hover {
    color: var(--color-text);
    background-color: var(--sp-hover);
}

.search-page .sort_label input:checked ~ span {
    background-color: var(--sp-accent);
    color: #fff !important;
    box-shadow: 0 4px 12px -4px var(--sp-accent-ring);
}

/* ---------- Product grid ---------- */

.search-page .row-category .item {
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    padding: 8px 8px 14px;
    margin-bottom: 16px;
    transition: transform .3s var(--sp-ease), box-shadow .3s ease, border-color .3s ease;
}

@media screen and (min-width: 768px) {
    .search-page .row-category .item:hover {
        transform: translateY(-4px);
        border-color: var(--sp-accent-ring);
        box-shadow: var(--sp-shadow-lg);
    }
}

.search-page .row-category .item .img-pro {
    border-radius: var(--sp-radius-sm);
    background-color: #fff;
}

.search-page .row-category .item:hover .img-pro img {
    transform: scale(1.04);
}

.search-page .row-category .pro-name {
    min-height: 0;
    margin-top: 12px;
    padding: 0 6px;
}

.search-page .row-category .pro-name a {
    min-height: 44px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    line-height: 22px;
    color: var(--color-text);
    transition: color .2s ease;
}

.search-page .row-category .pro-name a:hover {
    color: var(--sp-accent);
}

.search-page .row-category .cost-col {
    margin-top: 4px !important;
}

/* Badges */
.search-page .lbl1,
.search-page .lbl2,
.search-page .lbl4 {
    left: 8px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, .25);
}

.search-page .lbl1,
.search-page .lbl2 {
    top: 8px;
}

.search-page .lbl4 {
    top: 34px;
}

/* Favourite / compare buttons */
.search-page .p-list {
    top: 8px;
    transition: left .3s var(--sp-ease);
}

.search-page .p-list li {
    width: 34px;
    height: 34px;
    margin-top: 6px;
    line-height: 32px;
    border-color: var(--sp-line);
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .25);
    transition: color .2s ease, background-color .2s ease;
}

.search-page .p-list li:hover {
    color: var(--sp-accent);
}

.search-page .row-category .item:hover .p-list {
    left: 8px;
}

/* Quick add button */
.search-page .add-to-cart-btn {
    top: 8px;
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 18px;
}

/* Discount + old price */
.search-page .row-category .offer {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 18px;
}

.search-page .row-category .old-cost {
    font-size: 13px;
    color: var(--sp-muted);
}

/* Price pill: colours keep their meaning (normal / special / unavailable). */
.search-page .row-category .red-btn,
.search-page .row-category .btn-not-exist span {
    min-width: 140px;
    padding: 8px 14px;
    border-radius: 999px;
    line-height: 1.2;
    box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .45);
    transition: transform .2s var(--sp-ease), filter .2s ease;
}

.search-page .row-category .red-btn:hover {
    transform: none;
    filter: brightness(1.05);
}

.search-page .row-category .btn-not-exist {
    padding: 0;
}

.search-page .row-category .cost-total {
    font-size: 15px;
    font-weight: 800;
}

.search-page .row-category .unit {
    font-size: 12px;
    font-weight: 500;
    opacity: .9;
}

/* Countdown */
.search-page .row-category .countdown {
    gap: 4px;
    padding: 6px;
    border-radius: var(--sp-radius-sm);
    background-color: var(--sp-accent-soft);
    box-shadow: none;
}

.search-page .row-category .count-box {
    min-width: 34px;
    padding: 4px 2px;
    border-radius: 8px;
    background: var(--sp-surface);
}

.search-page .row-category .count-separator {
    align-self: center;
    color: var(--sp-accent);
    font-weight: 700;
}

.search-page .row-category .count-label {
    margin-top: 3px;
    color: var(--sp-muted);
}

/* ---------- Pagination ---------- */

.search-page .posts-view-pagination {
    padding: 10px 14px;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow) !important;
}

.search-page .paginat {
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.search-page .paginat li {
    width: 38px;
    height: 38px;
}

.search-page .paginat li a,
.search-page .paginat li button,
.search-page .paginat li span {
    border-radius: 12px;
    border-color: var(--sp-line);
}

.search-page .paginat li:not(.active) button:hover {
    background-color: var(--sp-accent-soft);
    border-color: transparent;
}

.search-page .paginat li.active span {
    background: var(--sp-accent);
    color: #fff;
    box-shadow: 0 6px 14px -6px var(--sp-accent-ring);
}

.search-page .page-item span {
    font-size: 13px;
    color: var(--sp-muted);
}

/* ---------- Sidebar filters ---------- */

.search-page .filter_pannel > ul {
    margin: 0;
}

.search-page .filter_pannel li.block {
    margin-bottom: 12px;
    padding: 14px 16px;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    float: none;
}

/* Section titles */
.search-page li.block > label.filter-cation,
.search-page .cat-filter-name {
    font-size: 14px !important;
    font-weight: 700;
    color: var(--color-text);
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 0 !important;
    line-height: 22px;
}

.search-page .filter_pannel ul li input[type="checkbox"]:checked + i + label.filter-cation {
    padding-bottom: 12px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid var(--sp-line) !important;
}

.search-page .cat-filter-name {
    padding-bottom: 10px !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid var(--sp-line) !important;
}

/* Collapse chevron (replaces the sprite arrow) */
.search-page .filter_pannel ul li input[type="checkbox"] + i,
.search-page .filter_pannel ul li input[type="checkbox"]:checked + i {
    top: 17px;
    left: 18px;
    width: 8px;
    height: 8px;
    background: none !important;
    border-right: 2px solid var(--sp-muted);
    border-bottom: 2px solid var(--sp-muted);
    transition: transform .25s var(--sp-ease);
}

.search-page .filter_pannel ul li input[type="checkbox"] + i {
    transform: rotate(45deg);
}

.search-page .filter_pannel ul li input[type="checkbox"]:checked + i {
    top: 21px;
    transform: rotate(-135deg) !important;
}

/* Scrollable option lists */
.search-page .block.cat-filter .options {
    max-height: 300px;
    scrollbar-width: thin;
    scrollbar-color: var(--sp-line-strong) transparent;
}

.search-page .block.cat-filter .options::-webkit-scrollbar {
    width: 6px;
}

.search-page .block.cat-filter .options::-webkit-scrollbar-thumb {
    background: var(--sp-line-strong);
    border-radius: 6px;
}

.search-page .filter_pannel .li-item {
    margin: 0;
}

.search-page .filter_pannel .li-item > li {
    margin-bottom: 2px;
}

/* Option / attribute rows */
.search-page .li-item li label.checkbox-icon {
    display: block;
    margin: 0;
    padding: 8px 36px 8px 40px !important;
    border-radius: 10px;
    font-size: 13.5px;
    line-height: 20px;
    color: var(--color-text);
    transition: background-color .2s ease;
}

.search-page .li-item li label.checkbox-icon:hover {
    background-color: var(--sp-hover);
}

.search-page .li-item li label.checkbox-icon .checkmark {
    top: 50%;
    right: 8px;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    border-radius: 6px;
    background: var(--sp-surface);
    border: 1.5px solid var(--sp-line-strong);
    transition: border-color .2s ease, background-color .2s ease;
}

.search-page .li-item li label.checkbox-icon:hover .checkmark {
    border-color: var(--sp-accent);
}

.search-page .checkbox-icon.customradio .checkmark::after {
    border-radius: 5px;
    background: var(--sp-accent);
    font-size: 10px;
    line-height: 16px;
}

.search-page .li-item:not(.modern-grid) li label .facet-count {
    left: 8px;
}

/* Brand rows */
.search-page .modern-brand-filter {
    border-radius: var(--sp-radius);
}

.search-page .modern-checkbox {
    margin: 0;
    padding: 8px 10px !important;
    border: 0;
    border-radius: 10px;
    isolation: isolate;
}

.search-page .modern-checkbox::before {
    background: var(--sp-hover);
}

.search-page .modern-checkbox:hover::before {
    opacity: 1;
}

.search-page .modern-checkbox > div:first-child {
    align-items: center !important;
    gap: 8px;
}

.search-page .brand-logo img {
    width: 56px;
    height: 30px;
    padding: 3px;
    border-radius: 8px;
    background-color: #fff;
    border: 1px solid var(--sp-line);
}

.search-page .brand-name {
    margin-top: 0;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--color-text);
}

.search-page .checkmark-wrapper {
    margin-top: 0;
}

.search-page .modern-checkmark {
    top: 1px;
    left: 1px;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--sp-surface);
    border: 1.5px solid var(--sp-line-strong);
    transform: none;
}

.search-page .modern-checkbox:hover .modern-checkmark {
    border-color: var(--sp-accent);
}

.search-page .modern-checkbox input:checked + .modern-checkmark {
    background: var(--sp-accent);
    border-color: var(--sp-accent);
}

.search-page .modern-checkmark::after {
    font-size: 11px;
}

/* Facet counts */
.search-page .facet-count {
    display: inline-block;
    min-width: 22px;
    height: 20px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--sp-hover);
    box-shadow: inset 0 0 0 1px var(--sp-line);
    color: var(--sp-muted);
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
    text-align: center;
    vertical-align: middle;
    /* Keep the digits from being reordered by the surrounding RTL text. */
    direction: ltr;
    unicode-bidi: isolate;
    transition: background-color .2s ease, color .2s ease;
}

.search-page .brand-name .facet-count {
    margin-inline-start: 6px;
}

/* Option values: pin the count to the far (left, in RTL) edge. */
.search-page .li-item:not(.modern-grid) li label .facet-count {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* :has() because the count is not a following sibling of the input. */
.search-page .modern-checkbox:has(input:checked) .facet-count,
.search-page .li-item:not(.modern-grid) li label:has(input:checked) .facet-count {
    background: var(--sp-accent-soft);
    box-shadow: none;
    color: var(--sp-accent);
}

/* Nothing in the current result set matches this value. */
.search-page .facet-empty {
    opacity: .45;
}

.search-page .facet-empty .facet-count {
    background: transparent;
}

/* Category links */
.search-page .panel.panel-default.filter_pannel ol {
    margin: 0;
}

.search-page .filter_pannel .main-categori li {
    margin-bottom: 2px;
}

.search-page .filter_pannel .main-categori a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 8px;
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--color-text);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.search-page .filter_pannel .main-categori a:hover {
    background-color: var(--sp-hover);
    color: var(--sp-accent);
}

.search-page .filter_pannel .main-categori a i {
    font-size: 11px;
    color: var(--sp-muted);
}

.search-page .c-catalog__list--depth {
    margin: 0 8px 0 0;
    border-right: 2px solid var(--sp-line);
}

.search-page .c-catalog__list--depth .more {
    padding: 6px 8px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sp-accent);
    cursor: pointer;
}

/* Toggle switches */
.search-page li.block:has(> .c-ui-statusswitcher) {
    display: flex;
    align-items: center;
    min-height: 52px;
}

.search-page .c-ui-statusswitcher {
    top: 50%;
    right: 16px;
    margin: 0;
    transform: translateY(-50%);
    line-height: 0;
}

.search-page .c-ui-statusswitcher__slider {
    width: 40px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: var(--sp-line-strong);
    transition: background-color .25s ease;
}

.search-page .c-ui-statusswitcher__slider__toggle {
    top: 3px;
    right: 3px;
    width: 16px;
    height: 16px;
    border: 0;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: right .25s var(--sp-ease);
}

.search-page input[type="checkbox"]:checked + .c-ui-statusswitcher__slider {
    background-color: var(--sp-accent);
}

.search-page input[type="checkbox"]:checked + .c-ui-statusswitcher__slider span {
    right: 21px;
}

.search-page .filter_pannel .status {
    margin-right: 52px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--color-text);
}

/* Price range */
.search-page .noUi-horizontal {
    width: calc(100% - 40px);
    height: 6px;
    margin: 52px auto 10px;
}

.search-page .noUi-target {
    border: 0;
    border-radius: 999px;
    background: var(--sp-line-strong);
    box-shadow: none;
}

.search-page .noUi-connect {
    background: var(--sp-accent);
}

.search-page .noUi-horizontal .noUi-handle {
    top: -8px;
    right: -11px;
    width: 22px;
    height: 22px;
    border: 3px solid var(--sp-accent);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
    cursor: grab;
}

.search-page .noUi-handle::before,
.search-page .noUi-handle::after {
    display: none;
}

.search-page .noUi-tooltip {
    bottom: 150%;
    padding: 2px 8px;
    border: 0;
    border-radius: 8px;
    background: var(--color-text);
    color: var(--sp-surface);
    font-size: 11.5px;
    font-weight: 600;
}

.search-page .cost-rang {
    display: flex;
    gap: 10px;
    margin: 18px 0 14px !important;
    padding: 0;
    border: 0;
}

.search-page .cost-rang li {
    flex: 1;
    width: auto;
    margin: 0;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--sp-line) !important;
    border-radius: var(--sp-radius-sm);
    background-color: var(--sp-hover);
}

.search-page .cost-rang p {
    margin: 0;
    font-size: 11.5px;
    color: var(--sp-muted);
}

.search-page .cost-rang .lbl-prise {
    font-weight: 700;
    color: var(--color-text);
}

.search-page .cost-rang .price-value,
.search-page .cost-rang input {
    width: 100%;
    padding: 2px 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    outline: none;
    direction: ltr;
    unicode-bidi: isolate;
}

.search-page .filter_pannel .btn-action {
    margin: 0;
}

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

.search-page .btn-primary {
    height: auto;
    padding: 10px 18px;
    border: 0;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-accent);
    font-size: 13.5px;
    font-weight: 600;
    transition: background-color .2s ease, box-shadow .2s ease;
}

.search-page .btn-primary:hover,
.search-page .btn-primary:focus {
    transform: none;
    background: var(--sp-accent-hover);
    box-shadow: 0 8px 18px -8px var(--sp-accent-ring) !important;
}

.search-page .filter_pannel .btn-action .btn-primary {
    width: 100%;
}

/* ---------- Mobile toolbar ---------- */

@media screen and (max-width: 767.98px) {
    .search-page .btn.btn-primary.filter-mob,
    .search-page .btn.btn-sort {
        height: 46px;
        border-radius: 14px;
        font-size: 13px;
        font-weight: 600;
        transform: none;
    }

    .search-page .btn.btn-sort {
        color: var(--color-text);
        background-color: var(--sp-surface);
        border: 1px solid var(--sp-line-strong);
        box-shadow: var(--sp-shadow);
    }

    .search-page .btn.btn-sort i {
        color: var(--sp-accent);
    }

    .search-page .row-category .item {
        padding: 6px 6px 12px;
        margin-bottom: 10px;
        border-radius: 14px;
    }

    .search-page .row-category .pro-name a {
        min-height: 40px;
        font-size: 12.5px;
        line-height: 20px;
    }

    .search-page .row-category .red-btn,
    .search-page .row-category .btn-not-exist span {
        min-width: 0;
        width: 100%;
        padding: 7px 8px;
    }

    .search-page .row-category .btn-not-exist {
        width: 100%;
    }

    .search-page .row-category .cost-total {
        font-size: 13.5px;
    }

    .search-page .posts-view-pagination {
        padding: 12px 8px;
    }

    .search-page .paginat li {
        width: 34px;
        height: 34px;
    }

    .search-page .page-item {
        margin-top: 8px;
    }
}

/* Free delivery banner (mobile) */
.search-page .page-products .icon-col {
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--sp-surface), var(--sp-surface));
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
}

.search-page .product-icon-h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.search-page .product-icon-h5 {
    margin-top: 2px;
    color: var(--sp-muted);
}

/* ---------- Offcanvas & modals ---------- */

.search-page .offcanvas-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--sp-line);
}

.search-page #offcanvasRightLabel {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.search-page .offcanvas-body {
    padding: 14px;
}

.search-page .modal-content {
    border: 0;
    border-radius: 20px;
    background-color: var(--bg-header);
    color: var(--color-text);
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45);
    overflow: hidden;
}

.search-page .modal-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sp-line);
}

.search-page .modal-title {
    font-size: 16px;
    font-weight: 700;
}

[data-theme="dark"] .search-page .btn-close {
    filter: invert(1);
}

/*
 * The site header is fixed at z-index 10001, above Bootstrap's modal (1055) and
 * backdrop (1050), so a tall sort modal slid under the header banner on mobile.
 * Lift both above it. The backdrop lives on <body>, hence the :has() guard.
 */
.search-page #sortModal {
    z-index: 10060;
}

body:has(#sortModal.show) > .modal-backdrop {
    z-index: 10055;
}

/* Sort modal options */
.search-page #sortModal .modal-body {
    padding: 12px 16px 4px;
}

.search-page #sortModal .modal-body .modal-body {
    padding: 0;
}

.search-page #sortModal .radio.radio-primary {
    margin: 0 0 8px;
}

.search-page #sortModal .checkbox-icon.customradio {
    display: block;
    margin: 0;
    padding: 12px 44px 12px 14px !important;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius-sm);
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease;
}

.search-page #sortModal .checkbox-icon.customradio:has(input:checked) {
    border-color: var(--sp-accent);
    background-color: var(--sp-accent-soft);
}

.search-page #sortModal .radiotextsty {
    font-size: 14px !important;
    font-weight: 500;
    color: var(--color-text);
}

.search-page #sortModal .checkmark {
    top: 50%;
    right: 14px;
    width: 20px;
    height: 20px;
    margin-top: -10px;
    border-radius: 50%;
    background: var(--sp-surface);
    border: 1.5px solid var(--sp-line-strong);
}

.search-page #sortModal .checkbox-icon.customradio .checkmark::after {
    top: 4px;
    left: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    content: "";
}

.search-page #sortModal .checkbox-icon.customradio input:checked ~ .checkmark {
    border-color: var(--sp-accent);
}

.search-page #sortModal .modal-footer {
    padding: 8px 0 14px;
    border-top: 0;
}

.search-page #sortModal .btn-group,
.search-page #sortModal .btn-danger {
    width: 100%;
}

.search-page #sortModal .btn-danger {
    padding: 12px;
    border: 0;
    border-radius: var(--sp-radius-sm);
    background: var(--sp-accent);
    font-size: 14px;
    font-weight: 700;
    transform: none;
}

/* ---------- Category description & FAQ ---------- */

.search-page .product-top {
    padding: 24px;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow) !important;
}

.search-page .my-white-box p,
.search-page .my-white-box {
    font-size: 14.5px;
    line-height: 2.1;
    color: var(--color);
}

.search-page .my-white-box.my-text-style.my-trim-text h2,
.search-page .my-white-box.my-text-style.my-trim-text h3,
.search-page .my-white-box.my-text-style.my-trim-text h4 {
    font-weight: 800;
    color: var(--color-text);
    margin-top: 12px;
}

.search-page .c-desc-wrapper img {
    border: 0;
    border-radius: var(--sp-radius);
}

.search-page .more-view-info.shaodow::before {
    background: linear-gradient(180deg, transparent, var(--bg-card) 90%) !important;
}

.search-page .more-desc-info {
    padding: 8px 22px;
    border: 0;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 8px 18px -8px var(--sp-accent-ring);
}

.search-page .more-desc-info::after {
    margin-right: 6px;
}

.search-page .accordion-item {
    margin-bottom: 8px;
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius-sm) !important;
    background-color: transparent;
    overflow: hidden;
}

.search-page .accordion-button {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
    background-color: transparent;
    box-shadow: none;
}

.search-page .accordion-button:not(.collapsed) {
    color: var(--sp-accent);
    background-color: var(--sp-accent-soft);
}

.search-page .accordion-body {
    font-size: 14px;
    line-height: 2;
    color: var(--color);
}

/* ---------- Shop features ---------- */

.search-page .sale-section {
    margin-top: 24px;
    padding: 32px 0;
}

.search-page .sale-section .icon-col {
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius);
    box-shadow: var(--sp-shadow);
    transition: transform .25s var(--sp-ease), box-shadow .25s ease;
}

.search-page .sale-section .icon-col:hover {
    transform: translateY(-3px);
    box-shadow: var(--sp-shadow-lg);
}

.search-page .d-block.blocks-icon-image.text-center {
    border: 1px solid var(--sp-line);
    box-shadow: var(--sp-shadow);
}

.search-page .blocks-icon-h4 {
    font-weight: 700;
    margin-bottom: 4px;
}

.search-page .d-block.text-box {
    line-height: 1.8;
    color: var(--sp-muted);
}

@media (prefers-reduced-motion: reduce) {
    .search-page *,
    .search-page *::before,
    .search-page *::after {
        transition: none !important;
    }
}

/* ---------- Loaders ---------- */

/*
 * Shared ring: a conic-gradient arc masked down to a thin ring, so the tail
 * fades out behind the head while it spins.
 */
.search-page .sp-ring,
.search-page .ajax-modal .la-ball-spin-clockwise::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, rgba(212, 7, 46, 0) 0deg, rgba(212, 7, 46, .15) 60deg, var(--sp-accent) 320deg, var(--sp-accent) 360deg);
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
    mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4px));
    animation: sp-spin .75s linear infinite;
}

@keyframes sp-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes sp-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes sp-pop-in {
    from {
        opacity: 0;
        transform: translateY(6px) scale(.96);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes sp-pulse {
    0%, 100% {
        transform: scale(.7);
        opacity: .5;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Filter / sort / page change overlay (livewire.loader partial). */
.search-page .ajax-modal {
    flex-direction: column;
    gap: 14px;
    opacity: 1;
    background-color: rgba(242, 242, 242, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    /* A short delay keeps fast responses from flashing the overlay. */
    animation: sp-fade-in .2s ease .15s both;
}

[data-theme="dark"] .search-page .ajax-modal {
    background-color: rgba(20, 20, 22, .55);
}

.search-page .ajax-modal .la-ball-spin-clockwise {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 84px;
    height: 84px;
    border-radius: 24px;
    background-color: var(--sp-surface);
    border: 1px solid var(--sp-line);
    box-shadow: 0 20px 48px -16px rgba(15, 23, 42, .35);
    color: var(--sp-accent);
    animation: sp-pop-in .3s var(--sp-ease) .15s both;
}

.search-page .ajax-modal .la-ball-spin-clockwise > div {
    display: none;
}

/* Small centre dot so the card doesn't read as an empty ring. */
.search-page .ajax-modal .la-ball-spin-clockwise::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--sp-accent);
    animation: sp-pulse 1.1s ease-in-out infinite;
}

.search-page .ajax-modal::after {
    content: "در حال بارگذاری…";
    padding: 5px 14px;
    border-radius: 999px;
    background-color: var(--sp-surface);
    box-shadow: var(--sp-shadow);
    color: var(--color-text);
    font-size: 12.5px;
    font-weight: 600;
    animation: sp-pop-in .3s var(--sp-ease) .2s both;
}

/* Quick add modal, while the product loads. */
.search-page #modal-content:has(> .sp-modal-loading) {
    display: flex;
    flex: 1 1 auto;
}

.search-page .sp-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    gap: 16px;
    min-height: 260px;
    padding: 32px 16px;
    animation: sp-fade-in .25s ease both;
}

.search-page .sp-modal-loading .sp-ring {
    width: 52px;
    height: 52px;
}

.search-page .sp-modal-loading__title {
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--color-text);
}

.search-page .sp-modal-loading__hint {
    margin: -10px 0 0;
    font-size: 12px;
    color: var(--sp-muted);
}

@media (prefers-reduced-motion: reduce) {
    .search-page .sp-ring,
    .search-page .ajax-modal .la-ball-spin-clockwise::before {
        animation-duration: 1.6s;
    }

    .search-page .ajax-modal .la-ball-spin-clockwise::after {
        animation: none;
    }
}
