.home-page {
    padding: 0;
}

.home-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.heroSwiper {
    position: relative;
    width: 100%;
}

.hero-slide {
    position: relative;
    width: 100%;
    height: auto;
}

.hero-slide picture {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    transition: transform 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.heroSwiper:hover .hero-image {
    transform: scale(1.025);
}

/* คลิกได้ทั้ง Hero Banner โดยไม่เปลี่ยนโครงสร้าง/ขนาดรูป */
.hero-slide-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    cursor: pointer;
}


.heroSwiper {
    overflow: hidden;
}

/* =========================================
   OVERLAY
========================================= */

.hero-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    align-items: center;

    z-index: 3;
    pointer-events: none;

    background: linear-gradient(90deg,
            rgba(9, 19, 79, .82) 0%,
            rgba(9, 19, 79, .58) 38%,
            rgba(9, 19, 79, .18) 68%,
            rgba(9, 19, 79, 0) 100%);
}

.hero-content {
    position: relative;
    z-index: 4;
    width: min(620px, 100%);
    color: #ffffff;
}

.hero-title {
    margin: 0 0 20px;

    font-size: clamp(38px, 5vw, 72px);
    line-height: 1.1;
    font-weight: 700;

    color: #ffffff;
}

.hero-description {
    max-width: 560px;
    margin-bottom: 30px;

    color: rgba(255, 255, 255, .88);

    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.7;
}


/* =========================================
   BUTTON
========================================= */

.hero-btn {
    position: relative;
    z-index: 5;
    pointer-events: auto;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;
    padding: 12px 28px;

    border: 1px solid #F63D37;
    border-radius: 8px;

    background: #F63D37;
    color: #ffffff;

    text-decoration: none;
    font-weight: 600;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease;
}

.hero-btn:hover {
    background: #df302b;
    border-color: #df302b;

    transform: translateY(-2px);
}


/* =========================================
   SWIPER ARROWS
========================================= */

.heroSwiper .swiper-button-prev,
.heroSwiper .swiper-button-next {
    z-index: 10;
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border-radius: 50%;
    background: #09134F;
    color: #ffffff;

    /* ซ่อนตอนปกติ */
    opacity: 0;
    visibility: hidden;

    transition:
        opacity .3s ease,
        visibility .3s ease,
        background .2s ease,
        transform .3s ease;
}


/* ตำแหน่งตอนซ่อน */
.heroSwiper .swiper-button-prev {
    left: 24px;
    transform: translateX(-10px);
}

.heroSwiper .swiper-button-next {
    right: 24px;
    transform: translateX(10px);
}


/* แสดงเมื่อ Hover ที่ Hero */
.heroSwiper:hover .swiper-button-prev,
.heroSwiper:hover .swiper-button-next {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}


/* ลูกศร */
.heroSwiper .swiper-button-prev::after,
.heroSwiper .swiper-button-next::after {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    margin: 0;

    font-size: 17px;
    line-height: 1;

    color: #ffffff;
}


/* Hover ที่ตัวปุ่ม */
.heroSwiper .swiper-button-prev:hover,
.heroSwiper .swiper-button-next:hover {
    background: #F63D37;
}


/* =========================================
   PAGINATION
========================================= */

.heroSwiper .swiper-pagination {
    z-index: 10;
}

.heroSwiper .swiper-pagination-bullet {
    width: 9px;
    height: 9px;

    background: #ffffff;
    opacity: .65;
}

.heroSwiper .swiper-pagination-bullet-active {
    width: 28px;

    border-radius: 20px;

    background: #09134F;
    opacity: 1;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {

    .hero-slide,
    .hero-image {
        height: 520px;
    }

    .hero-overlay {
        align-items: flex-end;

        padding-bottom: 55px;

        background: linear-gradient(0deg,
                rgba(9, 19, 79, .92) 0%,
                rgba(9, 19, 79, .62) 38%,
                rgba(9, 19, 79, .12) 75%,
                rgba(9, 19, 79, 0) 100%);
    }

    .hero-content {
        width: 100%;
    }

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

    .hero-description {
        font-size: 16px;
    }

    .heroSwiper .swiper-button-prev,
    .heroSwiper .swiper-button-next {
        display: none;
    }
}



/* =========================================================
   HOME STATS
========================================================= */

.home-stats {
    position: relative;
    overflow: hidden;
    padding: 48px 0;
    background:
        linear-gradient(90deg,
            #ffffff 0%,
            #ffffff 72%,
            #f7f9fd 100%);
}


/* subtle background pattern */

.home-stats::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -80px;
    width: 420px;
    height: 220px;
    background:
        radial-gradient(circle,
            rgba(12, 24, 106, 0.06) 1px,
            transparent 1px);

    background-size: 9px 9px;
    transform: translateY(-50%);

    pointer-events: none;
}


.home-stats-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 190px 1px minmax(0, 1fr);
    align-items: center;
    gap: 38px;
    width: calc(100% - 80px);
    max-width: 1280px;
    margin: 0 auto;
}


/* =========================
   TITLE
========================= */

.home-stats-title h2 {
    margin: 0;

    color: #09134F;

    font-size: 31px;
    font-weight: 700;
    line-height: 1.08;

    letter-spacing: -0.5px;
}


/* =========================
   DIVIDER
========================= */

.home-stats-divider {
    width: 1px;
    height: 72px;

    background: #cfd5e2;
}


/* =========================
   GRID
========================= */

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px;
}


/* =========================
   ITEM
========================= */

.home-stat-item {
    min-width: 0;
}


.home-stat-item strong {
    display: block;

    margin-bottom: 5px;

    color: #09134F;

    font-size: 34px;
    font-weight: 700;
    line-height: 1;
}


/* ตัวเลข */
.home-stat-item .stat-number {
    color: #09134F;
}

/* เครื่องหมาย + */
.home-stat-item .stat-plus {
    color: #F63D37;
}


.home-stat-item h3 {
    margin: 0 0 5px;

    color: #09134F;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}


.home-stat-item p {
    margin: 0;

    color: #697080;

    font-size: 12px;
    line-height: 1.5;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .home-stats-container {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .home-stats-divider {
        width: 100%;
        height: 1px;
    }

    .home-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 40px;
    }

}


@media (max-width: 600px) {

    .home-stats {
        padding: 36px 0;
    }

    .home-stats-container {
        width: calc(100% - 30px);
    }

    .home-stats-title h2 {
        font-size: 27px;
    }

    .home-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 20px;
    }

    .home-stat-item strong {
        font-size: 28px;
    }

}

/* =========================================================
   SECTION 3 : PRODUCT CATEGORIES
========================================================= */

.home-categories {
    padding: 90px 0;
    background-color: #F6F7F9;
}




/* =========================================================
   HEADER
========================================================= */

.home-categories-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 30px;
    margin-bottom: 36px;
}


/* =========================================================
   HEADING
========================================================= */

.home-categories-eyebrow {
    display: block;

    margin-bottom: 6px;

    font-size: var(--font-sm);
    font-weight: var(--font-medium);
    color: #09134F;
    letter-spacing: .04em;
}

.home-categories-heading h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: var(--font-h2);
    font-weight: var(--font-semibold);
    line-height: 1.3;
}


/* =========================================================
   VIEW ALL
========================================================= */

.home-categories-view-all {
    display: inline-flex;
    align-items: center;

    gap: 8px;
    padding-bottom: 3px;

    color: var(--color-primary);

    font-size: var(--font-sm);
    font-weight: var(--font-medium);

    transition:
        color var(--transition),
        border-color var(--transition);
}

.home-categories-view-all span {
    transition: transform var(--transition);
}

.home-categories-view-all:hover {
    color: #F63D37;

    border-color: #F63D37;
}

.home-categories-view-all:hover span {
    transform: translateX(4px);
}


/* =========================================================
   GRID
========================================================= */

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 20px;
}


/* =========================================================
   HOME CATEGORY GRID
========================================================= */

.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 16px;
}


/* =========================================================
   CATEGORY CARD
========================================================= */

.home-category-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #f0f1f5;
    border-radius: 14px;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.home-category-card:hover {

    box-shadow:
        0 10px 28px rgba(9, 19, 79, .08);
}


/* =========================================================
   IMAGE
========================================================= */

.home-category-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1.25 / 1;

    padding: 10px 14px 0;

    overflow: hidden;
}

.home-category-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    transition: transform .3s ease;
}




/* =========================================================
   NO IMAGE
========================================================= */

.home-category-no-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    color: #09134F;

    font-size: 20px;
    font-weight: 600;

    background: #f7f8fa;
}


/* =========================================================
   CONTENT
========================================================= */

.home-category-content {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 10px;

    min-height: 65px;

    padding: 8px 12px 12px;
}

.home-category-text {
    min-width: 0;
    flex: 1;
}

.home-category-text h3 {
    margin: 0;

    color: #09134F;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.home-category-text p {
    display: -webkit-box;

    margin: 2px 0 0;

    overflow: hidden;

    color: #09134F;

    font-size: 11px;
    font-weight: 400;
    line-height: 1.4;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}


/* =========================================================
   ARROW
========================================================= */

.home-category-arrow {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 18px;

    width: 18px;
    height: 18px;

    margin-bottom: 2px;

    background: #09134F;
    color: #ffffff;

    border-radius: 50%;

    font-size: 10px;
    line-height: 1;

    transition:
        background .2s ease,
        transform .2s ease;
}

.home-category-card:hover .home-category-arrow {
    background: #F63D37;
    transform: translateX(2px);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

    .home-categories-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .home-categories-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }

    .home-category-card {
        border-radius: 12px;
    }

    .home-category-image {
        aspect-ratio: 1.15 / 1;

        padding: 8px 8px 0;
    }

    .home-category-content {
        min-height: 58px;

        gap: 5px;

        padding: 6px 8px 9px;
    }

    .home-category-text h3 {
        font-size: 11px;
    }

    .home-category-text p {
        font-size: 9px;
    }

    .home-category-arrow {
        flex-basis: 17px;

        width: 17px;
        height: 17px;

        font-size: 9px;
    }

}


/* =========================================================
   SECTION 4 : DELIVERY BANNER
========================================================= */


.home-delivery-banner img {
    display: block;
    width: 100%;
    height: auto;
}



/* =========================================================
   SECTION 5 : TRUSTED CUSTOMERS
========================================================= */

.home-trusted-customers {
    padding: 70px 0;

    background: var(--color-white);
}

.trusted-customers-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);

    align-items: center;

    gap: 60px;
}


/* =========================================================
   HEADING
========================================================= */

.trusted-customers-heading {
    position: relative;
}

.trusted-customers-heading h2 {
    margin: 0;

    color: var(--color-primary);

    font-size: var(--font-h2);
    font-weight: var(--font-semibold);
    line-height: 1.35;
}

.trusted-customers-heading p {
    margin-top: 8px;

    color: var(--color-text-light);

    font-size: var(--font-sm);
    line-height: 1.6;
}


/* =========================================================
   LOGO AREA
========================================================= */

.trusted-customers-logos {
    position: relative;

    display: flex;
    flex-direction: column;

    gap: 20px;

    min-width: 0;

    overflow: hidden;
}


/*
 * Fade ซ้าย / ขวา
 */

.trusted-customers-logos::before,
.trusted-customers-logos::after {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;

    z-index: 2;

    width: 60px;

    pointer-events: none;
}

.trusted-customers-logos::before {
    left: 0;

    background:
        linear-gradient(to right,
            var(--color-white),
            transparent);
}

.trusted-customers-logos::after {
    right: 0;

    background:
        linear-gradient(to left,
            var(--color-white),
            transparent);
}


/* =========================================================
   LOGO TRACK
========================================================= */

.trusted-logo-track {
    display: flex;

    width: max-content;

    will-change: transform;
}

.trusted-logo-group {
    display: flex;
    align-items: center;

    gap: 50px;

    padding-right: 50px;

    flex-shrink: 0;
}


/* =========================================================
   LOGO ITEM
========================================================= */

.trusted-logo-item {
    display: flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 130px;

    width: 130px;
    height: 60px;

    color: var(--color-text-muted);

    font-size: var(--font-xs);
    font-weight: var(--font-medium);

    white-space: nowrap;
}


/*
 * ตอนใส่ภาพจริง
 */

.trusted-logo-item img {
    display: block;

    width: 100%;
    max-width: 120px;
    height: 50px;

    object-fit: contain;
}


/* =========================================================
   ANIMATION
========================================================= */

.trusted-logo-track-left {
    animation:
        trustedLogoLeft 28s linear infinite;
}

.trusted-logo-track-right {
    animation:
        trustedLogoRight 32s linear infinite;
}


@keyframes trustedLogoLeft {

    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }

}


@keyframes trustedLogoRight {

    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }

}


/* หยุดเมื่อ Hover */

.trusted-customers-logos:hover .trusted-logo-track {
    animation-play-state: paused;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .home-trusted-customers {
        padding: 60px 0;
    }

    .trusted-customers-layout {
        grid-template-columns: 220px minmax(0, 1fr);

        gap: 35px;
    }

    .trusted-logo-group {
        gap: 35px;

        padding-right: 35px;
    }

    .trusted-logo-item {
        flex-basis: 110px;

        width: 110px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .home-trusted-customers {
        padding: 48px 0;
    }

    .trusted-customers-layout {
        grid-template-columns: 1fr;

        gap: 30px;
    }

    .trusted-customers-heading h2 {
        font-size: 24px;
    }

    .trusted-customers-logos {
        gap: 16px;

        /*
         * ให้ Logo วิ่งกว้างถึงขอบ Container
         */
        width: 100%;
    }

    .trusted-logo-group {
        gap: 30px;

        padding-right: 30px;
    }

    .trusted-logo-item {
        flex-basis: 100px;

        width: 100px;
        height: 50px;
    }

    .trusted-logo-item img {
        max-width: 95px;
        height: 42px;
    }

    .trusted-customers-logos::before,
    .trusted-customers-logos::after {
        width: 30px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .trusted-logo-track {
        animation: none;
    }

}



/* =========================================================
   SECTION 6 : CONTACT BANNER
========================================================= */

.home-contact-banner {
    width: 100%;
}

.home-contact-banner img {
    display: block;

    width: 100%;
    height: auto;
}