/* ==================== Product Card - Clean Layout ==================== */
.qh-product-card {
    background: var(--qh-card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.qh-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.qh-product-card:hover .qh-product-image img {
    transform: scale(1.08);
}

.qh-product-card .qh-product-image img {
    transition: transform 0.4s ease;
    transform: scale(1);
}

.qh-product-card.out-of-stock {
    opacity: 0.75;
}

/* Shared product grid for suggest, best-seller and featured sections */
.qh-product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.qh-suggest-section .qh-product-grid {
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .qh-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .qh-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .qh-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* ==================== Discount Ribbon ==================== */
.discount-badge {
    position: absolute;
    top: 0;
    left: 0;
    background: var(--qh-primary);
    color: white;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 700;
    z-index: 10;
    border-radius: 0 0 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    line-height: 1;
}

.discount-badge::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 0;
    height: 0;
    border-left: 10px solid var(--qh-primary);
    border-bottom: 6px solid transparent;
}

/* ==================== Wishlist Heart Button ==================== */
.wishlist-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 10;
    opacity: 0;
    transform: scale(0.8);
}

.qh-product-card:hover .wishlist-btn {
    opacity: 1;
    transform: scale(1);
}

.wishlist-btn svg {
    width: 20px;
    height: 20px;
    stroke: #6b7280;
    fill: none;
    transition: all 0.3s ease;
}

.wishlist-btn:hover svg {
    stroke: var(--qh-primary);
    transform: scale(1.1);
}

.wishlist-btn.liked svg {
    stroke: var(--qh-primary);
    fill: var(--qh-primary);
}

/* ==================== Out of Stock Overlay ==================== */
.out-of-stock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
}

.out-of-stock-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #6b7280;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 6;
}

/* ==================== Compare Button ==================== */
.qh-compare-btn {
    font-family: 'Signika', sans-serif;
}

.qh-compare-btn:hover {
    background: var(--qh-primary-light) !important;
    border-color: var(--qh-primary) !important;
    color: var(--qh-primary) !important;
}

.qh-compare-btn.active {
    background: var(--qh-primary-light) !important;
    border-color: var(--qh-primary) !important;
    color: var(--qh-primary) !important;
    font-weight: 600;
}

/* ==================== HERO VIDEO SLIDER ==================== */
.qh-hero-slider {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 12px;
    padding: 0;
}

.qh-hero-slider-wrap {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(0, 0, 0, 0.14);
}

.qh-hero-stage {
    position: relative;
    height: 55vh;
    min-height: 340px;
    max-height: 520px;
    background: #111827;
}

.qh-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

.qh-hero-slide.active {
    opacity: 1;
    z-index: 1;
}

.qh-hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 0.7s ease;
}

.qh-hero-slide.active .qh-hero-video {
    transform: scale(1);
}

.qh-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(72, 71, 71, 0.55), rgba(110, 110, 110, 0));
    display: flex;
    align-items: center;
}

.qh-hero-text {
    padding-left: 80px;
    max-width: 600px;
}

.qh-hero-text h2 {
    font-size: 48px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: #fff;
    margin: 0 0 12px;
}

.qh-hero-text p {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ─── Nút điều hướng slider dùng chung (hero / banner / hotsale) ─── */
.qh-slider-nav {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.13);
    background: #fff;
    color: #374151;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    transition: background 0.2s, box-shadow 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.qh-slider-nav:hover {
    background: #f9fafb;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.qh-slider-nav:disabled,
.qh-slider-nav[disabled] {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 768px) {
    .qh-slider-nav {
        width: 32px;
        height: 32px;
    }

    .qh-slider-nav svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* Hero: override vị trí tuyệt đối + màu nhạt trên nền video */
.qh-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.88);
    z-index: 2;
}

.qh-hero-nav:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.06);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
}

.qh-hero-nav.prev {
    left: 12px;
}

.qh-hero-nav.next {
    right: 12px;
}

.qh-hero-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.qh-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.qh-hero-dot:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: scale(1.08);
}

.qh-hero-dot.active {
    background: rgba(255, 255, 255, 0.95);
}

/* Fallback text when video fails */
.qh-hero-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    .qh-hero-slider {
        padding: 0;
    }

    .qh-hero-stage {
        height: 38vh;
    }

    .qh-hero-text {
        padding-left: 24px;
        padding-right: 24px;
    }

    .qh-hero-text h2 {
        font-size: 28px;
    }

    .qh-hero-text p {
        font-size: 15px;
    }
}

/* ==================== Featured Brands Row ==================== */
/* Infinite Carousel Container */
.qh-carousel-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 28px auto;
    overflow: hidden;
    border-radius: 12px;
    z-index: 1;
}

/* Fade overlay on left and right using pseudo-elements */
.qh-carousel-container::before,
.qh-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    width: 12%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.qh-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

.qh-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
}

/* Carousel Track - the animated scrolling container */
.qh-carousel-track {
    display: flex;
    gap: 18px;
    padding: 0 20px;
    animation: scrollToLeft 25s linear infinite;
    width: fit-content;
    pointer-events: auto;
}

/* Hover: vẫn chạy tiếp, không dừng */
.qh-carousel-track:hover {
    animation-play-state: running;
}

/* Animation: Smooth infinite scroll from right to left */
@keyframes scrollToLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.qh-featured-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 10px 24px;
    transition: box-shadow 0.25s, transform 0.22s;
    border: 1.5px solid #f3f4f6;
    min-width: 110px;
    min-height: 56px;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}

.qh-featured-brand:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.13);
    transform: scale(1.04);
    border-color: #e0e7ef;
}

.qh-featured-brand img {
    height: 32px;
    width: auto;
    object-fit: contain;
    transition: transform 0.22s;
}

.qh-featured-brand:hover img {
    transform: scale(1.08);
}

@media (max-width: 768px) {
    .qh-carousel-container {
        border-radius: 8px;
        margin-bottom: 10px;
    }

    .qh-carousel-track {
        gap: 10px;
        padding: 0 12px;
        animation-duration: 18s;
    }

    .qh-featured-brand {
        min-width: 76px;
        min-height: 42px;
        padding: 7px 14px;
        border-radius: 8px;
    }

    .qh-featured-brand img {
        height: 22px;
    }

    /* --- Spacing giữa các section trên mobile --- */
    .qh-featured-title-wrap {
        margin-top: 20px;
        margin-bottom: 10px;
    }

    .qh-hotsale-section {
        margin-top: 20px;
        margin-bottom: 20px;
    }

    .qh-filter-bar {
        margin-top: 8px;
        margin-bottom: 16px;
    }

    .qh-product-grid {
        margin-bottom: 16px;
    }

    /* --- Nút Thêm giỏ / So sánh trong product card mobile --- */
    .qh-product-card .qh-cart-quick-btn,
    .qh-product-card .qh-compare-btn {
        font-size: 11px !important;
        padding: 7px 2px !important;
        gap: 3px !important;
        white-space: nowrap !important;
        min-width: 0 !important;
    }

    .qh-product-card .qh-cart-quick-btn i,
    .qh-product-card .qh-compare-btn i {
        font-size: 13px;
        flex-shrink: 0;
    }

    /* Tên SP nhỏ hơn chút trên mobile */
    .qh-product-name {
        font-size: 14px !important;
        min-height: 38px !important;
    }
}

.qh-featured-title-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 12px;
}

.qh-featured-title {
    font-size: clamp(13px, 3.5vw, 22px);
    font-weight: 800;
    color: #222;
    letter-spacing: clamp(0.4px, 0.2vw, 1.2px);
    font-family: 'Signika', sans-serif;
    background: linear-gradient(90deg, #565555 0%, #626161 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    padding: 0 clamp(4px, 1.5vw, 18px);
    text-align: center;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
}

.qh-featured-title::before,
.qh-featured-title::after {
    content: '';
    display: inline-block;
    width: min(44px, 6vw);
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, #626161 0%, #626161 100%);
    vertical-align: middle;
    margin: 0 clamp(4px, 1vw, 10px);
    animation: qh-title-bar-move 2.2s infinite alternate;
}

.qh-featured-title::after {
    animation-delay: 1.1s;
}

@keyframes qh-title-bar-move {
    0% {
        width: min(44px, 6vw);
        opacity: 1;
    }

    100% {
        width: min(80px, 11vw);
        opacity: 0.5;
    }
}

/* ==================== REVIEW SẢN PHẨM (style giống Sản Phẩm Bán Chạy, video Shorts 9:16) ==================== */
.qh-review-section {
    margin: 32px 0;
    background: #fff;
    border: 1px solid #ffdddd;
    border-radius: 16px;
    overflow: hidden;
}

.qh-review-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 1px solid #ffdddd;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
}

.qh-review-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qh-review-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--qh-price) 0%, var(--qh-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
}

.qh-review-section .qh-review-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--qh-price);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Signika', sans-serif;
    background: none;
    -webkit-text-fill-color: var(--qh-price);
}

.qh-review-section .qh-review-title::before,
.qh-review-section .qh-review-title::after {
    display: none;
}

.qh-review-inner {
    background: #fff;
    padding: 20px;
}

/* Slider wrapper: nav buttons absolutely positioned over the overflow */
.qh-review-slider-wrap {
    position: relative;
}

.qh-review-overflow {
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
}

/* Nav buttons float over the overflow, giống hero/banner slider */
.qh-review-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

.qh-review-nav.prev { left: -14px; }
.qh-review-nav.next { right: -14px; }

.qh-review-track {
    display: flex;
    gap: 16px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.qh-review-card {
    flex-shrink: 0;
    /* width set by JS */
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.qh-review-card:hover {
    border-color: var(--qh-price);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Shorts tỉ lệ 9:16 */
.qh-review-video {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%;
    background: #000;
    overflow: hidden;
}

.qh-review-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.qh-review-info {
    padding: 12px 14px;
}

.qh-review-product-name {
    font-size: 13px;
    font-weight: 700;
    color: #222;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .qh-review-header {
        padding: 12px 16px;
    }

    .qh-review-inner {
        padding: 14px 20px;
    }

    .qh-review-track {
        gap: 10px;
    }

    .qh-review-nav.prev { left: -10px; }
    .qh-review-nav.next { right: -10px; }

    .qh-review-section .qh-review-title {
        font-size: 1.05rem;
    }
}

/* ==================== 2 BOX NGANG: ƯU ĐÃI ĐA NỀN TẢNG + Blog (mỗi box style giống Review Sản Phẩm) ==================== */
.qh-two-boxes-wrap {
    display: flex;
    gap: 14px;
    align-items: stretch;
    margin: 8px 0 20px;
}

.qh-two-boxes-wrap .qh-review-section {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin: 0;
}

.qh-two-boxes-wrap .qh-box-offer {
    flex: 7 1 0;
}

.qh-two-boxes-wrap .qh-box-blog {
    flex: 3 1 0;
}

.qh-two-boxes-wrap .qh-review-inner {
    padding: 10px;
    flex: 1;
    min-height: 0;
}

.qh-two-boxes-wrap .qh-review-header {
    padding: 10px 14px;
}

.qh-two-boxes-wrap .qh-review-icon {
    width: 34px;
    height: 34px;
    font-size: 18px;
}

.qh-two-boxes-wrap .qh-review-title {
    font-size: 1.25rem;
}

/* Grid 4 ảnh trong box ƯU ĐÃI (2x2) */
.qh-offer-blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.qh-offer-blog-card {
    display: block;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 2.6 / 1;
}

.qh-offer-blog-card:hover {
    border-color: var(--qh-price);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.qh-offer-blog-card-img-wrap {
    position: absolute;
    inset: 0;
    background: #eeeeee;
}

.qh-offer-blog-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.qh-offer-blog-card img[data-banner-slot] {
    opacity: 0;
}

/* Blog list trong box 2 */
.qh-offer-blog-list {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    gap: 8px;
    height: 100%;
    width: 100%;
}

.qh-offer-blog-item {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid #eeeeee;
    min-height: 0;
    height: 100%;
}

.qh-offer-blog-item:last-child {
    border-bottom: none;
}

.qh-offer-blog-item-thumb {
    width: 64px;
    height: 44px;
    flex-shrink: 0;
    background: #e2e8f0;
    border-radius: 8px;
}

.qh-offer-blog-item-body {
    flex: 1;
    min-width: 0;
}

.qh-offer-blog-item-title {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    font-family: 'Signika', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qh-offer-blog-item-desc {
    margin: 0;
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.qh-offer-blog-item-placeholder .qh-offer-blog-item-title,
.qh-offer-blog-item-placeholder .qh-offer-blog-item-desc {
    color: #cbd5e1;
}

@media (max-width: 992px) {
    /* Review section cùng breakpoint với two-boxes để gap đồng nhất */
    .qh-review-section {
        margin: 20px 0;
    }

    .qh-two-boxes-wrap {
        flex-direction: column;
        gap: 20px;
        margin-top: 0;
        margin-bottom: 20px;
    }

    .qh-two-boxes-wrap .qh-box-offer,
    .qh-two-boxes-wrap .qh-box-blog {
        flex: 1 1 auto;
    }
}

@media (max-width: 576px) {
    .qh-two-boxes-wrap .qh-review-inner {
        padding: 10px;
    }

    .qh-offer-blog-grid {
        gap: 6px;
    }

    .qh-offer-blog-card {
        border-radius: 8px;
        aspect-ratio: 2.2 / 1;
    }

    .qh-offer-blog-item-thumb {
        width: 64px;
        height: 48px;
    }
}

/* ==================== SẢN PHẨM BÁN CHẠY (banner ảnh + box đỏ liền mạch) ==================== */
.qh-bestseller-section {
    margin: 32px 0;
}

.qh-bestseller-shell {
    max-width: 100%;
}

.qh-bestseller-banner-wrap {
    background: transparent;
    line-height: 0;
}

.qh-bestseller-banner-img {
    width: 100%;
    height: auto;
    display: block;
}

.qh-bestseller-box {
    background: #B61B17;
    border-radius: 0 0 14px 14px;
    padding: 18px 16px 20px;
}

.qh-bestseller-title {
    margin: 0 0 14px;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-family: 'Signika', sans-serif;
}

.qh-bestseller-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.qh-bestseller-section .qh-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.qh-bestseller-section .qh-product-card:hover {
    border-color: var(--qh-price);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

@media (max-width: 1200px) {
    .qh-bestseller-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .qh-bestseller-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .qh-bestseller-box {
        padding: 16px 12px 18px;
    }

    .qh-bestseller-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .qh-bestseller-title {
        font-size: 1.05rem;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .qh-bestseller-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== Flash Sale / Suggest Products ==================== */
.flash-sale-section {
    background: #01A400;
    border-radius: 20px;
    overflow: hidden;
    margin: 36px 0 32px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 0;
}

.flash-banner {
    width: 100%;
    background: #01A400;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.flash-banner img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    display: block;
    border-radius: 0;
    margin-bottom: 0;
}

.product-box {
    background: #fff;
    width: 100%;
    padding: 18px 8px 18px 8px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 0;
    box-shadow: none;
}

/* ==================== HOT SALE HÀNG NGÀY ==================== */
.qh-hotsale-section {
    max-width: 1400px;
    margin: 32px auto 0;
    padding: 0;
    position: relative;
}

/* --- Header: dùng ảnh 2026_header_bg.png làm nền --- */
.qh-hotsale-header {
    position: relative;
    z-index: 1;
    width: calc(100% - 68px);
    height: 54px;
    margin: 0 auto -8px;
    border-radius: 12px 12px 0 0;
}

.qh-hotsale-header-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding: 0 28px;
}

/* Tabs (trái) */
.qh-hotsale-tabs {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

/* ── Dịch cả tab (ảnh + radius): thay đổi --hs-tab-x / --hs-tab-y ── */
.qh-hotsale-tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 130px;
    height: 50px;
    --hs-tab-x: 40px;
    /* dịch cả tab: âm = trái, dương = phải */
    --hs-tab-y: -20px;
    /* dịch cả tab: âm = lên,  dương = xuống */
    transform: translate(var(--hs-tab-x), var(--hs-tab-y));
    background-image: url('/media/hotsale/hs-tab-title-20-10.webp');
    background-position: center center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.2s ease, transform 0.2s ease;
}

/* ── Điều chỉnh vị trí chữ: thay đổi --hs-tab-txt-x / --hs-tab-txt-y ── */
.qh-hotsale-tab span {
    position: relative;
    z-index: 1;
    --hs-tab-txt-x: 0px;
    /* dịch chữ: âm = trái, dương = phải */
    --hs-tab-txt-y: 0px;
    /* dịch chữ: âm = lên, dương = xuống — dịch xuống để vào dải banner ảnh */
    transform: translate(var(--hs-tab-txt-x), var(--hs-tab-txt-y));
    font-size: 0.9rem;
    font-weight: 800;
    font-style: italic;
    letter-spacing: 1px;
    line-height: 1;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

/* Tab không active – tối nhẹ, không mờ như disabled */
.qh-hotsale-tab:not(.active) {
    filter: brightness(0.72) saturate(0.6);
    --hs-tab-y: -12px;
}

.qh-hotsale-tab:not(.active):hover {
    filter: brightness(0.9) saturate(0.85);
    --hs-tab-y: -16px;
}

/* Countdown (phải, trong header) */
.qh-hotsale-countdown-row {
    display: flex;
    align-items: center;
    align-self: center;
    gap: 10px;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.qh-hotsale-countdown-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.qh-hotsale-countdown {
    display: flex;
    align-items: center;
    gap: 4px;
    font-variant-numeric: tabular-nums;
}

.qh-hotsale-time-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    background: #7f1d1d;
    border-radius: 5px;
    padding: 0 4px;
}

.qh-hotsale-time {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

.qh-hotsale-sep {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
}

/* --- Body chính: KHÔNG bo góc trên, liền mạch với header --- */
.qh-hotsale-body {
    position: relative;
    min-height: 400px;
    margin-top: 0;
    padding: 20px 8px 16px;
    overflow: visible;
    z-index: 3;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Ảnh góc trang trí — cần z-index > nav(5) để nằm trên cùng */
.qh-hotsale-corner {
    position: absolute;
    z-index: 7;
    pointer-events: none;
    width: 56px;
    height: auto;
}

.qh-hotsale-corner--tl {
    top: 16px;
    left: 20px;
}

.qh-hotsale-corner--bl {
    bottom: 16px;
    left: 20px;
}

.qh-hotsale-corner--tr {
    top: 16px;
    right: 20px;
}

.qh-hotsale-corner--br {
    bottom: 16px;
    right: 20px;
}

/* --- Slider wrap --- */
.qh-hotsale-slider-wrap {
    position: relative;
    z-index: 2;
    padding: 0 44px;
}

.qh-hotsale-overflow {
    width: 100%;
    overflow: hidden;
}

.qh-hotsale-track {
    display: flex;
    gap: 12px;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Nav buttons */
.qh-hotsale-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
}

.qh-hotsale-nav.prev {
    left: -4px;
}

.qh-hotsale-nav.next {
    right: -4px;
}

.qh-hotsale-nav:hover {
    transform: translateY(-50%) scale(1.08);
}

/* --- Product card --- */
.qh-hotsale-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s, box-shadow 0.25s;
}

.qh-hotsale-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}

.qh-hotsale-card-img {
    aspect-ratio: 1;
    background: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qh-hotsale-card-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qh-hotsale-card-info {
    padding: 10px 12px 12px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.qh-hotsale-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 6px;
    line-height: 1.35;
    min-height: 38px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qh-hotsale-card-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
}

.qh-hotsale-price-now {
    font-size: 16px;
    font-weight: 700;
    color: #dc2626;
}

.qh-hotsale-price-old {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Thanh "Đã bán x/y suất" */
.qh-hotsale-card-sold {
    margin-top: auto;
}

.qh-hotsale-sold-bar {
    width: 100%;
    height: 16px;
    background: #fee2e2;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.qh-hotsale-sold-fill {
    height: 100%;
    background: linear-gradient(90deg, #f87171, #dc2626);
    border-radius: 999px;
    min-width: 8px;
    transition: width 0.5s;
}

.qh-hotsale-sold-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #dc2626;
    margin-top: 4px;
}

.qh-hotsale-sold-text i {
    font-size: 12px;
}

.qh-hotsale-empty {
    padding: 40px 0;
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    font-weight: 500;
    white-space: nowrap;
    width: 100%;
}

.qh-hotsale-note {
    position: relative;
    z-index: 2;
    margin: 14px 0 0;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.3px;
}

/* --- Responsive --- */
@media (max-width: 1300px) {

    /* Khi body hẹp hơn ~1300px, 2 bên không còn chỗ cho icon trang trí */
    .qh-hotsale-corner--tl,
    .qh-hotsale-corner--bl,
    .qh-hotsale-corner--tr,
    .qh-hotsale-corner--br {
        display: none;
    }
}

@media (max-width: 768px) {
    .qh-hotsale-header {
        width: calc(100% - 24px);
        height: 36px;
    }

    .qh-hotsale-header-inner {
        padding: 0 10px;
    }

    .qh-hotsale-body {
        min-height: auto;
        padding: 12px 4px 10px;
    }

    .qh-hotsale-slider-wrap {
        padding: 0 28px;
    }

    .qh-hotsale-track {
        gap: 8px;
    }

    .qh-hotsale-nav.prev {
        left: -2px;
    }

    .qh-hotsale-nav.next {
        right: -2px;
    }

    .qh-hotsale-card {
        border-radius: 8px;
    }

    .qh-hotsale-card-info {
        padding: 6px 8px 8px;
    }

    .qh-hotsale-card-name {
        font-size: 12px;
        min-height: 32px;
        margin-bottom: 4px;
    }

    .qh-hotsale-price-now {
        font-size: 13px;
        order: -1;
    }

    .qh-hotsale-price-old {
        font-size: 10px;
        order: 0;
    }

    .qh-hotsale-card-price {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 2px;
    }

    .qh-hotsale-countdown-row {
        display: none !important;
    }

    .qh-hotsale-time-box {
        min-width: 26px;
        height: 26px;
    }

    .qh-hotsale-time,
    .qh-hotsale-sep {
        font-size: 0.8rem;
    }

    .qh-hotsale-countdown-label {
        font-size: 0.75rem;
    }

    .qh-hotsale-tab {
        width: 90px;
        height: 36px;
        --hs-tab-x: 20px;
        --hs-tab-y: -14px;
    }

    .qh-hotsale-tab span {
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .qh-hotsale-tab:not(.active) {
        --hs-tab-y: -8px;
    }

    .qh-hotsale-tab:not(.active):hover {
        --hs-tab-y: -10px;
    }

    .qh-hotsale-note {
        margin-top: 8px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .qh-hotsale-countdown-label {
        display: none;
    }

    .qh-hotsale-tab {
        padding: 4px 12px;
        font-size: 0.75rem;
    }
}

.qh-suggest-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: 1.5px;
    text-shadow: 2px 4px 0 #0b5c1a;
    color: #01A400;
}

.qh-suggest-sub {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 18px;
    font-weight: 500;
    letter-spacing: 1px;
    color: #222;
}

.qh-suggest-products {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    justify-content: center;
}

.product-card {
    background: #fff;
    color: #222;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.10);
    width: 210px;
    padding: 16px 14px 18px 14px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    transition: transform 0.18s, box-shadow 0.18s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    background: #f6f6f6;
}

.badge-stock {
    display: inline-block;
    background: linear-gradient(90deg, #ff5722 60%, #ff9800 100%);
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    border-radius: 8px;
    padding: 3px 12px;
    margin: 0 auto 10px auto;
    text-align: center;
    min-width: 80px;
    box-shadow: 0 1px 4px rgba(255, 87, 34, 0.10);
}

.price-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 4px;
}

.price-new {
    color: #e53935;
    font-size: 1.25rem;
    font-weight: 800;
}

.price-old {
    color: #888;
    font-size: 1.05rem;
    text-decoration: line-through;
}

.discount {
    background: #ffe082;
    color: #d32f2f;
    font-size: 0.98rem;
    font-weight: 700;
    border-radius: 7px;
    padding: 2px 8px;
    margin-left: 2px;
}

.product-name {
    font-size: 1.08rem;
    font-weight: 700;
    text-align: center;
    margin: 8px 0 14px 0;
    min-height: 40px;
}

.cta-btn {
    display: block;
    width: 100%;
    background: linear-gradient(90deg, #01A400 60%, #0b5c1a 100%);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 10px 0;
    margin-top: auto;
    cursor: pointer;
    transition: background 0.18s;
}

.cta-btn:hover {
    background: linear-gradient(90deg, #0b5c1a 60%, #01A400 100%);
}

@media (max-width: 1200px) {
    .qh-suggest-products {
        gap: 12px;
    }

    .product-card {
        width: 19vw;
        min-width: 170px;
        max-width: 220px;
    }
}

@media (max-width: 900px) {
    .product-card {
        width: 28vw;
        min-width: 150px;
    }
}

@media (max-width: 600px) {
    .qh-suggest-products {
        gap: 8px;
    }

    .product-card {
        width: 90vw;
        min-width: 0;
        max-width: 100vw;
    }
}

/* ==================== Product Filter Bar ==================== */
.qh-filter-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    max-width: 1400px;
    margin: 0 auto 24px auto;
    padding: 18px 24px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    border: 1.5px solid #f0f0f0;
    flex-wrap: wrap;
}

.qh-filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 160px;
}

.qh-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-family: 'Signika', sans-serif;
}

.qh-filter-select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    font-family: 'Signika', sans-serif;
}

.qh-filter-select:focus {
    outline: none;
    border-color: var(--qh-primary);
    box-shadow: 0 0 0 3px rgba(106, 125, 146, 0.1);
}

.qh-filter-select:hover {
    border-color: #ccc;
}

.qh-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}

.qh-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Signika', sans-serif;
    line-height: 1.4;
}

.qh-filter-btn-search {
    background: #8bb8e0;
    color: #fff;
}

.qh-filter-btn-search:hover {
    background: var(--qh-primary-dark);
    transform: translateY(-1px);
}

/* Nút "Lọc nhiều hơn" dùng màu chủ đạo đỏ */
#qhFilterSubmit {
    background: var(--qh-primary);
    color: #ffffff;
    border: 1.5px solid var(--qh-primary);
}

#qhFilterSubmit:hover {
    background: var(--qh-primary-hover);
    color: #ffffff;
    border-color: var(--qh-primary-hover);
}

#qhAdvancedFilterApply {
    background: var(--qh-primary);
    color: #ffffff;
    border: 1.5px solid var(--qh-primary);
}

#qhAdvancedFilterApply:hover {
    background: var(--qh-primary-hover);
    color: #ffffff;
    border-color: var(--qh-primary-hover);
}

.qh-filter-btn-reset {
    background: #f3f4f6;
    color: #555;
    border: 1.5px solid #e0e0e0;
}

.qh-filter-btn-reset:hover {
    background: #e5e7eb;
    color: #333;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.qh-lock-scroll {
    overflow: hidden;
}

.qh-advanced-filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease;
    z-index: 12000;
}

.qh-advanced-filter-overlay.open {
    opacity: 1;
    visibility: visible;
}

.qh-advanced-filter-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: min(440px, 92vw);
    height: 100dvh;
    background: #fff;
    box-shadow: -12px 0 28px rgba(15, 23, 42, 0.16);
    transform: translateX(100%);
    transition: transform 0.24s ease;
    z-index: 12001;
    display: flex;
    flex-direction: column;
}

.qh-advanced-filter-drawer.open {
    transform: translateX(0);
}

.qh-advanced-filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #eef2f7;
}

.qh-advanced-filter-head h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qh-advanced-filter-head h3 i {
    font-size: 22px;
    color: #1f2937;
    flex-shrink: 0;
    line-height: 1;
}

.qh-advanced-filter-close {
    width: 34px;
    height: 34px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #f9fafb;
    color: #334155;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.qh-advanced-filter-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 18px 8px;
}

.qh-af-group {
    margin-bottom: 16px;
    border: 1px solid #e7edf5;
    border-radius: 12px;
    padding: 12px;
    background: #fbfdff;
}

.qh-af-group h4 {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
}

.qh-af-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 1.35;
    color: #374151;
    margin-bottom: 8px;
    cursor: pointer;
}

.qh-af-group label:last-child {
    margin-bottom: 0;
}

.qh-af-group input[type="checkbox"],
.qh-af-group input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 2px solid #94a3b8;
    background: #fff;
    display: inline-grid;
    place-content: center;
    flex-shrink: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.qh-af-group input[type="checkbox"] {
    border-radius: 4px;
}

.qh-af-group input[type="radio"] {
    border-radius: 50%;
}

.qh-af-group input[type="checkbox"]::before,
.qh-af-group input[type="radio"]::before {
    content: '';
    transform: scale(0);
    transition: transform 0.14s ease;
}

.qh-af-group input[type="checkbox"]::before {
    width: 8px;
    height: 5px;
    border: 2px solid #fff;
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) scale(0);
}

.qh-af-group input[type="radio"]::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.qh-af-group input[type="checkbox"]:checked,
.qh-af-group input[type="radio"]:checked {
    border-color: #b91c1c;
    background: #b91c1c;
}

.qh-af-group input[type="checkbox"]:checked::before {
    transform: rotate(-45deg) scale(1);
}

.qh-af-group input[type="radio"]:checked::before {
    transform: scale(1);
}

.qh-af-group input[type="checkbox"]:focus-visible,
.qh-af-group input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 184, 224, 0.25);
}

.qh-advanced-filter-foot {
    display: flex;
    gap: 10px;
    padding: 14px 18px 18px;
    border-top: 1px solid #eef2f7;
    background: #fff;
}

.qh-advanced-filter-foot .qh-filter-btn {
    flex: 1;
    justify-content: center;
}

/* Responsive filter bar */
@media (max-width: 1024px) {
    .qh-filter-bar {
        gap: 12px;
        padding: 16px 18px;
    }

    .qh-filter-group {
        min-width: 140px;
    }
}

@media (max-width: 768px) {
    .qh-filter-bar {
        flex-direction: column;
        gap: 8px;
        padding: 12px 10px;
        border-radius: 10px;
    }

    .qh-filter-group {
        min-width: 100%;
    }

    .qh-filter-select {
        height: 42px;
        padding: 0 36px 0 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .qh-filter-actions {
        width: 100%;
        display: flex;
        gap: 8px;
        margin-top: 2px;
    }

    .qh-filter-btn {
        flex: 1;
        height: 42px;
        padding: 0 12px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* Drawer full screen + safe area for notch */
    .qh-advanced-filter-drawer {
        width: 100vw;
        height: 100dvh;
    }

    .qh-advanced-filter-head {
        padding: 14px 14px;
        padding-top: max(14px, env(safe-area-inset-top));
    }

    .qh-advanced-filter-head h3 {
        font-size: 16px;
    }

    .qh-advanced-filter-body {
        padding: 12px 12px 6px;
    }

    .qh-af-group {
        padding: 10px;
        margin-bottom: 10px;
    }

    .qh-af-group h4 {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .qh-af-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .qh-advanced-filter-foot {
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }

    .qh-advanced-filter-foot .qh-filter-btn {
        height: 44px;
        font-size: 13px;
    }
}

/* ==================== Loading Spinner Overlay ==================== */
.qh-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.qh-loading-spinner {
    width: 60px;
    height: 60px;
    position: relative;
}

.qh-loading-spinner svg {
    width: 100%;
    height: 100%;
    animation: rotate 1.5s linear infinite;
}

.qh-loading-spinner circle {
    stroke: var(--qh-primary, #4a90d9);
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dasharray: 1, 150;
        stroke-dashoffset: 0;
    }

    50% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -35;
    }

    100% {
        stroke-dasharray: 90, 150;
        stroke-dashoffset: -124;
    }
}

/* ==================== Newsletter Section ==================== */
/* Đồng bộ khung nội dung với USP / product: max-width 1400px, padding 0 24px */
.qh-newsletter-section {
    margin-top: 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px;
    position: relative;
    background: #ffffff;
    border-radius: var(--qh-radius-lg);
    box-shadow: 0 4px 16px var(--qh-shadow);
}

.qh-newsletter-section::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.75) 100%);
    pointer-events: none;
}

.qh-newsletter-shell {
    position: relative;
    padding: 24px 20px;
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: 20px;
}

.qh-newsletter-left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.qh-newsletter-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--qh-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qh-white);
    background: #8BB8E0;
    box-shadow: 0 4px 12px var(--qh-shadow);
    flex-shrink: 0;
}

.qh-newsletter-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--qh-white);
}

.qh-newsletter-copy {
    min-width: 0;
}

.qh-newsletter-title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    color: var(--qh-text);
    font-weight: 700;
    font-family: 'Signika', sans-serif;
}

.qh-newsletter-subtitle {
    margin: 2px 0 0;
    color: var(--qh-text-light);
    font-size: 13px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qh-newsletter-form {
    display: flex;
    min-width: 0;
}

.qh-newsletter-right {
    display: flex;
    align-items: center;
    border: 2px solid var(--qh-primary);
    background: var(--qh-white);
    border-radius: var(--qh-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px var(--qh-shadow);
}

.qh-newsletter-input {
    flex: 1;
    border: 0;
    background: transparent;
    color: var(--qh-text);
    height: 46px;
    padding: 0 16px;
    font-size: 14px;
    font-family: 'Signika', sans-serif;
    outline: none;
    min-width: 260px;
    max-width: 380px;
}

.qh-newsletter-input::placeholder {
    color: var(--qh-text-light);
}

.qh-newsletter-btn {
    width: 52px;
    height: 46px;
    border: 0;
    background: #8BB8E0;
    color: var(--qh-white);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.qh-newsletter-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--qh-shadow);
}

.qh-newsletter-btn:active {
    transform: translateY(0);
}

.qh-newsletter-btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.qh-newsletter-btn-text {
    font-size: 20px;
    line-height: 1;
    font-weight: 500;
}

.qh-newsletter-spinner {
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--qh-white);
    border-radius: 50%;
    opacity: 0;
    animation: qh-newsletter-spin 0.7s linear infinite;
}

.qh-newsletter-btn.loading .qh-newsletter-btn-text {
    opacity: 0;
}

.qh-newsletter-btn.loading .qh-newsletter-spinner {
    opacity: 1;
}

@keyframes qh-newsletter-spin {
    to {
        transform: rotate(360deg);
    }
}

.qh-newsletter-social-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qh-newsletter-social-label {
    color: var(--qh-text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.qh-newsletter-social-list {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qh-newsletter-social-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--qh-radius-sm);
    text-decoration: none;
    background: #8BB8E0;
    color: var(--qh-white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qh-newsletter-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--qh-shadow);
}

/* ----- Newsletter Responsive (trùng breakpoint với .qh-product-grid) ----- */
@media (max-width: 1200px) {
    .qh-newsletter-shell {
        grid-template-columns: auto 1fr;
        gap: 16px;
    }

    .qh-newsletter-social-wrap {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
}

@media (max-width: 992px) {
    .qh-newsletter-shell {
        grid-template-columns: 1fr;
        padding: 20px 24px;
        gap: 14px;
    }

    .qh-newsletter-left {
        justify-content: flex-start;
    }

    .qh-newsletter-form {
        width: 100%;
    }

    .qh-newsletter-right {
        max-width: 100%;
    }

    .qh-newsletter-input {
        min-width: 0;
        max-width: none;
    }

    .qh-newsletter-subtitle {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    .qh-newsletter-shell {
        padding: 16px 20px;
        gap: 12px;
    }

    .qh-newsletter-title {
        font-size: 16px;
    }

    .qh-newsletter-subtitle {
        font-size: 12px;
    }

    .qh-newsletter-icon {
        width: 42px;
        height: 42px;
    }

    .qh-newsletter-icon svg {
        width: 20px;
        height: 20px;
    }

    .qh-newsletter-right {
        border-radius: var(--qh-radius-sm);
    }

    .qh-newsletter-input {
        height: 42px;
        font-size: 13px;
        padding: 0 14px;
    }

    .qh-newsletter-btn {
        width: 48px;
        height: 42px;
    }

    .qh-newsletter-btn-text {
        font-size: 18px;
    }

    .qh-newsletter-social-wrap {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .qh-newsletter-social-label {
        font-size: 12px;
    }

    .qh-newsletter-social-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .qh-newsletter-shell {
        padding: 14px 16px;
        gap: 10px;
    }

    .qh-newsletter-title {
        font-size: 15px;
    }

    .qh-newsletter-subtitle {
        font-size: 11px;
    }

    .qh-newsletter-left {
        gap: 10px;
    }

    .qh-newsletter-icon {
        width: 40px;
        height: 40px;
    }

    .qh-newsletter-icon svg {
        width: 18px;
        height: 18px;
    }

    .qh-newsletter-input {
        height: 40px;
        font-size: 12px;
        padding: 0 12px;
    }

    .qh-newsletter-btn {
        width: 44px;
        height: 40px;
    }

    .qh-newsletter-btn-text {
        font-size: 16px;
    }

    .qh-newsletter-social-label {
        font-size: 11px;
    }

    .qh-newsletter-social-btn {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ==================== PHÂN TRANG TRÒN (home) ==================== */
.qh-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
}

.qh-pagination .qh-pagination-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 15px;
    background: linear-gradient(135deg, var(--qh-price) 0%, var(--qh-primary) 100%);
    color: #fff;
    border: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.qh-pagination a.qh-pagination-btn:hover {
    background: linear-gradient(135deg, var(--qh-primary) 0%, var(--qh-price) 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

.qh-pagination .qh-pagination-current {
    background: linear-gradient(135deg, var(--qh-price) 0%, var(--qh-primary) 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(185, 28, 28, 0.5);
}

.qh-pagination .qh-pagination-icon {
    width: 16px;
    height: 16px;
}