/* =========================================================
   1) GLOBAL BASE STYLES
========================================================= */
html,
body {
    overflow-x: hidden !important;
    height: 100%;
    min-height: 100vh;
    font-family: "Quicksand", "Noto Sans Thai", sans-serif;
    background: #f9f9f9;
}

body {
    padding-top: 74px;
}

main {
    min-height: 100%;
}

/* =========================================================
   2) NAVBAR
========================================================= */
.navbar-custom {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 50;
    height: 74px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    background: #d60000;
}

.nav-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
}

.navbar-logo .logo-img {
    height: 40px;
    width: auto;
}

.nav-icons {
    display: flex;
    gap: 18px;
    font-size: 30px;
}

/* NAVBAR RESPONSIVE */
@media (max-width: 768px) {
    .navbar-custom {
        height: auto;
        padding: 12px 18px;
    }

    .nav-inner {
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .nav-search {
        order: 3;
        flex: 1 1 100%;
    }

    .nav-icons {
        order: 2;
    }
}

/* =========================================================
   3) SEARCH BAR & SEARCH PANEL (PRODUCTION)
========================================================= */

/* =====================
   SEARCH INPUT
===================== */
.nav-search {
    flex: 1;
    position: relative;
    max-width: 480px;
}

.nav-search input {
    width: 100%;
    height: 42px;
    border-radius: 26px;
    padding-left: 16px;
    padding-right: 60px; /* เผื่อ icon */
    border: none;
    font-size: 16px; /* ⭐ ป้องกัน iOS zoom */
}

/* =====================
   SEARCH ICON + CLEAR
===================== */
.nav-search .search-icon,
.nav-search .clear-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    transition: opacity 0.2s ease;
}

.nav-search .search-icon {
    pointer-events: none;
}

.nav-search .clear-icon {
    font-size: 20px;
    color: #777;
    cursor: pointer;
}

.nav-search .clear-icon:hover {
    color: #d60000;
}

.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* =====================
   SEARCH PANEL CONTENT
===================== */
.search-panel-inner {
    padding: 10px;
    overflow-y: auto;
}

.search-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #d60000;
    margin: 18px 0 8px;
    text-transform: uppercase;
}

/* =====================
   SEARCH CARD
===================== */
.search-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #f2f2f2;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    text-decoration: none;
    color: #222;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

@media (hover: hover) {
    .search-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0,0,0,0.14);
    }
}

.search-card-img {
    width: 68px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
}

.search-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.search-card-name {
    font-size: 15px;
    font-weight: 600;
}

.search-card-brand {
    font-size: 13px;
    color: #888;
}

.search-card-price {
    font-size: 15px;
    font-weight: 700;
    color: #d62828;
}

.search-card-btn {
    padding: 6px 14px;
    border-radius: 8px;
    background: #fff;
    border: 1.5px solid #d62828;
    color: #d62828;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s ease;
}

.search-card-btn:hover {
    background: #d62828;
    color: #fff;
}

/* =====================
   SEARCH DIALOG
===================== */
#searchDialog {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 9999;
}

#searchDialog.show {
    display: flex;
}

.search-dialog-backdrop {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    padding-top: 118px;
    background: rgba(0,0,0,0.25);
}

.search-dialog-card {
    width: 650px;
    max-height: calc(100dvh - 118px);
    background: #fff;
    border-radius: 14px;
    overflow-y: auto;
    box-shadow: 0 10px 28px rgba(0,0,0,0.2);
    animation: fadeDown 0.25s ease;
}

/* =====================
   FOOTER
===================== */
.dialog-footer {
    margin-top: auto;
    padding: 14px 20px;
    border-top: 1px solid #f1f1f1;
    background: #fff;
    text-align: center;
}

.view-all-link {
    font-size: 15px;
    font-weight: 700;
    color: #d60000;
    text-decoration: none;
}

/* =====================
   BODY LOCK
===================== */
.no-scroll {
    overflow: hidden;
    touch-action: none;
}

/* =====================
   TABLET
===================== */
@media (max-width: 992px) {
    .nav-search {
        max-width: 100%;
    }

    .search-dialog-card {
        width: 90%;
    }
}

/* =====================
   MOBILE
===================== */
@media (max-width: 576px) {
    .search-card {
        flex-direction: column;
        text-align: center;
    }

    .search-dialog-card {
        width: 100%;
        height: calc(100dvh - 118px);
        max-height: none;
        border-radius: 0;
        padding-inline: 16px;
    }
}

/* =========================================================
   4) CATEGORY & BRAND SEARCH CARDS
========================================================= */
.search-cat-card,
.search-brand-card {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #f3f3f3;
    background: #fff;
    margin-bottom: 10px;
    text-decoration: none;
    color: #222;
    gap: 10px;
    transition: background 0.15s ease, transform 0.15s ease;
}

.search-cat-card:hover,
.search-brand-card:hover {
    background: #f9f9f9;
    transform: translateX(2px);
}

.search-cat-icon,
.search-brand-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: #ffeaea;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d60000;
}

.search-cat-name,
.search-brand-name {
    font-size: 14px;
    font-weight: 500;
}

/* Empty state */
.search-empty h6 {
    font-size: 16px;
    font-weight: 600;
}

.search-empty small {
    color: #888;
}

/* =========================================================
   5) MEGA MENU — DESKTOP
========================================================= */
.mega-btn {
    background: #fff;
    border: none;
    height: 35px;
    padding: 0 16px;
    border-radius: 26px;
    cursor: pointer;
    color: #333;
    font-weight: 600;
}

.mega-container {
    position: absolute;
    top: 80px;
    left: 640px;
    width: 820px;
    min-height: 480px;
    background: white;
    border-radius: 8px;
    box-shadow: 0px 10px 22px rgba(0, 0, 0, 0.2);
    display: flex;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.32s, transform 0.32s;
    z-index: 25;
}

.mega-container.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-col {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 480px;
    overflow-y: auto;
}

.col-1 {
    width: 32%;
    background: #fafafa;
    border-right: 1px solid #e8e8e8;
}

.col-2 {
    width: 34%;
    display: none;
    border-right: 1px solid #e8e8e8;
}

.col-3 {
    width: 34%;
    display: none;
}

.mega-col li {
    cursor: pointer;
    padding: 14px 20px;
    transition: background 0.12s, padding-left 0.18s;
}

.mega-col li.active {
    background: #ececec;
    border-left: 3px solid red;
    padding-left: 28px;
}

.mega-link {
    text-decoration: none;
    color: #333;
    width: 100%;
}

/* Clickable */
.mega-item.clickable {
    cursor: pointer;
    padding: 8px 14px;
    transition: background 0.2s ease;
}

.mega-item.clickable:hover {
    background: #f8f9fa;
}

.list-group-item.clickable {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.list-group-item.clickable:hover {
    background: #f1f1f1;
}

/* MEGA MENU RESPONSIVE */
@media (max-width: 1670px) {
    .mega-container {
        left: 510px !important;
        width: 800px !important;
    }
}

@media (max-width: 1400px) {
    .mega-container {
        left: 400px !important;
        width: 750px !important;
    }
}

@media (max-width: 992px) {
    .mega-container {
        left: 200px !important;
        width: 600px !important;
    }
}

@media (max-width: 768px) {
    .mega-btn {
        order: 1;
    }

    .mega-container {
        display: none !important;
    }
}

/* =========================================================
   6) MEGA MENU — MOBILE
========================================================= */
.mobile-dropdown-container {
    position: fixed;
    top: 118px;
    width: 100%;
    background: #ffffff;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    pointer-events: none;
    transition: 0.35s;
    z-index: 25;
}

.mobile-dropdown-container.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.mobile-dropdown-container,
.mobile-dropdown-container .list-group,
.mobile-dropdown-container .list-group-item {
    border-radius: 0 !important;
}

.mobile-dropdown-container .list-group-item {
    border: none;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.15s ease;
}

.mobile-dropdown-container .list-group-item:hover {
    background: #f4f4f4;
}

.mobile-dropdown-container .active-level {
    font-weight: 600;
    background: #f2f2f2;
}

.chevron {
    font-size: 14px;
    color: #666;
    transition: transform 0.25s ease;
}

.chevron.rotate {
    transform: rotate(90deg);
}

.level-2 {
    padding-left: 30px !important;
    background: #fafafa !important;
}

.level-3 {
    padding-left: 45px !important;
    background: #fdfdfd !important;
}

.mobile-dropdown-container a {
    text-decoration: none;
    color: #333;
    flex: 1;
}

/* =========================================================
   7) HAMBURGER MENU
========================================================= */
.menu-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-btn i {
    position: absolute;
    font-size: 24px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.icon-open {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.icon-close {
    opacity: 0;
    transform: rotate(-90deg) scale(0.6);
}

.menu-btn.active .icon-open {
    opacity: 0;
    transform: rotate(90deg) scale(0.6);
}

.menu-btn.active .icon-close {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* =========================================================
   8) LANGUAGE SWITCH
========================================================= */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 4px;
}

.lang-switch a {
    color: #fff;
    font-weight: 600;
    opacity: 0.65;
    text-decoration: none;
    transition: opacity 0.15s, transform 0.15s;
}

.lang-switch a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.lang-switch .active-lang {
    opacity: 1;
    text-decoration: underline;
}

.lang-switch span {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

@media (max-width: 768px) {
    .lang-switch {
        display: none !important;
    }
}

/* =========================================================
   9) DESKTOP MAIN MENU
========================================================= */
.desktop-main-menu {
    position: absolute;
    top: 80px;
    right: 490px;
    width: 340px;
    background: #fff;
    border-radius: 8px;
    padding: 18px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: 0.28s;
    z-index: 26;
}

.desktop-main-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.desktop-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 10px;
}

.desktop-nav-list li {
    margin-bottom: 14px;
    padding: 10px 4px;
    transition: background 0.18s ease;
}

.desktop-nav-list li:last-child {
    margin-bottom: 0;
}

.desktop-nav-list li:hover {
    background: rgba(0, 0, 0, 0.06);
    border-radius: 6px;
}

/* Link */
.desktop-menu-link {
    text-decoration: none;
    color: #222;
    font-size: 16px;
    font-weight: 500;
    padding-bottom: 3px;
    display: inline-block;
    position: relative;
    transition: color 0.18s, transform 0.18s ease;
}

.desktop-menu-link::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background: #d60000;
    transition: width 0.25s ease;
}

.desktop-menu-link:hover {
    color: #d60000;
}

.desktop-menu-link:hover::after {
    width: 100%;
}

.desktop-menu-link.active {
    color: #d60000;
}

.desktop-menu-link.active::after {
    width: 100%;
}

/* Responsive */
@media (max-width: 1600px) {
    .desktop-main-menu {
        right: 260px;
    }
}

@media (max-width: 1400px) {
    .desktop-main-menu {
        right: 140px;
    }
}

@media (max-width: 768px) {
    .desktop-main-menu {
        display: none !important;
    }
}

/* =========================================================
   10) MOBILE MAIN MENU
========================================================= */

.mobile-main-menu {
    position: fixed;
    top: 118px !important;
    left: 0;
    width: 100%;
    background: #fff;

    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s ease;

    z-index: 40 !important; /* ขึ้นมาสุด */
}

.mobile-main-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.mobile-main-menu a {
    text-decoration: none !important;
    color: #222;
    transition: color 0.18s ease, padding-left 0.18s ease;
}

.mobile-main-menu a:hover {
    color: #d60000;
    padding-left: 6px;
}

/* =========================================================
   11) BREADCRUMB
========================================================= */

.breadcrumb {
    background: none;
    padding: 0;
    margin: 16px 0 24px;
}

.breadcrumb-item + .breadcrumb-item {
    padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: none;
}

.breadcrumb .breadcrumb-item a {
    text-decoration: none;
    color: #333;
    font-weight: 700;
}

.breadcrumb .breadcrumb-item.active {
    color: #555;
    font-weight: 600;
}

.breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

.separator-icon {
    font-size: 12px;
    color: #666;
    margin: 0 6px;
}

/* =========================================================
   MOBILE (≤575px)
========================================================= */
@media (max-width: 575.98px) {
    .breadcrumb {
        margin: 8px 0 12px;
    }

    .breadcrumb .breadcrumb-item a,
    .breadcrumb .breadcrumb-item span,
    .breadcrumb .breadcrumb-item.active {
        font-size: 0.85rem;
    }

    .separator-icon {
        font-size: 10px;
        margin: 0 4px;
    }
}

/* =========================================================
   TABLET (576–991px)
========================================================= */
@media (min-width: 576px) and (max-width: 991.98px) {
    .breadcrumb {
        margin: 12px 0 16px;
    }

    .breadcrumb .breadcrumb-item a,
    .breadcrumb .breadcrumb-item.active {
        font-size: 0.95rem;
    }

    .separator-icon {
        font-size: 11px;
        margin: 0 5px;
    }
}

/* =========================================================
   DESKTOP (≥992px)
========================================================= */
@media (min-width: 992px) {
    .breadcrumb {
        margin: 16px 0 24px;
    }

    .breadcrumb .breadcrumb-item a,
    .breadcrumb .breadcrumb-item.active {
        font-size: 1rem;
    }
}

/* =========================================================
   13) PREVIEW IMAGE
========================================================= */
.preview-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-placeholder {
    font-size: 64px;
    color: #bcbcbc;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.no-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f1f1f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 80px;
    color: #ccc;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: 0.2s;
}

.gallery-thumb:hover {
    border-color: #d60000;
}

/* =========================================================
   15) NEWS CAROUSEL (FIXED)
========================================================= */

.news-carousel-wrapper {
    max-width: 1200px;
    padding-top: 1.5rem;
    margin: 0 auto;
    overflow: hidden;
}

/* ===== Carousel Item (ตัวคุมความสูงจริง) ===== */
#carouselNews .carousel-item {
    max-height: 520px;
}

/* ===== Image ===== */
.news-carousel-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    
    /* Safari / iOS fix */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* ===== Placeholder ===== */
.news-carousel-placeholder {
    width: 100%;
    height: 100%;
    background: #f4f4f4;
    border-radius: 14px;
}

/* ===== Indicators ===== */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    background-color: #d60000;
    border-radius: 50%;
    opacity: 0.25;
}

.carousel-indicators .active {
    opacity: 1;
}

.image-only {
    cursor: default;
}

/* ===== ปิด smooth-carousel ที่ชน Bootstrap ===== */
/* ใช้ของ Bootstrap ดีที่สุด */
.smooth-carousel {
    will-change: transform;
}

/* =========================================================
   NEWS LISTING
========================================================= */

.news-card-link {
    text-decoration: none;
    color: inherit;
}

.news-card-image {
    height: 220px;
    background: #f8f8f8;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-placeholder {
    height: 100%;
    background: #f0f0f0;
}

.news-title {
    min-height: 48px;
    line-height: 1.3;
}

.news-summary {
    min-height: 48px;
}

/* =========================================================
   NEWS SHOW PAGE
========================================================= */

.news-main-image img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.news-placeholder-big {
    height: 350px;
    background: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* =========================================================
   PREV / NEXT BUTTONS
========================================================= */

.custom-prev,
.custom-next {
    width: 45px;
    height: 45px;
    background: #d60000;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin-inline: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    transition: background 0.2s ease, transform 0.2s ease;
}

.custom-prev:hover,
.custom-next:hover {
    background: #b00000;
    transform: translateY(-50%) scale(1.08);
}

.custom-prev i,
.custom-next i {
    font-size: 20px;
    color: #fff;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 992px) {
    #carouselNews .carousel-item {
        height: 340px;
    }

    .custom-prev,
    .custom-next {
        width: 42px;
        height: 42px;
    }
}

@media (max-width: 768px) {
    #carouselNews .carousel-item {
        height: 240px;
    }

    .news-carousel-wrapper {
        max-width: 100%;
        padding-top: 2.3rem;
        margin: 0;
    }

    .custom-prev,
    .custom-next {
        width: 38px;
        height: 38px;
    }

    .custom-prev i,
    .custom-next i {
        font-size: 14px;
    }

    .carousel-indicators {
        margin-top: 10px !important;
    }
}

/* =========================================================
   16) SHORT CATEGORY MENU
========================================================= */
.category-short-menu {
    gap: 35px 30px !important;
}

.short-menu-item {
    text-decoration: none;
    color: inherit;
    width: 90px;
}

.short-menu-box {
    width: 90px;
    height: 90px;
    background: #fff;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;

    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);

    transition: 0.25s ease;
}

.short-menu-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.12);
}

.short-menu-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: auto;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.short-menu-placeholder {
    font-size: 38px;
    opacity: 0.65;
    color: #888;
    transition: 0.2s;
}

.short-menu-box:hover .short-menu-placeholder {
    opacity: 1;
    color: #d60000;
}

.short-menu-title {
    margin-top: 10px;
    font-weight: 600;
    font-size: 14px;
}

.dropdown-toggle::after {
    display: none !important;
}

.dropdown .dropdown-menu {
    min-width: 160px;
    top: 70% !important;
    left: 0 !important;
    transform: none !important;
}

/* Fade Up ตอนโหลด */
.short-menu-item {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.6s ease forwards;
}

.short-menu-item:nth-child(1) {
    animation-delay: 0.05s;
}
.short-menu-item:nth-child(2) {
    animation-delay: 0.1s;
}
.short-menu-item:nth-child(3) {
    animation-delay: 0.15s;
}
.short-menu-item:nth-child(4) {
    animation-delay: 0.2s;
}
.short-menu-item:nth-child(5) {
    animation-delay: 0.25s;
}

/* เพิ่ม hover แบบ spring นิด ๆ */
.short-menu-box {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.short-menu-box:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: 0 16px 28px rgba(0, 0, 0, 0.16);
}

/* Mobile */
@media (max-width: 480px) {
    .dropdown .dropdown-menu {
        min-width: 160px;
        top: 110% !important;
        left: 0 !important;
        transform: none !important;
    }

    .short-menu-item,
    .short-menu-box {
        width: 72px;
        height: 72px;
    }

    .short-menu-icon {
        width: 40px;
        height: 40px;
    }

    .short-menu-title {
        font-size: 12px;
    }
}

/* =========================================================
   17) FILTER SIDEBAR
========================================================= */
.filter-sidebar {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    top: 90px;
}

/* Title */
.filter-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

/* Section */
.filter-section-header {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    color: #374151;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.15s ease;
}

.filter-section-header:hover {
    background: #eef2f7;
}

/* Lists */
.filter-list {
    list-style: none;
    padding-left: 0;
    margin-top: 10px;
}

.filter-sublist {
    list-style: none;
    padding-left: 18px;
    margin-top: 6px;
}

.filter-item,
.filter-subitem {
    margin-bottom: 8px;
}

/* Checkbox */
.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.filter-name {
    font-weight: 500;
    font-size: 0.95rem;
    color: #374151;
}

.filter-count {
    font-size: 0.85rem;
    color: #6b7280;
}

.filter-checkbox:hover .filter-name {
    color: #0ea5e9;
}

/* Price input */
.price-input {
    width: 80px;
    padding: 4px 6px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

/* Range slider */
.range-slider {
    position: relative;
    height: 40px;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    top: 26.5%;
    pointer-events: none;
    -webkit-appearance: none;
    background: none;
    z-index: 40;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: all;
    width: 18px;
    height: 18px;
    background: #ff0000;
    border-radius: 50%;
    cursor: pointer;
    -webkit-appearance: none;
}

.slider-track {
    position: absolute;
    height: 6px;
    background: #ddd;
    border-radius: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
}

.slider-track::after {
    content: "";
    position: absolute;
    height: 6px;
    background: #ff0000;
    border-radius: 4px;
    top: 0;
    left: 0;
    right: 0;
}

/* Responsive: hide sidebar on mobile */
@media (max-width: 991px) {
    /* ซ่อน Sidebar บนมือถือ */
    .filter-sidebar {
        display: none !important;
    }

    /* ปุ่ม Filter บนมือถือ */
    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 8px;
        border: 1px solid #3b82f6;
        background: #fff;
        color: #3b82f6;
        font-weight: 600;
        cursor: pointer;
    }

    /* MOBILE OFFCANVAS */
    .offcanvas-body .filter-section-header {
        padding: 10px 12px;
    }

    .offcanvas-body .filter-name {
        font-size: 1rem;
    }

    .offcanvas-body .filter-sublist {
        padding-left: 14px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .filter-section-header {
        padding: 9px 10px;
    }
    .filter-name {
        font-size: 0.9rem;
    }
    .filter-count {
        font-size: 0.8rem;
    }
}

#mobileFilter {
    z-index: 9999 !important;
}

/* =========================================================
   18) PRODUCT SECTION WRAPPER
========================================================= */
.product-section-wrapper {
    max-width: 1200px;
    padding: 24px 28px;
    margin: 40px auto;
    background: #fafafa;
    border-radius: 16px;
    border: 1px solid #e6e6e6;
}

.product-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
}

.see-all-link {
    font-size: 15px;
    font-weight: 700;
    color: #d60000;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.see-all-link:hover {
    text-decoration: underline;
}

/* Grid */
.product-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
}

.no-product-state {
    text-align: center;
    background: #fafafa;
    border-radius: 16px;
    margin: 40px auto;
    max-width: 520px;
}

.no-product-icon {
    font-size: 48px;
    color: #ccc;
}

.no-product-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.no-product-desc {
    font-size: 14px;
    color: #777;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-section-wrapper {
        padding: 20px;
    }

    .product-grid {
        gap: 20px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .section-title {
        font-size: 22px;
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .section-title {
        font-size: 20px;
    }

    .product-section-wrapper {
        padding: 16px;
        border-radius: 0;
        border: 0;
    }
}

/* =========================================================
   19) PRODUCT GRID — 6 PER ROW (SMALL GRID)
========================================================= */
.small-card-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .small-card-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .small-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile slide */
.mobile-slide-wrapper {
    overflow-x: auto;
    padding-bottom: 10px;
}

.mobile-slide-container {
    display: flex;
    gap: 12px;
    scroll-snap-type: x mandatory;
    padding-left: 5px;
}

.slide-card {
    flex: 0 0 48%;
    scroll-snap-align: start;
    text-decoration: none;
    color: inherit;
}

/* =========================================================
   20) SMALL PRODUCT CARD
========================================================= */
.small-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    padding-bottom: 10px;
}

.small-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.12);
}

.small-card .product-image {
    width: 100%;
    background: #f7f7f7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.small-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.small-card .no-image {
    width: 100%;
    height: 100%;
    font-size: 22px;
}

.small-card .product-name {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    height: 32px;
    line-height: 1.3;
    overflow: hidden;
    color: #333;
    text-decoration: none;
}

.small-card .product-price {
    color: #e60023;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
}

.small-card .contact-btn {
    width: 100%;
    border: none;
    background: #e60023;
    color: white;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s ease;
}

.small-card .contact-btn:hover {
    background: #ac1128;
}

/* =========================================================
   21) PRODUCT CARD — FULL VERSION (DUPLICATE GROUP)
========================================================= */
.product-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: 0.25s ease;
}

.product-link {
    text-decoration: none !important;
    color: inherit !important;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.09);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.product-image {
    background: #fafafa;
    border-bottom: 1px solid #ececec;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px 10px 0px 0px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0px 0px;
}

.no-image {
    font-size: 38px;
    color: #ccc;
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
}

.product-card .product-name {
    font-size: 15px;
    font-weight: 700;
    min-height: 40px;
    line-height: 1.3;
    color: #333;
    text-decoration: none;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 20px;
    font-weight: 800;
    color: #d60000;
    margin-bottom: 10px;
}

.contact-btn {
    margin-top: auto;
    background: #d60000;
    color: white;
    padding: 10px 14px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    width: 100%;
    transition: 0.2s ease;
}

.contact-btn:hover {
    background: #b00000;
    color: white;
}

@media (max-width: 576px) {
    .product-image {
        aspect-ratio: auto;
    }
    
    .product-name {
        font-size: 14px;
        min-height: 36px;
    }

    .product-price {
        font-size: 18px;
    }

    .contact-btn {
        padding: 9px 12px;
        font-size: 14px;
    }
}

/* =========================================================
   22) ANIMATIONS
========================================================= */
@keyframes fadeZoom {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   23) FOOTER
========================================================= */

.footer {
    background: #fff;
    border-top: 1px solid #eee;
}

.footer-wrap {
    min-height: 170px; /* ให้ความสูงใกล้รูป */
    display: flex;
    align-items: center; /* ทุกอย่างกึ่งกลางแนวตั้ง */
    justify-content: center;
    gap: 45px;
    padding: 26px 0;
}

/* LOGO */
.footer-logo img {
    max-height: 70px; /* ปรับให้ใกล้รูป */
    display: block;
}

/* DIVIDER */
.footer-divider {
    width: 2px;
    height: 90px;
    background: #000000; /* เส้นเทาเข้มแบบในรูป */
    opacity: 0.7;
}

/* RIGHT SIDE */
.footer-right {
    display: flex;
    align-items: flex-start;
    gap: 66px; /* ช่องว่างเมนู vs contact */
}

/* MENU */
.footer-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-menu li {
    margin: 0 0 6px 0;
}
.footer-menu a {
    text-decoration: none;
    color: #111;
    font-size: 16px;
}
.footer-menu a:hover {
    color: #dc3545;
}

/* CONTACT */
.footer-contact {
    font-size: 16px;
    color: #111;
    min-width: 240px;
}
.footer-contact-title {
    font-weight: 600;
    margin-bottom: 8px;
}

/* SOCIAL */
.footer-social {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.social-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 16px;
}
.social-circle.facebook {
    background: #1877f2;
}
.social-circle.line {
    background: #06c755;
}
.line-text {
    font-size: 10px;
    font-weight: 700;
}

/* CONTACT ITEMS */
.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.footer-contact-item i {
    font-size: 16px;
    color: #111;
}

/* RED BAR */
.footer-redbar {
    height: 30px; /* หนาแบบรูป */
    background: #ff0000;
}

/* RESPONSIVE: มือถือให้เรียงลง + ซ่อนเส้น */
@media (max-width: 767.98px) {
    .footer-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 16px;
    }
    .footer-right {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    .footer-contact {
        min-width: auto;
    }
    .footer-contact-item {
        justify-content: center;
    }
    .footer-social {
        justify-content: center;
    }
}
