/* หน้า Reviews */

#about-modal .panel {
    max-width: 540px;
}

/* ---------- เกี่ยวกับผม ---------- */
.intro {
    padding: 24px 20px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.intro small {
    font-family: var(--font-fight);
    font-size: 12px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.intro h2 {
    margin-top: 6px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
}

.intro p {
    margin-top: 8px;
    max-width: 44em;
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
}

.pillars {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}

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

.pillars .icon {
    font-size: 15px;
    color: var(--line-green);
}

@media (min-width: 900px) {
    .intro {
        padding: 34px 40px;
    }

    .intro h2 {
        font-size: 28px;
    }
}

/* ---------- ช่วงยังไม่มีสินค้า ---------- */
.is-launching .intro,
.is-launching .filters,
.is-launching #platform,
.is-launching .shop .sec-head,
.is-launching .cta {
    display: none;
}

.is-launching .shop {
    padding-top: 12px;
}

.is-launching .catalog {
    min-height: 0;
}

.launch {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 20px;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: center;
    animation: rise .6s var(--ease-out) both;
}

.launch small {
    font-family: var(--font-fight);
    font-size: 12px;
    letter-spacing: .28em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.launch h2 {
    margin-top: 8px;
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    font-weight: 600;
    line-height: 1.25;
}

.launch p {
    max-width: 34em;
    margin-top: 10px;
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.65;
    color: var(--ink-2);
}

.launch ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    font-weight: 500;
}

.launch li {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.launch li .icon {
    font-size: 14px;
    color: var(--line-green);
}

.launch-actions {
    display: grid;
    gap: 10px;
    width: 100%;
    max-width: 420px;
    margin-top: 22px;
}

.launch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 0 20px;
    border-radius: 15px;
    background: var(--ink);
    color: var(--bg);
    font-weight: 600;
    transition: transform .4s var(--spring);
}

.launch-btn--line {
    background: var(--line-green);
    color: #fff;
}

.launch-btn:active {
    transform: scale(.96);
    transition-duration: .1s;
}

@media (min-width: 560px) {
    .launch-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------- ตัวกรองหมวดหมู่ ---------- */
.filters {
    position: sticky;
    top: 60px;
    z-index: 20;
    overflow-x: auto;
    scrollbar-width: none;
    background: var(--bar);
    margin-top: 8px;
    padding: 8px 0 10px;
}

.filters::-webkit-scrollbar {
    display: none;
}

.filters-track {
    position: relative;
    display: flex;
    gap: 6px;
    width: max-content;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.filters-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
    transition: transform .55s var(--spring), width .55s var(--spring), background-color .25s;
}

.filter {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 15px;
    border-radius: 999px;
    color: var(--ink-2);
    font-size: 14px;
    white-space: nowrap;
    transition: color .25s, transform .4s var(--spring);
}

.filter:active {
    transform: scale(.94);
    transition-duration: .1s;
}

.filter .icon {
    font-size: 12px;
}

.filter.is-active {
    color: var(--on-accent);
}

/* ---------- พื้นที่ร้าน ---------- */
.shop {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px var(--gutter) 0;
}

.catalog {
    min-height: 40vh;
    align-content: start;
}

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.shop .sec-head {
    margin-bottom: -4px;
}

.sort {
    margin-left: auto;
}

.sort select {
    height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 13.5px;
    cursor: pointer;
}

/* สินค้าแนะนำ: ใบใหญ่ใบเดียว สลับสินค้าเอง */
.spot[hidden] {
    display: none;
}

.spot-stage {
    display: grid;
}

.spot-stage .feature {
    grid-area: 1 / 1;
    animation: spot-in .7s var(--ease-out) both;
}

.spot-stage .feature.is-leaving {
    pointer-events: none;
    animation: spot-out .42s var(--ease-in) both;
}

.spot-stage .feature-media img {
    animation: spot-zoom 1.1s var(--ease-out) both;
}

@keyframes spot-in {
    from {
        opacity: 0;
        transform: translateX(44px) scale(.98);
    }
}

@keyframes spot-out {
    to {
        opacity: 0;
        transform: translateX(-44px) scale(.98);
    }
}

@keyframes spot-zoom {
    from {
        transform: scale(1.1);
    }
}

.spot-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    min-height: 28px;
    margin-top: 2px;
}

.spot-dots:empty {
    display: none;
}

.spot-dot {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
}

.spot-dot i {
    position: relative;
    display: block;
    overflow: hidden;
    width: 8px;
    height: 8px;
    border-radius: 99px;
    background: var(--ink-3);
    opacity: .5;
    transition: width .35s var(--ease-out), opacity .2s;
}

.spot-dot.is-active {
    width: 44px;
}

.spot-dot.is-active i {
    width: 36px;
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--line);
    opacity: 1;
}

.spot-dot.is-active i::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--ink);
    transform-origin: left;
    animation: spot-fill var(--spot-time, 6s) linear both;
}

.is-locked .spot-dot i::after {
    animation-play-state: paused;
}

@media (hover: hover) {
    .spot:hover .spot-dot i::after {
        animation-play-state: paused;
    }
}

@keyframes spot-fill {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.feature[data-platform="tiktok"] {
    --accent: var(--ink);
    --on-accent: var(--bg);
}

/* รีวิวเด่น */
.feature {
    display: grid;
    width: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    text-align: left;
    transition: transform .45s var(--spring), box-shadow .3s ease;
}

.feature[hidden] {
    display: none;
}

.feature:active {
    transform: scale(.985);
    transition-duration: .1s;
}

.feature-media {
    display: block;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--surface-2);
}

.feature-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--ease-out);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px 18px;
}

.feature-text small {
    font-family: var(--font-fight);
    font-size: 12px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-3);
}

.feature-text strong {
    font-size: 19px;
    font-weight: 600;
    line-height: 1.3;
}

.feature-text q {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 4.65em;
    font-family: var(--font-text);
    font-size: 16px;
    line-height: 1.55;
    color: var(--ink-2);
}

.feature-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 6px;
}

.feature-foot b {
    font-size: 24px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}

[data-platform="shopee"] .feature-foot b {
    color: var(--shopee);
}

.feature-foot em {
    margin-right: 6px;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    color: var(--ink-3);
}

.feature-go {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 14px;
    font-weight: 500;
}

@media (hover: hover) {
    .feature:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lift);
    }

    .feature:hover .feature-media img {
        transform: scale(1.04);
    }
}

@media (min-width: 760px) {
    .feature {
        grid-template-columns: 44% 1fr;
    }

    .feature-media {
        aspect-ratio: 1;
    }

    .feature-text {
        justify-content: center;
        gap: 12px;
        padding: 28px 36px;
    }

    .feature-text strong {
        font-size: 26px;
    }

    .feature-text q {
        font-size: 18px;
    }

    .feature-foot {
        margin-top: 8px;
    }
}

@media (min-width: 1024px) {
    .feature {
        grid-template-columns: 34% 1fr;
    }

    .shop {
        gap: 24px;
    }
}

/* ---------- หน้าต่างสินค้า ---------- */
.pd-close {
    position: absolute;
    z-index: 7;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, .55);
    border-color: rgba(255, 255, 255, .22);
    color: #fff;
}

@media (hover: hover) {
    .pd-close:hover {
        background: rgba(0, 0, 0, .8);
    }
}

.pd-scroll {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
}

.pd-scroll::-webkit-scrollbar {
    display: none;
}

.pd-gallery {
    position: relative;
    aspect-ratio: 1;
    background: var(--surface-2);
    overflow: hidden;
}

.pd-media {
    display: flex;
    height: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.pd-media::-webkit-scrollbar {
    display: none;
}

@media (hover: hover) and (pointer: fine) {
    .pd-media {
        cursor: grab;
    }

    .pd-slide {
        cursor: inherit;
    }
}

.pd-media.is-landing {
    visibility: hidden;
}

.pd-slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    cursor: zoom-in;
}

.pd-slide img,
.pd-slide video,
.pd-slide iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.pd-ghost {
    position: fixed;
    z-index: 5;
    object-fit: cover;
    transform-origin: 0 0;
    pointer-events: none;
    will-change: transform;
}

.pd-colors {
    position: absolute;
    z-index: 2;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .35);
}

.pd-color {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 3px solid #fff;
    transition: transform .4s var(--spring);
}

.pd-color:active {
    transform: scale(.82);
    transition-duration: .1s;
}

.pd-count {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.pd-count:empty {
    display: none;
}

.pd-arrow {
    position: absolute;
    top: 50%;
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    opacity: 0;
    transition: opacity .2s, transform .4s var(--spring);
}

.pd-arrow--prev { left: 12px; }
.pd-arrow--next { right: 12px; }

.pd-arrow:active {
    transform: scale(.88);
    transition-duration: .1s;
}

.pd-info {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.pd-body {
    flex: 1;
    padding: 18px 18px 8px;
}

.pd-body > * {
    animation: rise .45s var(--ease-out) both;
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--ink-3);
}

.pd-badge {
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--ink);
    color: var(--bg);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
}

[data-platform="shopee"] .pd-badge {
    background: var(--shopee);
    color: #fff;
}

#pd-title {
    margin-top: 6px;
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
}

.pd-price {
    margin-top: 4px;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
}

.pd-thumbs {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    scrollbar-width: none;
}

.pd-thumbs:empty {
    display: none;
}

.pd-thumb {
    flex: none;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--surface-2);
    box-shadow: 0 0 0 1px var(--line);
    transition: box-shadow .2s, transform .4s var(--spring);
}

.pd-thumb.is-active {
    box-shadow: 0 0 0 2px var(--accent);
    margin: 2px;
}

.pd-thumb:active {
    transform: scale(.92);
    transition-duration: .1s;
}

.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-tabs {
    margin-top: 16px;
}

.pd-tabs button {
    height: 36px;
}

.pd-text {
    padding: 14px 2px 8px;
    font-family: var(--font-text);
    font-size: 15.5px;
    line-height: 1.7;
    color: var(--ink-2);
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.pd-text--review {
    color: var(--ink);
    font-weight: 500;
}

.pd-text.is-swapping {
    animation: rise .35s var(--ease-out) both;
}

.embed-media img,
.embed-media video,
.embed-media iframe {
    width: 100%;
    height: auto;
    margin: 12px 0;
    border: 0;
    border-radius: 14px;
    background: var(--surface-2);
}

.embed-media img {
    cursor: zoom-in;
}

.embed-media iframe {
    aspect-ratio: 16 / 9;
}

.embed-media iframe.vertical-vid,
.embed-media video.vertical-vid {
    aspect-ratio: 9 / 16;
}

.pd-buy {
    position: sticky;
    bottom: 0;
    z-index: 3;
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
    background: var(--surface);
    border-top: 1px solid var(--line);
}

@media (min-width: 900px) {
    .pd {
        --pd-size: min(640px, 86vh, 52vw);
        width: min(calc(var(--pd-size) + 440px), 100%);
        max-width: 100%;
        height: var(--pd-size) !important;
    }

    .pd-scroll {
        display: grid;
        grid-template-columns: var(--pd-size) minmax(0, 1fr);
        overflow: hidden;
    }

    .pd-gallery {
        aspect-ratio: auto;
        height: var(--pd-size);
    }

    .pd-info {
        height: var(--pd-size);
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .pd-body {
        padding: 26px 26px 8px;
    }

    .pd-buy {
        padding: 12px 26px 20px;
    }

    .pd-arrow {
        display: grid;
    }

    .pd-gallery:hover .pd-arrow {
        opacity: 1;
    }

    .pd-close {
        background: var(--surface-2);
        border: 0;
        color: var(--ink);
    }

    .pd-close:hover {
        background: var(--line);
    }
}

/* ---------- ดูรูปเต็มจอ ---------- */
.dlg--lb {
    background: #000;
    opacity: 0;
    transition: opacity .25s ease;
}

.dlg--lb.is-open {
    opacity: 1;
}

.lb-stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.lb-stage > * {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    touch-action: pinch-zoom;
}

.lb-stage iframe {
    width: min(100%, 960px);
    aspect-ratio: 16 / 9;
    border: 0;
}

.lb-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font-size: 18px;
    transition: transform .4s var(--spring), background-color .2s;
}

.lb-btn:active {
    transform: scale(.88);
    transition-duration: .1s;
}

@media (hover: hover) {
    .lb-btn:hover {
        background: rgba(255, 255, 255, .26);
    }
}

.lb-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.lb-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(18px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.lb-nav > * {
    pointer-events: auto;
}

.lb-nav[hidden] {
    display: none;
}
