/* /san-pham polish: list + detail */

.shop-shell[data-page="products-list"] {
    --shop-polish-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.shop-shell[data-page="products-list"] .shop-v5-hero {
    padding: 20px 0 12px;
}

.shop-shell[data-page="products-list"] .shop-v5-toolbar {
    position: static !important;
    top: auto;
    z-index: 36;
    border-radius: 18px;
    border-color: #d9e4f3;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    box-shadow: var(--shop-polish-shadow);
}

.shop-shell[data-page="products-list"] .shop-sticky {
    position: static;
    top: auto;
    align-self: flex-start;
}

.shop-shell[data-page="products-list"] .shop-v5-toolbar__sort {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.shop-shell[data-page="products-list"] .shop-v5-toolbar__sort::-webkit-scrollbar {
    display: none;
}

.shop-shell[data-page="products-list"] .shop-v5-sort-chip,
.shop-shell[data-page="products-list"] .shop-v5-mobile-btn,
.shop-shell[data-page="products-list"] .shop-v5-clear-btn,
.shop-shell[data-page="products-list"] .shop-v5-filter-chip {
    min-height: 36px;
}

.shop-shell[data-page="products-list"] .shop-v5-sort-chip,
.shop-shell[data-page="products-list"] .shop-v5-filter-chip {
    flex: 0 0 auto;
}

.shop-shell[data-page="products-list"] .shop-v5-filter-cluster {
    border-color: #d8e3f2;
    background: linear-gradient(180deg, #ffffff 0%, #f9fbff 100%);
}

.shop-shell[data-page="products-list"] .shop-v5-card {
    border-color: #dbe6f4;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.shop-shell[data-page="products-list"] .shop-v5-card:hover {
    transform: translateY(-3px);
    border-color: #b8cae4;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.14);
}

.shop-shell[data-page="products-list"] .shop-v5-card:focus,
.shop-shell[data-page="products-list"] .shop-v5-card:focus-visible,
.shop-shell[data-page="products-list"] .shop-v5-card:focus-within,
.shop-shell[data-page="products-list"] .shop-v5-media:focus,
.shop-shell[data-page="products-list"] .shop-v5-media:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: #dbe6f4;
}

.shop-shell[data-page="products-list"] .product-tile a:focus,
.shop-shell[data-page="products-list"] .product-tile a:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.shop-shell[data-page="products-list"] #product-grid:focus,
.shop-shell[data-page="products-list"] #product-grid:focus-visible,
.shop-shell[data-page="products-list"] #product-grid *:focus,
.shop-shell[data-page="products-list"] #product-grid *:focus-visible {
    outline: none !important;
}

.shop-shell[data-page="products-list"] .shop-v5-media {
    background: linear-gradient(180deg, #f8fbff 0%, #f2f7fe 100%);
}

.shop-shell[data-page="products-list"] .shop-v5-state {
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.2);
}

.shop-shell[data-page="products-list"] .shop-v5-variant-panel {
    border-color: #d7e3f2;
}

.shop-shell[data-page="products-list"] .is-focus-target {
    box-shadow: none !important;
    outline: none !important;
}

.shop-shell[data-page="products-list"] .pagination {
    gap: 6px;
}

.shop-shell[data-page="products-list"] .pagination .page-item .page-link {
    border-radius: 10px;
    border: 1px solid #d4dfef;
    color: #1e3a5f;
    background: #fff;
    min-width: 38px;
    text-align: center;
}

.shop-shell[data-page="products-list"] .pagination .page-item.active .page-link {
    border-color: #1d4ed8;
    background: #1d4ed8;
    color: #fff;
}

.shop-shell[data-page="products-list"] .pagination .page-item .page-link:focus {
    outline: none;
    box-shadow: none;
    border-color: #d4dfef;
}

.shop-shell[data-page="products-list"] .pagination .page-item .page-link:focus-visible {
    outline: 2px solid #1d4ed8;
    outline-offset: 1px;
}

.pd-shell[data-page="product-detail"] {
    --pd-polish-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
}

.pd-shell[data-page="product-detail"] .pd-v5-hero {
    margin-bottom: 14px;
}

.pd-shell[data-page="product-detail"] .pd-v5-title {
    max-width: 18ch;
    font-size: clamp(32px, 4.2vw, 48px);
    line-height: 1.08;
}

.pd-shell[data-page="product-detail"] .pd-v5-state {
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.16);
}

.pd-shell[data-page="product-detail"] .pd-v5-gallery-card,
.pd-shell[data-page="product-detail"] .pd-v5-content-card,
.pd-shell[data-page="product-detail"] .pd-v5-buybox,
.pd-shell[data-page="product-detail"] .pd-v5-related {
    border-color: #d9e4f3;
    box-shadow: var(--pd-polish-shadow);
}

.pd-shell[data-page="product-detail"] .pd-v5-buybox {
    top: 82px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.pd-shell[data-page="product-detail"] .pd-v5-price-block {
    margin: 8px 0 6px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #d6e1f0;
}

.pd-shell[data-page="product-detail"] .bundle-v6__variants {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #d6e1f0;
}

.pd-shell[data-page="product-detail"] .bundle-v6__variant-grid {
    max-height: 380px;
    overflow: auto;
    padding-right: 2px;
}

.pd-shell[data-page="product-detail"] .qty-stepper {
    border: 1px solid #d2deef;
    border-radius: 999px;
    background: #f8fbff;
}

.pd-shell[data-page="product-detail"] .qty-stepper .qty-minus,
.pd-shell[data-page="product-detail"] .qty-stepper .qty-plus {
    background: transparent;
}

.pd-shell[data-page="product-detail"] .pd-qty-total {
    font-size: 13px;
    font-weight: 700;
    color: #1e3a5f;
}

.pd-shell[data-page="product-detail"] .pd-cta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.pd-shell[data-page="product-detail"] .pd-cta .btn {
    min-height: 44px;
    font-weight: 700;
}

.pd-shell[data-page="product-detail"] .pd-v5-mobile-cta__summary {
    display: none;
}

@media (max-width: 991.98px) {
    .shop-shell[data-page="products-list"] .shop-sticky {
        position: static;
        top: auto;
    }
}

@media (max-width: 767.98px) {
    .shop-shell[data-page="products-list"] .container,
    .pd-shell[data-page="product-detail"] .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-hero {
        padding: 14px 0 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-hero__head {
        align-items: flex-start;
    }

    .shop-shell[data-page="products-list"] .shop-v5-title {
        font-size: clamp(24px, 8vw, 32px);
        line-height: 1.12;
    }

    .shop-shell[data-page="products-list"] .shop-v5-muted {
        font-size: 12px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-toolbar {
        top: auto;
        border-radius: 12px;
        padding: 8px;
        margin-bottom: 12px;
        gap: 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-toolbar__actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-mobile-btn {
        width: 100%;
        justify-content: center;
    }

    .shop-shell[data-page="products-list"] .shop-v5-sort-chip {
        min-height: 34px;
        padding: 0 10px;
        font-size: 11px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-filter-cluster {
        padding: 9px;
        border-radius: 12px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-filter-cluster__head {
        font-size: 10px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-filter-chip {
        min-height: 30px;
        font-size: 11px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-filter-control {
        min-height: 36px;
        font-size: 13px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-active {
        margin-bottom: 10px;
        border-radius: 12px;
        padding: 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-chip-link {
        font-size: 11px;
        padding: 4px 8px;
    }

    .shop-shell[data-page="products-list"] .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-card {
        border-radius: 14px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-media {
        aspect-ratio: 4 / 3;
    }

    .shop-shell[data-page="products-list"] .shop-v5-media img {
        object-fit: contain !important;
        object-position: center;
    }

    .shop-shell[data-page="products-list"] .shop-v5-state {
        left: 8px;
        top: 8px;
        font-size: 10px;
        padding: 3px 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-body {
        padding: 11px;
        gap: 6px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-product-title {
        min-height: 36px;
        font-size: 13px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-price-wrap .product-price {
        font-size: 18px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-meta-chip:nth-child(n + 3) {
        display: none;
    }

    .shop-shell[data-page="products-list"] .shop-v5-card-actions {
        gap: 6px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-btn--variant {
        min-height: 40px;
        padding: 7px 9px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-btn-variant__label {
        font-size: 12px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-btn-variant__meta {
        font-size: 10px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-card-actions .btn {
        min-height: 38px;
        font-size: 13px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-variant-toggle {
        min-height: 32px;
        font-size: 11px;
        padding: 5px 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-variant-panel {
        border-radius: 10px;
        padding: 8px;
        gap: 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-variant-chip {
        padding: 6px 8px;
    }

    .shop-shell[data-page="products-list"] .shop-v5-variant-chip__meta {
        gap: 8px;
        font-size: 10px;
    }

    .shop-shell[data-page="products-list"] .pagination {
        justify-content: center;
        margin-top: 2px;
    }

    .shop-shell[data-page="products-list"] .pagination .page-item .page-link {
        min-width: 40px;
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
    }

    #offcanvasCategory,
    #offcanvasFilter {
        --bs-offcanvas-width: min(92vw, 360px);
    }

    #offcanvasCategory .offcanvas-body,
    #offcanvasFilter .offcanvas-body {
        padding: 12px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-title {
        font-size: clamp(24px, 7.6vw, 34px);
        line-height: 1.12;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-gallery-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 6px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-gallery-tab {
        justify-content: center;
        min-height: 34px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-carousel .carousel-control-prev,
    .pd-shell[data-page="product-detail"] .pd-v5-carousel .carousel-control-next {
        width: 34px;
        height: 34px;
        top: calc(50% - 17px);
    }

    .pd-shell[data-page="product-detail"] .pd-v5-hero__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-info-row {
        gap: 6px;
        margin-bottom: 8px;
    }

    .pd-shell[data-page="product-detail"] .pd-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-price-value {
        font-size: clamp(30px, 9.2vw, 40px);
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-shell[data-page="product-detail"] .pd-v5-gallery-card,
    .pd-shell[data-page="product-detail"] .pd-v5-content-card,
    .pd-shell[data-page="product-detail"] .pd-v5-buybox,
    .pd-shell[data-page="product-detail"] .pd-v5-related {
        padding: 12px !important;
        border-radius: 14px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-gallery-thumb {
        flex: 0 0 60px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-pill {
        padding: 10px !important;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-name {
        font-size: 11px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variants-head {
        align-items: center;
        gap: 6px;
        margin-bottom: 6px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variants-title {
        font-size: 14px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__sort-btn {
        width: 28px;
        height: 28px;
        min-width: 28px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-search-wrap .form-control {
        min-height: 34px;
        font-size: 13px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-groups-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-groups-nav::-webkit-scrollbar {
        display: none;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-group-filter {
        font-size: 10px;
        padding: 5px 8px;
        white-space: nowrap;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-meta-chip strong {
        font-size: 10px;
    }

    .pd-shell[data-page="product-detail"] .qty-stepper {
        width: 100%;
        justify-content: space-between;
    }

    .pd-shell[data-page="product-detail"] .qty-stepper .qty-minus,
    .pd-shell[data-page="product-detail"] .qty-stepper .qty-plus {
        width: 40px;
        height: 40px;
    }

    .pd-shell[data-page="product-detail"] .qty-stepper .qty-input {
        flex: 1 1 auto;
        min-width: 72px;
        height: 40px;
        font-size: 15px;
    }

    .pd-shell[data-page="product-detail"] .pd-qty-total {
        margin-top: 6px !important;
        font-size: 12px;
        display: none;
    }

    .pd-shell[data-page="product-detail"] .pd-cta {
        display: none;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta {
        left: 8px;
        right: 8px;
        bottom: calc(8px + env(safe-area-inset-bottom, 0px));
        border-color: #cfdced;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(8px);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.2);
        padding: 8px;
        gap: 8px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta__summary {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        border: 1px solid #d8e4f3;
        border-radius: 10px;
        background: #f7fbff;
        padding: 6px 10px;
        font-size: 12px;
        color: #475569;
        line-height: 1.2;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta__summary strong {
        font-size: 13px;
        color: #0b63d4;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta .btn {
        min-height: 42px;
        border-radius: 10px;
        font-size: 14px;
    }

    .pd-shell[data-page="product-detail"].pd-v5 {
        padding-bottom: 136px;
    }
}

@media (max-width: 575.98px) {
    .pd-shell[data-page="product-detail"] .pd-v5-info-chip {
        font-size: 11px;
        padding: 4px 8px;
    }

    .pd-shell[data-page="product-detail"] .bundle-v6__variant-group-grid {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 420px) {
    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta {
        left: 6px;
        right: 6px;
    }

    .pd-shell[data-page="product-detail"] .pd-v5-mobile-cta__summary {
        padding: 6px 8px;
    }
}
