:root {
    --green: #2a7a4b;
    --green-2: #3ab54a;
    --deep: #0d4a2e;
    --cream: #f6f0ea;
    --text: #24313d;
    --muted: #6f7b86;
    --radius: 18px
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}

body {
    font-family: Nunito, system-ui, Segoe UI, Roboto, Arial;
    color: var(--text);
    background: #fbf7f3
}

.container {
    width: min(1180px, 92%);
    margin: auto
}

.center {
    text-align: center
}

.mt-28 {
    margin-top: 28px
}

/* Simple topbar just utk page single-file ni */
.topbar {
    background: #fff;
    border-bottom: 1px solid #eee
}

.topbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0
}

.brand {
    font-family: Fraunces, serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--deep);
    text-decoration: none
}

.brand span {
    color: var(--green-2)
}

.topmenu a {
    color: #53606b;
    text-decoration: none;
    margin-left: 22px;
    font-weight: 700
}

.btn {
    display: inline-block;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    text-decoration: none
}

.btn-cta {
    background: var(--green-2);
    color: #fff;
    box-shadow: 0 8px 18px rgba(51, 164, 82, .28)
}

.btn-cta:hover {
    filter: saturate(1.05) brightness(1.02)
}

.btn-outline {
    margin-top: 20px;
    border: 2px solid black !important;
    border-radius: 100px !important;
}

.btn-outline:hover {
    background: var(--green-2) !important;
    color: #ffffff !important;
}

/* HERO */
.hero-wrap {
    position: relative
}

/* Desktop */
.hero-swiper,
.hero-slide {
    height: 82vh !important;
}

/* Mobile */
@media (max-width:640px) {

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

    /* atau 60vh */
}

.hero-slide {
    width: 100%;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(to right, rgba(255, 220, 110, .35), rgba(255, 255, 255, 0)), var(--bg) center/cover no-repeat;
    position: relative
}

.hero-card {
    position: absolute;
    z-index: 2;
    width: min(520px, 86%);
    background: #fff;
    border-radius: 20px;
    padding: 28px 28px 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
    backdrop-filter: saturate(120%) blur(2px);
    /* positioning default — kanan & center vertical */
    right: 5.5%;
    top: 75%;
    transform: translateY(-50%);
    /* margin-right: 5.5%;  <-- buang */
}

.hero-title {
    font-family: Fraunces, serif;
    font-size: 30px;
    margin: 0 0 8px;
    color: #0f2d1e
}

.hero-desc {
    color: #4e5a64;
    line-height: 1.55;
    margin: 0 0 16px
}

.hero-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center
}

.swiper-pagination-bullet {
    background: #fff;
    opacity: .85
}

.swiper-pagination-bullet-active {
    background: var(--deep)
}

/* Sections */
.section {
    padding: 64px 0
}

.sec-title {
    font-family: Fraunces, serif;
    font-size: 26px;
    text-align: center;
    color: #183125;
    margin: 0 0 6px
}

.sec-title.lg {
    font-size: 34px;
    line-height: 1.25
}

.sec-sub {
    color: var(--deep);
    text-align: center;
    margin: 0 0 30px
}

/* Categories */
/* ====== CATEGORIES (match screenshot) ====== */
.section-cats {
    padding: 56px 0 28px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.section-cats .container {
    width: min(1180px, 92%);
    /* lebar padat macam gambar */
}

.cat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
    /* jarak antara kad */
}

/* KAD SAMA BESAR */
.cat-card {
    position: relative;
    overflow: hidden;
    height: 420px;
    /* <<< ubah tinggi kalau nak (400–440px cun) */
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
    display: block;
    isolation: isolate;
}

.cat-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 900;
    /* atas gelap → tengah clear → bawah gelap */
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.8) 0%,
            rgba(62, 62, 62, 0) 18%,
            rgba(0, 0, 0, 0.4) 72%,
            rgba(21, 64, 41, 0.9) 100%);

}

/* Gambar fill penuh & konsisten */
.cat-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* pastikan saiz seragam, tak herot */
    transform: scale(1.03);
    transition: transform .45s ease-out;
}

/* Gradient gelap bawah */
.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(6, 46, 35, .75) 0%,
            rgba(6, 46, 35, .55) 38%,
            rgba(6, 46, 35, .00) 75%);
    z-index: 1;
}

/* Nama kategori – betul-betul center bawah */
.cat-name {
    position: absolute;
    inset: auto 0 20px 0;
    /* = left:0; right:0; bottom:20px */
    width: 100%;
    text-align: center;
    margin: 0;
    margin-left: -20px;
    /* buang margin lain */
    transform: none;
    /* pastikan tak ada translateX */
    color: #fff;
    font-weight: 900;
    letter-spacing: .06em;
    font-size: 18px;
    text-transform: uppercase;
    z-index: 1000;
    /* overlay kat z-index:1, so 2 cukup */
    padding: 0 12px;
    /* elak text rapat tepi bila 2 baris */
}

/* Hover subtle */
.cat-card:hover .cat-img {
    transform: scale(1.08);
}

/* Responsive: stack 1 lajur */
@media (max-width: 992px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-card {
        height: 360px;
    }
}

@media (max-width: 600px) {
    .cat-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .cat-card {
        height: 320px;
    }
}

.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .55), rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, 0) 75%)
}

.cat-name {
    position: absolute;
    left: 22px;
    bottom: 18px;
    color: #fff;
    font-weight: 900;
    letter-spacing: .06em
}

.cat-card:hover .cat-img {
    transform: scale(1.1);
    transition: transform .4s
}

/* Products */
.prod-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px;
    margin-top: 22px
}

.prod-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid #eee;
    position: relative;
    box-shadow: 0 8px 18px rgba(0, 0, 0, .04)
}

.prod-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    background: var(--green-2);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 6px 10px;
    border-radius: 999px;
    box-shadow: 0 8px 14px rgba(102, 255, 82, 0.25)
}

.prod-imgwrap {
    height: 180px;
    display: grid;
    place-items: center
}

.prod-imgwrap img {
    max-width: 100%;
    max-height: 160px
}

.prod-info {
    padding: 6px 6px 8px
}

.prod-name {
    margin: 6px 0 8px;
    font-size: 14px;
    color: #162a1f
}

.price {
    display: flex;
    gap: 8px;
    align-items: center
}

.price .old {
    text-decoration: line-through;
    color: #96a1ab;
    font-size: 13px
}

.price .sale {
    font-weight: 800;
    color: #0f2d1e
}

/* Why/Trust */
.section-why {
    background: #fff
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 26px
}

.why-card {
    background: rgb(223, 255, 230);
    border: 1px solid #f0e3d8;
    border-radius: 16px;
    padding: 24px
}

.why-card img {
    width: 42px;
    height: 42px;
    margin-bottom: 10px
}

.why-card h4 {
    margin: 6px 0 8px
}

.why-card p {
    color: #5b6872
}

.cert-logos {
    display: flex;
    gap: 26px;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    flex-wrap: wrap
}

.cert-logos img {
    opacity: .9;
    filter: grayscale(100%)
}

/* Testimonials */
.section-testis {
    background: #fff
}

.testi-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px
}

.t-nav {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #fff;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .08);
    cursor: pointer
}

.testi-swiper {
    background: #f2fff0ff;
    border-radius: 18px;
    padding: 28px
}

.testi-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, .06)
}

.quote {
    font-size: 18px;
    line-height: 1.6;
    margin: 0 0 14px
}

.person {
    display: flex;
    gap: 10px;
    align-items: center
}

.person img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover
}

.person .name {
    font-weight: 800
}

.person .role {
    color: #7a8793;
    font-size: 13px
}

.testi-pagination {
    margin-top: 8px;
    text-align: center
}

.avatar-strip {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center
}

.avatar-strip img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .06)
}

.disclaimer {
    color: var(--green-2);
    text-align: center;
    margin-top: 18px
}

/* Social */
.section-social .links a {
    color: var(--green-2);
    text-decoration: none
}

.social-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 26px
}

.social-grid img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 16px
}

/* Footer simple */
.foot {
    background: #f3ede6;
    border-top: 1px solid #e8e1d9
}

.foot .container {
    padding: 28px 0
}

.foot p {
    margin: 0;
    color: #6a777f;
    text-align: center
}

/* Responsive */
@media (max-width:1024px) {
    .prod-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .social-grid {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:640px) {

    .hero-swiper,
    .hero-slide {
        height: 500px
    }

    .cat-grid {
        grid-template-columns: 1fr;
        gap: 18px
    }

    .prod-grid {
        grid-template-columns: 1fr
    }

    .why-grid {
        grid-template-columns: 1fr
    }

    .sec-title.lg {
        font-size: 26px
    }
}

/* ====== Avatar marquee 2 baris ====== */
.avatar-marquee {
    margin-top: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.am-row {
    overflow: hidden;
    /* hide luar */
    /* optional fade tepi */
    -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
    mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}

.am-track {
    display: flex;
    gap: 12px;
    align-items: center;
    /* trick: kandungan diganda -> anim -50% atau 0% */
    will-change: transform;
}

.am-row img {
    width: 86px;
    /* ubah ikut saiz nak */
    aspect-ratio: 1 / 1;
    /* kunci 1:1 */
    height: auto;
    /* biar ikut width via aspect-ratio */
    display: block;
    /* elak line-height effect */
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, .06);
}

/* arah & kelajuan */
.row-1 .am-track {
    animation: marquee-right 28s linear infinite;
}

.row-2 .am-track {
    animation: marquee-left 28s linear infinite;
}

/* hover pause (opsyenal) */
.avatar-marquee:hover .am-track {
    animation-play-state: paused;
}

/* keyframes: dengan kandungan diganda, -50%/0% cukup untuk loop */
@keyframes marquee-left {
    0% {
        transform: translateX(0);
    }

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

@keyframes marquee-right {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* responsive kecilkan sikit */
@media (max-width:640px) {
    .am-row img {
        width: 48px;
        height: 48px;
    }

    .row-1 .am-track,
    .row-2 .am-track {
        animation-duration: 22s;
    }
}

.container-wide {
    max-width: 1180px
}

.feature-item {
    font-family: "Playfair Display", Georgia, "Times New Roman", serif;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: #2b2b2b;
}

.mg-leaf {
    color: #28a745;
    width: 24px;
    height: 24px;
}

/* Features chip row — scrollable */
.features {
    padding: 10px 0;
    margin: 20px !important;
}

.features .features-wrap {
    gap: 30px;
    padding-bottom: 6px;
}

.features {
    background: var(--mg-bg)
}

.feature-pill {
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, .1);
    margin-right: 12px
}

.feature-pill i {
    color: var(--mg-green)
}

.features-wrap {
    overflow: auto;
    scroll-snap-type: x mandatory
}

.features-wrap::-webkit-scrollbar {
    height: 6px
}

.features-wrap::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 6px
}

/* ===== Popup modal (MediGreen) ===== */
/* === Popup overlay default (hidden) === */
.mgp-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s ease, visibility .28s ease;
    background: rgba(0, 0, 0, .35);
    /* gelapkan sikit */
    -webkit-backdrop-filter: blur(5px) saturate(120%);
    backdrop-filter: blur(5px) saturate(120%);
    z-index: 9999;
}

/* show state: fade-in */
.mgp-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* dialog: subtle glass + drop shadow */
.mgp-dialog {
    position: relative;
    max-width: min(92vw, 720px);
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
    transform: translateY(12px) scale(.96);
    opacity: 0;
}

/* entrance animation (pop/zoom) */
.mgp-overlay.show .mgp-dialog {
    animation: mgpPopIn .45s cubic-bezier(.2, .7, .2, 1) forwards;
}

/* exit animation (reverse) */
.mgp-overlay.closing .mgp-dialog {
    animation: mgpPopOut .28s ease forwards;
}

/* nav & pagination boleh melayang sedikit */
.mgp-nav {
    transition: transform .2s ease, opacity .2s ease;
}

.mgp-nav:hover {
    transform: scale(1.08);
}

.mgp-pagination {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .15));
}

/* keyframes */
@keyframes mgpPopIn {
    0% {
        transform: translateY(20px) scale(.92);
        opacity: 0;
    }

    60% {
        transform: translateY(0) scale(1.02);
        opacity: 1;
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes mgpPopOut {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }

    100% {
        transform: translateY(12px) scale(.96);
        opacity: 0;
    }
}

/* reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {

    .mgp-overlay,
    .mgp-dialog,
    .mgp-nav {
        transition: none !important;
        animation: none !important;
    }
}

.mgp-close {
    position: absolute;
    top: 10px;
    right: 10px;
    border: 0;
    background: rgba(0, 0, 0, .35);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    z-index: 2
}

.mgp-close:hover {
    background: rgba(0, 0, 0, .5)
}

.mgp-figure {
    margin: 0;
    background: #0b120c
}

.mgp-figure img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover
}

.mgp-figure.single img {
    border-radius: 18px
}

.mgp-caption {
    color: #eaf7e8;
    font: 600 14px/1.5 Nunito, system-ui, sans-serif;
    padding: 10px 14px 14px
}

.mgp-swiper {
    --pad: 10px;
    padding: var(--pad);
    padding-bottom: 44px;
    background: #0b120c
}

.mgp-pagination {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px
}

.mgp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .45);
    color: #fff;
    display: grid;
    place-items: center;
    cursor: pointer
}

.mgp-prev {
    left: 10px
}

.mgp-next {
    right: 10px
}

.mgp-nav:hover {
    background: rgba(0, 0, 0, .65)
}

/* Buang underline & warna link pada kad produk */
.prod-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Pastikan semua state link tak underline/warna biru */
.prod-card:link,
.prod-card:visited,
.prod-card:hover,
.prod-card:active,
.prod-card:focus {
    color: inherit;
    text-decoration: none;
}