/* =========================================================
   Shop list / category page — synced with TH Kids theme
   Colors: --mainColor #c8103d | --subColor #ea6182 | --hover #f4b631
   ========================================================= */

/* ---------- Breadcrumb ---------- */
.shop-list-page .bread-crumb {
    background: #fdebf2;
    margin-bottom: 24px;
}

.shop-list-page .breadcrumb {
    margin: 0;
    padding: 12px 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 24px;
    background: transparent;
    border-radius: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.shop-list-page .breadcrumb > li + li:before {
    display: none;
}

.shop-list-page .breadcrumb li {
    display: inline;
}

.shop-list-page .breadcrumb li > a,
.shop-list-page .breadcrumb li > a > span,
.shop-list-page .breadcrumb li span,
.shop-list-page .breadcrumb li .mr_lr {
    color: #666;
}

.shop-list-page .breadcrumb li .mr_lr {
    padding: 0 4px;
}

.shop-list-page .breadcrumb li .mr_lr svg {
    width: 10px;
    height: 10px;
    margin-top: -2px;
}

.shop-list-page .breadcrumb li a:hover,
.shop-list-page .breadcrumb li a:hover span,
.shop-list-page .breadcrumb li strong,
.shop-list-page .breadcrumb li strong span {
    color: var(--mainColor);
    text-decoration: none;
    font-weight: 500;
}

/* ---------- Page title ---------- */
.shop-list-page .category-title {
    text-align: center;
    margin-bottom: 20px;
}

.shop-list-page .category-title .title-head {
    font-family: "Coiny", system-ui, sans-serif;
    font-size: 2.8rem;
    font-weight: 400;
    color: var(--mainColor);
    margin: 0;
    line-height: 1.25;
}

@media (max-width: 767px) {
    .shop-list-page .category-title .title-head {
        font-size: 2.2rem;
    }
}

/* ---------- Layout ---------- */
.shop-list-page .shop-list-section {
    padding-bottom: 40px;
}

.shop-list-page .shop-list-layout {
    align-items: flex-start;
}

.shop-list-page .shop-list-main {
    min-width: 0;
}

/* ---------- Sidebar ---------- */
.shop-list-page .shop-sidebar {
    background: #fff;
    border: 1px solid #ffe9fd;
    border-radius: 12px;
    padding: 4px 0;
    box-shadow: 0 1px 4px rgba(200, 16, 61, 0.06);
}

.shop-list-page .shop-sidebar-widget {
    padding: 16px 18px;
    border-bottom: 1px solid #f5e6ec;
}

.shop-list-page .shop-sidebar-widget:last-child {
    border-bottom: 0;
}

.shop-list-page .shop-sidebar-widget .widget-title {
    font-family: "Coiny", system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: var(--mainColor);
    margin: 0 0 14px;
    position: relative;
    padding-bottom: 8px;
}

.shop-list-page .shop-sidebar-widget .widget-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, var(--mainColor), var(--subColor));
    border-radius: 2px;
}

.shop-list-page .shop-cate-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-list-page .shop-cate-list li {
    margin: 0;
}

.shop-list-page .shop-cate-list li a {
    display: block;
    padding: 8px 10px;
    font-size: 1.4rem;
    color: #333;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s;
}

.shop-list-page .shop-cate-list li a:hover {
    color: var(--mainColor);
    background: #fdebf2;
    text-decoration: none;
}

.shop-list-page .shop-cate-list li.active a {
    color: #fff;
    background: var(--mainColor);
    font-weight: 600;
}

.shop-list-page .price-filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.shop-list-page .price-filter-row .form-control {
    height: 38px;
    border: 1px solid #f0c9d6;
    border-radius: 8px;
    font-size: 1.3rem;
    padding: 6px 10px;
    color: #333;
    background: #fff;
}

.shop-list-page .price-filter-row .form-control:focus {
    border-color: var(--subColor);
    box-shadow: 0 0 0 3px rgba(234, 97, 130, 0.15);
    outline: 0;
}

.shop-list-page .shop-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 38px;
    border: 0;
    border-radius: 8px;
    background: var(--mainColor);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.shop-list-page .shop-filter-btn:hover {
    background: var(--subColor);
}

.shop-list-page .dom-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 1.3rem;
    color: #555;
}

.shop-list-page .dom-filter-head b {
    color: var(--mainColor);
}

.shop-list-page .dom-filter-head a {
    color: var(--mainColor);
    font-weight: 600;
    white-space: nowrap;
}

.shop-list-page .dom-filter-head a:hover {
    color: var(--hover);
    text-decoration: underline;
}

.shop-list-page .tag-filter-group-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px;
    text-transform: capitalize;
}

.shop-list-page .tag-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px 2px 2px 0;
}

.shop-list-page .tag-filter-list::-webkit-scrollbar {
    width: 5px;
}

.shop-list-page .tag-filter-list::-webkit-scrollbar-thumb {
    background: var(--mainColor);
    border-radius: 5px;
}

.shop-list-page .tag-filter-item {
    margin: 0;
}

.shop-list-page .tag-filter-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    min-height: 34px;
    padding: 6px 14px;
    font-size: 1.35rem;
    font-weight: 500;
    line-height: 1.2;
    color: #444;
    cursor: pointer;
    user-select: none;
    background: #fff;
    border: 1px solid #f0c9d6;
    border-radius: 999px;
    box-shadow: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.shop-list-page .tag-filter-label:hover {
    border-color: var(--subColor);
    color: var(--mainColor);
    background: #fff7fa;
}

.shop-list-page .tag-filter-label input.js-tag-filter {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    pointer-events: none;
}

/* Ẩn ô check cũ bị chồng chữ */
.shop-list-page .tag-filter-check {
    display: none !important;
}

.shop-list-page .tag-filter-text {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.shop-list-page .tag-filter-text::before {
    content: none;
}

.shop-list-page .tag-filter-label.is-checked .tag-filter-text::before,
.shop-list-page .tag-filter-label:has(input:checked) .tag-filter-text::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 10px;
    flex-shrink: 0;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translateY(-1px);
}

.shop-list-page .tag-filter-label:has(input:checked),
.shop-list-page .tag-filter-label.is-checked {
    background: var(--mainColor);
    border-color: var(--mainColor);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(200, 16, 61, 0.2);
}

.shop-list-page .tag-filter-label:has(input:checked):hover,
.shop-list-page .tag-filter-label.is-checked:hover {
    background: var(--subColor);
    border-color: var(--subColor);
    color: #fff;
}

.shop-list-page .tag-filter-label:has(input:focus-visible) {
    outline: 2px solid var(--subColor);
    outline-offset: 2px;
}

.shop-list-page .shop-filter-empty {
    margin: 0;
    font-size: 1.3rem;
    color: #888;
}

.shop-list-page .shop-sidebar-close {
    display: none;
}

.shop-list-page .shop-sidebar-overlay {
    display: none;
}

/* ---------- Toolbar ---------- */
.shop-list-page .shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid #dee2e6;
}

.shop-list-page .shop-toolbar-count {
    margin: 0;
    font-size: 1.4rem;
    color: #444;
}

.shop-list-page .shop-toolbar-count b {
    color: var(--mainColor);
}

.shop-list-page .shop-toolbar-actions {
    display: flex;
    /* flex-wrap: wrap; */
    align-items: center;
    gap: 10px;
}

.shop-list-page .shop-filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: #fdebf2;
    color: #333f48;
    font-size: 1.35rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.shop-list-page .shop-filter-toggle:hover,
.shop-list-page .shop-filter-toggle[aria-expanded="true"] {
    background: var(--mainColor);
    color: #fff;
}

.shop-list-page .shop-sort-select {
    height: 36px;
    min-width: 160px;
    padding: 0 12px;
    border: 1px solid #f0c9d6;
    border-radius: 8px;
    background: #fff;
    font-size: 1.35rem;
    color: #333;
    cursor: pointer;
}

.shop-list-page .shop-sort-select:focus {
    border-color: var(--subColor);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(234, 97, 130, 0.15);
}

.shop-list-page .grid-view {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-list-page .grid-view li {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #f0c9d6;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.shop-list-page .grid-view li:hover {
    color: var(--mainColor);
    border-color: var(--mainColor);
}

.shop-list-page .grid-view li.active {
    color: #fff;
    background: var(--mainColor);
    border-color: var(--mainColor);
}

@media (max-width: 575px) {
    .shop-list-page .grid-view {
        display: none;
    }
}

/* ---------- Product grid & cards ---------- */
.shop-list-page .all-products {
    margin-bottom: 8px;
}

.shop-list-page .product-list-row {
    margin-left: -8px;
    margin-right: -8px;
}

.shop-list-page .product-list-col {
    padding-left: 8px;
    padding-right: 8px;
    margin-bottom: 16px;
}

.shop-list-page .item_product_main {
    display: block;
    height: 100%;
    position: relative;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 6px rgba(50, 50, 93, 0.12), 1px 1px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.25s ease;
}

.shop-list-page .item_product_main:hover {
    box-shadow: rgba(60, 64, 67, 0.1) 0 1px 2px 0,
        rgba(60, 64, 67, 0.15) 0 2px 6px 2px;
}

.shop-list-page .item_product_main .product-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #fafafa;
}

.shop-list-page .item_product_main .product-thumbnail .image_thumb {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}

.shop-list-page .item_product_main .product-thumbnail .image_thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    position: absolute;
    inset: 0;
    margin: auto;
    transition: transform 0.3s ease;
}

.shop-list-page .item_product_main:hover .product-thumbnail .image_thumb img {
    transform: scale(1.04);
}

.shop-list-page .item_product_main .smart {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    background: var(--mainColor);
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 6px;
    pointer-events: none;
}

.shop-list-page .item_product_main .smart span {
    display: block;
}

/* Action buttons overlay (form.product-action inside thumbnail) */
.shop-list-page .item_product_main .product-thumbnail > .product-action {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    margin: 0;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.92));
    transform: translateY(110%);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.28s ease;
    box-shadow: none;
    border-radius: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
}

.shop-list-page .item_product_main:hover .product-thumbnail > .product-action {
    transform: translateY(0);
    opacity: 1;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .btn-cart,
.shop-list-page .item_product_main .product-thumbnail > .product-action .btn-views {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    text-decoration: none;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .btn-cart {
    flex: 1;
    min-width: 0;
    padding: 0 12px;
    background: var(--mainColor);
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .btn-cart:hover {
    background: var(--subColor);
    color: #fff;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .quick-view {
    flex: 0 0 36px;
    width: 36px;
    padding: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 50%;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .quick-view img {
    width: 18px;
    height: 18px;
    display: block;
}

.shop-list-page .item_product_main .product-thumbnail > .product-action .quick-view:hover {
    background: var(--hover);
    border-color: var(--hover);
}

.shop-list-page .item_product_main .product-info {
    padding: 10px 12px 14px;
    background: #fff;
    position: relative;
    z-index: 1;
}

.shop-list-page .item_product_main .product-info .product-name {
    font-size: 1.45rem;
    font-weight: 600;
    min-height: 40px;
    margin: 0 0 6px;
    line-height: 1.35;
}

.shop-list-page .item_product_main .product-info .product-name a {
    color: #222;
    text-decoration: none;
}

.shop-list-page .item_product_main .product-info .product-name a:hover {
    color: var(--subColor);
}

.shop-list-page .item_product_main .product-info .price-box {
    color: var(--price, #d31100);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
}

.shop-list-page .item_product_main .product-info .price-box .compare-price {
    display: inline-block;
    margin-left: 6px;
    color: #9aa5b3;
    font-size: 1.3rem;
    font-weight: 400;
    text-decoration: line-through;
}

.shop-list-page .shop-empty-alert {
    padding: 28px 20px;
    text-align: center;
    background: #fdebf2;
    border-radius: 10px;
    color: #666;
    font-size: 1.5rem;
}

/* Always show actions on touch devices */
@media (hover: none), (max-width: 991px) {
    .shop-list-page .item_product_main .product-thumbnail > .product-action {
        transform: translateY(0);
        opacity: 1;
        background: rgba(255, 255, 255, 0.95);
    }
}

@media (max-width: 575px) {
    .shop-list-page .item_product_main .product-info .product-name {
        font-size: 1.3rem;
        min-height: 36px;
    }

    .shop-list-page .item_product_main .product-info .price-box {
        font-size: 1.35rem;
    }

    .shop-list-page .item_product_main .product-thumbnail > .product-action .btn-cart {
        font-size: 1.1rem;
        padding: 0 8px;
    }
}

/* ---------- Pagination ---------- */
.shop-list-page .shop-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}

.shop-list-page .shop-pagination nav,
.shop-list-page .shop-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-list-page .shop-pagination .page-item {
    list-style: none;
}

.shop-list-page .shop-pagination .page-link,
.shop-list-page .shop-pagination a,
.shop-list-page .shop-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    margin: 0 2px 4px;
    border: 1px solid var(--mainColor);
    border-radius: 6px;
    background: transparent;
    color: var(--mainColor);
    font-size: 1.35rem;
    font-weight: 500;
    text-decoration: none;
    line-height: 1;
    transition: background 0.2s, color 0.2s;
}

.shop-list-page .shop-pagination .page-item.active .page-link,
.shop-list-page .shop-pagination .active > span,
.shop-list-page .shop-pagination .active > a,
.shop-list-page .shop-pagination span[aria-current="page"] {
    background: var(--mainColor);
    color: #fff;
    border-color: var(--mainColor);
}

.shop-list-page .shop-pagination .page-link:hover,
.shop-list-page .shop-pagination a:hover {
    background: var(--mainColor);
    color: #fff;
    text-decoration: none;
}

.shop-list-page .shop-pagination .page-item.disabled .page-link,
.shop-list-page .shop-pagination .disabled > span,
.shop-list-page .shop-pagination .disabled > a {
    opacity: 0.4;
    pointer-events: none;
    border-color: #ccc;
    color: #999;
}

/* ---------- SEO content ---------- */
.shop-list-page .shop-list-seo {
    margin-top: 36px;
    padding: 20px;
    background: #fffafc;
    border: 1px solid #ffe9fd;
    border-radius: 12px;
    font-size: 1.45rem;
    line-height: 1.7;
    color: #444;
}

.shop-list-page .shop-list-seo h2,
.shop-list-page .shop-list-seo h3 {
    color: var(--mainColor);
    font-family: "Coiny", system-ui, sans-serif;
    font-weight: 400;
}

.shop-list-page .shop-list-seo a {
    color: var(--mainColor);
}

.shop-list-page .shop-list-seo a:hover {
    color: var(--hover);
}

/* ---------- Mobile filter drawer ---------- */
@media (max-width: 991px) {
    .shop-list-page .shop-filter-toggle {
        display: inline-flex;
    }

    .shop-list-page .shop-sidebar-col {
        position: fixed;
        top: 0;
        left: 0;
        width: 300px;
        max-width: 86vw;
        height: 100%;
        z-index: 10050;
        padding: 0 !important;
        transform: translateX(-105%);
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.645, 0.045, 0.355, 1),
            visibility 0.35s;
    }

    body.shop-filter-open .shop-list-page .shop-sidebar-col {
        transform: translateX(0);
        visibility: visible;
    }

    .shop-list-page .shop-sidebar {
        height: 100%;
        overflow-y: auto;
        border-radius: 0;
        border: 0;
        box-shadow: none;
        padding-bottom: 40px;
    }

    .shop-list-page .shop-sidebar-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 0;
        left: 100%;
        width: 36px;
        height: 36px;
        border: 0;
        background: var(--mainColor);
        color: #fff;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
        z-index: 2;
    }

    .shop-list-page .shop-sidebar-close:hover {
        background: var(--subColor);
    }

    .shop-list-page .shop-sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 10040;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
        pointer-events: none;
    }

    body.shop-filter-open .shop-list-page .shop-sidebar-overlay {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    body.shop-filter-open {
        overflow: hidden;
    }
}

@media (max-width: 767px) {
    .shop-list-page .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .shop-list-page .shop-toolbar-actions {
        justify-content: space-between;
    }

    .shop-list-page .shop-sort-select {
        flex: 1;
        min-width: 0;
    }
}
