/* CSS cho Trang Chủ - Dự án Tranh Nhóm */

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #121212;
    --text-white: #ffffff;
    --accent-gold: #c9a84c;
    --accent-gold-hover: #e5c36a;
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 480px) {
    .inner {
        padding: 0 14px;
    }
}

@media (max-width: 360px) {
    .inner {
        padding: 0 10px;
    }
}

/* Common Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    /* Reduced from 22px for a much cleaner, premium look */
    font-weight: 700;
    /* Reduced from 800 */
    letter-spacing: 1.5px;
    color: var(--text-white);
    position: relative;
    padding-left: 12px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    /* Slimmed down from 4px */
    height: 15px;
    /* Reduced from 20px to match new font size */
    background-color: var(--accent-gold);
}

.section-link {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold);
    text-decoration: none;
    letter-spacing: 1px;
    transition: var(--transition);
}

.section-link:hover {
    color: var(--accent-gold-hover);
}

/* ========== HERO SECTION ========== */
.hero-section {
    position: relative;
    padding: 90px 0 80px;
    overflow: hidden;
    background-color: #050505;
    background-size: cover;
    background-position: center right;
    min-height: 65vh;
    display: flex;
    align-items: center;
}

/* Kỹ thuật phủ dải bóng tối (Vignette Gradient) */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Đổ bóng tối sâu ở góc trái (nơi đặt chữ) và trong suốt dần sang góc phải (nơi treo tranh) */
    background: linear-gradient(to right,
            rgba(5, 5, 5, 0.95) 0%,
            rgba(5, 5, 5, 0.8) 40%,
            rgba(5, 5, 5, 0.2) 70%,
            rgba(5, 5, 5, 0.5) 100%);
    z-index: 1;
}

.hero-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: flex-start;
    /* Đẩy khối chữ né sang bên trái một cách tự nhiên */
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    text-align: left;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    box-shadow: none;
}

.hero-title {
    font-family: 'Montserrat', 'Inter', 'Segoe UI', Arial, sans-serif;
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 900;
    letter-spacing: clamp(1px, 0.3vw, 4px);
    line-height: 1.08;
    margin-bottom: 24px;
    text-align: left;
    text-transform: uppercase;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Each line is its own full-width block — NEVER wraps */
.metal-line {
    display: block;
    white-space: nowrap;
    line-height: 1.08;

    /* ✨ Premium Chrome / Brushed Metal gradient:
       Simulates how light hits polished aluminium from top:
       bright specular highlight → soft light → dark reflection band → soft light → bright edge */
    background: linear-gradient(180deg,
            #ffffff 0%,
            #d8d8d8 30%,
            #777777 70%,
            #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Multi-layer shadow: white rim light on top + deep black shadow below + ambient glow */
    filter:
        drop-shadow(0px 1px 0px rgba(255, 255, 255, 0.55)) drop-shadow(0px 3px 2px rgba(0, 0, 0, 0.95)) drop-shadow(0px 8px 12px rgba(0, 0, 0, 0.8)) drop-shadow(0px 20px 35px rgba(0, 0, 0, 0.6));
}

/* Line 1: TRANH KIM LOẠI — slightly lighter tone for depth contrast */
.metal-line-1 {
    background: linear-gradient(180deg,
            #ffffff 0%,
            #c5c5c5 35%,
            #6a6a6a 75%,
            #d8d8d8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter:
        drop-shadow(0px 1px 0px rgba(255, 255, 255, 0.6)) drop-shadow(0px 3px 3px rgba(0, 0, 0, 1)) drop-shadow(0px 10px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0px 24px 40px rgba(0, 0, 0, 0.65));
}

/* Line 2: CAO CẤP — warm silver with golden undertone */
.metal-line-2 {
    background: linear-gradient(180deg,
            #ffffff 0%,
            #d4c99a 35%,
            #8a7f50 75%,
            #e4dca0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter:
        drop-shadow(0px 1px 0px rgba(255, 245, 200, 0.7)) drop-shadow(0px 3px 3px rgba(0, 0, 0, 1)) drop-shadow(0px 10px 18px rgba(0, 0, 0, 0.85)) drop-shadow(0px 24px 40px rgba(0, 0, 0, 0.65));
}

/* Remove the old span rule (now handled by .metal-line-2) */
.hero-title span.metal-line {
    margin-top: 0;
    font-size: inherit;
    letter-spacing: inherit;
}

.hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 35px;
    max-width: 420px;
    text-align: left;
    line-height: 1.7;
    letter-spacing: 0.3px;
}

.hero-btns {
    display: flex;
    gap: 16px;
}

/* Nâng cấp hệ thống nút bấm đồng bộ chuỗi màu Gold sang trọng */
.btn-primary,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 0 28px;
    border-radius: 6px;
    /* Bo góc nhẹ mang lại cảm giác hiện đại */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
}

/* Nút Khám Phá Ngay: Nền Gold nguyên khối */
.btn-primary {
    background-color: var(--accent-gold);
    color: #050505;
}

.btn-primary:hover {
    background-color: var(--accent-gold-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(201, 168, 76, 0.25);
}

/* Nút Thiết Kế Tranh Riêng: Trong suốt viền Gold đồng bộ */
.btn-outline {
    background-color: transparent;
    color: var(--accent-gold);
    border: 1px solid rgba(201, 168, 76, 0.4);
}

.btn-outline:hover {
    background-color: rgba(201, 168, 76, 0.08);
    border-color: var(--accent-gold-hover);
    color: var(--accent-gold-hover);
    transform: translateY(-2px);
}

/* Slider Dots cố định phía dưới cùng của không gian */
.hero-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}

/* Responsive tinh tế cho mọi thiết bị di động */
@media (max-width: 992px) {
    .hero-section {
        padding: 60px 0;
        min-height: auto;
    }

    .hero-bg-overlay {
        background: rgba(5, 5, 5, 0.85);
    }

    .hero-container {
        justify-content: center;
    }

    .hero-content {
        text-align: center;
        align-items: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 40px;
        text-align: center;
    }

    .hero-title span {
        font-size: 34px;
    }

    .hero-desc {
        text-align: center;
        max-width: 100%;
    }

    .hero-btns {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .btn-primary,
    .btn-outline {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .hero-btns {
        display: none !important;
    }
}

/* ========== CATEGORIES SECTION ========== */
.categories-section {
    padding: 60px 0;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

.category-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    background-color: #080808;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.6);
}

.category-card:hover {
    border-color: var(--accent-gold);
}

.cat-img {
    width: 100%;
    height: 150px;
    position: relative;
    overflow: hidden;
}

.cat-img img,
.cat-img div {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bottom Info Bar matching Image 1 */
.cat-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background-color: #0b0b0b;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s;
}

.category-card:hover .cat-info-bar {
    background-color: #0d0d0d;
}

.cat-info-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Star Box (✦) */
.cat-star-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-gold);
    flex-shrink: 0;
    transition: all 0.3s;
}

.category-card:hover .cat-star-box {
    border-color: var(--accent-gold);
    background: rgba(201, 168, 76, 0.08);
}

.cat-text-group {
    display: flex;
    flex-direction: column;
}

.cat-title-text {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 0.5px;
}

.cat-subtitle-text {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin: 2px 0 0 0;
    font-weight: 400;
}

/* Action Button */
.cat-action-btn {
    border: 1px solid rgba(201, 168, 76, 0.35);
    border-radius: 6px;
    padding: 8px 16px;
    color: var(--accent-gold);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    background: transparent;
}

.category-card:hover .cat-action-btn {
    background-color: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.products-section {
    padding: 35px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .btn-detail {
        display: none !important;
    }
}


@media (max-width: 920px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


@media (max-width: 850px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 560px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .products-grid .product-card:nth-child(n+5) {
        display: none !important;
    }
}



.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        border-color 0.35s ease,
        box-shadow 0.35s ease;
}

.product-card:hover {
    border-color: var(--accent-gold);
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.15);
}

.product-img {
    aspect-ratio: 2 / 3;
    height: auto;
    position: relative;
    background-color: #151515;
    overflow: hidden;
}

/* Zoom ảnh khi hover */
.product-img-inner {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover .product-img-inner {
    transform: scale(1.07);
}

/* Gold shimmer sweep hiệu ứng ánh sáng quét chéo */
.product-img-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg,
            transparent 0%,
            transparent 40%,
            rgba(201, 168, 76, 0.18) 50%,
            transparent 60%,
            transparent 100%);
    background-size: 200% 100%;
    background-position: 200% 0;
    transition: background-position 0s;
    pointer-events: none;
    z-index: 2;
}

.product-card:hover .product-img-shine {
    background-position: -200% 0;
    transition: background-position 0.7s ease;
}

.product-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 2px;
    letter-spacing: 0.5px;
}

.badge-hot {
    background-color: #ff3333;
    color: white;
}

.badge-new {
    background-color: var(--accent-gold);
    color: black;
}

.product-info {
    padding: 14px 12px 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 6px;
    line-height: 1.38;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-type {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-price {
    font-size: 14.5px;
    font-weight: 800;
    color: var(--accent-gold);
    margin-bottom: 12px;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-price del {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4) !important;
    font-weight: 500;
    text-decoration: line-through;
    margin-right: 4px;
}

.product-price ins {
    font-size: 14.5px;
    color: var(--accent-gold) !important;
    font-weight: 800;
    text-decoration: none;
    background: transparent;
}

.product-actions {
    display: flex;
    gap: 10px;
}

.btn-detail,
.btn-order {
    flex: 1;
    height: 32px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-detail {
    background-color: transparent;
    color: var(--text-white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-detail:hover {
    border-color: var(--text-white);
}

.btn-order {
    background-color: var(--accent-gold);
    color: #000;
    border: none;
}

.btn-order:hover {
    background-color: var(--accent-gold-hover);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-gallery {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .hero-features {
        grid-template-columns: 1fr;
    }

    .hero-gallery {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 770px) {
    .section-title {
        font-size: 16px;
        padding-left: 10px;
    }

    .section-title::before {
        height: 16px;
    }

    .section-link {
        font-size: 10px;
    }

    .cat-title-text {
        font-size: 12px;
    }

    .cat-subtitle-text {
        font-size: 10px;
    }

    .cat-info-bar {
        padding: 10px 12px;
    }

    .cat-star-box {
        display: none !important;
    }

    .products-grid {
        gap: 10px;
    }

    .product-img {
        aspect-ratio: 2 / 3 !important;
        height: auto !important;
    }

    .product-info {
        padding: 10px !important;
    }

    .product-name {
        font-size: 11px !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }

    .product-type {
        font-size: 9px !important;
        margin-bottom: 8px !important;
    }

    .product-price {
        font-size: 12px !important;
        margin-bottom: 8px !important;
    }

    .product-price ins {
        font-size: 12px !important;
    }

    .product-price del {
        font-size: 10px !important;
    }

    .btn-detail {
        display: none !important;
    }

    .btn-order {
        height: 32px !important;
        line-height: 30px !important;
        font-size: 10px !important;
        padding: 0 5px !important;
    }
}

/* =============================================
   SCROLL REVEAL ANIMATION SYSTEM
   ============================================= */

/* Base state: hidden before animation triggers */
.anim-fade-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.65s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Visible state: set by IntersectionObserver JS */
.anim-fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section header always slightly faster */
.section-header.anim-fade-up {
    transition-duration: 0.5s;
}

/* ── Category card stagger delays ── */
.categories-grid .category-card:nth-child(1) {
    transition-delay: 0.05s;
}

.categories-grid .category-card:nth-child(2) {
    transition-delay: 0.12s;
}

.categories-grid .category-card:nth-child(3) {
    transition-delay: 0.19s;
}

.categories-grid .category-card:nth-child(4) {
    transition-delay: 0.26s;
}

.categories-grid .category-card:nth-child(5) {
    transition-delay: 0.33s;
}

.categories-grid .category-card:nth-child(6) {
    transition-delay: 0.40s;
}

.categories-grid .category-card:nth-child(7) {
    transition-delay: 0.47s;
}

.categories-grid .category-card:nth-child(8) {
    transition-delay: 0.54s;
}

/* ── Product card stagger delays ── */
.products-grid .product-card:nth-child(1) {
    transition-delay: 0.05s;
}

.products-grid .product-card:nth-child(2) {
    transition-delay: 0.12s;
}

.products-grid .product-card:nth-child(3) {
    transition-delay: 0.19s;
}

.products-grid .product-card:nth-child(4) {
    transition-delay: 0.26s;
}

.products-grid .product-card:nth-child(5) {
    transition-delay: 0.33s;
}

.products-grid .product-card:nth-child(6) {
    transition-delay: 0.10s;
}

.products-grid .product-card:nth-child(7) {
    transition-delay: 0.17s;
}

.products-grid .product-card:nth-child(8) {
    transition-delay: 0.24s;
}

.products-grid .product-card:nth-child(9) {
    transition-delay: 0.31s;
}

.products-grid .product-card:nth-child(10) {
    transition-delay: 0.38s;
}

.products-grid .product-card:nth-child(n+11) {
    transition-delay: 0.15s;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .anim-fade-up {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ── Category card: same gold shimmer as products ── */
.cat-img {
    overflow: hidden;
    position: relative;
}

.cat-img>div:first-child {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card:hover .cat-img>div:first-child {
    transform: scale(1.06);
}

/* ── Improved product card info area ── */
.product-name {
    transition: color 0.2s ease;
}

.product-card:hover .product-name {
    color: var(--accent-gold) !important;
}

/* ── Btn-order subtle pulse on card hover ── */
.product-card:hover .btn-order {
    background-color: var(--accent-gold-hover);
    box-shadow: 0 0 18px rgba(201, 168, 76, 0.3);
}

/* Styles moved from home.php */
/* Desktop Slider Base (Applies globally now) */
.categories-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    /* Firefox */
    padding-bottom: 5px !important;
    gap: 20px !important;
}

.categories-grid::-webkit-scrollbar {
    display: none !important;
    /* Safari and Chrome */
}

.categories-grid>.category-card {
    flex: 0 0 calc(20% - 16px) !important;
    /* Show 5 cards on desktop */
    flex-shrink: 0 !important;
    /* Prevent cards from shrinking and squishing */
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
}

.section-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Arrow nav always visible */
.cat-header-nav {
    display: flex;
    gap: 8px;
}

.cat-header-btn {
    display: flex;
    width: 34px;
    height: 34px;
    background: rgba(10, 10, 10, 0.9);
    border: 1.5px solid var(--accent-gold, #c9a84c);
    border-radius: 50%;
    color: var(--accent-gold, #c9a84c);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.cat-header-btn:hover {
    background: var(--accent-gold, #c9a84c);
    color: #000;
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.4);
}

.categories-slider-wrapper {
    padding: 0 !important;
}

@media (min-width: 1024px) {
    .cat-nav-btn {
        display: none !important;
    }
}

/* "Xem tất cả" link — always visible, pill style */
.desktop-hide-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold, #c9a84c);
    text-decoration: none;
    letter-spacing: 0.8px;
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: 20px;
    padding: 5px 13px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.desktop-hide-nav-link:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.55);
    color: #e5c36a;
}



@media (max-width: 1000px) {
    .categories-grid {
        gap: 16px !important;
    }

    .categories-grid>.category-card {
        flex: 0 0 calc(25% - 12px) !important;
        /* Show 4 cards under 1000px */
    }
}

@media (max-width: 900px) {
    .categories-grid {
        gap: 15px !important;
    }

    .categories-grid>.category-card {
        flex: 0 0 calc(33.333% - 10px) !important;
        /* Show 3 cards under 900px (covers 866px) */
    }
}


.cat-scroll-indicator-bar {
    display: none;
    /* Hidden on desktop */
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.cat-scroll-indicator-bar .indicator-dash {
    width: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-scroll-indicator-bar .indicator-dash.active {
    background: var(--accent-gold, #c9a84c);
    width: 32px;
    /* Stretch effect when active */
}

@media (max-width: 1023px) {
    .cat-scroll-indicator-bar {
        display: flex !important;
    }
}

/* ===== MOBILE: Hiển thị danh mục dạng slider có peek để thấy nhiều hơn ===== */
@media (max-width: 600px) {
    .categories-grid {
        gap: 10px !important;
        padding: 0 !important;
    }

    .categories-grid>.category-card {
        /* Slider peek: show ~2.3 cards to invite swiping */
        flex: 0 0 43% !important;
        min-width: 0 !important;
    }

    /* Ảnh danh mục hợp lý trên slider */
    .categories-grid .cat-img {
        height: 130px !important;
    }

    .categories-grid .cat-info-bar {
        padding: 10px 10px !important;
    }

    .categories-grid .cat-star-box {
        display: none !important;
    }

    .categories-grid .cat-title-text {
        font-size: 11px !important;
        letter-spacing: 0.3px !important;
    }

    .categories-grid .cat-subtitle-text {
        font-size: 9px !important;
    }
}

@media (max-width: 400px) {
    .categories-grid {
        gap: 8px !important;
    }

    .categories-grid>.category-card {
        flex: 0 0 43% !important;
    }

    .categories-grid .cat-img {
        height: 110px !important;
    }
}

.products-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    /* Firefox */
    padding-bottom: 5px !important;
    gap: 20px !important;
}

.products-grid::-webkit-scrollbar {
    display: none !important;
    /* Safari and Chrome */
}

.products-grid>.product-card {
    flex: 0 0 calc(20% - 16px) !important;
    /* Show 5 products on desktop */
    flex-shrink: 0 !important;
    /* Prevent product cards from shrinking and squishing */
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
}

/* Fine-tune product cards for premium 5-column layout */
.products-grid .product-card .product-img {
    aspect-ratio: 2 / 3 !important;
    height: auto !important;
    /* Overrides previous fixed heights */
}

.products-grid .product-card .product-info {
    padding: 14px 12px 15px !important;
    /* Reduced padding for cleaner look */
}

.products-grid .product-card .product-name {
    font-size: 13px !important;
    /* Elegant smaller font size */
    /* Adjusted min-height for 2-line title */
    line-height: 1.38 !important;
    margin-bottom: 6px !important;
}

.products-grid .product-card .product-type {
    font-size: 10.5px !important;
    margin-bottom: 8px !important;
}

.products-grid .product-card .product-price {
    font-size: 14.5px !important;
    margin-bottom: 12px !important;
}

.products-grid .product-card .product-price ins {
    font-size: 14.5px !important;
}

.products-grid .product-card .product-price del {
    font-size: 11px !important;
}

.products-grid .product-card .btn-detail,
.products-grid .product-card .btn-order {
    height: 32px !important;
    font-size: 10px !important;
}

/* Arrow nav always visible */
.prod-header-nav {
    display: flex;
    gap: 8px;
}

.prod-header-btn {
    display: flex;
    width: 34px;
    height: 34px;
    background: rgba(10, 10, 10, 0.9);
    border: 1.5px solid var(--accent-gold, #c9a84c);
    border-radius: 50%;
    color: var(--accent-gold, #c9a84c);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}

.prod-header-btn:hover {
    background: var(--accent-gold, #c9a84c);
    color: #000;
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.4);
}

.prod-scroll-indicator-bar {
    display: none;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
}

.prod-scroll-indicator-bar .indicator-dash {
    width: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.prod-scroll-indicator-bar .indicator-dash.active {
    background: var(--accent-gold, #c9a84c);
    width: 32px;
}

/* "Xem tất cả" link products — always visible */
.prod-desktop-hide-nav-link {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-gold, #c9a84c);
    text-decoration: none;
    letter-spacing: 0.8px;
    border: 1px solid rgba(201, 168, 76, 0.28);
    border-radius: 20px;
    padding: 5px 13px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.prod-desktop-hide-nav-link:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: rgba(201, 168, 76, 0.55);
    color: #e5c36a;
}

@media (max-width: 1023px) {
    .prod-scroll-indicator-bar {
        display: flex !important;
    }
}

@media (max-width: 1000px) {
    .products-grid {
        gap: 16px !important;
    }

    .products-grid>.product-card {
        flex: 0 0 calc(33.333% - 11px) !important;
        /* Show 3 products under 1000px */
    }
}

/* ===== MOBILE: Hiển thị đúng 2 sản phẩm vừa khít ===== */
@media (max-width: 771px) {
    .products-grid {
        gap: 12px !important;
        padding: 0 !important;
    }

    .products-grid>.product-card {
        /* Tính toán chính xác: (100% - 12px gap) / 2 = 50% - 6px */
        flex: 0 0 calc(50% - 6px) !important;
        min-width: 0 !important;
    }

    /* Removed fixed height for mobile */
    .products-grid .product-card .product-info {
        padding: 12px 10px 14px !important;
    }

    .products-grid .product-card .product-name {
        font-size: 12px !important;
        min-height: 32px !important;
        line-height: 1.4 !important;
        margin-bottom: 4px !important;
    }

    .products-grid .product-card .product-type {
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }

    .products-grid .product-card .product-price {
        font-size: 13px !important;
        margin-bottom: 10px !important;
        gap: 5px !important;
        flex-direction: row !important;
        align-items: center !important;
    }

    .products-grid .product-card .product-price ins {
        font-size: 13px !important;
    }

    .products-grid .product-card .product-price del {
        font-size: 10px !important;
    }

    .products-grid .product-card .btn-detail {
        display: none !important;
    }

    .products-grid .product-card .btn-order {
        width: 100% !important;
        height: 36px !important;
        font-size: 11px !important;
        border-radius: 6px !important;
    }
}

@media (max-width: 480px) {
    .products-grid {
        gap: 10px !important;
    }

    .products-grid>.product-card {
        flex: 0 0 calc(50% - 5px) !important;
    }

    /* Removed fixed height for mobile */
    .products-grid .product-card .product-info {
        padding: 10px 8px 12px !important;
    }

    .products-grid .product-card .product-name {
        font-size: 11.5px !important;
    }

    .products-grid .product-card .product-price {
        font-size: 12px !important;
    }

    .products-grid .product-card .product-price ins {
        font-size: 12px !important;
    }

    .products-grid .product-card .btn-order {
        height: 34px !important;
        font-size: 10.5px !important;
    }
}

@media (max-width: 360px) {
    .products-grid {
        gap: 8px !important;
    }

    .products-grid>.product-card {
        flex: 0 0 calc(50% - 4px) !important;
    }

    /* Removed fixed height for mobile */
}

/* ========================================================
   PROMO GRID SECTION — 4 KHUNG ẢNH FULL WIDTH
   Tỷ lệ 3:2  |  Ảnh tốt nhất: 900×600px hoặc 1200×800px
   ======================================================== */

.promo-grid-section {
    /* Bằng phẳng với Categories section phía trên */
    margin-top: -10px;
    padding: 0 0 50px;
}

.install-guide-section {
    padding: 20px 0 25px;
}

/* Grid — không có inner, full-width với padding 2 bên nhỏ */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 20px;
    max-width: 1240px;
    margin: 0 auto;
}

/* Mỗi khung ảnh */
.promo-frame {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    /* Tỷ lệ 3:2 — landscape đẹp, không quá cao cũng không quá rộng */
    aspect-ratio: 3 / 2;
    background-color: #0d0d0d;
    box-shadow: 0 3px 16px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
    cursor: pointer;
}

.promo-frame:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(201, 168, 76, 0.35);
    z-index: 2;
}

/* Ảnh nền — cover toàn khung */
.promo-frame-bg {
    position: absolute;
    inset: 0;
    background-image: var(--promo-img);
    background-size: cover;
    background-position: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-frame:hover .promo-frame-bg {
    transform: scale(1.07);
}

/* ==== Responsive — Tablet & Mobile (≤ 860px): Dạng lướt ngang (Slider) ==== */
@media (max-width: 860px) {
    .promo-grid {
        /* Chuyển về flex để xếp thành hàng ngang */
        display: flex;
        flex-wrap: nowrap;
        /* Cho phép cuộn ngang */
        overflow-x: auto;
        /* Scroll snap để cuộn mượt và dừng đúng khung */
        scroll-snap-type: x mandatory;
        /* Ẩn scrollbar nhưng vẫn vuốt được */
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Thêm padding để ảnh không dính viền màn hình */
        padding: 0 16px 20px;
        gap: 12px;
    }

    .promo-grid-section {
        /* Bằng phẳng với Categories section phía trên */
        padding: 0px !important;
    }

    /* Ẩn thanh cuộn trên webkit (Chrome, Safari, iOS) */
    .promo-grid::-webkit-scrollbar {
        display: none;
    }

    .install-guide-section {
        padding: 0px !important;
    }

    .promo-frame {
        /* Độ rộng 85% màn hình để khung tiếp theo "ló" ra 1 chút, báo hiệu có thể vuốt */
        flex: 0 0 85%;
        /* Điểm dừng khi vuốt */
        scroll-snap-align: center;
        /* Ngăn lướt qua nhiều ảnh cùng lúc, bắt buộc dừng lại ở mỗi ảnh */
        scroll-snap-stop: always;
        /* Tỷ lệ ảnh có thể điều chỉnh 1 chút nếu cần, ở đây giữ nguyên 3:2 */
    }
}

/* ==== Responsive — Mobile nhỏ (≤ 480px) ==== */
@media (max-width: 480px) {
    .promo-grid {
        padding: 0 12px 16px;
        gap: 10px;
    }

    .promo-frame {
        /* Mobile nhỏ: ló khung tiếp theo ra nhiều hơn chút xíu để dễ thấy */
        flex: 0 0 88%;
    }
}