:root {
    --ah-primary: #194185;
    --ah-primary-light: #1570EF;
    --ah-text: #1D2939;
    --ah-text-secondary: #475467;
    --ah-text-muted: #667085;
    --ah-border: #EAECF0;
    --ah-border-strong: #D0D5DD;
    --ah-bg-subtle: #F9FAFB;
    --ah-radius: 14px;
    --ah-transition: 0.25s ease;
}

h2 {
    font-family: Kanit;
    font-size: 24px;
    font-weight: 400;
    margin: 0px;
}

.page-h1 {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.01em;
    color: var(--ah-text-muted);
    margin: 14px 0 10px;
}

@media (min-width: 600px) {
    .page-h1 {
        font-size: 15px;
        margin: 18px 0 14px;
    }
}

/* ---------- Hero slider ---------- */
.sideswiper {
    border-radius: var(--ah-radius);
    overflow: hidden;
}

.swiper-slide>a>img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

@media (min-width: 600px) {
    .swiper-slide>a>img {
        width: 100%;
    }
}

.swiper-button-next-1>a,
.swiper-button-prev-1>a {
    backdrop-filter: blur(4px);
    transition: transform var(--ah-transition), background var(--ah-transition);
}

.swiper-button-next-1>a:hover,
.swiper-button-prev-1>a:hover {
    background: #FFFFFF !important;
    transform: scale(1.06);
}

.swiper-button-next-1>a>i {
    font-size: 2.6rem;
    margin-left: -2px;
    margin-top: -2px
}

.swiper-button-prev-1>a>i {
    font-size: 2.6rem;
    margin-left: -7px;
    margin-top: -2px;
}

.swiper-pagination-bullet {
    height: 10px;
    width: 10px;
    background-color: rgba(255, 255, 255, 0.55);
    border: none;
    opacity: 1;
    transition: background-color var(--ah-transition), transform var(--ah-transition);
}

.swiper-pagination-bullet-active {
    height: 10px;
    width: 10px;
    background-color: #FFFFFF;
    border: none;
    transform: scale(1.15);
}

/* ---------- Section headers ---------- */
.header {
    position: relative;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    padding-bottom: 1.1rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--ah-border);
}

.header h2 {
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ah-text);
}

.header>span {
    position: absolute;
    right: 0;
    bottom: 1.1rem;
    font-size: 14px;
    cursor: pointer;
}

.header>span a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.header>span a::after {
    content: "\2192";
    display: inline-block;
    transition: transform var(--ah-transition);
}

.header>span a:hover::after {
    transform: translateX(4px);
}

/* ---------- Product cards ---------- */
.Upcoming .swiper-slide,
.Popular .swiper-slide {
    background: #fff;
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    overflow: hidden;
    padding-bottom: 14px;
    transition: transform var(--ah-transition), box-shadow var(--ah-transition), border-color var(--ah-transition);
}

.Upcoming .swiper-slide:hover,
.Popular .swiper-slide:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 28px -12px rgba(16, 24, 40, 0.16);
    border-color: transparent;
}

.box-imge {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.box-imge img {
    transition: transform 0.4s ease;
}

.swiper-slide:hover .box-imge img {
    transform: scale(1.06);
}

.box-imge>.d-flex {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    gap: 6px !important;
    flex-wrap: wrap;
}

.box-imge>.status-product {
    position: absolute;
    top: 1%;
    left: 0;
    font-size: 12px;
    background-color: #1570EF;
    color: white;
    margin-left: 0px;
}

.box-imge>.status-time-product {
    position: absolute;
    bottom: 1%;
    left: 0;
    font-size: 12px;
    background-color: #DC6803;
    color: white;
    margin-left: 0px;
    border-radius: 5px;
}

.box-imge>.d-flex>.status-product,
.box-imge>.d-flex>.status-time-product {
    border-radius: 20px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 500;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.18);
}

.box-imge>.d-flex>.status-product {
    background-color: #1570EF;
    color: white;
    margin-left: 0px;
}

.box-imge>.d-flex>.status-time-product {
    background-color: #DC6803;
    color: white;
    margin-left: 0px;
}

.title_product {
    color: var(--ah-text);
    font-size: 16px;
    font-weight: 400;
    height: 50px;
    padding: 10px 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    max-height: calc(1.5em * 3);
}

.pirce_product {
    color: var(--ah-text-secondary);
    font-weight: 300;
    padding: 6px 12px 10px;
    font-size: clamp(14px, 2vw, 16px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.Upcoming .swiper-slide>a,
.Popular .swiper-slide>a {
    display: block;
    padding: 0 12px;
}

.btnNomal {
    width: 100%;
    color: var(--ah-primary);
    font-weight: 400;
    background-color: unset;
    border: 1px solid var(--ah-border-strong);
    border-radius: 8px;
    box-shadow: unset;
    font-size: 14px;
    transition: background-color var(--ah-transition), border-color var(--ah-transition), transform 0.15s ease;
}

.btnNomal:hover {
    background-color: var(--ah-primary) !important;
    border-color: var(--ah-primary) !important;
    color: #fff !important;
}

.btnNomal:active {
    transform: scale(0.98);
}

.btn-floating i {
    color: #194185d6;
}

/* ---------- Shops carousel ---------- */
.Shops .box-imge {
    border-radius: 20px;
    border: 1px solid var(--ah-border);
    width: 98%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 1.25rem 0;
    transition: transform var(--ah-transition), box-shadow var(--ah-transition), border-color var(--ah-transition);
}

.Shops .box-imge:hover {
    transform: translateY(-4px);
    border-color: var(--ah-primary);
    box-shadow: 0 12px 24px -10px rgba(16, 24, 40, 0.16);
}

.Shops .box-imge img {
    height: 64px;
    width: 64px;
    border-radius: 64px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.Shops .box-imge:hover img {
    transform: scale(1.08);
}

.Shops .box-imge h6 {
    font-size: 15px;
    font-weight: 400;
    color: var(--ah-text);
    margin-top: 0.75rem;
}

/* ---------- Empty states ---------- */
.no_data {
    display: flex;
    align-items: center;
    justify-self: center;
    flex-direction: column;
    min-height: 318px;
    justify-content: center;

    img {
        width: 128px;
        height: 128px;
    }

    h5 {
        text-align: center;
        color: var(--ah-text);
        font-weight: 400;
        font-size: 16px;
    }

    p {
        text-align: center;
        color: var(--ah-text-secondary);
        font-weight: 300;
        font-size: 16px;
        margin-top: 0px;
    }

    a {
        background-color: var(--ah-primary);
        color: white;
        margin-top: 1rem;
        padding: 0;
        border-radius: 8px;
    }
}

.noitems {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 398px;
    flex-direction: column;

    img {
        width: 128px;
        height: 128px;
        opacity: 0.85;
    }

    p:first-of-type {
        font-size: 16px;
        color: var(--ah-text);
        font-weight: 400;
        margin: 0;
    }

    p:nth-of-type(2) {
        color: var(--ah-text-secondary);
        font-size: 16px;
        font-weight: 300;
        margin: 0;
    }
}

#filter_footer {
    display: flex;
    justify-content: space-between;

    .select_page {
        display: flex;
        align-items: center;

        .select-wrapper input.select-dropdown {
            max-width: 60px;
            padding-left: 10px;
            border-bottom: 1px solid var(--ah-border-strong);
            font-size: 16px;
            font-weight: 300;
        }
    }

    .pagination li {
        vertical-align: middle;
        border: 1px solid transparent;
    }

    .pagination li a {
        font-size: 14px;
        font-weight: 300;
        vertical-align: middle;
    }

    .pagination li i {
        font-size: 14px;
        font-weight: 300;
        vertical-align: initial;
    }

    .pagination li.active {
        background-color: unset;
        border: 1px solid var(--ah-border-strong);
    }

    .pagination li.active a {
        color: var(--ah-primary) !important;
    }
}

@media only screen and (max-width: 600px) {
    #listProducts {
        .header {
            padding: 1rem 1rem 1rem 0.75rem !important;
        }

        #favorites {
            padding: 0px;
        }

        .card .card-content {
            padding: 24px 0;
        }
    }
}

/* ---------- Promo article sections ---------- */
.article_1 {
    display: flex;
    flex-direction: column-reverse;
    border-radius: var(--ah-radius);
    overflow: hidden;

    .box-1 {
        background-color: var(--ah-bg-subtle);
        display: flex;
        flex-direction: column;
        align-content: center;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
        height: 428px;
        text-align: center;
        padding: 0 1.5rem;

        h2 {
            font-size: 26px;
            color: var(--ah-text);
            font-weight: 500;
            letter-spacing: -0.01em;
            margin: 0;
        }

        p {
            font-weight: 300;
            font-size: 16px;
            color: var(--ah-text-secondary);
        }

        a {
            color: white;
            width: auto;
            padding: 0 2rem;
            background: var(--ah-primary);
            border-radius: 999px;
            transition: transform 0.2s ease, box-shadow var(--ah-transition);
        }

        a:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px -8px rgba(25, 65, 133, 0.5);
        }
    }

    .box-2 {
        height: 428px;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;

        img {
            height: 100%;
            max-width: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }
    }

    &:hover .box-2 img {
        transform: scale(1.03);
    }
}

@media (min-width: 600px) {
    .article_1 {
        flex-direction: row;
        max-height: 485.6px;

        div {
            width: 50%;
        }

        .box-1 {
            padding-left: 3rem;
            align-content: center;
            align-items: flex-start;
            justify-content: center;
            height: 428px;
            text-align: left;
        }
    }
}

/* ---------- Features ---------- */
.features {
    padding: 1rem 0 4rem;
}

.features-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2rem;
}

.features-head h2 {
    font-size: 26px;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ah-text);
    margin: 0 0 0.5rem;
}

.features-head p {
    font-size: 15px;
    font-weight: 300;
    color: var(--ah-text-secondary);
    margin: 0;
}

/* 6 การ์ด: 1 / 2 / 3 คอลัมน์ — หารลงตัวทุก breakpoint ไม่มีแถวที่เหลือช่องว่าง */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 993px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    background: #fff;
    border: 1px solid var(--ah-border);
    border-radius: var(--ah-radius);
    padding: 24px;
    transition: transform var(--ah-transition), box-shadow var(--ah-transition), border-color var(--ah-transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: transparent;
    box-shadow: 0 16px 28px -14px rgba(16, 24, 40, 0.2);
}

.feature-card .icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--ah-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
}

.feature-card .icon i {
    color: var(--ah-primary);
    font-size: 22px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 500;
    color: var(--ah-text);
    margin: 0 0 6px;
}

.feature-card p {
    font-size: 14px;
    font-weight: 300;
    line-height: 1.65;
    color: var(--ah-text-secondary);
    margin: 0;
}

.article_2 {
    padding: 5rem 1rem;
    text-align: center;

    h2 {
        font-size: 26px;
        color: var(--ah-text);
        font-weight: 500;
        letter-spacing: -0.01em;
        margin: 0 0 0.75rem;
    }

    p {
        font-weight: 300;
        font-size: 16px;
        color: var(--ah-text-secondary);
        max-width: 720px;
        margin: 0 auto;
        line-height: 1.7;
    }
}

@media (min-width: 600px) {
    .article_2 {
        padding: 5rem 5rem;
        text-align: center;
    }
}

.article_3 {
    padding: 5rem 1rem;
    text-align: center;
    background-color: var(--ah-bg-subtle);
    border-radius: var(--ah-radius);

    h2 {
        font-size: 26px;
        color: var(--ah-text);
        font-weight: 500;
        letter-spacing: -0.01em;
        margin: 0 0 0.75rem;
    }

    p {
        font-weight: 300;
        font-size: 16px;
        color: var(--ah-text-secondary);
    }

    a {
        color: white;
        width: auto;
        padding: 0 2rem;
        background: var(--ah-primary) !important;
        border-radius: 999px;
        transition: transform 0.2s ease, box-shadow var(--ah-transition);
    }

    a:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px -8px rgba(25, 65, 133, 0.5);
    }
}

@media (min-width: 600px) {
    .article_3 {
        padding: 5rem 5rem;
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
    }
}
