:root {
    --primary: #004aad;
    --secondary: #0072ce;
    --bg: #f4f6f9;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
}

/* ================= HERO ================= */
.page-hero {
    position: relative;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
}

.page-hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

/* text บนรูป */
/* .hero-text {
            position: absolute;
            top: 50%;
            left: 8%;
            transform: translateY(-50%);
            color: #fff;
            z-index: 2;
            max-width: 600px;
        }

        .hero-text h1 {
            font-size: 44px;
            margin-bottom: 12px;
        }

        .hero-text p {
            font-size: 18px;
            opacity: 0.9;
        } */

/* ================= CONTENT ================= */
.content {
    max-width: 1300px;
    margin: auto;
    padding: 60px 20px 100px;
}

/* FILTER BAR */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

/* DROPDOWN BOX */
.dropdown {
    position: relative;
    width: 220px;
}

/* SELECTED BOX */
.dropdown-selected {
    background: #f1f1f1;
    padding: 12px 16px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    box-shadow: inset 0 0 0 1px #ddd;
}

/* ARROW */
.dropdown-selected .arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-4px);
}

/* MENU */
.dropdown-menu {
    position: absolute;
    top: 110%;
    left: 0;
    width: 100%;
    background: #eee;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: .25s;
    z-index: 3000;
}

/* SHOW */
.dropdown.active .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* OPTIONS */
.dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    font-size: 15px;
    cursor: pointer;
}

.dropdown-menu input {
    width: 18px;
    height: 18px;
}

/* ================= PRODUCT ================= */
.products {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-card {
    background: var(--card);
    border-radius: 22px;
    padding: 30px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, .08);
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: .35s cubic-bezier(.22, .61, .36, 1);
    position: relative;
    overflow: hidden;
}

/* ================= BADGE ================= */
/* .badge {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--secondary);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
} */

/* IMAGE */
.product-img {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: .35s;
}

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

/* QUICK VIEW */
.quick-view {
    display: block;
    margin: 12px auto 0;
    background: #fff;
    color: #000;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    width: max-content;
    opacity: 0;
    cursor: pointer;
    transform: translateY(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .2);
    transition: .3s;
}

.product-card:hover .quick-view {
    opacity: 1;
    transform: translateY(0);
}

/* TEXT */
.product-title {
    padding-top: 16px;
    font-size: 20px;
    font-weight: 700;
}

.product-sub {
    font-size: 40px;
    color: var(--secondary);
    font-weight: 600;
}

.product-desc {
    font-size: 30px;
    color: var(--muted);
}

/* BUTTON */
.product-btn {
    display: inline-block;
    padding: 11px 22px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    transition: .25s;
    margin-top: auto;
    text-align: center;
}

.product-btn:hover {
    background: #003a87;
}


/* QUICK VIEW PANEL */
.quick-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: .3s;
    z-index: 1500;
}

.quick-overlay.active {
    opacity: 1;
    visibility: visible;
}

.quick-panel {
    position: fixed;
    top: 0;
    right: -480px;
    width: 480px;
    max-width: 90%;
    height: 100vh;
    background: #fff;
    box-shadow: -10px 0 60px rgba(0, 0, 0, .35);
    transition: .45s cubic-bezier(.22, .61, .36, 1);
    z-index: 2000;
    overflow-y: auto;
}

.quick-panel.active {
    right: 0;
}

.panel-content {
    display: flex;
    flex-direction: column;
    padding: 50px 32px;
    overflow-y: auto;
}

.panel-gallery {
    text-align: center;
    margin-top: 40px;
}

.panel-gallery img {
    width: 85%;
    max-width: 220px;
}

.panel-title {
    padding-top: 30px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

.panel-sub {
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 12px;
}

.panel-desc {
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.close-panel {
    position: absolute;
    right: 25px;
    top: 25px;
    font-size: 24px;
    cursor: pointer;
}

/* ===================================================== */
/* ================= 320px (BASE) ======================= */

/* HERO */
.page-hero {
    max-height: 260px;
}

/* CONTENT */
.content {
    padding: 40px 16px 80px;
}

/* FILTER */
.filter-bar {
    flex-direction: column;
    align-items: stretch;
}

/* DROPDOWN */
.dropdown {
    width: 100%;
}

/* PRODUCTS → 1 column */
.products {
    grid-template-columns: 1fr;
    gap: 20px;
}

.product-card {
    padding: 20px;
}

/* IMAGE */
.product-img {
    height: 160px;
}

/* TEXT */
.product-title {
    font-size: 18px;
}

.product-sub,
.product-desc {
    font-size: 15px;
}

/* BUTTON */
.product-btn {
    font-size: 13px;
    padding: 10px 16px;
}

/* QUICK VIEW BUTTON (always visible mobile) */
.quick-view {
    opacity: 1;
    transform: none;
}

/* PANEL */
.quick-panel {
    width: 100%;
    max-width: 100%;
}

.panel-content {
    padding: 40px 20px;
}

.panel-title {
    font-size: 20px;
}

/* ================= 360px ============================== */
@media (min-width: 360px) {

    .page-hero {
        max-height: 300px;
    }

    .product-img {
        height: 180px;
    }

    .product-title {
        font-size: 19px;
    }
}

/* ================= 768px (Tablet) ===================== */
@media (min-width: 768px) {

    .page-hero {
        max-height: 400px;
    }

    .content {
        max-width: 720px;
        margin: auto;
        padding: 60px 20px;
    }

    .filter-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .dropdown {
        width: 240px;
    }

    /* PRODUCTS → 2 columns */
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }

    .product-img {
        height: 200px;
    }

    /* PANEL */
    .quick-panel {
        width: 420px;
    }
}

/* ================= 1024px (Laptop) ==================== */
@media (min-width: 1024px) {

    .page-hero {
        max-height: 520px;
    }

    .content {
        max-width: 960px;
    }

    /* PRODUCTS */
    .products {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }

    .product-card {
        padding: 28px;
    }

    /* hover */
    .quick-view {
        opacity: 0;
        transform: translateY(10px);
    }

    .product-card:hover .quick-view {
        opacity: 1;
        transform: translateY(0);
    }

    .quick-panel {
        width: 480px;
    }
}

/* ================= 1400px (Desktop) =================== */
@media (min-width: 1400px) {

    .content {
        max-width: 1200px; /* เพิ่มพื้นที่นิดนึง */
    }

    .products {
        grid-template-columns: repeat(3, 1fr); /* ✅ 3 การ์ด */
        gap: 40px; /* เพิ่มระยะห่างให้ดูโปร */
    }

    .product-card {
        padding: 34px; /* เพิ่ม padding ให้ดูหรู */
    }

    .product-img {
        height: 240px; /* รูปใหญ่ขึ้น */
    }
}