/* ==========================================================================
   Haewon – Products Slide Block  (haewon/products-slide)
   Tone: dark forest green #2d5a27 / sage #6b8f5e / cream #f7f5f0
   ========================================================================== */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
.hw-ps {
    --hw-border:  #d8e8d2;
    --hw-text:    #2a3d24;
    --hw-muted:   #7a9070;
    --hw-pill-bg: #f0f4ed;
    --hw-white:   #ffffff;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.hw-ps {
    background: var(--hw-white);
    width: 100%;
    padding-bottom: 0;
    overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.hw-ps-header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}
.hw-ps-badge {
    color: var(--hw-muted);
    margin: 0 0 .5rem;
    letter-spacing: .02em;
}
.hw-ps-heading {
    color: var(--hw-dark);
    margin: 0 0 .75rem;
    line-height: 1.2;
    letter-spacing: -.01em;
}
.hw-ps-heading span{
    font-weight: 100;
}
.hw-ps-sub {
    font-size: 1rem;
    color: var(--hw-sage);
    margin: 0;
}

/* ── Category tabs ───────────────────────────────────────────────────────── */
.hw-ps-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
    justify-content: center;
    padding: 0 2rem 2.5rem;
    border-bottom: 1px solid var(--hw-border);
}
.hw-ps-tab {
    padding: .55rem 1.375rem;
    border-radius: 100px;
    border: 1.5px solid var(--hw-border);
    background: transparent;
    font-size: .9rem;
    font-weight: 400;
    color: var(--hw-muted);
    cursor: pointer;
    font-family: inherit;
    transition: background .2s, border-color .4s, color .2s, color .2s;
    white-space: nowrap;
}
.hw-ps-tab:hover { color: var(--hw-dark); background: var(--hw-pill-bg); border-color: var(--hw-sage); }
.hw-ps-tab--active {
    background: var(--hw-dark);
    border-color: var(--hw-dark);
    color: var(--hw-white);
    font-weight: 500;
}

/* ── Stage (slide area + right nav side-by-side) ─────────────────────────── */
.hw-ps-stage {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 56px;
    min-height: 520px;
    overflow: hidden;
}

/* ── Slides container ────────────────────────────────────────────────────── */
.hw-ps-slides {
    position: relative;
    overflow: hidden;
    /* touch-action set in JS */
    -webkit-user-select: none; /* สำหรับเบราว์เซอร์ตระกูล Safari / Chrome เก่า */
    user-select: none;         /* มาตรฐานทั่วไป */
}

/* ── Single slide ────────────────────────────────────────────────────────── */
.hw-ps-slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    min-height: 520px;
    /* off-screen slides hidden via JS class */
    position: absolute; 
    top: 0; left: 0; width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}
.hw-ps-slide-img {
    background: linear-gradient(to right, #f7f5f0, #e8e8e8, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2.5rem;
    overflow: hidden;
}
.hw-ps-slide--green .hw-ps-slide-img{
    background: linear-gradient(to right, #F2F6EF, #E8F0E4, #fff);
}
.hw-ps-slide--blue .hw-ps-slide-img{
    background: linear-gradient(to right, #E8F0F6, #E4E8F0, #fff);
}
/*
.hw-ps-slide--pink .hw-ps-slide-img{
    background: linear-gradient(to right, #F6E8F0, #F0E4E8, #fff);
}  */ 

.hw-ps-slide-img img {
    max-width: 100%;
    max-height: 420px;
    object-fit: contain;
    display: block;
    transition: transform .5s ease;
    filter: drop-shadow(0 12px 32px rgba(45,90,39,.14));
}
.hw-ps-slide--active {
    opacity: 1;
    visibility: visible;
    position: relative;
    z-index: 2;
}
.hw-ps-slide--active .hw-ps-slide-img img {
    transform: translateY(-4px);
}
.hw-ps-slide-detail {
    background: var(--hw-white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.25rem;
    padding: 3rem 2.5rem 3rem 3rem;
}
/* category pill on slide */
.hw-ps-slide-cat {
    display: inline-block;
    padding: .35rem 1rem;
    border-radius: 100px;
    border: 1.5px solid var(--hw-border);
    font-size: .8125rem;
    color: var(--hw-sage);
    background: transparent;
    font-weight: 400;
    align-self: flex-start;
    transition: background .2s, border-color .4s, color .2s;
}
.hw-ps-slide-cat:hover {
    color: white;
    background: var(--hw-sage);
    border-color: var(--hw-sage);
}
.hw-ps-slide-title {
    font-size: clamp(1.6rem, 2.8vw, 2.5rem);
    font-weight: 400;
    color: var(--hw-dark);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.04em;
    transition: color .2s;
}
.hw-ps-slide-title:hover { color: var(--hw-sage); }
.hw-ps-slide-subtitle {
    color: var(--hw-sage);
    margin: 0;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.hw-ps-slide-sub {
    font-size: clamp(.95rem, 1.3vw, 1.125rem);
    font-weight: 300;
    color: #616161;
    margin: 0;
    line-height: 1.35;
}
.hw-ps-slide-fda {
    font-size: .9rem;
    color: var(--hw-muted);
    margin: 0;
    line-height: 1.35;
}
.hw-ps-slide-halal-logo {
    width: 60px;
    height: auto;
    display: block;
    margin-top: .5rem;
}
.hw-ps-slide-fda--label {
    font-weight: 500;
    color: #616161;
}
.hw-ps-slide-feats {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.hw-ps-slide-feats li {
    font-size: .9rem;
    color: var(--hw-text);
    padding-left: 1.25rem;
    position: relative;
    line-height: 1.5;
}
.hw-ps-slide-feats li::before {
    content: '·';
    position: absolute;
    left: .25rem;
    color: var(--hw-sage);
    font-weight: 700;
}
.hw-ps-slide-readmore {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: var(--hw-text);
    text-decoration: none;
    font-weight: 400;
    padding-top: .25rem;
}
s
.hw-ps-slide-readmore:hover { color: var(--hw-dark); }
/* Empty state */
.hw-ps-empty {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    color: var(--hw-muted);
    padding: 4rem 2rem;
}

/* ── Right nav: arrow · dots · arrow ────────────────────────────────────── */
.hw-ps-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: 1rem .5rem;
    background: var(--hw-white);
    border-left: 1px solid var(--hw-border);
}
.hw-ps-nav-arrow {
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--hw-text);
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: background .18s, color .18s;
}
.hw-ps-nav-arrow svg { width: 1.125rem; height: 1.125rem; }
.hw-ps-nav-arrow:hover { background: var(--hw-pill-bg); color: var(--hw-dark); }
.hw-ps-nav-arrow:disabled { opacity: .3; cursor: not-allowed; }

/* Dots */
.hw-ps-dots {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .4rem;
}
.hw-ps-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--hw-border);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background .2s, transform .2s;
    flex-shrink: 0;
}
.hw-ps-dot--active {
    background: var(--hw-dark);
    transform: scale(1.4);
}

/* ── View All banner ─────────────────────────────────────────────────────── */
.hw-ps-viewall {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--hw-dark);
    color: var(--hw-white);
    text-decoration: none;
    padding: 1.75rem 2.5rem;
    transition: background .2s;
}
.hw-ps-viewall:hover { background: #234d1e; }
.hw-ps-viewall-text {
    font-size: clamp(1rem, 1.8vw, 1.375rem);
    font-weight: 400;
    letter-spacing: .01em;
}
.hw-ps-viewall-arrow {
    width: 1.75rem;
    height: 1.75rem;
    flex-shrink: 0;
    stroke: var(--hw-white);
    transition: transform .22s;
}
.hw-ps-viewall:hover .hw-ps-viewall-arrow { transform: translateX(5px); }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hw-ps-stage {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hw-ps-nav {
        flex-direction: row-reverse;
        justify-content: center;
        border-left: none;
        border-top: 1px solid var(--hw-border);
        padding: .875rem 1rem;
    }
    .hw-ps-dots { flex-direction: row; gap: .5rem; }
    .hw-ps-slide {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hw-ps-slide-img { padding: 2rem 1.5rem; min-height: 240px; }
    .hw-ps-slide-img img { max-height: 360px; }
    .hw-ps-slide-detail {
        border-left: none;
        border-top: 1px solid var(--hw-border);
        padding: 2rem 1.5rem 4rem;
    }
}
@media (max-width: 540px) {
    .hw-ps-header { padding: 2.5rem 1rem 1.5rem; background-color: #fcfcfc; }
    .hw-ps-tabs   { padding: 1rem 1rem 1.5rem; gap: .4rem; background-color: #fcfcfc;}
    .hw-ps-tab    { font-size: .8125rem; padding: .45rem 1rem; }
    .hw-ps-slide-img  { padding: 1.5rem 1rem; }
    .hw-ps-slide-detail { padding: 1.5rem 1rem 4rem; }
    .hw-ps-viewall { padding: 1.25rem 1rem; }
}
