/* Banner base (พื้นหลัง / ชื่อเรื่อง / รูป) อยู่ใน style.css ใต้ PAGE BANNER
   — ที่นี่เหลือเฉพาะค่าที่ต่างของหน้านี้ */
.gallery-banner {
    font-size: 18px;
}

.banner-boxs {
    display: grid;
    grid-template-columns: repeat(auto-fill, 263px);
    justify-content: center;
    gap: 1px;
}

.banner-box {
    display: block;
    text-align: center;
    background: #313131;
}

.banner-box h1 {
    font-size: 32px;
    font-weight: 700;
}

.gallery-tabs {
    position: sticky;
    top: var(--site-header-height, 150px);
    z-index: 90;
    display: flex;
    gap: 20px;
    padding: 14px 50px;
    background: #f5f4ef;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.gallery-tabs::-webkit-scrollbar {
    display: none;
    height: 0;
    width: 0;
}

.gallery-tab {
    flex: 0 0 auto;
    padding: 8px 16px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #333;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
}

.gallery-tab.is-active {
    background: var(--tab-color, #000);
    color: var(--tab-color-ink, #fff);
}

.gallery-card[hidden] {
    display: none;
}

.gallery-products .container,
.gallery-consult .container {
    max-width: 1180px;
}

.gallery-products-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gallery-title-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #000;
}

.gallery-products-title h1 {
    margin: 0;
    font-weight: 600;
    font-size: 32px;
}

.gallery-products-title small {
    font-weight: 400;
    font-size: 16px;
    color: #a6a6a6;
}

.gallery-products .gallery-list {
    grid-template-columns: repeat(auto-fit, 282px);
    gap: 15px;
}

.gallery-products .gallery-card {
    position: relative;
    background: #f5f5f5;
    border-radius: 5px;
}

/* hover: ป้ายชื่อประเภทมุมซ้ายบนของรูป (พื้นหลัง = สีประเภท มากับ style inline) */
.gallery-products .gallery-image {
    position: relative;
}

.gallery-products .gallery-type-badge {
    position: absolute;
    top: 10px;
    left: 15px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 5px 0 5px 0;
    font-size: 16px;
    font-weight: 400;
    opacity: 0;
    transform: translateY(-4px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
    pointer-events: none;
}

/* hover: overlay สี #27272733 คลุมเฉพาะรูป — รูปแบบเดียวกับ .product-image::after ของหน้า home */
.gallery-products .gallery-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #27272733;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-products .gallery-card:hover .gallery-type-badge,
.gallery-products .gallery-card:focus-visible .gallery-type-badge {
    opacity: 1;
    transform: translateY(0);
}

.gallery-products .gallery-card:hover .gallery-image::after,
.gallery-products .gallery-card:focus-visible .gallery-image::after {
    opacity: 1;
}

.gallery-products .gallery-image img {
    max-height: 183px;
}

.gallery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 15px;
}

.gallery-desc span {
    margin: 0;
    font-weight: 400;
    font-size: 16px;
    color: #333;
}

.gallery-desc p {
    margin: 0;
    font-weight: 400;
    font-size: 15px;
    color: #7c7c7c;
}

.gallery-type-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.gallery-consult {
    position: relative;
    overflow: hidden;
    background: #ff3a00;
}

.gallery-consult::before {
    content: "";
    position: absolute;
    bottom: -116px;
    left: 5px;
    width: 233px;
    height: 233px;
    border-radius: 50%;
    background: #f03700;
}

.gallery-consult::after {
    content: "";
    position: absolute;
    top: -150px;
    right: 150px;
    width: 306px;
    height: 306px;
    border-radius: 50%;
    background: #f03700;
}

.gallery-consult .consult-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 607px 400px;
    align-items: center;
    justify-content: space-between;
    color: #fff;
}

.gallery-consult .consult-content h1 {
    font-size: 64px;
    font-weight: 600;
    margin: 0;
}

.gallery-consult .consult-content small {
    font-size: 16px;
    font-weight: 400;
}

.gallery-consult .consult-btn {
    display: flex;
    justify-content: end;
    gap: 20px;
}

.consult-btn .my-btn {
    height: 57px;
}

.primary-btn {
    max-width: 183px;
    line-height: 57px;
    border-radius: 10px;

    background: #ffd600;
    color: #000000;
    transition: transform 0.3s ease;
}

.secondary-btn {
    max-width: 187px;
    line-height: 57px;
    border-radius: 10px;

    background: transparent;
    border: 1px solid #ffffff;
}

.primary-btn:hover {
    transform: scale(1.03);
}

.secondary-btn:hover {
    color: #dddddddd;
    border: 1px solid #dddddddd;
}

@media (max-width: 768px) {
    .gallery-tabs {
        padding: 14px 15px;
        scroll-snap-type: x mandatory;
        top: var(--site-header-height, 72px);
    }

    .gallery-banner .container,
    .gallery-products .container {
        padding: 0 15px 20px;
    }

    .gallery-consult .container {
        padding: 0 25px 20px;
    }

    .banner-boxs {
        grid-template-columns: repeat(auto-fill, 176px);
    }

    .banner-box h1 {
        font-size: 22px;
    }

    .banner-box p {
        font-size: 13px;
    }

    .gallery-tabs {
        gap: 10px;
    }

    .gallery-tab {
        padding: 5px 16px;
        font-size: 16px;
    }

    .gallery-products {
        padding: 25px 0;
    }

    .gallery-title-dot {
        width: 11px;
        height: 11px;
    }

    .gallery-products-title h1 {
        font-size: 27px;
    }

    .gallery-products .gallery-list {
        grid-template-columns: repeat(auto-fit, 167px);
    }

    .gallery-desc span {
        font-size: 15px;
        color: #000;
    }

    .gallery-desc p {
        font-size: 14px;
    }

    .gallery-type-dot {
        position: absolute;
        right: 15px;
        bottom: 13px;
    }

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

    .gallery-consult::before {
        bottom: -50px;
        left: -180px;
    }

    .gallery-consult::after {
        top: -100px;
        right: -100px;
    }

    .gallery-consult .consult-content {
        text-align: center;
        gap: 30px;
    }

    .consult-text {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }

    .gallery-consult .consult-content h1 {
        font-size: 48px;
        font-weight: 700;
    }

    .gallery-consult .consult-btn {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .consult-btn .my-btn {
        height: 46px;
    }

    .primary-btn {
        max-width: 268px;
        line-height: 46px;
    }

    .secondary-btn {
        max-width: 167px;
        line-height: 46px;
    }
}
