/* ============================================
   PhoShop Theme — Main Stylesheet
   ============================================ */

:root {
    --color-primary:   #8B1A1A;
    --color-accent:    #D4541A;
    --color-light:     #FDEBD0;
    --color-lighter:   #FFF8F5;
    --color-dark:      #3D1A00;
    --color-text:      #2D1A00;
    --color-muted:     #8A6A5A;
    --color-white:     #ffffff;
    --color-line:      #00B900;
    --color-line-dark: #009900;
    --font-main:       'Noto Sans Thai', sans-serif;
    --font-heading:    'Noto Sans Thai', serif;
    --radius:          10px;
    --radius-lg:       18px;
    --shadow:          0 4px 20px rgba(0,0,0,.08);
    --shadow-md:       0 8px 32px rgba(0,0,0,.12);
    --transition:      0.25s ease;
    --header-h:        70px;
    --container:       1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-main); color: var(--color-text); background: #fff; line-height: 1.7; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Utility ---- */
.phoshop-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ============================================
   TOPBAR
   ============================================ */
.phoshop-topbar {
    background: var(--color-primary);
    color: rgba(255,255,255,.9);
    font-size: .92rem;
    position: relative;
    z-index: 1002;
}
/* โหมด Sticky: topbar ติดบนสุดเสมอ (header จะถูกดันลงด้วย --header-sticky-top) */
.phoshop-topbar.is-sticky {
    position: sticky;
    top: 0;
}
/* เคารพ WP admin bar เมื่อ login (admin bar สูง 32px / 46px บนจอเล็ก) */
.admin-bar .phoshop-topbar.is-sticky { top: 32px; }
@media screen and (max-width: 782px) {
    .admin-bar .phoshop-topbar.is-sticky { top: 46px; }
}
.phoshop-topbar-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 7px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.phoshop-topbar-left {
    font-weight: 600;
    white-space: nowrap;
}
.phoshop-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.phoshop-topbar-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.phoshop-topbar-sep {
    opacity: .4;
    font-size: .7rem;
}
@media (max-width: 600px) {
    .phoshop-topbar-left { display: none; }
    .phoshop-topbar-inner {
        justify-content: center;
        padding: 6px 16px;
        flex-wrap: wrap;
        gap: 6px;
    }
    .phoshop-topbar-right { gap: 6px; justify-content: center; }
    .phoshop-topbar-sep { display: none; }
    .phoshop-topbar-item { font-size: .72rem; }
}

/* ============================================
   HEADER
   ============================================ */
.phoshop-header {
    position: sticky; top: var(--header-sticky-top, 0px); left: 0; right: 0; z-index: 1000;
    height: var(--header-h);
    background: var(--navbar-scrolled-bg, #fff);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid #e8e2db;
    transition: height 0.3s ease, background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease;
}
/* เมื่อ scroll ลงมา — compact + minimal */
.phoshop-header.scrolled {
    height: 52px;
    background: var(--navbar-scrolled-bg, #fff);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
/* ยังไม่ scroll = ช่องค้นหา inline / scroll ลงมา = ยุบเป็นไอคอน (เปิด overlay กลางจอ) */
.phoshop-header.scrolled .phoshop-search-wrap { display: none; }

.phoshop-header-inner {
    max-width: var(--container); margin: 0 auto;
    height: 100%;
    display: flex; align-items: center; gap: 16px;
}

/* Logo */
.phoshop-logo { flex-shrink: 0; }
.phoshop-logo-link {
    display: flex; align-items: center; gap: 10px;
    color: var(--color-dark); text-decoration: none;
    transition: color var(--transition);
}
.phoshop-logo-img {
    height: 40px; width: auto; border-radius: 50%;
    transition: height 0.3s ease;
}
.phoshop-header.scrolled .phoshop-logo-img { height: 30px; }

/* Wordmark — ตัวอักษรเขียวล้วน ไม่มีพื้น/ขอบมน สูงเท่าช่องค้นหา */
.phoshop-logo-block {
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    /* ใช้ box model ชุดเดียวกับช่องค้นหา (.phoshop-search-input padding 10px บน-ล่าง +
       .phoshop-search-form border 1px) เพื่อให้สูงเท่ากันเป๊ะ ไม่ต้องเดาเป็น px */
    padding: 10px 0;
    border: 1px solid transparent;
    color: #035726;
    font-weight: 800;
    font-size: 1.35rem;
    line-height: 1.4;
    letter-spacing: .01em;
    white-space: nowrap;
    transition: font-size .3s ease;
}
.phoshop-header.scrolled .phoshop-logo-block { font-size: 1.2rem; }
/* คงสีเขียวแบรนด์เสมอ แม้ navbar scrolled */
.phoshop-header.scrolled .phoshop-logo-link .phoshop-logo-block { color: #035726; }

.phoshop-logo-circle {
    width: 40px; height: 40px; border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.2);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-dark); flex-shrink: 0;
    transition: border-color var(--transition), color var(--transition);
}
.phoshop-logo-name {
    font-size: 1rem; font-weight: 700;
    color: var(--color-dark); white-space: nowrap;
    letter-spacing: .02em;
    transition: color var(--transition);
}
/* scrolled → ใช้สีตัวหนังสือจาก admin */
.phoshop-header.scrolled .phoshop-logo-link,
.phoshop-header.scrolled .phoshop-logo-name { color: var(--navbar-scrolled-text, #1a1a1a); }
.phoshop-header.scrolled .phoshop-logo-circle {
    border-color: var(--navbar-scrolled-text, rgba(0,0,0,.25));
    color: var(--navbar-scrolled-text, #1a1a1a);
}

/* Search Bar */
.phoshop-search-wrap { flex: 1; max-width: 300px; position: relative; }
.phoshop-search-form {
    position: relative; display: flex; align-items: center;
    background: #fff;
    border: 1px solid rgba(61,26,0,.22);
    border-radius: 8px; overflow: hidden;
    transition: background var(--transition), border-color var(--transition);
}
.phoshop-search-form:focus-within {
    background: #fff;
    border-color: var(--color-primary);
}
.phoshop-search-icon {
    position: absolute; left: 14px;
    color: var(--color-primary); opacity: .55; pointer-events: none; flex-shrink: 0;
    transition: opacity var(--transition);
}
.phoshop-search-form:focus-within .phoshop-search-icon { opacity: 1; }
.phoshop-search-input {
    width: 100%; padding: 10px 16px 10px 42px;
    background: transparent; border: none; outline: none;
    font-family: var(--font-main); font-size: .92rem;
    color: var(--color-dark);
    transition: color var(--transition);
}
.phoshop-search-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    width: 14px; height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    cursor: pointer;
    opacity: .7;
}
.phoshop-search-input::-webkit-search-cancel-button:hover { opacity: 1; }
.phoshop-search-input::placeholder { color: rgba(0,0,0,.4); }
/* scrolled → ปรับตาม navbar bg */
.phoshop-header.scrolled .phoshop-search-form {
    background: #fff;
    border-color: rgba(61,26,0,.22);
}
.phoshop-header.scrolled .phoshop-search-form:focus-within {
    background: #fff;
    border-color: var(--color-primary);
}
.phoshop-header.scrolled .phoshop-search-icon { color: var(--color-primary); opacity: .55; }
.phoshop-header.scrolled .phoshop-search-input { color: var(--navbar-scrolled-text, #1a1a1a); }
.phoshop-header.scrolled .phoshop-search-input::placeholder { color: color-mix(in srgb, var(--navbar-scrolled-text, #1a1a1a) 55%, transparent); }

/* Live Search Results Dropdown */
.phoshop-search-results {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0; right: 0;
    background: #fff;
    border-radius: 14px;
    border: 1px solid #f0ebe6;
    overflow: hidden;
    z-index: 9999;
    max-height: 420px;
    overflow-y: auto;
}
.phoshop-search-results.open { display: block; }

/* Search result item */
.phoshop-search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    color: var(--color-dark);
    transition: background var(--transition);
    border-bottom: 1px solid #faf6f3;
}
.phoshop-search-item:last-child { border-bottom: none; }
.phoshop-search-item:hover,
.phoshop-search-item.focused { background: var(--color-lighter); }

/* Thumbnail */
.phoshop-search-thumb {
    width: 44px; height: 44px;
    object-fit: cover; border-radius: 8px;
    flex-shrink: 0; background: var(--color-lighter);
}
.phoshop-search-thumb--empty {
    width: 44px; height: 44px; border-radius: 8px;
    background: var(--color-lighter);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary); opacity: .4;
    flex-shrink: 0;
}

/* Item text */
.phoshop-search-item-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.phoshop-search-item-title {
    font-size: .88rem; font-weight: 500;
    color: var(--color-dark);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.phoshop-search-item-title mark {
    background: none;
    color: var(--color-primary);
    font-weight: 700;
}
.phoshop-search-price {
    font-size: .8rem; font-weight: 600;
    color: var(--color-primary);
}

/* Empty state */
.phoshop-search-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: .88rem;
    color: var(--color-muted);
}

/* Loading dots */
.phoshop-search-loading {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 20px;
}
.phoshop-search-loading span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--color-primary); opacity: .3;
    animation: phoshop-search-dot .8s ease-in-out infinite;
}
.phoshop-search-loading span:nth-child(2) { animation-delay: .15s; }
.phoshop-search-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes phoshop-search-dot {
    0%, 80%, 100% { opacity: .3; transform: scale(.8); }
    40%           { opacity: 1;  transform: scale(1); }
}

/* Nav — Pill style (flat, no shadow)
   hover = pill จางสีแบรนด์ | active = pill แดงเต็ม ตัวหนังสือขาว */
.phoshop-nav { flex-shrink: 0; margin-left: auto; }
.phoshop-nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.phoshop-nav-menu > li { position: relative; }
.phoshop-nav-menu > li > a {
    display: flex; align-items: center; gap: 5px;
    padding: 8px 16px;
    font-size: 1rem; font-weight: 500; color: rgba(0,0,0,.72);
    border-radius: 8px;
    background: transparent;
    position: relative;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
}
/* hover → pill จางสีแบรนด์ */
.phoshop-nav-menu > li > a:hover,
.phoshop-nav-menu > li:hover > a {
    background: color-mix(in srgb, var(--color-primary) 10%, transparent);
    color: var(--color-primary);
}
/* active (หน้าปัจจุบัน) → pill แดงเต็ม */
.phoshop-nav-menu > li.current-menu-item > a,
.phoshop-nav-menu > li.current-menu-item > a:hover,
.phoshop-nav-menu > li.current_page_item > a {
    background: var(--color-primary);
    color: #fff;
}

/* scrolled → คงสไตล์ pill เดียวกัน */
.phoshop-header.scrolled .phoshop-nav-menu > li > a {
    color: var(--navbar-scrolled-text, #1a1a1a);
    padding: 7px 16px;
    border-radius: 8px;
    background: transparent;
}
.phoshop-header.scrolled .phoshop-nav-menu > li > a:hover,
.phoshop-header.scrolled .phoshop-nav-menu > li:hover > a {
    background: color-mix(in srgb, var(--color-primary) 12%, transparent);
    color: var(--color-primary);
}
.phoshop-header.scrolled .phoshop-nav-menu > li.current-menu-item > a,
.phoshop-header.scrolled .phoshop-nav-menu > li.current_page_item > a {
    background: var(--color-primary);
    color: #fff;
}
/* Dropdown chevron — injected via JS */
/* Dropdown submenu */
.phoshop-nav-menu .sub-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    min-width: 200px;
    padding: 8px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 200;
    border: 1px solid #f0ebe4;
}
.phoshop-nav-menu .sub-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 11px;
    height: 11px;
    background: #fff;
    border-left: 1px solid #f0ebe4;
    border-top: 1px solid #f0ebe4;
}
.phoshop-nav-menu > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}
.phoshop-nav-menu .sub-menu li { list-style: none; }
.phoshop-nav-menu .sub-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-dark, #1a1a1a);
    border-radius: 8px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.phoshop-nav-menu .sub-menu a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ddd;
    flex-shrink: 0;
    transition: background .15s;
}
.phoshop-nav-menu .sub-menu a:hover {
    background: #fff5f0;
    color: var(--color-primary, #e05c2a);
}
.phoshop-nav-menu .sub-menu a:hover::before {
    background: var(--color-primary, #e05c2a);
}

/* Priority+ "เพิ่มเติม" overflow nav item */
.phoshop-more-item { white-space: nowrap; }
.phoshop-more-trigger { display: flex !important; align-items: center; }

/* Items moved into .phoshop-more-sub were top-level — keep consistent indent */
.phoshop-more-sub > li > a {
    padding: 9px 16px 9px 36px;
}
.phoshop-more-sub > li > a::before {
    left: 16px;
}
/* If a moved item itself has a submenu, open it to the right */
.phoshop-more-sub > li > .sub-menu {
    top: 0;
    left: 100%;
    transform: translateX(0) translateY(-8px);
}
.phoshop-more-sub > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0) translateY(0);
}

/* Header Actions */
.phoshop-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* LINE CTA button in navbar */
.phoshop-line-cta {
    display: inline-flex; align-items: center; gap: 8px;
    background: #06C755;
    color: #fff;
    padding: 9px 18px;
    border-radius: 24px;
    font-size: .85rem; font-weight: 600;
    white-space: nowrap;
    transition: background var(--transition);
}
.phoshop-line-cta:hover { background: #05a849; color: #fff; }
.phoshop-line-cta svg { flex-shrink: 0; }
.phoshop-header.scrolled .phoshop-line-cta { padding: 5px 20px; }

/* Hamburger */
.phoshop-hamburger {
    display: none; flex-direction: column; gap: 5px;
    background: none; border: none; cursor: pointer; padding: 6px;
}
.phoshop-hamburger span { display: block; width: 22px; height: 2px; background: rgba(0,0,0,.7); border-radius: 2px; transition: var(--transition); }
.phoshop-header.scrolled .phoshop-hamburger span { background: var(--navbar-scrolled-text, #1a1a1a); }
.phoshop-hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.phoshop-hamburger.open span:nth-child(2) { opacity: 0; }
.phoshop-hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Search trigger button — ไอคอนค้นหา (เปิด overlay กลางจอ) ทุกขนาดจอ */
.phoshop-search-trigger {
    display: none;
    align-items: center; justify-content: center;
    background: none; border: none; cursor: pointer;
    padding: 6px; color: var(--navbar-scrolled-text, #1a1a1a);
    transition: color var(--transition);
}
/* ไอคอนข้าง logo — แสดงแทนช่องค้นหาเมื่อ scroll ลงมา (เดสก์ท็อป) */
.phoshop-header.scrolled .phoshop-search-trigger--inline { display: flex; }

/* ไอคอน inline จัดทรงให้ดูเหมือน "ช่องค้นหาที่ยุบแล้ว" — กล่องโปร่งขอบมน flat */
.phoshop-search-trigger--inline {
    width: 38px; height: 38px; padding: 0;
    border: 1px solid color-mix(in srgb, var(--navbar-scrolled-text, #1a1a1a) 22%, transparent);
    border-radius: 8px;
    color: var(--navbar-scrolled-text, #1a1a1a);
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.phoshop-search-trigger--inline .phoshop-search-icon {
    position: static; left: auto; opacity: .85; pointer-events: none;
}
.phoshop-search-trigger--inline:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, transparent);
}
.phoshop-search-trigger:hover { color: var(--color-primary); }

/* Search Overlay */
.phoshop-search-overlay {
    display: none;
    position: fixed; inset: 0; z-index: 2000;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    align-items: flex-start; justify-content: center;
    padding-top: 80px;
}
.phoshop-search-overlay.open { display: flex; }
.phoshop-search-overlay-inner {
    width: calc(100% - 32px);
    max-width: 520px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
}
.phoshop-search-overlay-form {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid #f0ebe6;
}
.phoshop-search-overlay-input {
    flex: 1; border: none; outline: none;
    font-size: 1rem; font-family: inherit;
    color: var(--color-dark, #1a1a1a);
    background: transparent;
}
.phoshop-search-overlay-input::placeholder { color: #bbb; }
.phoshop-search-overlay-input::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.phoshop-search-overlay-close {
    background: none; border: none; cursor: pointer;
    color: #aaa; padding: 4px; display: flex;
    align-items: center; justify-content: center;
    flex-shrink: 0; transition: color var(--transition);
}
.phoshop-search-overlay-close:hover { color: var(--color-primary); }

/* Overlay results */
.phoshop-overlay-results { max-height: 360px; overflow-y: auto; }
.phoshop-overlay-results .phoshop-result-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; text-decoration: none; color: inherit;
    transition: background var(--transition);
    border-bottom: 1px solid #faf7f4;
}
.phoshop-overlay-results .phoshop-result-item:last-child { border-bottom: none; }
.phoshop-overlay-results .phoshop-result-item:hover { background: #faf7f4; }
.phoshop-overlay-results .phoshop-result-img {
    width: 48px; height: 48px; border-radius: 8px;
    object-fit: cover; flex-shrink: 0;
    background: #f0ebe6;
}
.phoshop-overlay-results .phoshop-result-name {
    font-size: .9rem; font-weight: 600; color: var(--color-dark, #1a1a1a);
}
.phoshop-overlay-results .phoshop-result-price {
    font-size: .8rem; color: var(--color-primary);
    margin-top: 2px;
}
.phoshop-overlay-results .phoshop-result-empty {
    padding: 20px 16px; font-size: .88rem; color: #aaa; text-align: center;
}

/* ============================================
   MAIN & SECTIONS
   ============================================ */
/* ไม่มี padding-top — Hero ขึ้นไปชิด top 0 ทับ navbar โปร่งใส */
.phoshop-main { padding-top: 0; }

/* Section ทั่วไปที่ไม่ใช่ Hero ต้องการ scroll-margin เผื่อ fixed header */
.phoshop-section:not(.phoshop-section--hero) { scroll-margin-top: var(--header-h); }

/* Section Header */
.phoshop-section-header { text-align: center; margin-bottom: 48px; }
.phoshop-section-header h2 {
    font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 600; color: var(--color-dark); margin-bottom: 12px;
}
.phoshop-section-header p { font-size: 1.05rem; color: var(--color-muted); max-width: 540px; margin: 0 auto; }

/* ============================================
   HERO
   ============================================ */
.phoshop-section--hero { padding-top: 0 !important; }

/* ============================================
   HERO — Base
   ============================================ */
.phoshop-hero {
    position: relative;
    min-height: max(380px, 50vh);
    display: flex; align-items: stretch;
    background: var(--hero-bg,
        linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%)
    ) center/cover no-repeat;
    overflow: hidden;
}
.phoshop-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        135deg,
        rgba(0,0,0,.55) 0%,
        rgba(0,0,0,.25) 60%,
        rgba(0,0,0,.10) 100%
    );
    z-index: 0;
}

/* ============================================
   HERO — Inner wrapper (single OR two-col)
   ============================================ */
.phoshop-hero-inner {
    position: relative; z-index: 1;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;          /* single-col: centered */
}

/* Two-column variant */
.phoshop-hero--two-col .phoshop-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    justify-content: initial;
    padding-top: 48px;
    padding-bottom: 60px;
}

/* ============================================
   HERO — Left: Content
   ============================================ */
.phoshop-hero-content {
    color: #fff;
    text-align: center;               /* default (single-col): centered */
    padding: 48px 0 60px;
    max-width: 640px;
}
/* Two-col: left-align content */
.phoshop-hero--two-col .phoshop-hero-content {
    text-align: left;
    padding: 0;
    max-width: none;
}
.phoshop-hero--two-col .phoshop-hero-actions { justify-content: flex-start; }
.phoshop-hero--two-col .phoshop-hero-logo { margin: 0 0 20px; }

/* ============================================
   HERO — Full-background slideshow mode
   ============================================ */
.phoshop-hero--fullbg {
    min-height: max(520px, 70vh);
    background: var(--color-dark); /* fallback ก่อน slide โหลด */
}

/* Background slides layer */
.phoshop-hero-bg-slideshow {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.phoshop-hero-bg-slides {
    position: relative;
    width: 100%; height: 100%;
}
.phoshop-hero-bg-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity 1.2s ease;
}
.phoshop-hero-bg-slide.active { opacity: 1; }
.phoshop-hero-bg-slide img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    display: block;
}

/* ใน fullbg: overlay เข้มขึ้นเล็กน้อยเพื่อให้ข้อความอ่านได้ */
.phoshop-hero--fullbg .phoshop-hero-overlay {
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,.55) 0%,
        rgba(0,0,0,.30) 50%,
        rgba(0,0,0,.50) 100%
    );
    z-index: 1;
}

/* ใน fullbg: inner เพิ่ม z-index ให้อยู่เหนือ overlay */
.phoshop-hero--fullbg .phoshop-hero-inner {
    z-index: 2;
    justify-content: center;
    padding: 80px 40px;
}

/* ใน fullbg: content อยู่กลาง */
.phoshop-hero--fullbg .phoshop-hero-content {
    text-align: center;
    align-items: center;
    padding: 0;
    max-width: 720px;
}
.phoshop-hero--fullbg .phoshop-hero-actions { justify-content: center; }
.phoshop-hero--fullbg .phoshop-hero-logo { margin: 0 auto 20px; }

/* Arrows + Dots ใน fullbg/boxed — เป็น direct child ของ .phoshop-hero
   ต้องมี z-index สูงกว่า overlay (z-index:1) และ inner (z-index:2) */
.phoshop-hero--fullbg .phoshop-hero-ctrl {
    position: absolute;
    z-index: 10;
    pointer-events: auto;
}
.phoshop-hero--fullbg .phoshop-slide-arrow.phoshop-hero-ctrl {
    top: 50%; transform: translateY(-50%);
    width: 48px; height: 48px;
    background: rgba(0,0,0,.38);
}
.phoshop-hero--fullbg .phoshop-slide-prev.phoshop-hero-ctrl { left: 20px; }
.phoshop-hero--fullbg .phoshop-slide-next.phoshop-hero-ctrl { right: 20px; }

.phoshop-hero--fullbg .phoshop-slide-dots.phoshop-hero-ctrl {
    bottom: 80px; /* เหนือ wave */
    left: 50%; transform: translateX(-50%);
}
.phoshop-hero--fullbg .phoshop-slide-dot {
    width: 10px; height: 10px;
}

/* Mobile */
@media (max-width: 768px) {
    .phoshop-hero--fullbg { min-height: max(400px, 60vh); }
    .phoshop-hero--fullbg .phoshop-hero-inner { padding: 60px 20px; }
    .phoshop-hero--fullbg .phoshop-slide-prev { left: 10px; }
    .phoshop-hero--fullbg .phoshop-slide-next { right: 10px; }
    .phoshop-hero--fullbg .phoshop-slide-dots { bottom: 64px; }
}

/* ============================================
   HERO — Boxed (contained + rounded corners)
   ============================================ */

/* Section wrapper: แสดง page background รอบ box */
.phoshop-section--hero-boxed {
    background: var(--color-lighter);
    padding: 24px 24px 48px !important; /* override padding-top:0 จาก .phoshop-section--hero */
}

/* hero box: contained + rounded */
.phoshop-hero--boxed {
    max-width: var(--container);   /* 1200px */
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    min-height: max(360px, 52vh);
}

/* Override fullbg min-height for boxed (ไม่ต้องสูงเท่า fullscreen) */
.phoshop-hero--fullbg.phoshop-hero--boxed {
    min-height: max(360px, 52vh);
}

/* Wave: ซ่อนใน boxed เพราะมุมโค้งทำแนวขอบเองแล้ว */
.phoshop-hero--boxed .phoshop-hero-wave { display: none; }

/* Overlay: gradient เฉียงแบบ Ducky — เข้มซ้ายบน จางขวาล่าง */
.phoshop-hero--boxed .phoshop-hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0,0,0,.52) 0%,
        rgba(0,0,0,.18) 55%,
        rgba(0,0,0,.00) 100%
    );
}

/* Content ชิดซ้าย (คล้ายภาพตัวอย่าง) */
.phoshop-hero--boxed .phoshop-hero-content {
    text-align: left;
    align-items: flex-start;
    padding: 0;
    max-width: 560px;
}
.phoshop-hero--boxed .phoshop-hero-actions  { justify-content: flex-start; }
.phoshop-hero--boxed .phoshop-hero-logo     { margin: 0 0 20px; }
.phoshop-hero--boxed .phoshop-hero-inner    { padding: 56px 48px; justify-content: flex-start; }

/* Dots + Arrows ใน boxed: override ตำแหน่งจาก fullbg */
.phoshop-hero--boxed .phoshop-slide-dots.phoshop-hero-ctrl { bottom: 16px; }
.phoshop-hero--boxed .phoshop-slide-prev.phoshop-hero-ctrl { left: 16px; }
.phoshop-hero--boxed .phoshop-slide-next.phoshop-hero-ctrl { right: 16px; }

/* Mobile */
@media (max-width: 768px) {
    .phoshop-section--hero-boxed { padding: 16px 12px 32px; }
    .phoshop-hero--boxed         { border-radius: 14px; min-height: max(280px, 45vh); }
    .phoshop-hero--boxed .phoshop-hero-inner { padding: 40px 24px; }
}

/* Wave divider ด้านล่าง Hero — --wave-fill injected inline by front-page.php */
.phoshop-hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    line-height: 0;
    z-index: 2;
}
.phoshop-hero-wave svg {
    width: 100%;
    height: clamp(40px, 5vw, 80px);
    display: block;
}

/* ============================================================
   Wave divider สำหรับ Section ทั่วไป (non-hero)
   ============================================================ */
.phoshop-section-has-wave {
    position: relative;
    overflow: visible;
    z-index: 1; /* สร้าง stacking context ให้ wave divider แสดงทับ section ถัดไปได้ */
}
.phoshop-section-wave-divider {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    line-height: 0;
    z-index: 10;
    pointer-events: none;
}
.phoshop-section-wave-divider svg {
    width: 100%;
    height: clamp(48px, 6vw, 80px);
    display: block;
}
.phoshop-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,.2); backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,.3);
    padding: 6px 18px; border-radius: 20px;
    font-size: .85rem; font-weight: 500;
    margin-bottom: 20px; letter-spacing: .05em;
}
.phoshop-hero-logo { height: 80px; margin: 0 auto 20px; filter: drop-shadow(0 2px 8px rgba(0,0,0,.3)); }
.phoshop-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-weight: 600; line-height: 1.2;
    margin-bottom: 16px;
    text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.phoshop-hero-subtitle { font-size: 1.05rem; opacity: .9; margin-bottom: 32px; line-height: 1.6; }

.phoshop-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.phoshop-btn-hero {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-white); color: var(--color-primary);
    padding: 14px 28px; border-radius: 30px;
    font-weight: 700; font-size: .95rem;
    transition: opacity var(--transition);
}
.phoshop-btn-hero:hover { opacity: .88; }
.phoshop-btn-hero svg { transition: transform var(--transition); }
.phoshop-btn-hero:hover svg { transform: translateX(4px); }

/* ============================================
   HERO — Right: Media panel
   ============================================ */
.phoshop-hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- YouTube embed --- */
.phoshop-hero-yt-wrap {
    position: relative;
    width: 100%;
    padding-top: 56.25%;               /* 16:9 */
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
}
.phoshop-hero-yt-wrap iframe {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    border: none;
}

/* --- Image slideshow --- */
.phoshop-hero-slideshow {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.45);
    aspect-ratio: 1 / 1;
}
.phoshop-hero-slides {
    position: relative;
    width: 100%; height: 100%;
}
.phoshop-hero-slide {
    position: absolute; inset: 0;
    opacity: 0;
    transition: opacity .6s ease;
}
.phoshop-hero-slide.active { opacity: 1; }
.phoshop-hero-slide img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Arrows */
.phoshop-slide-arrow {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    z-index: 10;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
    backdrop-filter: blur(4px);
}
.phoshop-slide-arrow:hover { background: rgba(0,0,0,.7); }
.phoshop-slide-prev { left: 12px; }
.phoshop-slide-next { right: 12px; }

/* Dots */
.phoshop-slide-dots {
    position: absolute;
    bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px; z-index: 10;
}
.phoshop-slide-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    border: none; cursor: pointer;
    padding: 0;
    transition: background var(--transition), transform var(--transition);
}
.phoshop-slide-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ============================================
   LINE BUTTON (shared)
   ============================================ */
.phoshop-line-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-line); color: #fff;
    padding: 10px 20px; border-radius: 24px;
    font-weight: 600; font-size: .9rem;
    transition: background var(--transition);
}
.phoshop-line-btn:hover { background: var(--color-line-dark); color: #fff; }
.phoshop-line-btn--hero { background: var(--color-line); backdrop-filter: blur(4px); }
.phoshop-line-btn--large { padding: 18px 32px; font-size: 1.1rem; border-radius: 16px; }
.phoshop-line-btn--large strong { display: block; font-size: 1.1rem; }
.phoshop-line-btn--large small { font-size: .8rem; opacity: .85; font-weight: 400; }

/* ============================================
   PRODUCTS — Grid Layout
   ============================================ */
.phoshop-section--products {
    padding: 80px 0 0;          /* ไม่มี padding-bottom — frame จะยื่นลงไปทับ section ถัดไป */
    background: var(--color-lighter);
    overflow: visible;
    position: relative;
    z-index: 0;
}
.phoshop-products-wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* กรอบครอบสินค้าทั้งหมด: ขอบบน+ซ้าย+ขวา, มุมบนมน, ไม่มีขอบล่าง */
.phoshop-products-frame {
    border-bottom: none;
    border-radius: 24px 24px 0 0;
    overflow: hidden;           /* clip title block corners */
    margin-left: -24px;
    margin-right: -24px;
    padding: 0 0 80px;          /* top handled by title block */
    margin-bottom: -80px;
    position: relative;
    z-index: 1;
    background: var(--color-lighter);
}

/* ====== Products Title — Style B (dark panel + outline text) ====== */
.phoshop-products-title-block {
    background: #2b1a0d;
    padding: 44px 32px 36px;
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
/* Repeating diagonal text pattern background */
.phoshop-products-title-block::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; right: -100%; bottom: -100%;
    background-image: var(--products-bg-img);
    background-repeat: repeat;
    background-size: 560px 70px;
    transform: rotate(-25deg);
    pointer-events: none;
    z-index: 0;
}
/* Keep all title content above the pattern */
.phoshop-products-title-block > * { position: relative; z-index: 1; }

/* inner: inline-flex column → shrinks to h2 width, subtitle right-aligns inside */
.phoshop-products-title-inner {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 100%;
}
.phoshop-products-title-main {
    font-family: var(--font-heading);
    font-size: clamp(3.2rem, 8vw, 6rem);
    font-weight: 900;
    color: #FFF8F5;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin: 0;
}
.phoshop-products-title-sub {
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(253,235,208,.75);
    text-align: right;
    line-height: 1.5;
}

/* View All Button — ปุ่มเดี่ยวใต้ grid (ออกจาก grid แล้ว) */
.phoshop-products-all-cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;   /* เว้นจากแถวสินค้า (อยู่ในกรอบ ไม่ต้องชดเชย margin ติดลบ) */
    padding: 0 24px;
}
.phoshop-btn-all {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 38px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 800;
    border-radius: 50px;
    text-decoration: none;
    transition: background .2s ease, transform .15s ease;
}
.phoshop-btn-all svg { transition: transform .2s ease; }
.phoshop-btn-all:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
}
.phoshop-btn-all:hover svg { transform: translateX(4px); }
.phoshop-btn-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: 2px solid var(--color-primary, #e05c2a);
    border-radius: 50px;
    color: var(--color-primary, #e05c2a);
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    transition: background .2s, color .2s, transform .15s;
}
.phoshop-btn-more:hover {
    background: var(--color-primary, #e05c2a);
    color: #fff;
    transform: translateY(-2px);
}

/* Grid */
.phoshop-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 0 24px;
}

/* Product Card */
.phoshop-product-card {
    background: #fff; border-radius: var(--radius-lg);
    padding: 8px;
    border: 1px solid #f0ebe6;
    transition: border-color var(--transition);
    position: relative; display: flex; flex-direction: column;
}
.phoshop-product-card:hover { border-color: #c4b5a8; }

.phoshop-product-badge {
    position: absolute; top: 18px; left: 18px; z-index: 2;
    background: var(--color-accent); color: #fff;
    padding: 4px 12px; border-radius: 20px;
    font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
/* ป้าย "แนะนำ" แบบ Shopee — inline หน้าชื่อสินค้า */
.phoshop-name-badge {
    display: inline-block; vertical-align: text-bottom;
    background: var(--color-primary); color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 1.4;
    padding: 1px 6px; border-radius: 4px;
    letter-spacing: .02em; white-space: nowrap;
}
.phoshop-product-img-wrap {
    position: relative;
    aspect-ratio: 1; overflow: hidden;
    border-radius: calc(var(--radius-lg) - 6px);
    background: linear-gradient(135deg, #fbe9dd 0%, #fdf3ec 55%, #ffffff 100%);
}
.phoshop-product-img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.phoshop-product-card:hover .phoshop-product-img { transform: scale(1.07); }

/* ปุ่ม "คล้ายกัน" แบบ Shopee — เลื่อนขึ้นจากด้านล่างรูปเมื่อ hover (desktop เท่านั้น) */
.phoshop-product-similar {
    display: none;
}
@media (hover: hover) and (min-width: 769px) {
    .phoshop-product-similar {
        display: flex;
        align-items: flex-end;
        justify-content: center;
        position: absolute;
        left: 0; right: 0; bottom: 0;
        height: 64px;
        padding-bottom: 9px;
        /* ไล่สีจางลง — เขียวเข้มทึบที่ขอบล่าง จางโปร่งขึ้นด้านบน ดูนุ่ม */
        background: linear-gradient(to top,
            color-mix(in srgb, var(--color-primary) 92%, transparent) 0%,
            color-mix(in srgb, var(--color-primary) 70%, transparent) 55%,
            transparent 100%);
        color: #fff;
        font-size: .85rem; font-weight: 700;
        text-decoration: none;
        border-bottom-left-radius: calc(var(--radius-lg) - 6px);
        border-bottom-right-radius: calc(var(--radius-lg) - 6px);
        transform: translateY(100%);
        transition: transform .28s ease;
    }
    .phoshop-product-card:hover .phoshop-product-similar {
        transform: translateY(0);
    }
}
.phoshop-product-img--placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-accent);
}
.phoshop-product-info {
    padding: 16px 12px 10px;
    display: flex; flex-direction: column; flex: 1;
}
.phoshop-product-name {
    font-size: .92rem; font-weight: 600;
    margin-bottom: 10px; color: var(--color-dark);
    line-height: 1.4; letter-spacing: 0;
    /* ตัด 2 บรรทัด แบบ Shopee */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.phoshop-product-desc { font-size: .83rem; color: var(--color-muted); margin-bottom: 10px; flex: 1; line-height: 1.6; }

/* Foot: price on top, action buttons on their own full-width row below.
   Consistent regardless of how many channel buttons a product has. */
.phoshop-product-foot {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.phoshop-product-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
    letter-spacing: -.01em;
}
.phoshop-product-price-label {
    font-size: .72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: .06em;
    color: var(--color-muted);
}
.phoshop-product-price-row {
    display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
}
.phoshop-product-price-current {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-primary);
}
.phoshop-product-price-compare {
    font-size: .9rem;
    font-weight: 500;
    color: var(--color-muted);
    text-decoration: line-through;
}
.phoshop-product-price--sale .phoshop-product-price-current { color: var(--color-accent); }

/* Product card — action buttons (full-width row under the price) */
.phoshop-product-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
/* Detail button grows to fill, channel icons stay their fixed size at the end */
.phoshop-product-actions .phoshop-btn-detail { flex: 1 1 auto; min-width: 0; }

/* ดูรายละเอียด — ghost style */
.phoshop-btn-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border: 1.5px solid #e5ddd6;
    border-radius: 8px;
    background: #faf8f6;
    color: #666;
    font-size: .82rem;
    font-weight: 500;
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
    white-space: nowrap;
    box-sizing: border-box;
}
.phoshop-btn-detail:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #fff;
}

/* Icon-only channel buttons */
.phoshop-product-icon-btns {
    display: flex;
    gap: 6px;
}
.phoshop-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    text-decoration: none;
    flex-shrink: 0;
    transition: opacity var(--transition);
    color: #fff;
}
.phoshop-icon-btn:hover { opacity: .82; }
.phoshop-icon-btn--line    { background: #00B900; }
.phoshop-icon-btn--tiktok  { background: #111; }
.phoshop-icon-btn--shopee  { background: #EE4D2D; }

/* ดูรายละเอียด — icon-only mode (legacy: ใช้ใน related products) */
.phoshop-btn-detail--icon {
    width: 38px;
    height: 38px;
    flex: unset;
    padding: 0;
    justify-content: center;
    flex-shrink: 0;
}

/* ดูรายละเอียด — แบบ collapsible (front page products) */
/* Default: แสดงข้อความ "ดูรายละเอียด" (สำหรับ PC) */
.phoshop-btn-detail__icon { display: none; }
.phoshop-btn-detail__text { display: inline; }

/* มือถือ (≤768px): ถ้ามีปุ่ม platform ครบ 3 → ย่อเป็น icon-only */
@media (max-width: 768px) {
    .phoshop-btn-detail--collapsible {
        width: 32px;
        height: 32px;
        flex: unset;
        padding: 0;
        justify-content: center;
        flex-shrink: 0;
    }
    .phoshop-btn-detail--collapsible .phoshop-btn-detail__icon { display: inline-block; }
    .phoshop-btn-detail--collapsible .phoshop-btn-detail__text { display: none; }
}

/* ============================================
   PRODUCTS — Empty State (Admin only)
   ============================================ */
.phoshop-products-empty {
    position: relative;
    padding: 40px 24px 80px;
    max-width: var(--container);
    margin: 0 auto;
}

/* Skeleton grid — blurred backdrop */
.phoshop-products-empty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    filter: blur(3px);
    opacity: .45;
    pointer-events: none;
    user-select: none;
}

.phoshop-products-empty-card {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #f0ebe6;
    display: flex;
    flex-direction: column;
}

.phoshop-products-empty-img {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #f5ece6 0%, #fde8d8 50%, #f0e0d6 100%);
    animation: phoshop-skeleton-pulse 1.6s ease-in-out infinite;
}

.phoshop-products-empty-lines {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phoshop-products-empty-line {
    border-radius: 6px;
    background: linear-gradient(90deg, #ede8e4 25%, #f8f3f0 50%, #ede8e4 75%);
    background-size: 200% 100%;
    animation: phoshop-skeleton-shimmer 1.6s ease-in-out infinite;
}
.phoshop-products-empty-line--title  { height: 16px; width: 75%; }
.phoshop-products-empty-line--price  { height: 20px; width: 45%; }
.phoshop-products-empty-line--btn    { height: 36px; width: 100%; border-radius: 24px; margin-top: 4px; }

@keyframes phoshop-skeleton-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .65; }
}
@keyframes phoshop-skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Overlay panel — centred above skeleton */
.phoshop-products-empty-panel {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 48px rgba(0,0,0,.13), 0 2px 8px rgba(0,0,0,.06);
    padding: 40px 48px 36px;
    text-align: center;
    min-width: 320px;
    max-width: 440px;
    width: 90%;
    z-index: 10;
    border: 1.5px solid #e6f4ec;
}

.phoshop-products-empty-icon {
    margin-bottom: 18px;
}

.phoshop-products-empty-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 10px;
    line-height: 1.3;
}

.phoshop-products-empty-desc {
    font-size: .93rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 28px;
}

.phoshop-products-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: #035726;
    color: #fff;
    border-radius: 50px;
    font-size: .93rem;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 16px rgba(3,87,38,.25);
    margin-bottom: 20px;
}
.phoshop-products-empty-btn:hover {
    background: #024a20;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(3,87,38,.35);
}

.phoshop-products-empty-note {
    font-size: .78rem;
    color: #a08878;
    line-height: 1.5;
    border-top: 1px solid #f0ebe6;
    padding-top: 14px;
    margin-top: 4px;
}

/* ============================================
   SINGLE PRODUCT PAGE
   ============================================ */
.phoshop-single-product-main {
    padding-top: 20px;
    min-height: 70vh;
    background: #fff;
}
.phoshop-single-product-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 0 80px;
}

/* Breadcrumb */
.phoshop-breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: .95rem; color: var(--color-muted);
    margin-bottom: 24px;
}
.phoshop-breadcrumb a {
    color: var(--color-muted);
    display: inline-flex; align-items: center;
    transition: color var(--transition);
}
.phoshop-breadcrumb a:hover { color: var(--color-primary); }
.phoshop-breadcrumb-sep { opacity: .35; }
.phoshop-breadcrumb-current { color: var(--color-dark); font-weight: 500; }

/* Detail grid: image | info */
.phoshop-product-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
    margin-bottom: 64px;
}

/* Image col — Gallery */
.phoshop-product-gallery { display: flex; flex-direction: column; gap: 12px; }

.phoshop-product-gallery-main {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;

    /* Base warm cream */
    background-color: #fdf6ee;

    /* Layer 1: soft spotlight จากกลาง */
    background-image:
        radial-gradient(ellipse 70% 70% at 50% 45%,
            rgba(255,255,255,.95) 0%,
            rgba(253,246,238,.6) 55%,
            rgba(245,230,210,.0) 100%),
        /* Layer 2: มุมเงา subtle */
        radial-gradient(ellipse 120% 120% at 50% 50%,
            #fdf6ee 40%,
            #f0dfc8 100%);
}

/* เส้น shadow ด้านล่างรูป — ให้รู้สึกว่ามีพื้น */
.phoshop-product-gallery-main::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 8%;
    background: radial-gradient(ellipse 80% 100% at 50% 100%,
        rgba(140, 90, 40, .22) 0%,
        transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.phoshop-gallery-main-img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
    transition: opacity .15s ease;
}

/* Zoom button */
.phoshop-gallery-zoom-btn {
    position: absolute; bottom: 12px; right: 12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity var(--transition), background var(--transition);
    z-index: 2;
}
.phoshop-product-gallery-main:hover .phoshop-gallery-zoom-btn { opacity: 1; }
.phoshop-gallery-zoom-btn:hover { background: rgba(0,0,0,.68); }

/* Lightbox — JS toggles via element.hidden = true/false */
.phoshop-lightbox {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.88); backdrop-filter: blur(8px);
    align-items: center; justify-content: center;
}
.phoshop-lightbox:not([hidden]) { display: flex; }
.phoshop-lightbox-inner {
    position: relative; max-width: 90vw; max-height: 90vh;
    display: flex; align-items: center; justify-content: center;
}
.phoshop-lightbox-img {
    max-width: 90vw; max-height: 88vh;
    object-fit: contain; border-radius: 10px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
}
.phoshop-lightbox-close {
    position: fixed; top: 20px; right: 20px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.15); backdrop-filter: blur(8px);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
    z-index: 10000;
}
.phoshop-lightbox-close:hover { background: rgba(255,255,255,.28); }

/* cursor pointer on main img to hint clickable */
.phoshop-gallery-main-img { cursor: zoom-in; }

/* Thumbnail strip */
.phoshop-product-gallery-thumbs {
    display: flex; gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scrollbar-color: var(--color-light) transparent;
}
.phoshop-product-gallery-thumbs::-webkit-scrollbar { height: 4px; }
.phoshop-product-gallery-thumbs::-webkit-scrollbar-track { background: transparent; }
.phoshop-product-gallery-thumbs::-webkit-scrollbar-thumb { background: var(--color-light); border-radius: 2px; }

.phoshop-gallery-thumb {
    flex-shrink: 0;
    width: 72px; height: 72px;
    border-radius: 8px; overflow: hidden;
    border: 2px solid transparent;
    padding: 0; background: var(--color-lighter);
    cursor: pointer;
    transition: border-color var(--transition), opacity var(--transition);
    opacity: .65;
}
.phoshop-gallery-thumb img { width:100%; height:100%; object-fit:cover; display:block; }
.phoshop-gallery-thumb:hover { opacity: .85; }
.phoshop-gallery-thumb.active {
    border-color: #ec1a23;
    opacity: 1;
}

/* Placeholder (no image) */
.phoshop-product-detail-img-wrap {
    position: relative;
    background: var(--color-lighter);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
}
.phoshop-product-detail-img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
.phoshop-product-detail-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary);
}
.phoshop-product-detail-badge {
    position: absolute; top: 16px; left: 16px;
    background: var(--color-accent); color: #fff;
    padding: 5px 14px; border-radius: 20px;
    font-size: .82rem; font-weight: 600; z-index: 1;
}

/* Info col */
.phoshop-product-detail-cats {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 12px;
}
.phoshop-product-detail-cat {
    font-size: .78rem; font-weight: 600;
    color: var(--color-primary);
    text-transform: uppercase; letter-spacing: .08em;
}
.phoshop-product-detail-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 800; color: var(--color-dark);
    line-height: 1.35; margin-bottom: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
}
.phoshop-product-detail-price {
    margin-bottom: 20px;
}
.phoshop-product-detail-price-compare {
    display: block;
    font-size: .95rem;
    color: var(--color-muted);
    text-decoration: line-through;
    margin-bottom: 4px;
}
.phoshop-product-detail-price-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.phoshop-product-detail-price-amount {
    display: inline-flex;
    align-items: flex-start;
    gap: 2px;
    font-size: 2.4rem; font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}
.phoshop-product-detail-price-symbol {
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 5px;
}
.phoshop-product-detail-price-badge {
    display: inline-flex;
    align-items: center;
    background: var(--color-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 5px;
    letter-spacing: .03em;
}
.phoshop-product-detail-excerpt {
    font-size: .95rem; line-height: 1.75;
    color: var(--color-muted);
    margin-bottom: 24px;
}
.phoshop-product-detail-short-desc {
    position: relative;
    font-size: 1.1rem; line-height: 1.8;
    color: var(--color-text);
    margin-bottom: 28px;
    margin-top: 40px;
    padding: 24px 24px 24px 32px;
    background: var(--color-lighter);
    border-radius: 10px;
}
.phoshop-product-detail-short-desc::before {
    content: '\201C';
    position: absolute;
    top: -50px;
    left: -20px;
    font-size: 200px;
    line-height: 1;
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--color-accent);
    opacity: .12;
    pointer-events: none;
    user-select: none;
}
.phoshop-product-detail-short-desc::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -60px;
    width: 200px;
    height: 200px;
    background-image: url('../images/QuoteBG.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    filter: brightness(0) sepia(1) saturate(3) hue-rotate(345deg) brightness(0.7);
    opacity: .12;
    pointer-events: none;
    user-select: none;
}
/* มีน้ำหนักด้านล่าง → ย้าย QuoteBG ไปที่กล่องน้ำหนักแทน */
.phoshop-product-detail-short-desc.has-weight-below::after { content: none; }
.phoshop-product-detail-weight {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text);
    margin: 0 0 28px;
    padding: 18px 24px;
    background: var(--color-lighter);
    border-radius: 10px;
}
/* QuoteBG ย้ายมาจาก short-desc เมื่อมีน้ำหนัก — มุมขวาล่าง */
.phoshop-product-detail-weight::after {
    content: '';
    position: absolute;
    bottom: -70px;
    right: -90px;
    width: 200px;
    height: 200px;
    background-image: url('../images/QuoteBG.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom right;
    filter: brightness(0) sepia(1) saturate(3) hue-rotate(345deg) brightness(0.7);
    opacity: .12;
    pointer-events: none;
    user-select: none;
}
.phoshop-product-detail-weight svg { color: var(--color-accent); flex-shrink: 0; position: relative; z-index: 1; width: 22px; height: 22px; display: block; transform: translateY(-2px); }
.phoshop-product-detail-weight-label { font-weight: 600; }
.phoshop-product-detail-weight-val { margin-left: auto; font-weight: 700; }
.phoshop-product-detail-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px 0;
}
.phoshop-product-detail-divider::before,
.phoshop-product-detail-divider::after,
.phoshop-product-detail-divider span {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d9cfc9;
}

/* Actions */
.phoshop-product-detail-actions {
    display: flex; flex-direction: row; flex-wrap: wrap; gap: 10px;
    margin-bottom: 28px;
}

/* Order buttons — single product page */
.phoshop-product-detail-order-btn {
    flex: 1;
    min-width: 0;
    position: relative;
    overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    padding: 16px 20px; border-radius: 12px;
    font-size: 1rem; font-weight: 700;
    transition: background var(--transition);
    white-space: nowrap;
    gap: 0;
}
/* Icon — large decorative background on left */
.phoshop-product-detail-order-btn svg {
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%) rotate(-20deg);
    width: 68px;
    height: 68px;
    opacity: .18;
    pointer-events: none;
    flex-shrink: 0;
}
/* Button text sits above the icon */
.phoshop-product-detail-order-btn span,
.phoshop-product-detail-order-btn:not(:has(span)) {
    position: relative;
    z-index: 1;
}
.phoshop-product-detail-order-btn--line   { background: #06C755; }
.phoshop-product-detail-order-btn--line:hover { background: #05a849; color: #fff; }
.phoshop-product-detail-order-btn--tiktok { background: #010101; }
.phoshop-product-detail-order-btn--tiktok:hover { background: #333; color: #fff; }
.phoshop-product-detail-order-btn--shopee { background: #EE4D2D; }
.phoshop-product-detail-order-btn--shopee:hover { background: #d43e21; color: #fff; }
.phoshop-product-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1.5px solid var(--color-primary);
    border-radius: 100px;
    color: var(--color-primary);
    font-size: .8rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background var(--transition), color var(--transition);
}
.phoshop-product-detail-back:hover {
    background: var(--color-primary);
    color: #fff;
}
.phoshop-product-detail-back:hover svg {
    stroke: #fff;
}

/* Meta: categories + tags (pill style) */
.phoshop-product-detail-meta {
    border-top: 1px solid #f0ebe6;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.phoshop-product-meta-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .8rem;
}
.phoshop-product-meta-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-muted);
    font-weight: 600;
    white-space: nowrap;
    padding-top: 3px;
    min-width: 72px;
    flex-shrink: 0;
}
.phoshop-product-meta-label svg { opacity: .6; flex-shrink: 0; }
.phoshop-product-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.phoshop-meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 99px;
    font-size: .78rem;
    font-weight: 500;
    text-decoration: none;
    transition: background .18s, color .18s, border-color .18s, transform .15s;
    line-height: 1.4;
}
.phoshop-meta-pill:hover { transform: translateY(-1px); }
.phoshop-meta-pill--cat {
    background: var(--color-lighter);
    color: var(--color-muted);
    border: 1px solid #edddd0;
}
.phoshop-meta-pill--cat:hover {
    background: var(--color-light);
    color: var(--color-dark);
    border-color: #ddc8b8;
}
.phoshop-meta-pill--tag {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #e5e7eb;
}
.phoshop-meta-pill--tag:hover {
    background: #e5e7eb;
    color: #222;
}

/* Meta + Share row */
.phoshop-meta-share-row {
    border-top: none;
    background-image: radial-gradient(circle, #d0c8bf 1.5px, transparent 1.5px);
    background-size: 12px 2px;
    background-repeat: repeat-x;
    background-position: top;
    padding-top: 20px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}
.phoshop-meta-share-row .phoshop-product-detail-meta {
    border-top: none;
    padding-top: 0;
    flex: 1;
}

/* Share trigger button */
.phoshop-share-wrap {
    position: relative;
    flex-shrink: 0;
    display: flex;
}
.phoshop-share-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 12px;
    border: 1.5px solid #e8e2db;
    background: #fff;
    color: #555;
    font-size: .8rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
    white-space: nowrap;
    width: 100%;
    height: 100%;
}
.phoshop-share-trigger:hover {
    border-color: var(--color-primary, #e05c2a);
    color: var(--color-primary, #e05c2a);
    background: #fff9f7;
}
.phoshop-share-trigger svg { flex-shrink: 0; }

/* Share dropdown card */
.phoshop-share-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06);
    border: 1px solid #f0ebe4;
    padding: 16px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
    z-index: 100;
}
.phoshop-share-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
/* Arrow */
.phoshop-share-dropdown-arrow {
    position: absolute;
    top: -7px;
    right: 20px;
    width: 13px; height: 13px;
    background: #fff;
    border-left: 1px solid #f0ebe4;
    border-top: 1px solid #f0ebe4;
    transform: rotate(45deg);
}
.phoshop-share-dropdown-title {
    font-size: .75rem;
    font-weight: 600;
    color: #aaa;
    letter-spacing: .05em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
/* Row of round icon buttons */
.phoshop-share-icons {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}
.phoshop-share-ico {
    position: relative;
    width: 42px; height: 42px;
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s, transform .12s;
}
.phoshop-share-ico:hover { transform: translateY(-2px); }
.phoshop-share-ico--fb   { background: #e7f0fd; color: #1877f2; }
.phoshop-share-ico--line { background: #e6f9ee; color: #06c755; }
.phoshop-share-ico--copy { background: #f3f4f6; color: #555; }
.phoshop-share-ico--fb:hover   { background: #1877f2; color: #fff; }
.phoshop-share-ico--line:hover { background: #06c755; color: #fff; }
.phoshop-share-ico--copy:hover { background: #e5e7eb; color: #222; }

/* Copy icon button: swap copy ⇄ check on success */
.phoshop-share-ico--copy .phoshop-share-ico-check { display: none; }
.phoshop-share-ico--copy.is-copied { background: #e6f9ee; color: #06c755; }
.phoshop-share-ico--copy.is-copied .phoshop-share-ico-copy  { display: none; }
.phoshop-share-ico--copy.is-copied .phoshop-share-ico-check { display: block; }

/* Short URL row */
.phoshop-share-shorturl {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.phoshop-share-shorturl-input {
    width: 100%;
    padding: 8px 12px;
    border: 1.5px solid #e8e2db;
    border-radius: 10px;
    background: #faf8f5;
    color: #555;
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}
.phoshop-share-shorturl-input:focus {
    outline: none;
    border-color: var(--color-primary, #e05c2a);
}
.phoshop-share-shorturl-status {
    font-size: .72rem;
    color: #aaa;
    text-align: center;
}

/* Full description */
.phoshop-product-detail-body {
    margin-bottom: 64px;
}
.phoshop-product-detail-section-title {
    font-size: 1.6rem; font-weight: 700;
    color: var(--color-dark); margin-bottom: 28px;
    display: flex; align-items: center; gap: 16px;
    white-space: nowrap;
}
.phoshop-product-detail-section-title::after {
    content: '';
    display: block; flex: 1;
    height: 2px;
    background: linear-gradient(to right, #e8e0db, transparent);
    border-radius: 2px;
}
.phoshop-product-detail-content {
    line-height: 1.85;
    color: var(--color-text);
    width: 100%;
}
.phoshop-product-detail-content p { margin-bottom: 16px; }
.phoshop-product-detail-content table {
    width: 100%; border-collapse: collapse;
    font-size: .9rem; margin-bottom: 16px;
}
.phoshop-product-detail-content table th,
.phoshop-product-detail-content table td {
    padding: 10px 14px; text-align: left;
    border-bottom: 1px solid #f0ebe6;
}
.phoshop-product-detail-content table th {
    width: 160px; color: var(--color-dark);
    font-weight: 600; background: var(--color-lighter);
}

/* Related products */
.phoshop-product-related { padding-top: 10px; }
.phoshop-related-grid { grid-template-columns: repeat(4, 1fr); }

/* ============================================
   BRAND STORY — Logo + Content LEFT | Image fog RIGHT
   ============================================ */
.phoshop-section--brand {
    padding: 0;
    background: #fff;
    overflow: hidden;
    position: relative;
}

/* Brand section — ribbon อยู่นอก container ให้ full-width */

.phoshop-brand-outer {
    position: relative;
    overflow: hidden;           /* clip ribbon ที่ระดับ section เต็มจอ */
}


.phoshop-brand-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;   /* image col กว้างกว่านิดหน่อย */
    gap: 0;
    align-items: stretch;
    min-height: 580px;
}

/* --- Col ซ้าย: content — align กับ container boundary ---
   padding-top เล็กน้อยเพราะ hero wave (absolute, อยู่ใน hero section)
   สูง ~72px อยู่แล้ว ไม่ต้องเพิ่ม gap เพิ่มเติม */
.phoshop-brand-body {
    padding-top: 60px;
    padding-bottom: 120px;  /* เผื่อ ribbon 140px ไม่ทับ text */
    padding-right: 48px;
    padding-left: max(clamp(20px, 5vw, 60px), calc((100vw - 1280px) / 2 + 60px));
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 0;
}
/* จัดให้ inline-flex children อยู่กึ่งกลางตาม body */
.phoshop-brand-body .phoshop-brand-eyebrow,
.phoshop-brand-body .phoshop-brand-stats { justify-content: center; }
.phoshop-brand-body .phoshop-brand-features { align-items: center; }
.phoshop-brand-body .phoshop-brand-feat { justify-content: center; text-align: left; }

/* ===== Wave ribbon — full-width (relative to .phoshop-brand-outer) ===== */
.phoshop-brand-ribbon {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 160px;
    pointer-events: none;
    z-index: 10;
}
.phoshop-brand-ribbon-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Eyebrow label เหนือ title — เส้นขีดสั้น + ตัวพิมพ์ใหญ่ */
.phoshop-brand-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 22px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--color-primary);
}
.phoshop-brand-eyebrow-line {
    width: 34px;
    height: 2px;
    background: var(--color-primary);
    flex-shrink: 0;
}

/* Logo */
.phoshop-brand-logo-wrap {
    margin-bottom: 20px;
}
.phoshop-brand-logo {
    height: 270px;
    width: auto;
    max-width: 560px;
    object-fit: contain;
    display: block;
}
@media (max-width: 768px) {
    .phoshop-brand-logo { height: 100px; max-width: 260px; }
}

/* Title — ใหญ่ โดดเด่น */
.phoshop-brand-title {
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.2vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-dark);
    margin: 0 0 8px;
    white-space: nowrap;
}

/* Subtitle — ประเภทร้าน (สีหลัก) */
.phoshop-brand-subtitle {
    font-size: clamp(1rem, 1.6vw, 1.25rem);
    font-weight: 700;
    color: var(--color-primary);
    margin: 0 0 6px;
    line-height: 1.4;
}

/* Tagline — แฟรนไชส์ / พันธมิตร */
.phoshop-brand-tagline {
    font-size: .9rem;
    color: #888;
    font-weight: 400;
    margin: 0 0 28px;
}

/* Stat row — เติมพื้นที่แนวนอนด้วยจุดเด่นเชิงคุณภาพ คั่นด้วยเส้นบาง */
.phoshop-brand-stats {
    display: flex;
    align-items: stretch;
    gap: 22px;
    margin: 0 0 30px;
    padding: 20px 0;
    border-top: 1px solid rgba(0,0,0,.08);
    border-bottom: 1px solid rgba(0,0,0,.08);
}
.phoshop-brand-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phoshop-brand-stat-val {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--color-dark);
}
.phoshop-brand-stat-label {
    font-size: .76rem;
    color: #888;
    line-height: 1.3;
}
.phoshop-brand-stat-sep {
    width: 1px;
    align-self: stretch;
    background: rgba(0,0,0,.1);
}

/* Features block */
.phoshop-brand-feat-block {
    margin-bottom: 28px;
}
.phoshop-brand-feat-heading {
    font-size: .85rem;
    font-weight: 700;
    color: var(--color-dark);
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.phoshop-brand-feat-icon {
    font-size: 1rem;
    letter-spacing: 0;
}
.phoshop-brand-features {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.phoshop-brand-feat {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: #444;
    font-weight: 400;
    line-height: 1.55;
}
.phoshop-brand-feat-dot {
    flex-shrink: 0;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--color-primary);
    margin-top: .45em;
}

/* Extra text content */
.phoshop-brand-text {
    color: #555;
    line-height: 1.85;
    font-size: .9rem;
    margin-bottom: 24px;
}
.phoshop-brand-text p { margin: 0 0 10px; }
.phoshop-brand-text p:last-child { margin-bottom: 0; }

/* CTA button */
.phoshop-btn-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: 8px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: .88rem;
    transition: opacity var(--transition);
    align-self: flex-start;
    margin-top: 4px;
}
.phoshop-btn-brand:hover { opacity: .85; color: #fff; }
.phoshop-btn-brand svg { transition: transform var(--transition); }
.phoshop-btn-brand:hover svg { transform: translateX(3px); }

/* --- Col ขวา: Image + fog — bleed to right edge --- */
.phoshop-brand-img-col {
    position: relative;
    overflow: hidden;
}
.phoshop-brand-img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    object-position: center top;  /* โชว์ส่วนบนของรูปอาหาร */
    display: block;
}
/* Fog overlay — fade เบาๆ จากซ้ายเข้าหารูป */
.phoshop-brand-img-col::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--fog-color, #fff) 0%, transparent 40%);
    pointer-events: none;
    z-index: 2;
}
.phoshop-brand-img-col::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--fog-color, #fff) 0%, transparent 22%);
    opacity: .5;
    pointer-events: none;
    z-index: 3;
}
.phoshop-brand-img--placeholder {
    width: 100%;
    height: 100%;
    min-height: 400px;
    background: var(--color-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

/* Brand Slideshow */
.phoshop-brand-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}
.phoshop-brand-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    z-index: 0;
}
.phoshop-brand-slide.active {
    opacity: 1;
    z-index: 1;
}
.phoshop-brand-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.phoshop-brand-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}
.phoshop-brand-dot.active {
    background: #fff;
    transform: scale(1.3);
}

/* ============================================
   DIVIDER STRIP SECTION
   ============================================ */
/* override section wrapper padding — divider ไม่ต้องการ padding */
.phoshop-section--divider {
    padding: 0 !important;
    margin: 0;
    line-height: 0;        /* กันช่องว่างบรรทัดบนล่าง */
    font-size: 0;
}
.phoshop-divider-strip {
    width: 100%;
    display: block;
    /* height, background-image, repeat, size ถูก set inline จาก PHP */
}

/* ============================================
   GALLERY SECTION
   ============================================ */
.phoshop-section--gallery { padding: 128px 0; background: #fff; }
.phoshop-gallery-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 40px;
}

/* ---- Gallery Header: รูปซ้าย + กล่องข้อความขวา ---- */
.phoshop-gallery-header {
    display: flex;
    align-items: flex-end;
    gap: 0;
    margin-bottom: 48px;
}

/* รูปภาพ mascot */
.phoshop-gallery-mascot-wrap {
    flex-shrink: 0;
    width: 180px;
    position: relative;
    z-index: 1;
}
.phoshop-gallery-mascot-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: bottom;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,.15));
}

/* กล่องข้อความ (speech bubble ชี้ซ้าย) */
.phoshop-gallery-bubble {
    flex: 1;
    background: #ffffff;
    border: 1px solid #ede8e3;
    border-radius: 20px 20px 20px 4px;
    padding: 28px 32px;
    position: relative;
    margin-bottom: 12px;
}
/* หางฟอง — เส้น border ชี้ซ้าย */
.phoshop-gallery-bubble::after {
    content: '';
    position: absolute;
    left: -17px;
    bottom: 24px;
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 16px solid #ede8e3;
}
/* หางฟอง — สีขาวทับ border */
.phoshop-gallery-bubble::before {
    content: '';
    position: absolute;
    left: -14px;
    bottom: 25px;
    width: 0;
    height: 0;
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-right: 14px solid #ffffff;
    z-index: 1;
}

/* รูป icon จางๆ มุมขวาล่าง — ใช้ mask เพื่อให้สีตรงตาม #ede8e3 */
.phoshop-gallery-bubble-icon {
    position: absolute;
    right: 12px;
    bottom: 8px;
    width: 100px;
    height: 100px;
    display: block;
    background-color: #ede8e3;
    -webkit-mask: var(--icon-url) no-repeat center / contain;
    mask: var(--icon-url) no-repeat center / contain;
    opacity: .6;
    pointer-events: none;
    user-select: none;
}

.phoshop-gallery-bubble h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3vw, 2rem);
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 6px;
    line-height: 1.2;
}
.phoshop-gallery-bubble p {
    font-size: .85rem;
    color: var(--color-muted);
    line-height: 1.5;
    margin: 0;
}

/* Responsive */
@media (max-width: 640px) {
    .phoshop-gallery-mascot-wrap { width: 120px; }
    .phoshop-gallery-bubble { padding: 20px 22px; }
}
@media (max-width: 480px) {
    .phoshop-gallery-header { gap: 0; }
    .phoshop-gallery-mascot-wrap { width: 90px; }
    .phoshop-gallery-bubble { border-radius: 16px 16px 16px 4px; padding: 16px 18px; }
}

/* Grid */
.phoshop-gallery-grid {
    display: grid;
    grid-template-columns: repeat(var(--gallery-cols, 3), 1fr);
    gap: 12px;
}

/* Each item */
.phoshop-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: var(--color-lighter);
}
.phoshop-gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
}
.phoshop-gallery-img {
    width: 100%;
    aspect-ratio: var(--gallery-ratio, 16/9);
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.phoshop-gallery-link:hover .phoshop-gallery-img {
    transform: scale(1.04);
}

/* Zoom icon overlay */
.phoshop-gallery-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0);
    color: #fff;
    opacity: 0;
    transition: opacity .3s ease, background .3s ease;
}
.phoshop-gallery-link:hover .phoshop-gallery-zoom {
    opacity: 1;
    background: rgba(0,0,0,.28);
}

/* ---- Lightbox (gallery) — shared base rule defined above ---- */

.phoshop-lb-img-wrap {
    max-width: 90vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phoshop-lb-img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 6px;
    display: block;
}

/* Lightbox buttons */
.phoshop-lb-close,
.phoshop-lb-prev,
.phoshop-lb-next {
    position: fixed;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.phoshop-lb-close:hover,
.phoshop-lb-prev:hover,
.phoshop-lb-next:hover { background: rgba(255,255,255,.25); }

.phoshop-lb-close { top: 20px; right: 20px; width: 44px; height: 44px; }
.phoshop-lb-prev  { left: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }
.phoshop-lb-next  { right: 20px; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; }

.phoshop-lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
    .phoshop-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .phoshop-gallery-wrap { padding: 0 16px; }
    .phoshop-section--gallery { padding: 48px 0; }
    .phoshop-lb-prev { left: 10px; }
    .phoshop-lb-next { right: 10px; }
}
@media (max-width: 480px) {
    .phoshop-gallery-grid { grid-template-columns: 1fr; }
}

/* ============================================
   LINE BANNER GIF SECTION
   ============================================ */
.phoshop-section--line-banner { padding: 0; background: var(--color-lighter); }
.phoshop-line-banner-wrap {
    max-width: var(--container);   /* เท่ากับ phoshop-products-wrap */
    margin: 0 auto;
    padding: 100px 24px 0;                    /* เว้นขอบข้างกัน GIF ชิดจอ mobile */
}
.phoshop-line-banner-link { display: block; }
.phoshop-line-banner-img {
    width: 100%;
    height: auto;
    display: block;
}
@media (max-width: 760px) {
    /* มือถือ: GIF กว้างเต็ม container (เว้นขอบข้าง 24px) ทับ inline width จาก admin */
    .phoshop-line-banner-wrap { padding: 48px 24px 0; }
    .phoshop-line-banner-img  { width: 100% !important; }
}

/* ============================================
   BANNER SECTION (โฆษณา / Promo strip)
   ============================================ */
.phoshop-banner-section {
    position: relative;
    width: 100%;
    min-height: var(--banner-minh, 420px);
    background-image: var(--banner-img);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Overlay ทึบ */
.phoshop-banner-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0, var(--banner-overlay, 0.35));
    pointer-events: none;
}

/* ข้อความตรงกลาง / ซ้าย / ขวา */
.phoshop-banner-body {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 48px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.phoshop-banner--center .phoshop-banner-body { align-items: center; text-align: center; }
.phoshop-banner--left   .phoshop-banner-body { align-items: flex-start; text-align: left; }
.phoshop-banner--right  .phoshop-banner-body { align-items: flex-end; text-align: right; }

.phoshop-banner-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0,0,0,.4);
    margin: 0;
}
.phoshop-banner-subtitle {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: rgba(255,255,255,.88);
    max-width: 560px;
    margin: 0;
    text-shadow: 0 1px 6px rgba(0,0,0,.35);
}
.phoshop-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: 50px;
    text-decoration: none;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,.25);
    margin-top: 4px;
}
.phoshop-banner-cta:hover {
    background: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.phoshop-banner-cta svg { flex-shrink: 0; transition: transform .2s; }
.phoshop-banner-cta:hover svg { transform: translateX(3px); }

/* Banner ที่ไม่มีข้อความ — ทำ <a> คลุมทั้ง section */
.phoshop-banner-link-wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
}

/* Responsive */
@media (max-width: 768px) {
    .phoshop-banner--tall   { --banner-minh: 380px; }
    .phoshop-banner--full   { --banner-minh: 60vh;  }
    .phoshop-banner--medium { --banner-minh: 300px; }
    .phoshop-banner--short  { --banner-minh: 200px; }
    .phoshop-banner-body    { padding: 36px 20px; }
}

/* ============================================
   BLOG SECTION
   ============================================ */
.phoshop-section--blog {
    padding: 64px 0 80px;
    background-color: var(--color-lighter);
}

/* Outer container */
.phoshop-blog-outer {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Title area — floats above paper, slightly overlaps torn top edge */
.phoshop-blog-above-title {
    position: relative;
    z-index: 3;
    margin-bottom: -18px;
    text-align: center;
}

/* Ribbon wrapper — rope and ribbon centered together */
.phoshop-blog-ribbon-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 30px;
}

/* Rope — behind ribbon via z-index */
.phoshop-blog-rope {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
    z-index: 0;
    opacity: 1;
    pointer-events: none;
    user-select: none;
}

/* Ribbon body */
.phoshop-blog-ribbon {
    position: relative;
    display: inline-block;
    background: var(--color-primary);
    padding: 10px 44px;
    z-index: 1;
}

/* Left arrow */
.phoshop-blog-ribbon::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0; bottom: 0;
    width: 22px;
    background: var(--color-primary);
    clip-path: polygon(100% 0, 100% 100%, 0 50%);
    transform: translateX(calc(-100% + 1px));
}

/* Right arrow */
.phoshop-blog-ribbon::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0; bottom: 0;
    width: 22px;
    background: var(--color-primary);
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    transform: translateX(calc(100% - 1px));
}

.phoshop-blog-ribbon h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.3rem, 2.2vw, 1.9rem);
    font-weight: 700;
    color: #FDEBD0;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
}

/* Subtitle — speech bubble above rope, arrow pointing down */
.phoshop-blog-ribbon-sub {
    position: relative;
    display: inline-block;
    background: #ffffff;
    border: 1px solid #ede8e3;
    border-radius: 10px;
    padding: 5px 22px;
    margin-bottom: 10px;
    font-size: .88rem;
    color: var(--color-muted);
    line-height: 1.6;
    z-index: 2;
}
.phoshop-blog-ribbon-sub::before {
    content: '';
    position: absolute;
    bottom: -11px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 11px solid #ede8e3;
}
.phoshop-blog-ribbon-sub::after {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 9px solid #ffffff;
    z-index: 1;
}

/* Paper wrap with torn edges */
.phoshop-blog-wrap {
    position: relative;
    z-index: 2;
    padding: 60px 40px 64px;
    overflow: visible;
}

/* Torn top edge */
.phoshop-blog-wrap::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 44px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 44' preserveAspectRatio='none'%3E%3Cpath d='M0,0 L1440,0 L1440,24 L1415,34 L1385,18 L1350,36 L1315,16 L1285,30 L1250,10 L1215,26 L1182,38 L1148,14 L1115,28 L1080,8 L1045,24 L1010,36 L975,16 L940,30 L905,12 L870,26 L833,20 L798,34 L762,10 L727,26 L690,18 L655,32 L618,8 L582,24 L545,38 L508,16 L472,30 L435,10 L398,26 L362,34 L325,14 L288,28 L252,8 L215,24 L178,36 L142,16 L105,30 L68,10 L35,26 L10,20 L0,28 Z' fill='%23FFF8F5'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    pointer-events: none;
    z-index: 1;
}

/* Torn bottom edge */
.phoshop-blog-wrap::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 44px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 44' preserveAspectRatio='none'%3E%3Cpath d='M0,44 L1440,44 L1440,20 L1415,12 L1385,28 L1350,10 L1315,26 L1285,16 L1250,32 L1215,14 L1182,26 L1148,8 L1115,22 L1080,34 L1045,12 L1010,28 L975,8 L940,22 L905,36 L870,16 L833,28 L798,12 L762,26 L727,8 L690,22 L655,34 L618,14 L582,28 L545,10 L508,24 L472,38 L435,18 L398,30 L362,10 L325,24 L288,36 L252,16 L215,28 L178,8 L142,24 L105,36 L68,18 L35,30 L10,20 L0,26 Z' fill='%23FFF8F5'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
    pointer-events: none;
    z-index: 1;
}

/* Grid above torn edges */
.phoshop-blog-grid {
    position: relative;
    z-index: 2;
}

/* Blog Header */
.phoshop-blog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
}
.phoshop-blog-header-left {
    display: flex;
    align-items: stretch;
    gap: 16px;
}
.phoshop-blog-header-bar {
    width: 4px;
    border-radius: 4px;
    background: var(--color-accent);
    flex-shrink: 0;
}
.phoshop-blog-header-left h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 4px;
    line-height: 1.2;
}
.phoshop-blog-header-left p {
    font-size: .88rem;
    color: var(--color-muted);
    margin: 0;
}
.phoshop-blog-header-all {
    white-space: nowrap;
    flex-shrink: 0;
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-muted);
    border: 1px solid #ede8e3;
    padding: 7px 18px;
    border-radius: 99px;
    text-decoration: none;
    transition: border-color .2s, color .2s;
}
.phoshop-blog-header-all:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* Grid — card แรกกว้าง 2 คอลัมน์ ที่เหลือ 1 คอลัมน์ */
.phoshop-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Card base */
.phoshop-blog-card {
    display: flex; flex-direction: column;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid #ede8e3;
    transition: border-color var(--transition);
    color: var(--color-dark);
}
.phoshop-blog-card:hover { border-color: var(--color-primary); }

/* Featured card (card แรก) — กว้าง 2 คอลัมน์ */
.phoshop-blog-card--featured {
    grid-column: span 2;
    flex-direction: row;
}
.phoshop-blog-card--featured .phoshop-blog-img-wrap {
    width: 55%;
    flex-shrink: 0;
    aspect-ratio: unset;
}
.phoshop-blog-card--featured .phoshop-blog-info {
    padding: 28px 28px;
    display: flex; flex-direction: column; justify-content: center;
}
.phoshop-blog-card--featured .phoshop-blog-title {
    font-size: 1.2rem;
}

/* Thumbnail */
.phoshop-blog-img-wrap {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex-shrink: 0;
}
.phoshop-blog-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.phoshop-blog-card:hover .phoshop-blog-img { transform: scale(1.04); }
.phoshop-blog-img--placeholder {
    width: 100%; height: 100%;
    background: var(--color-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary); opacity: .35;
}

/* Category badge on image */
.phoshop-blog-cat-badge {
    position: absolute; top: 12px; left: 12px;
    background: var(--color-primary); color: #fff;
    font-size: .72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 4px 10px; border-radius: 20px;
}

/* Info */
.phoshop-blog-info { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.phoshop-blog-date { font-size: .78rem; color: var(--color-muted); }
.phoshop-blog-title {
    font-size: 1rem; font-weight: 700;
    color: var(--color-dark); line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.phoshop-blog-excerpt {
    font-size: .85rem; color: var(--color-muted);
    line-height: 1.65;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.phoshop-blog-readmore {
    font-size: .83rem; font-weight: 600;
    color: var(--color-primary);
    margin-top: auto;
}

/* ============================================
   CONTACT
   ============================================ */
.phoshop-section--contact { padding: 80px 0; background: var(--color-dark); color: #fff; }
.phoshop-contact-wrap { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.phoshop-contact-wrap .phoshop-section-header h2 { color: #fff; }
.phoshop-contact-wrap .phoshop-section-header p { color: rgba(255,255,255,.7); }

.phoshop-contact-inner { display: grid; grid-template-columns: 1fr auto; gap: 48px; align-items: start; }

.phoshop-contact-info { display: flex; flex-direction: column; gap: 20px; }
.phoshop-contact-item { display: flex; align-items: flex-start; gap: 16px; }
.phoshop-contact-icon {
    width: 48px; height: 48px; border-radius: 12px;
    background: rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: rgba(255,255,255,.8);
}
.phoshop-contact-icon--line { background: rgba(0,185,0,.2); color: #00e600; }
.phoshop-contact-label { display: block; font-size: .78rem; color: rgba(255,255,255,.55); font-weight: 500; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 2px; }
.phoshop-contact-value { font-size: 1rem; font-weight: 500; color: #fff; }
.phoshop-contact-value a { color: rgba(255,255,255,.9); transition: color var(--transition); }
.phoshop-contact-value a:hover { color: #fff; text-decoration: underline; }

.phoshop-contact-cta { display: flex; justify-content: center; }

/* ============================================
   FOOTER
   ============================================ */
/* ---- Footer ---- */
.phoshop-footer {
    background: #111;
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 56px 0 0;
}
.phoshop-footer-inner { max-width: var(--container); margin: 0 auto; padding: 0 32px; }

/* Grid: brand (wider) | 3 columns — aligned to top */
.phoshop-footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 48px;
    align-items: start;
}

/* Col 1: Brand */
.phoshop-footer-brand { display: flex; flex-direction: column; gap: 0; }
.phoshop-footer-logo  {
    max-width: 120px;
    height: auto;
    max-height: 52px;
    object-fit: contain;
    display: block;
    margin-bottom: 18px;
    border-radius: 6px;
    background: #fff;
    padding: 7px 12px;
}
.phoshop-footer-logo-text {
    width: 48px; height: 48px; border-radius: 10px;
    background: rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; font-weight: 800; color: rgba(255,255,255,.75);
    margin-bottom: 16px;
}
.phoshop-footer-store-name {
    font-size: .95rem; font-weight: 600;
    color: rgba(255,255,255,.85);
    margin-bottom: 10px;
}
.phoshop-footer-address {
    font-size: .83rem;
    line-height: 1.8;
    color: rgba(255,255,255,.38);
    margin: 0;
}

/* Nav columns */
.phoshop-footer-col h4 {
    color: rgba(255,255,255,.55);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .1em;
    margin-bottom: 16px;
    padding-bottom: 0;
    border-bottom: none;
}
.phoshop-footer-links {
    display: flex; flex-direction: column; gap: 10px;
    list-style: none; padding: 0; margin: 0;
}
.phoshop-footer-links a {
    color: rgba(255,255,255,.42);
    font-size: .875rem;
    transition: color var(--transition);
}
.phoshop-footer-links a:hover { color: rgba(255,255,255,.85); }

/* Contact items (icon + text) */
.phoshop-footer-contact-item {
    display: flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.42);
    font-size: .875rem;
    transition: color var(--transition);
}
.phoshop-footer-contact-item svg { flex-shrink: 0; opacity: .6; }
.phoshop-footer-contact-item:hover { color: rgba(255,255,255,.85); }

/* Social icons — ใต้คอลัมน์ ติดต่อ */
.phoshop-footer-social {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 20px;
}
.phoshop-social-icon {
    width: 32px; height: 32px;
    border-radius: 6px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.45);
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.phoshop-social-icon:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; }

/* Footer bottom bar */
/* แถบเครดิตล่างสุด — เด่นขึ้น + เผื่อที่ไม่ให้ sticky LINE bar บัง */
.phoshop-footer-bottom {
    margin-top: 48px;
    /* ดึงแถบให้กว้างเต็มจอ (ออกจาก padding ของ .phoshop-footer container) */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: rgba(0,0,0,.28);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 18px 24px;
    /* เผื่อความสูง sticky LINE bar ด้านล่าง ไม่ให้ทับข้อความเครดิต */
    padding-bottom: calc(18px + var(--sticky-bar-h, 0px));
    text-align: center;
}
.phoshop-footer-bottom p {
    font-size: .85rem; color: rgba(255,255,255,.6); margin: 0; line-height: 1.6;
}
.phoshop-footer-bottom a {
    color: #fff; font-weight: 700; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.4);
    transition: border-color .15s, color .15s;
}
.phoshop-footer-bottom a:hover { color: var(--color-accent, #D4541A); border-color: var(--color-accent, #D4541A); }

/* ============================================
   PARTNERS MARQUEE
   ============================================ */
.phoshop-section--partners { padding: 0; }

.phoshop-partners-wrap {
    background: var(--partners-bg, #3D1A00);
    padding: 40px 0;
    overflow: hidden;
}

/* Heading */
.phoshop-partners-heading {
    text-align: center;
    padding: 0 24px 36px;
}
.phoshop-partners-title {
    font-family: var(--font-heading);
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 10px;
    letter-spacing: -.01em;
}
.phoshop-partners-subtitle {
    font-size: clamp(.9rem, 1.5vw, 1rem);
    color: rgba(255,255,255,.6);
    font-weight: 400;
    letter-spacing: .01em;
}
/* ตัวเลข/คำสำคัญใน title — สี accent สะดุดตา */
.phoshop-partners-accent {
    font-style: normal;
    color: #FFD580;
    font-weight: 800;
}

/* Marquee container */
.phoshop-marquee {
    position: relative;
    overflow: hidden;
    /* Fade edges */
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/* Track — contains 2× logos for seamless loop */
.phoshop-marquee-track {
    display: flex;
    align-items: center;
    gap: 0;
    width: max-content;
    animation: phoshop-marquee var(--marquee-speed, 40s) linear infinite;
}
.phoshop-marquee-track:hover { animation-play-state: paused; }

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

/* Each logo item */
.phoshop-marquee-item {
    flex-shrink: 0;
    padding: 0 40px;
    display: flex; align-items: center; justify-content: center;
}
.phoshop-marquee-link {
    display: flex; align-items: center; justify-content: center;
    transition: opacity var(--transition), transform var(--transition);
}
.phoshop-marquee-link:hover { opacity: .75; transform: scale(1.05); }

/* Logo image */
.phoshop-marquee-logo {
    height: 48px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    /* Make logos white/light for dark backgrounds */
    filter: brightness(0) invert(1);
    opacity: .75;
    transition: opacity var(--transition);
}
.phoshop-marquee-link:hover .phoshop-marquee-logo { opacity: 1; }

/* ============================================
   SINGLE POST (BLOG)
   ============================================ */
.phoshop-single-post-main {
    padding-top: var(--header-h);
    background: #fff;
    min-height: 70vh;
}
.phoshop-single-post-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 32px 24px 80px;
}

/* Header */
.phoshop-post-header { margin-bottom: 36px; }
.phoshop-post-cats { display: flex; gap: 8px; margin-bottom: 14px; }
.phoshop-post-cat {
    font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .08em;
    color: var(--color-primary);
}
.phoshop-post-title {
    font-family: var(--font-heading);
    font-size: clamp(1.7rem, 3.5vw, 2.6rem);
    font-weight: 800; line-height: 1.25;
    color: var(--color-dark); margin-bottom: 16px;
}
.phoshop-post-meta {
    display: flex; align-items: center; gap: 8px;
    font-size: .85rem; color: var(--color-muted);
}
.phoshop-post-meta-sep { opacity: .4; }

/* Hero image */
.phoshop-post-hero-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 48px;
    aspect-ratio: 16 / 7;
}
.phoshop-post-hero-img-el {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}

/* Layout: content + sidebar */
.phoshop-post-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 56px;
    align-items: start;
}

/* Article content — WordPress block styles */
.phoshop-post-content {
    font-size: 1rem;
    line-height: 1.85;
    color: #374151;
    max-width: 100%;
}
.phoshop-post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem; font-weight: 700;
    color: var(--color-dark);
    margin: 36px 0 14px;
}
.phoshop-post-content h3 {
    font-size: 1.15rem; font-weight: 700;
    color: var(--color-dark);
    margin: 28px 0 10px;
}
.phoshop-post-content p { margin-bottom: 20px; }
.phoshop-post-content img {
    max-width: 100%; border-radius: 10px;
    margin: 8px 0;
}
.phoshop-post-content ul,
.phoshop-post-content ol {
    padding-left: 24px; margin-bottom: 20px;
}
.phoshop-post-content li { margin-bottom: 6px; }
.phoshop-post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 12px 20px;
    background: var(--color-lighter);
    border-radius: 0 8px 8px 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--color-dark);
}
.phoshop-post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.phoshop-post-content table {
    width: 100%; border-collapse: collapse;
    margin-bottom: 20px; font-size: .9rem;
}
.phoshop-post-content table th,
.phoshop-post-content table td {
    padding: 10px 14px;
    border-bottom: 1px solid #f0ebe6;
    text-align: left;
}
.phoshop-post-content table th {
    background: var(--color-lighter);
    font-weight: 600; color: var(--color-dark);
}
.phoshop-post-content figure { margin: 24px 0; }
.phoshop-post-content figcaption {
    text-align: center; font-size: .82rem;
    color: var(--color-muted); margin-top: 8px;
}
/* WordPress alignment classes */
.phoshop-post-content .aligncenter { display: block; margin: 0 auto; }
.phoshop-post-content .alignleft   { float: left; margin: 0 20px 16px 0; }
.phoshop-post-content .alignright  { float: right; margin: 0 0 16px 20px; }

/* Sidebar */
.phoshop-post-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }

/* ---- Sidebar card (minimal) ---- */
.phoshop-post-sidebar-card {
    background: var(--color-lighter);
    border: 1px solid #f0dfd6;
    border-radius: 14px;
    padding: 20px;
    display: flex; flex-direction: column; gap: 20px;
}

/* Brand header */
.phoshop-pscard-brand { display: flex; flex-direction: column; gap: 4px; }
.phoshop-pscard-logo { height: 44px; width: auto; object-fit: contain; }
.phoshop-pscard-storename {
    font-weight: 800; font-size: 1rem; color: var(--color-dark);
}

/* Description */
.phoshop-pscard-desc {
    font-size: .84rem; color: var(--color-muted);
    line-height: 1.7; margin: 0;
    padding-top: 4px;
    border-top: 1px solid #f0ebe6;
}

/* CTA buttons */
.phoshop-pscard-actions { display: flex; flex-direction: column; gap: 8px; }
.phoshop-pscard-line-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    background: var(--color-line);
    color: #fff; font-weight: 700; font-size: .9rem;
    padding: 11px 16px; border-radius: 8px;
    text-decoration: none;
    transition: background var(--transition);
}
.phoshop-pscard-line-btn:hover { background: var(--color-line-dark); color: #fff; }
.phoshop-pscard-menu-btn {
    display: flex; align-items: center; justify-content: center;
    padding: 10px 16px;
    border: 1.5px solid #e5ddd6;
    border-radius: 10px;
    background: #faf8f6;
    color: #666; font-size: .82rem; font-weight: 500;
    text-decoration: none;
    transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.phoshop-pscard-menu-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: #fff;
}

/* Sidebar ad images */
.phoshop-post-sidebar-ads { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.phoshop-post-sidebar-ad { border-radius: 14px; overflow: hidden; }
.phoshop-post-sidebar-ad-img {
    width: 100%; display: block;
    object-fit: cover;
    border-radius: 14px;
    transition: opacity var(--transition);
}
.phoshop-post-sidebar-ad:hover .phoshop-post-sidebar-ad-img { opacity: .88; }

/* Footer nav */
.phoshop-post-footer-nav { margin-top: 48px; padding-top: 24px; border-top: 1px solid #f0ebe6; }

/* Responsive */
@media (max-width: 900px) {
    .phoshop-post-layout { grid-template-columns: 1fr; }
    .phoshop-post-sidebar { position: static; }
    .phoshop-post-sidebar-card { gap: 14px; }
    .phoshop-pscard-actions { flex-direction: row; align-items: center; }
    .phoshop-pscard-line-btn { flex: 1; }
    .phoshop-pscard-menu-btn { flex-shrink: 0; }
}
@media (max-width: 600px) {
    .phoshop-post-hero-img { aspect-ratio: 4 / 3; }
}

/* ============================================
   EMPTY STATE
   ============================================ */
.phoshop-empty-state { text-align: center; padding: 60px 24px; color: var(--color-muted); }
.phoshop-empty-state a { color: var(--color-primary); font-weight: 600; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .phoshop-footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .phoshop-footer-brand { grid-column: 1 / -1; flex-direction: row; align-items: flex-start; gap: 20px; }
    .phoshop-footer-logo, .phoshop-footer-logo-text { flex-shrink: 0; margin-bottom: 0; }
    .phoshop-products-grid { grid-template-columns: repeat(3, 1fr); }
    .phoshop-brand-body { padding: 48px 32px 48px 24px; }
    .phoshop-brand-grid { min-height: 480px; }

    /* Hero two-col: slightly tighter gap on tablet */
    .phoshop-hero--two-col .phoshop-hero-inner { gap: 32px; padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 768px) {
    :root { --header-h: 60px; }

    /* header inner padding บน mobile */
    .phoshop-header-inner { padding: 0 16px; gap: 12px; }

    .phoshop-hamburger { display: flex; }

    /* mobile: ไม่มีช่อง inline — ใช้ไอคอนค้นหาฝั่งขวาตลอด (ไม่ผูกกับ scroll) */
    .phoshop-search-wrap { display: none; }
    .phoshop-search-trigger--inline { display: none !important; }
    .phoshop-search-trigger--action { display: flex; }

    /* LINE button — แสดง text เต็มบน mobile */
    .phoshop-line-cta span { display: inline; }
    .phoshop-line-cta { flex-shrink: 0; }

    /* header-actions ชิดขวาสุด */
    .phoshop-header-actions { margin-left: auto; }

    /* logo ขนาดลดลงนิดหน่อย */
    .phoshop-logo-img { height: 34px; }

    /* mobile nav เปิดแล้ว → header คง white + border ล่าง */
    /* header ต้อง overflow visible เพื่อให้ nav absolute โผล่ออกมาได้ */
    .phoshop-header { overflow: visible; }

    .phoshop-header:has(.phoshop-nav.open) {
        background: #fff;
        border-bottom-color: transparent;
    }

    .phoshop-nav {
        position: absolute;
        top: 100%;          /* เกาะติดใต้ header พอดีทุกสถานการณ์ */
        left: 0; right: 0;
        height: 100dvh;     /* สูงเต็มจอที่เหลือ */
        background: #fff;
        z-index: 1001;
        padding: 0 20px 32px;
        display: none;
        flex-direction: column;
        overflow-y: auto;
        border-top: 1px solid #f0ebe6;
    }
    .phoshop-nav.open { display: flex; }

    /* เมนูหลัก — ชิดซ้าย เต็มความกว้าง */
    .phoshop-nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
        margin-top: 8px;
    }
    .phoshop-nav-menu > li {
        width: 100%;
        border-bottom: 1px solid #f5f0eb;
    }
    .phoshop-nav-menu > li:last-child { border-bottom: none; }
    .phoshop-nav-menu > li > a {
        font-size: 1rem;
        font-weight: 500;
        padding: 15px 4px;
        color: var(--color-dark, #1a1a1a);
        border-radius: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        white-space: normal;
    }
    .phoshop-nav-menu > li > a:hover,
    .phoshop-nav-menu > li > a.active {
        background: transparent;
        color: var(--color-primary);
    }
    .phoshop-nav-menu > li > a::after { display: none; }

    /* submenu บน mobile */
    .phoshop-nav-menu .sub-menu {
        position: static; opacity: 1; visibility: visible; transform: none;
        background: #faf8f6; box-shadow: none; border: none;
        border-radius: 8px; margin: 0 0 12px 4px; padding: 4px 0;
        min-width: unset; width: 100%;
    }
    .phoshop-nav-menu .sub-menu::before { display: none; }
    .phoshop-nav-menu .sub-menu li { border: none; width: 100%; }
    .phoshop-nav-menu .sub-menu a {
        color: #555;
        padding: 11px 16px;
        font-size: .95rem;
        display: block;
        width: 100%;
    }
    .phoshop-nav-menu .sub-menu a::before { display: none; }
    .phoshop-nav-menu .sub-menu a:hover {
        background: #f0ebe6;
        color: var(--color-primary);
    }

    .phoshop-hero { min-height: 340px; }
    .phoshop-hero-title { font-size: clamp(1.6rem, 7vw, 2.5rem); }
    .phoshop-hero-actions { flex-direction: column; align-items: center; }

    /* Two-col hero → single col on mobile */
    .phoshop-hero--two-col .phoshop-hero-inner {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-top: 32px;
        padding-bottom: 50px;
        padding-left: 20px;
        padding-right: 20px;
    }
    .phoshop-hero--two-col .phoshop-hero-content { text-align: center; }
    .phoshop-hero--two-col .phoshop-hero-actions { justify-content: center; }
    .phoshop-hero--two-col .phoshop-hero-logo    { margin: 0 auto 20px; }
    .phoshop-hero-media { width: 100%; }
    .phoshop-hero-slideshow { aspect-ratio: 4 / 3; }

    .phoshop-products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
    .phoshop-product-info { padding: 12px 14px 14px; }
    .phoshop-product-name {
        font-size: .88rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .phoshop-product-price { margin-bottom: 10px; }
    .phoshop-product-price-current { font-size: 1.05rem; }
    .phoshop-btn-detail { font-size: .78rem; height: 32px; padding: 0 10px; }
    .phoshop-icon-btn { width: 32px; height: 32px; }

    /* Brand: stack vertical on mobile */
    .phoshop-brand-grid { grid-template-columns: 1fr; min-height: auto; }
    .phoshop-brand-body { padding: 40px 16px 80px; order: 2; max-width: 100%; }
    .phoshop-brand-title { white-space: normal; font-size: clamp(1.4rem, 5vw, 1.8rem); }
    .phoshop-brand-img-col { order: 1; min-height: 260px; }
    .phoshop-brand-img { min-height: 260px; aspect-ratio: 16 / 9; }
    /* mobile: fog เปลี่ยนเป็นจากบนลงล่างแทน */
    .phoshop-brand-img-col::before { background: linear-gradient(to bottom, transparent 60%, var(--fog-color, #fff) 100%); }
    .phoshop-brand-img-col::after { background: none; }
    .phoshop-btn-brand { align-self: stretch; justify-content: center; }
    /* mobile: stat row ยืดเต็มความกว้าง แบ่งเท่าๆ กัน */
    .phoshop-brand-stats { gap: 14px; }
    .phoshop-brand-stat { flex: 1; }

    .phoshop-blog-grid { grid-template-columns: 1fr; }
    .phoshop-blog-card--featured { grid-column: span 1; flex-direction: column; }
    .phoshop-blog-card--featured .phoshop-blog-img-wrap { width: 100%; aspect-ratio: 16 / 10; }
    .phoshop-blog-card--featured .phoshop-blog-info { padding: 20px; }
    .phoshop-section-header { text-align: left; }

    .phoshop-contact-inner { grid-template-columns: 1fr; }
    .phoshop-contact-cta { justify-content: flex-start; }

    .phoshop-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .phoshop-footer-brand { grid-column: 1 / -1; flex-direction: column; }
    .phoshop-footer-logo, .phoshop-footer-logo-text { margin-bottom: 14px; }

    .phoshop-section--products,
    .phoshop-section--blog,
    .phoshop-section--contact { padding: 56px 0; }
}

@media (max-width: 480px) {
    .phoshop-lifestyle-content { padding: 36px 24px; }
}

@media (max-width: 768px) {
    /* Single product — stack เป็น column บน mobile */
    .phoshop-single-product-wrap {
        padding: 0 16px 60px;
    }
    .phoshop-product-detail-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .phoshop-product-detail-grid { margin-bottom: 40px; }

    /* Breadcrumb — wrap ได้ ไม่ล้นขอบ */
    .phoshop-breadcrumb {
        flex-wrap: wrap;
        font-size: .82rem;
        gap: 4px 6px;
        margin-bottom: 16px;
    }

    /* Thumbnail ใหญ่ขึ้นบน mobile */
    .phoshop-gallery-thumb {
        width: 80px;
        height: 80px;
    }

    /* Related grid */
    .phoshop-related-grid { grid-template-columns: repeat(2, 1fr); }

    /* Product actions ใน related */
    .phoshop-product-actions { flex-direction: row; flex-wrap: wrap; gap: 8px; }
    .phoshop-btn-detail { flex: 1; min-width: 0; }
}

/* ============================================================
   PAGE TEMPLATE
   ============================================================ */

.phoshop-page-main {
    padding: 20px 0 80px;
    background: #fff;
    min-height: 60vh;
}
.phoshop-page-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0;
}
.phoshop-page-header {
    margin-bottom: 32px;
}
.phoshop-page-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    color: var(--color-dark, #1a1a1a);
    margin: 0;
    letter-spacing: -.02em;
}
.phoshop-page-hero-img {
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
}
.phoshop-page-hero-img-el {
    width: 100%;
    height: auto;
    display: block;
}
.phoshop-page-content {
    max-width: 780px;
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444;
}
.phoshop-page-content h2 { font-size: 1.4rem; font-weight: 700; margin: 40px 0 12px; color: var(--color-dark); }
.phoshop-page-content h3 { font-size: 1.15rem; font-weight: 700; margin: 32px 0 10px; color: var(--color-dark); }
.phoshop-page-content p  { margin: 0 0 20px; }
.phoshop-page-content ul,
.phoshop-page-content ol { padding-left: 24px; margin-bottom: 20px; }
.phoshop-page-content li { margin-bottom: 8px; }
.phoshop-page-content a  { color: var(--color-primary); text-decoration: underline; }
.phoshop-page-content img { max-width: 100%; border-radius: 10px; margin: 20px 0; }

/* ============================================================
   ARCHIVE / CATEGORY PAGE
   ============================================================ */

.phoshop-archive-main {
    padding: 28px 0 80px;
    background: var(--color-bg, #faf9f7);
    min-height: 60vh;
}

.phoshop-archive-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- Page Header ---------- */
.phoshop-archive-header {
    margin-bottom: 20px;
}
.phoshop-archive-title {
    font-size: clamp(1.4rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--color-dark, #1a1a1a);
    margin: 0 0 4px;
    letter-spacing: -.02em;
}
.phoshop-archive-desc {
    font-size: .9rem;
    color: #888;
    margin: 0 0 4px;
}

/* ---------- Layout ---------- */
.phoshop-archive-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: start;
}

/* ---------- Sidebar ---------- */
.phoshop-archive-sidebar {
    position: sticky;
    top: calc(var(--header-h, 70px) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}
/* ซ่อน toggle บน desktop */
.phoshop-sidebar-toggle { display: none; }

/* desktop: sidebar-inner เป็น flex column มี gap */
.phoshop-archive-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.phoshop-sidebar-widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
}

.phoshop-sidebar-title {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #aaa;
    margin: 0 0 14px;
}

/* Categories */
.phoshop-sidebar-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.phoshop-sidebar-cat-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: .95rem;
    color: var(--color-dark, #1a1a1a);
    text-decoration: none;
    transition: background .15s, color .15s;
}
.phoshop-sidebar-cat-link:hover {
    background: var(--color-primary-light, #fff5f0);
    color: var(--color-primary, #e05c2a);
}
.phoshop-sidebar-cat-link.active {
    background: var(--color-primary, #e05c2a);
    color: #fff;
    font-weight: 600;
}
.phoshop-sidebar-cat-link.active .phoshop-sidebar-cat-count {
    background: rgba(255,255,255,.25);
    color: #fff;
}
.phoshop-sidebar-cat-count {
    font-size: .75rem;
    background: #f2ede8;
    color: #999;
    border-radius: 20px;
    padding: 2px 8px;
    font-weight: 600;
    transition: background .15s, color .15s;
}

/* Price Filter */
.phoshop-price-filter {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.phoshop-price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}
.phoshop-price-input-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    background: #f7f5f2;
    border: 1px solid #e8e2dc;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: .85rem;
    color: #888;
    transition: border-color .15s;
}
.phoshop-price-input-wrap:focus-within {
    border-color: var(--color-primary, #e05c2a);
    background: #fff;
}
.phoshop-price-input-wrap input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    font-size: .85rem;
    color: var(--color-dark, #1a1a1a);
    font-family: inherit;
}
.phoshop-price-input-wrap input::placeholder { color: #bbb; }
.phoshop-price-dash { color: #ccc; font-size: .9rem; flex-shrink: 0; }
.phoshop-price-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.phoshop-price-btn {
    flex: 1;
    background: var(--color-primary, #e05c2a);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-family: inherit;
}
.phoshop-price-btn:hover { background: var(--color-primary-dark, #c94e1f); transform: translateY(-1px); }
.phoshop-price-btn:active { transform: translateY(0); }
.phoshop-price-clear {
    font-size: .8rem;
    color: #aaa;
    text-decoration: none;
    white-space: nowrap;
    transition: color .15s;
}
.phoshop-price-clear:hover { color: var(--color-primary, #e05c2a); }

/* Featured / Recently Viewed items */
.phoshop-sidebar-featured {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.phoshop-sidebar-featured-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 6px;
    border-radius: 8px;
    transition: background .15s;
}
.phoshop-sidebar-featured-link:hover { background: #f7f5f2; }
.phoshop-sidebar-featured-img {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid #f0ebe5;
}
.phoshop-sidebar-featured-name {
    font-size: .85rem;
    font-weight: 600;
    color: var(--color-dark, #1a1a1a);
    margin: 0 0 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.phoshop-sidebar-featured-price {
    font-size: .8rem;
    color: var(--color-primary, #e05c2a);
    font-weight: 700;
    margin: 0;
}

/* Tags */
.phoshop-sidebar-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.phoshop-sidebar-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    background: #f2ede8;
    color: #777;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.phoshop-sidebar-tag:hover {
    background: var(--color-primary-light, #fff5f0);
    color: var(--color-primary, #e05c2a);
}
.phoshop-sidebar-tag.active {
    background: var(--color-primary, #e05c2a);
    color: #fff;
}

/* ---------- Toolbar ---------- */
.phoshop-archive-content { min-width: 0; }

/* Active filter chips */
.phoshop-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    font-size: .8rem;
}
.phoshop-active-filters-label {
    color: #aaa;
    font-size: .85rem;
    font-weight: 500;
    margin-right: 2px;
}
.phoshop-active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px 5px 14px;
    border-radius: 99px;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: background .15s, color .15s;
}
.phoshop-active-filter-chip--cat {
    background: #fff0ea;
    color: var(--color-primary, #e05c2a);
    border: 1px solid #f5d5c5;
}
.phoshop-active-filter-chip--cat:hover {
    background: #fde0d0;
}
.phoshop-active-filter-chip--tag {
    background: #f0f4ff;
    color: #4a6cf7;
    border: 1px solid #d0d9fc;
}
.phoshop-active-filter-chip--tag:hover {
    background: #e0e8ff;
}
.phoshop-active-filter-chip--price {
    background: #f3f4f6;
    color: #555;
    border: 1px solid #e5e7eb;
}
.phoshop-active-filter-chip--price:hover {
    background: #e5e7eb;
}
.phoshop-active-filter-chip svg { flex-shrink: 0; opacity: .6; }
.phoshop-active-filters-clear {
    color: #aaa;
    font-size: .85rem;
    text-decoration: none;
    margin-left: 4px;
    transition: color .15s;
}
.phoshop-active-filters-clear:hover { color: var(--color-primary, #e05c2a); }

.phoshop-archive-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: none;
    background-image: radial-gradient(circle, #d0c8bf 1.5px, transparent 1.5px);
    background-size: 12px 2px;
    background-repeat: repeat-x;
    background-position: bottom;
}
.phoshop-toolbar-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
}
.phoshop-toolbar-left .phoshop-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 0;
}
.phoshop-archive-count {
    font-size: .88rem;
    color: #999;
    white-space: nowrap;
    flex-shrink: 0;
}
.phoshop-sort-form { display: flex; align-items: center; }
.phoshop-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: 1px solid #e0d8d0;
    border-radius: 8px;
    padding: 7px 32px 7px 12px;
    font-size: .85rem;
    color: var(--color-dark, #1a1a1a);
    font-family: inherit;
    cursor: pointer;
    transition: border-color .15s;
    min-width: 140px;
}
.phoshop-sort-select:focus {
    outline: none;
    border-color: var(--color-primary, #e05c2a);
}

.phoshop-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* ---------- Product Card ---------- */
.phoshop-archive-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,.06);
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
}
.phoshop-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

.phoshop-archive-card-img-wrap {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f2ee;
}
.phoshop-archive-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.phoshop-archive-card:hover .phoshop-archive-card-img { transform: scale(1.05); }

.phoshop-archive-card-noimg {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.phoshop-archive-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--color-primary, #e05c2a);
    color: #fff;
    font-size: .7rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .03em;
    pointer-events: none;
}

.phoshop-archive-card-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.phoshop-archive-card-cat {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--color-primary, #e05c2a);
    margin-bottom: 7px;
    display: block;
}

.phoshop-archive-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.phoshop-archive-card-title a {
    color: var(--color-dark, #1a1a1a);
    text-decoration: none;
    transition: color .15s;
}
.phoshop-archive-card-title a:hover { color: var(--color-primary, #e05c2a); }

.phoshop-archive-card-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}
.phoshop-archive-card-compare {
    font-size: .92rem;
    color: #bbb;
    text-decoration: line-through;
}
.phoshop-archive-card-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-primary, #e05c2a);
}

/* ---------- Pagination ---------- */
.phoshop-archive-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.phoshop-archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--color-dark, #1a1a1a);
    background: #fff;
    border: 1px solid #e8e2dc;
    transition: background .15s, color .15s, border-color .15s;
}
.phoshop-archive-pagination .page-numbers:hover {
    background: var(--color-primary-light, #fff5f0);
    border-color: var(--color-primary, #e05c2a);
    color: var(--color-primary, #e05c2a);
}
.phoshop-archive-pagination .page-numbers.current {
    background: var(--color-primary, #e05c2a);
    color: #fff;
    border-color: var(--color-primary, #e05c2a);
}
.phoshop-archive-pagination .page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}

/* ---------- Empty State ---------- */
.phoshop-archive-empty {
    text-align: center;
    padding: 80px 24px;
    color: #bbb;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.phoshop-archive-empty p {
    font-size: 1rem;
    color: #999;
    margin: 0;
}
.phoshop-archive-empty a {
    display: inline-block;
    background: var(--color-primary, #e05c2a);
    color: #fff;
    text-decoration: none;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600;
    transition: background .15s, transform .1s;
}
.phoshop-archive-empty a:hover { background: var(--color-primary-dark, #c94e1f); transform: translateY(-1px); }

/* ---------- Archive Responsive ---------- */
@media (max-width: 1024px) {
    .phoshop-archive-layout { grid-template-columns: 220px 1fr; gap: 24px; }
    .phoshop-archive-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .phoshop-archive-wrap { padding: 0 16px 60px; }
    .phoshop-archive-layout { grid-template-columns: 1fr; }

    /* Sidebar — toggle บน mobile */
    .phoshop-archive-sidebar {
        position: static;
        gap: 0;
    }
    .phoshop-sidebar-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 10px 16px;
        background: #fff;
        border: 1.5px solid #e8e0d8;
        border-radius: 10px;
        font-size: .9rem;
        font-weight: 600;
        font-family: var(--font-main);
        color: var(--color-dark, #1a1a1a);
        cursor: pointer;
        margin-bottom: 0;
    }
    .phoshop-sidebar-toggle svg { margin-left: auto; transition: transform .2s; }
    .phoshop-sidebar-toggle.open svg { transform: rotate(180deg); }
    .phoshop-archive-sidebar-inner {
        display: none;
    }
    .phoshop-archive-sidebar-inner.open {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 16px 0 8px;
    }
    .phoshop-archive-sidebar-inner .phoshop-sidebar-widget {
        box-shadow: none;
        border: 1.5px solid #ece6df;
        padding: 16px;
    }

    /* Toolbar */
    .phoshop-archive-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .phoshop-sort-form { width: 100%; }
    .phoshop-sort-select { width: 100%; }

    /* Grid */
    .phoshop-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .phoshop-archive-card-body { padding: 12px; }
    .phoshop-archive-card-title { font-size: .85rem; }

    /* Breadcrumb */
    .phoshop-breadcrumb {
        flex-wrap: wrap;
        font-size: .82rem;
        gap: 4px 6px;
    }
}

@media (max-width: 480px) {
    .phoshop-archive-main { padding: 20px 0 60px; }
    .phoshop-archive-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .phoshop-archive-card-body { padding: 10px; }
    .phoshop-archive-card-amount { font-size: .95rem; }
    .phoshop-price-inputs { flex-direction: column; gap: 6px; }
    .phoshop-price-dash { display: none; }
}

/* ============================================
   SPEECH BUBBLE BOUNCE
   ============================================ */

/* เด้ง 3 ครั้งในช่วง 15% สุดท้ายของ cycle แล้วหยุดนาน */
@keyframes phoshop-bubble-bounce {
    0%,  80%  { transform: translateY(0); }
    84%        { transform: translateY(-10px); }
    88%        { transform: translateY(0); }
    91%        { transform: translateY(-6px); }
    94%        { transform: translateY(0); }
    96.5%      { transform: translateY(-3px); }
    100%       { transform: translateY(0); }
}

.phoshop-blog-ribbon-sub {
    /* cycle 6s: หยุด ~4.8s แล้วเด้งประมาณ 1.2s — delay 2.5s ให้ reveal เสร็จก่อน */
    animation: phoshop-bubble-bounce 6s ease-in-out 2.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
    .phoshop-blog-ribbon-sub { animation: none; }
}

/* ============================================
   SCROLL REVEAL
   ============================================ */

/* Initial hidden state — set by JS so non-JS users see content normally */
.phoshop-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition:
        opacity  500ms ease-in,
        transform 500ms ease-in;
    transition-delay: var(--reveal-delay, 0ms);
}

/* Visible state triggered by IntersectionObserver */
.phoshop-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Reduce motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
    .phoshop-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}


/* ============================================
   STICKY LINE BAR
   ============================================ */
.phoshop-sticky-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 9999;
    background: #06C755;
    overflow: visible;
}
.phoshop-sticky-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    text-decoration: none;
    max-width: var(--container);
    margin: 0 auto;
    position: relative;
}
.phoshop-sticky-bar-group {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.phoshop-sticky-bar-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: #fff;
}
.phoshop-sticky-bar-text {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .01em;
    white-space: nowrap;
}
.phoshop-sticky-bar-text em {
    font-style: normal;
    font-weight: 800;
    color: #fff;
}
.phoshop-sticky-bar-char {
    position: absolute;
    left: calc(50% + 200px);
    bottom: 0;
    height: 100px;
    width: auto;
    object-fit: contain;
    pointer-events: none;
}
/* ชดเชย height ให้ footer ไม่ถูก bar บัง */
body { padding-bottom: 60px; }

@media (max-width: 768px) {
    .phoshop-sticky-bar-inner {
        padding: 10px 16px;
        gap: 8px;
    }
    .phoshop-sticky-bar-icon svg {
        width: 22px;
        height: 22px;
    }
    .phoshop-sticky-bar-text {
        font-size: .88rem;
        white-space: normal;
        line-height: 1.3;
    }
    .phoshop-sticky-bar-char { display: none; }
    body { padding-bottom: 52px; }
}

@media (max-width: 390px) {
    .phoshop-sticky-bar-text { font-size: .82rem; }
}

/* ==============================================
   FRANCHISE FORM SECTION
   ============================================== */
.phoshop-franchise-wrap {
    background: #f9fafb;
    padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 60px);
    position: relative;
    overflow: hidden;
}
/* รูปสินค้าลอยประกอบฟอร์ม — chili (ซ้ายบน) + hoisin (ขวาล่าง) */
.phoshop-fr-float {
    position: absolute;
    z-index: 0;
    width: clamp(190px, 20vw, 340px);
    height: auto;
    pointer-events: none; user-select: none; -webkit-user-drag: none;
    opacity: .95;
    will-change: transform;
}
/* ซอส chili — ซ้ายบน */
.phoshop-fr-float--l1 {
    left: clamp(-50px, 1vw, 30px); top: 6%;
    animation: phoshopFrFloatL1 6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
/* ซอส hoisin — ขวาล่าง */
.phoshop-fr-float--r2 {
    right: clamp(-50px, 1vw, 30px); bottom: 6%;
    animation: phoshopFrFloatR2 7.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes phoshopFrFloatL1 {
    0%,100% { transform: translateY(0) rotate(-8deg); }
    50%     { transform: translateY(-22px) rotate(-5deg); }
}
@keyframes phoshopFrFloatR2 {
    0%,100% { transform: translateY(0) rotate(7deg); }
    50%     { transform: translateY(-26px) rotate(10deg); }
}
.phoshop-franchise-inner { position: relative; z-index: 1; }

/* วงกลมรูปบรรยากาศร้าน — decoration ด้านหลังฟอร์ม */
.phoshop-fr-circle {
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    overflow: hidden;
    pointer-events: none;
    box-shadow: 0 12px 40px rgba(0,0,0,.12);
}
.phoshop-fr-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* c1 — ใต้ซอส chili (ฝั่งซ้าย กลางลงล่าง) */
.phoshop-fr-circle--c1 { width: clamp(160px, 18vw, 350px); aspect-ratio: 1; top: 56%; left: 4%; }
.phoshop-fr-circle--c2 { width: clamp(120px, 13vw, 200px); aspect-ratio: 1; bottom: 6%; left: 15%; }
.phoshop-fr-circle--c3 { width: clamp(210px, 16vw, 420px); aspect-ratio: 1; top: 24%; right: 9%; }
/* ซ่อน decoration บนจอแคบ — ไม่มีที่ว่างพอ */
@media (max-width: 1100px) {
    .phoshop-fr-float,
    .phoshop-fr-circle { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .phoshop-fr-float { animation: none; }
}
.phoshop-franchise-inner {
    max-width: 760px;
    margin: 0 auto;
}
/* Section header (full-width form layout) */
.phoshop-franchise-head {
    text-align: center;
    margin-bottom: clamp(28px, 4vw, 44px);
}
.phoshop-franchise-head .phoshop-franchise-title {
    font-family: var(--phfr-display, var(--font-heading));
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700; line-height: 1.15; color: var(--color-dark, #1a1a1a);
    margin: 0 0 14px; text-wrap: balance;
}
.phoshop-franchise-head .phoshop-franchise-em { color: var(--color-accent, #D4541A); font-style: normal; }
.phoshop-franchise-head .phoshop-franchise-subtitle {
    font-size: clamp(1.05rem, 1.8vw, 1.25rem);
    line-height: 1.7; color: var(--color-muted, #555);
    max-width: 56ch; margin: 0 auto; text-wrap: pretty;
}

/* --- Info col (left) — Header Block --- */
.phoshop-franchise-header {
    background: #162b1e;
    border-radius: 16px 16px 0 0;
    padding: 36px 32px 32px;
    position: relative;
    overflow: hidden;
    margin-bottom: 0;
}
/* Diagonal repeating pattern */
.phoshop-franchise-header::before {
    content: '';
    position: absolute;
    top: -100%; left: -100%; right: -100%; bottom: -100%;
    background-repeat: repeat;
    background-size: 680px 70px;
    transform: rotate(-15deg);
    pointer-events: none;
    z-index: 0;
}
.phoshop-franchise-header-inner {
    position: relative;
    z-index: 1;
}
.phoshop-franchise-title {
    font-size: clamp(1.8rem, 3.8vw, 2.8rem);
    font-weight: 900;
    color: #f0faf4;
    line-height: 1.2;
    margin: 0 0 12px;
    letter-spacing: -.01em;
}
.phoshop-franchise-em {
    color: #5fdb8e;
    font-style: normal;
}
.phoshop-franchise-subtitle {
    font-size: .95rem;
    color: rgba(210, 240, 220, .75);
    line-height: 1.7;
    margin: 0;
    font-weight: 400;
}
/* Why block connects below header */
.phoshop-franchise-why {
    background: #f0faf4;
    border-radius: 0 0 16px 16px;
    padding: 20px 24px 24px;
    margin: 0 0 20px;
}
.phoshop-franchise-feats {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.phoshop-franchise-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff3cd;
    border: 1px solid #ebc640;
    border-radius: 30px;
    padding: 7px 16px;
    font-size: .82rem;
    font-weight: 600;
    color: #7a5c00;
}
.phoshop-franchise-badge-dot {
    width: 8px;
    height: 8px;
    background: #ebc640;
    border-radius: 50%;
    animation: ffBadgePulse 1.5s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes ffBadgePulse {
    0%,100% { opacity:1; transform:scale(1); }
    50%      { opacity:.4; transform:scale(.6); }
}

/* --- Why block --- */
.phoshop-franchise-why-heading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #162b1e;
    color: #f0faf4;
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1;
    padding: 10px 18px 10px 14px;
    border-radius: 8px;
    margin: 0 0 16px;
    position: relative;
    overflow: hidden;
}
.phoshop-franchise-why-heading::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--fr-pattern);
    background-repeat: repeat;
    background-size: 680px 70px;
    transform: rotate(-15deg) scale(1.5);
    pointer-events: none;
    opacity: .6;
}
.phoshop-franchise-why-heading > * { position: relative; z-index: 1; }

/* Checkmark feat items */
.phoshop-franchise-feat {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}
.phoshop-franchise-feat-check {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2d9b5a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-top: 1px;
}
.phoshop-franchise-feat-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    padding-top: 6px;
}
.phoshop-franchise-feat-title {
    font-size: 1rem;
    font-weight: 700;
    color: #162b1e;
    line-height: 1.3;
}
.phoshop-franchise-feat-sub {
    font-size: .82rem;
    color: #4a7a5a;
    line-height: 1.45;
    font-weight: 400;
}

/* --- QR Panel --- */
.phoshop-franchise-qr-panel {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    background: #f0faf4;
    border: 1px solid #cfe8da;
    border-radius: 10px;
    padding: 16px 20px;
}
.phoshop-franchise-qr-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.phoshop-franchise-qr-badge {
    font-size: .78rem;
    font-weight: 700;
    color: #2d9b5a;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.phoshop-franchise-qr-hint {
    font-size: .88rem;
    color: #162b1e;
    font-weight: 600;
    margin: 0;
    line-height: 1.4;
}
.phoshop-franchise-qr-tag {
    font-size: .75rem;
    color: #6a7d72;
    font-weight: 400;
}
.phoshop-franchise-qr-right {
    flex-shrink: 0;
}
.phoshop-franchise-qr-img {
    width: 88px;
    height: 88px;
    object-fit: contain;
    border-radius: 6px;
    display: block;
    border: 1px solid #e5e7eb;
    padding: 4px;
    background: #fff;
}

/* --- Phone contacts --- */
.phoshop-franchise-phones {
    margin-top: 20px;
}
.phoshop-franchise-phones-label {
    font-size: .78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 10px;
}
.phoshop-franchise-phones-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.phoshop-franchise-phone-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .95rem;
    font-weight: 700;
    color: #035726;
    text-decoration: none;
    transition: opacity .2s;
}
.phoshop-franchise-phone-item:hover { opacity: .75; color: #035726; }
.phoshop-franchise-phone-item svg { flex-shrink: 0; opacity: .7; }

/* --- Form card (right) --- */
.phoshop-franchise-card {
    background: #fff;
    border-radius: 18px;
    padding: clamp(28px, 4vw, 48px) clamp(22px, 4vw, 44px);
    border: 1px solid #e8e8e8;
    position: relative;     /* anchor สำหรับ logo overlay */
    overflow: visible;      /* ให้ logo โผล่ออกนอก card ได้ */
}

/* Logo overlay — ขวาบนของ card */
.phoshop-franchise-card-logo {
    position: absolute;
    top: -58px;
    right: -30px;
    z-index: 5;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.12), 0 0 0 3px #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    overflow: hidden;
}
.phoshop-franchise-card-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.phoshop-franchise-card-heading {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 26px;
    padding-bottom: 18px;
    border-bottom: 2px solid #f0f0f0;
}
.phoshop-franchise-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}
.phoshop-ff-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
.phoshop-ff-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.phoshop-ff-label {
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
}
.phoshop-ff-req {
    color: #c0392b;
}
.phoshop-ff-note {
    font-weight: 400;
    color: #999;
    font-size: .85rem;
}
.phoshop-ff-input {
    width: 100%;
    padding: 14px 16px;
    border: 1.5px solid #dde1e7;
    border-radius: 10px;
    font-size: 1.02rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.phoshop-ff-input:focus {
    border-color: #035726;
    box-shadow: 0 0 0 3px rgba(3,87,38,.1);
    background: #fff;
}
.phoshop-ff-input.phoshop-ff-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}
.phoshop-ff-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}
/* "ประเภทที่สนใจ" — radio แบ่งเป็นหมวดหมู่ + การ์ดเลือกได้ */
.phoshop-ff-radiogroups {
    display: flex; flex-direction: column; gap: 16px;
    margin-top: 4px;
}
.phoshop-ff-radiocat-head {
    display: block;
    font-size: 1rem; font-weight: 700; letter-spacing: .01em;
    color: #035726;
    margin-bottom: 10px;
}
.phoshop-ff-radios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-top: 2px;
}
.phoshop-ff-radio { display: block; cursor: pointer; }
.phoshop-ff-radio input {
    position: absolute; opacity: 0; width: 0; height: 0;
}
.phoshop-ff-radio-box {
    display: flex; align-items: flex-start; gap: 12px;
    height: 100%;
    padding: 16px 17px;
    border: 1.5px solid #dde1e7;
    border-radius: 12px;
    background: #fafbfc;
    transition: border-color .18s, background .18s, box-shadow .18s;
}
.phoshop-ff-radio-dot {
    flex-shrink: 0; margin-top: 2px;
    width: 22px; height: 22px; border-radius: 50%;
    border: 2px solid #c3cad3;
    background: #fff;
    transition: border-color .18s, box-shadow .18s;
    position: relative;
}
.phoshop-ff-radio-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.phoshop-ff-radio-title { font-size: 1.05rem; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.phoshop-ff-radio-sub { font-size: .9rem; color: #6a7d72; line-height: 1.45; }
/* hover */
.phoshop-ff-radio:hover .phoshop-ff-radio-box { border-color: #035726; background: #fff; }
/* checked */
.phoshop-ff-radio input:checked + .phoshop-ff-radio-box {
    border-color: #035726;
    background: color-mix(in srgb, #035726 6%, #fff);
    box-shadow: 0 0 0 2px rgba(3,87,38,.12);
}
.phoshop-ff-radio input:checked + .phoshop-ff-radio-box .phoshop-ff-radio-dot {
    border-color: #035726;
    box-shadow: inset 0 0 0 5px #035726;
}
/* keyboard focus */
.phoshop-ff-radio input:focus-visible + .phoshop-ff-radio-box {
    box-shadow: 0 0 0 3px rgba(3,87,38,.25);
}
/* error state */
.phoshop-ff-radios.phoshop-ff-invalid .phoshop-ff-radio-box { border-color: #c0392b; }
.phoshop-ff-error {
    font-size: .76rem;
    color: #c0392b;
    min-height: 16px;
}
/* Success message */
.phoshop-ff-msg {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: .9rem;
    color: #155724;
    font-weight: 500;
    text-align: center;
}
/* Submit button */
.phoshop-ff-submit {
    width: 100%;
    padding: 17px 22px;
    background: #035726;
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.12rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 12px rgba(3,87,38,.25);
    margin-top: 4px;
}
.phoshop-ff-submit:hover:not(:disabled) {
    background: #024a20;
    box-shadow: 0 6px 18px rgba(3,87,38,.35);
    transform: translateY(-1px);
}
.phoshop-ff-submit:active:not(:disabled) {
    transform: translateY(0);
}
.phoshop-ff-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
}
.phoshop-ff-spinner {
    animation: ffSpin .8s linear infinite;
}
@keyframes ffSpin { to { transform: rotate(360deg); } }
.phoshop-ff-privacy {
    text-align: center;
    font-size: .86rem;
    color: #8a8a8a;
    margin: 6px 0 0;
}

/* --- Responsive --- */
@media (max-width: 800px) {
    .phoshop-ff-row {
        grid-template-columns: 1fr;
    }
}

/* ==============================================
   FRANCHISE SUCCESS STATE
   ============================================== */
.phoshop-ff-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 4px;
    animation: ffSuccessFadeIn .4s ease both;
}
@keyframes ffSuccessFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Checkmark icon */
.phoshop-ff-success-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 18px;
}
.phoshop-ff-checkmark {
    width: 72px;
    height: 72px;
}
/* Circle draw animation */
.phoshop-ff-checkmark-circle {
    stroke-dasharray: 157;
    stroke-dashoffset: 157;
    animation: ffCircleDraw .5s cubic-bezier(.65,.05,.35,.95) .1s forwards;
}
@keyframes ffCircleDraw {
    to { stroke-dashoffset: 0; }
}
/* Tick draw animation */
.phoshop-ff-checkmark-tick {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
    animation: ffTickDraw .35s ease .55s forwards;
}
@keyframes ffTickDraw {
    to { stroke-dashoffset: 0; }
}

/* Texts */
.phoshop-ff-success-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #035726;
    margin: 0 0 8px;
}
.phoshop-ff-success-msg {
    font-size: .9rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 20px;
}

/* Summary box */
.phoshop-ff-summary {
    width: 100%;
    background: #f6fdf8;
    border: 1px solid #c3e6cb;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 20px;
    text-align: left;
}
.phoshop-ff-summary-label {
    font-size: .72rem;
    font-weight: 700;
    color: #035726;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 10px;
}
.phoshop-ff-summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.phoshop-ff-summary-list li {
    font-size: .85rem;
    color: #333;
    display: flex;
    gap: 8px;
}
.phoshop-ff-summary-list li strong {
    color: #1a1a1a;
    font-weight: 600;
    min-width: 90px;
    flex-shrink: 0;
}

/* Next steps */
.phoshop-ff-next-steps {
    width: 100%;
    text-align: left;
    margin-bottom: 22px;
}
.phoshop-ff-next-label {
    font-size: .72rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin: 0 0 10px;
}
.phoshop-ff-next-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: .88rem;
    color: #444;
    margin-bottom: 8px;
    line-height: 1.5;
}
.phoshop-ff-next-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    background: #035726;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    margin-top: 1px;
}

/* LINE button */
.phoshop-ff-line-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #06C755;
    color: #fff;
    text-decoration: none;
    padding: 11px 22px;
    border-radius: 30px;
    font-size: .9rem;
    font-weight: 700;
    transition: background .2s, transform .1s;
    box-shadow: 0 3px 10px rgba(6,199,85,.3);
}
.phoshop-ff-line-btn:hover {
    background: #05b04a;
    transform: translateY(-1px);
    color: #fff;
}

/* ==============================================
   SALES INQUIRY FORM SECTION
   ============================================== */
.phoshop-sales-wrap {
    background: transparent;
    padding: clamp(48px, 7vw, 96px) clamp(20px, 5vw, 60px);
}
.phoshop-sales-center {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* --- Header --- */
.phoshop-sales-header {
    text-align: center;
    width: 100%;
}
.phoshop-sales-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .8rem;
    font-weight: 700;
    color: #035726;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: rgba(3,87,38,.08);
    border: 1px solid rgba(3,87,38,.18);
    border-radius: 20px;
    padding: 4px 12px;
    margin: 0 0 16px;
}
.phoshop-sales-title {
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.25;
    margin: 0 0 10px;
}
.phoshop-sales-em {
    font-style: normal;
    color: #035726;
}
.phoshop-sales-subtitle {
    font-size: .97rem;
    color: #666;
    line-height: 1.7;
    margin: 0 0 20px;
}

/* --- Benefit chips --- */
.phoshop-sales-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}
.phoshop-sales-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    color: #035726;
    background: rgba(3,87,38,.07);
    border: 1px solid rgba(3,87,38,.16);
    border-radius: 20px;
    padding: 4px 12px;
}

/* --- Form card --- */
.phoshop-sales-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 32px 28px;
    border: 1px solid #e8e8e8;
    width: 100%;
}

/* --- Stats row --- */
.phoshop-sales-stats {
    display: flex;
    align-items: center;
    gap: 0;
    width: 100%;
    background: #ffffff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 16px 20px;
}
.phoshop-sales-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-align: center;
}
.phoshop-sales-stat-num {
    font-size: 1.3rem;
    font-weight: 800;
    color: #035726;
    line-height: 1;
}
.phoshop-sales-stat-label {
    font-size: .72rem;
    color: #888;
    font-weight: 500;
}
.phoshop-sales-stat-divider {
    width: 1px;
    height: 32px;
    background: #e0e0e0;
    margin: 0 8px;
    flex-shrink: 0;
}
.phoshop-sf-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.phoshop-sf-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.phoshop-sf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.phoshop-sf-label {
    font-size: .82rem;
    font-weight: 600;
    color: #444;
}
.phoshop-sf-req  { color: #c0392b; }
.phoshop-sf-note { font-weight: 400; color: #999; font-size: .78rem; }
.phoshop-sf-field { position: relative; display: flex; align-items: center; }
.phoshop-sf-icon {
    position: absolute;
    left: 13px;
    color: #aab0ba;
    pointer-events: none;
    transition: color .2s;
}
.phoshop-sf-field:focus-within .phoshop-sf-icon { color: #8B1A1A; }
.phoshop-sf-field .phoshop-sf-input { padding-left: 40px; }
.phoshop-sf-input {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #dde1e7;
    border-radius: 8px;
    font-size: .9rem;
    font-family: inherit;
    color: #1a1a1a;
    background: #fafbfc;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.phoshop-sf-input:focus {
    border-color: #8B1A1A;
    box-shadow: 0 0 0 3px rgba(139,26,26,.1);
    background: #fff;
}
.phoshop-sf-input.phoshop-sf-invalid {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,.08);
}
.phoshop-sf-select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 7L11 1' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
    cursor: pointer;
}
.phoshop-sf-error {
    font-size: .76rem;
    color: #c0392b;
    min-height: 16px;
}

/* Customer type radio buttons */
.phoshop-sf-type-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.phoshop-sf-type-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px 10px;
    border: 1.5px solid #dde1e7;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, background .2s, box-shadow .2s;
    position: relative;
    gap: 4px;
    background: #fafbfc;
}
.phoshop-sf-type-btn:hover {
    border-color: #8B1A1A;
    background: #fff9f9;
}
.phoshop-sf-type-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.phoshop-sf-type-btn:has(input:checked) {
    border-color: #8B1A1A;
    background: #fff1f1;
    box-shadow: 0 0 0 3px rgba(139,26,26,.1);
}
.phoshop-sf-type-icon { font-size: 1.4rem; line-height: 1; }
.phoshop-sf-type-name { font-size: .78rem; font-weight: 700; color: #1a1a1a; }
.phoshop-sf-type-desc { font-size: .68rem; color: #999; line-height: 1.3; }

/* Checkboxes */
.phoshop-sf-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.phoshop-sf-check-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .85rem;
    color: #333;
    cursor: pointer;
    padding: 7px 12px;
    border: 1.5px solid #dde1e7;
    border-radius: 20px;
    background: #fafbfc;
    transition: border-color .15s, background .15s;
    user-select: none;
}
.phoshop-sf-check-label:hover {
    border-color: #8B1A1A;
    background: #fff9f9;
}
.phoshop-sf-check-label:has(input:checked) {
    border-color: #8B1A1A;
    background: #fff1f1;
    color: #8B1A1A;
    font-weight: 600;
}
.phoshop-sf-checkbox { display: none; }
.phoshop-sf-check-box {
    width: 16px;
    height: 16px;
    border: 1.5px solid #ccc;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color .15s, background .15s;
    position: relative;
}
.phoshop-sf-check-label:has(input:checked) .phoshop-sf-check-box {
    background: #8B1A1A;
    border-color: #8B1A1A;
}
.phoshop-sf-check-label:has(input:checked) .phoshop-sf-check-box::after {
    content: '';
    display: block;
    width: 9px;
    height: 5px;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(-45deg) translateY(-1px);
}

/* Submit button */
.phoshop-sf-submit {
    width: 100%;
    padding: 13px 20px;
    background: #035726;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 12px rgba(3,87,38,.25);
    margin-top: 4px;
}
.phoshop-sf-submit:hover:not(:disabled) {
    filter: brightness(1.1);
    box-shadow: 0 6px 18px rgba(3,87,38,.35);
    transform: translateY(-1px);
}
.phoshop-sf-submit:disabled { opacity: .65; cursor: not-allowed; }
.phoshop-sf-spinner { animation: ffSpin .8s linear infinite; }
.phoshop-sf-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-align: center;
    font-size: .74rem;
    color: #aaa;
    margin: 4px 0 0;
}

/* Success state */
.phoshop-sf-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 0 4px;
    animation: ffSuccessFadeIn .4s ease both;
}
.phoshop-sf-success-icon { width: 68px; height: 68px; margin-bottom: 16px; }
.phoshop-sf-success-title { font-size: 1.3rem; font-weight: 800; color: #035726; margin: 0 0 8px; }
.phoshop-sf-success-msg   { font-size: .9rem; color: #555; line-height: 1.6; margin: 0 0 18px; }
.phoshop-sf-success-alt   { font-size: .82rem; color: #999; margin: 16px 0 8px; }

/* Responsive */
@media (max-width: 640px) {
    .phoshop-sales-card  { padding: 24px 20px 22px; }
    .phoshop-sf-row      { grid-template-columns: 1fr; }
    .phoshop-sales-stats { padding: 12px 14px; }
    .phoshop-sales-stat-num { font-size: 1.1rem; }
}

/* ==============================================
   PAIN-SOLUTION — Section ปัญหา + ทางออก
   ============================================== */
.phoshop-ps-wrap {
    padding: 72px 0 80px;
}
.phoshop-ps-wrap .phoshop-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ---- Pain block 3D ---- */
.phoshop-ps-pain-outer {
    position: relative;
    margin-right: 100px; /* เว้นขวาให้ "?" โผล่ออกนอกกรอบ */
    padding-top: 36px;   /* เผื่อพื้นที่บนให้ heading โผล่ขึ้น */
}
/* "?" อยู่นอกกรอบทางขวา — z-index ต่ำสุด */
.phoshop-ps-deco-q {
    position: absolute;
    right: -210px;
    top: 60%;
    transform: translateY(-50%);
    font-size: clamp(200px, 24vw, 400px);
    font-weight: 900;
    color: var(--color-primary);
    opacity: .09;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
    animation: ps-q-float 4s ease-in-out infinite;
}
@keyframes ps-q-float {
    0%   { transform: translateY(-50%) scale(1);    opacity: .09; }
    40%  { transform: translateY(-54%) scale(1.04); opacity: .13; }
    100% { transform: translateY(-50%) scale(1);    opacity: .09; }
}
/* shadow layer — สร้าง 3D offset */
.phoshop-ps-pain-shadow {
    position: absolute;
    inset: 36px 0 0 0; /* เริ่มระดับเดียวกับ card ไม่ขึ้นทับ heading */
    border-radius: var(--radius-lg);
    background: var(--color-primary);
    transform: translate(7px, 7px);
    z-index: 1;
}
.phoshop-ps-pain-block {
    position: relative;
    z-index: 2;
    background: #fdf6ee;
    border: 2.5px solid var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 0 40px 36px;
    overflow: visible;
}
.phoshop-ps-pain-content { position: relative; z-index: 3; display: flex; flex-direction: column; }
.phoshop-ps-pain-heading {
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: #ffffff;
    line-height: 1.2;
    margin-top: -0.7em; /* ดึงขึ้นเหนือกรอบ */
    position: relative;
    display: inline-block;
    align-self: flex-start;
    z-index: 4;
    background: var(--color-primary);
    padding: 0.25em 0.75em 0.25em;
    border-radius: 8px;
}

.phoshop-ps-pain-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 20px;
}
.phoshop-ps-pain-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    padding: 16px 0;
    border-bottom: 1px solid rgba(139,26,26,.1);
}
.phoshop-ps-pain-item:last-child { border-bottom: none; }

/* Q&A layout */
.phoshop-ps-qa-item { gap: 10px; }
.phoshop-ps-qa-q,
.phoshop-ps-qa-a {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.phoshop-ps-qa-label {
    flex-shrink: 0;
    padding: 3px 11px;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-top: 3px;
    line-height: 1.5;
}
.phoshop-ps-qa-label--a {
    background: rgba(139,26,26,0.10);
    color: var(--color-primary);
}
.phoshop-ps-qa-q span:last-child {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--color-text);
    line-height: 1.55;
}
.phoshop-ps-qa-a span:last-child {
    font-size: 1rem;
    font-weight: 400;
    color: #555;
    line-height: 1.6;
}
/* เน้นคำ: mark/strong = แดง, b = เขียว — ทำงานเหมือนกันทั้ง Q และ A และซ้อนแท็กกันได้ */
.phoshop-ps-qa-q mark, .phoshop-ps-qa-q strong,
.phoshop-ps-qa-a mark, .phoshop-ps-qa-a strong {
    background: none;
    color: var(--color-primary);
    font-weight: 800;
}
.phoshop-ps-qa-q b,
.phoshop-ps-qa-a b {
    background: none;
    color: #2f7d3a;
    font-weight: 800;
}
/* dash minimal แทน SOS */
.phoshop-ps-dash {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 1.1rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ---- Checklist cards 3D ---- */
.phoshop-ps-check-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.phoshop-ps-check-item {
    position: relative;
    list-style: none;
    /* padding บนให้ icon โผล่ขึ้นได้ */
    padding-top: 18px;
}
/* shadow layer 3D */
.phoshop-ps-check-card-shadow {
    position: absolute;
    inset: 18px 0 0 0; /* เริ่มที่ระดับเดียวกับ card */
    border-radius: var(--radius);
    background: var(--color-primary);
    transform: translate(5px, 5px);
    z-index: 0;
    opacity: .25;
}
.phoshop-ps-check-card {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    background: #fff;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    padding: 20px 22px 20px 18px;
    overflow: visible;
}
/* icon โผล่เหนือกรอบ card */
.phoshop-ps-checkmark {
    flex-shrink: 0;
    position: relative;
    margin-top: -36px; /* ยกขึ้นเหนือกรอบ */
    align-self: flex-start;
}
.phoshop-ps-check-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-dark);
    line-height: 1.45;
}

/* ---- Bottom row: solution bar + CTA แยกกัน 2-col ---- */
.phoshop-ps-bottom-row {
    display: grid;
    grid-template-columns: 4fr 1fr;
    gap: 20px;
    align-items: stretch;
    overflow: visible;
}

/* Col ซ้าย: solution bar */
.phoshop-ps-solution-bar {
    background: var(--color-dark);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.phoshop-ps-solution-headline {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.45;
    margin: 0;
}
.phoshop-ps-solution-sub {
    font-size: .9rem;
    color: rgba(255,255,255,.62);
    margin: 8px 0 0;
    line-height: 1.65;
}

/* Col ขวา: CTA ปุ่มใหญ่ */
.phoshop-ps-cta-wrap {
    position: relative;
    overflow: visible;
}
.phoshop-ps-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 110px;
    background: var(--color-primary);
    color: #fff;
    border-radius: var(--radius-lg);
    font-size: 1.7rem;
    font-weight: 900;
    letter-spacing: .01em;
    position: relative;
    overflow: visible;
    transition: background var(--transition), transform .2s ease;
    /* pulse เบาๆ เรียกสายตา — ใช้ transform ไม่ใช่ shadow ตาม design rule */
    animation: ps-cta-pulse 2.2s ease-in-out infinite;
}
.phoshop-ps-cta:hover {
    background: #6e1414;
    transform: scale(1.03);
    animation-play-state: paused;
}
@keyframes ps-cta-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.025); }
}
.phoshop-ps-cta-label {
    padding: 32px 28px;
    text-align: center;
    line-height: 1.25;
}
/* วงกลมลูกศรโผล่ลอยออกนอกกรอบปุ่มทางขวา */
.phoshop-ps-cta-arrow {
    position: absolute;
    right: -38px;
    top: 50%;
    transform: translateY(-50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    pointer-events: none;
    z-index: 10;
    animation: ps-arrow-nudge 1.6s ease-in-out infinite;
}
@keyframes ps-arrow-nudge {
    0%   { transform: translateY(-50%) translateX(0); }
    30%  { transform: translateY(-50%) translateX(8px); }
    50%  { transform: translateY(-50%) translateX(3px); }
    70%  { transform: translateY(-50%) translateX(10px); }
    100% { transform: translateY(-50%) translateX(0); }
}
.phoshop-ps-cta:hover .phoshop-ps-cta-arrow {
    background: #b83d10;
    animation: ps-arrow-nudge-fast 0.6s ease-in-out infinite;
}
@keyframes ps-arrow-nudge-fast {
    0%   { transform: translateY(-50%) translateX(0); }
    50%  { transform: translateY(-50%) translateX(10px); }
    100% { transform: translateY(-50%) translateX(0); }
}

@media (max-width: 760px) {
    .phoshop-ps-bottom-row  { grid-template-columns: 1fr; }
    .phoshop-ps-cta         { min-height: 92px; font-size: 1.4rem; }
    .phoshop-ps-cta-label   { padding: 24px 20px; }
    .phoshop-ps-cta-arrow   { right: -30px; width: 60px; height: 60px; }
}

@media (max-width: 860px) {
    .phoshop-ps-pain-outer      { margin-right: 60px; }
    .phoshop-ps-deco-q          { font-size: 160px; right: -70px; }
    .phoshop-ps-check-list      { grid-template-columns: 1fr; }
    .phoshop-ps-solution-bar    { flex-direction: column; align-items: flex-start; padding: 24px 28px 28px; }
    .phoshop-ps-cta-wrap        { margin-right: 0; align-self: flex-start; }
}
@media (max-width: 640px) {
    .phoshop-ps-wrap            { padding: 52px 0 60px; }
    .phoshop-ps-pain-outer      { margin-right: 0; }
    .phoshop-ps-pain-block      { padding: 22px 18px; }
    .phoshop-ps-deco-q          { display: none; }
}

/* ==============================================
   WHY US — Section จุดเด่น / ทำไมต้องเลือกเรา
   ============================================== */
/* ── Why Us — redesigned ── */
.phoshop-whyus-wrap {
    padding: 80px 0 88px;
    position: relative;
    overflow: hidden;
}

.phoshop-whyus-bg-texture {
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 18px,
        rgba(139,26,26,0.03) 18px,
        rgba(139,26,26,0.03) 19px
    );
    pointer-events: none;
}

.phoshop-whyus-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 56px;
    align-items: center;
}

/* ════════ Left: 3D stage ════════ */
.phoshop-whyus-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    isolation: isolate;
    overflow: visible;
}

/* ── Brush-stroke reveal background ── */
.phoshop-whyus-glass {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: -1;
    /* feather every edge so the scene melts into the section, no boxed frame */
    -webkit-mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 78% 78% at 50% 50%, #000 55%, transparent 100%);
}

/* layer 1: restaurant scene, washed out underneath the paint */
.phoshop-whyus-glass-scene {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.96) saturate(0.85);
    transform: scale(1.08);
}

/* layer 2: the painted-over film covering the scene */
.phoshop-whyus-glass-fog {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 28% 22%, rgba(255,255,255,0.3) 0%, transparent 42%),
        linear-gradient(135deg, rgba(255,248,243,0.82), rgba(253,235,208,0.78));
}

/* layer 3: clear scene, revealed inside diagonal brush strokes */
.phoshop-whyus-glass-wipe {
    position: absolute;
    inset: -10%;
    background-size: cover;
    background-position: center;
    filter: brightness(1.05) saturate(1.12);
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%),
        linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
    mask-image:
        linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%),
        linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%),
        linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
    -webkit-mask-size: 100% 22%, 100% 15%, 100% 11%;
    mask-size: 100% 22%, 100% 15%, 100% 11%;
    -webkit-mask-position: 0 26%, 0 54%, 0 74%;
    mask-position: 0 26%, 0 54%, 0 74%;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    transform: rotate(-5deg) scale(1.1);
    animation: whyus-wipe-in 1.3s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}

/* the model itself */
.phoshop-whyus-pot-img {
    position: absolute;
    z-index: 2;
    width: 125%;
    max-width: none;
    height: auto;
    object-fit: contain;
    left: 50%;
    bottom: -6%;
    transform: translateX(-50%);
    animation: whyus-stage-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both,
               whyus-float-overflow 4s ease-in-out 0.9s infinite;
}

@keyframes whyus-float-overflow {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50%      { transform: translateX(-50%) translateY(-18px); }
}

/* elliptical reflection/shadow under the pot, sitting on the glass */
.phoshop-whyus-stage-base {
    position: absolute;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(ellipse, rgba(61,26,0,0.28) 0%, transparent 72%);
    filter: blur(5px);
    z-index: 0;
    animation: whyus-shadow-pulse 4s ease-in-out 1s infinite;
}

/* ════════ Right: content ════════ */
.phoshop-whyus-content {
    display: flex;
    flex-direction: column;
}

.phoshop-whyus-header {
    margin-bottom: 8px;
}

.phoshop-whyus-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 10px;
}

.phoshop-whyus-heading {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--color-primary);
    margin: 0 0 10px;
    line-height: 1.2;
}

.phoshop-whyus-subheading {
    font-size: 0.95rem;
    color: var(--color-muted);
    line-height: 1.7;
    margin: 0;
    max-width: 460px;
}

/* ── Cards column ── */
.phoshop-whyus-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 16px;
}

.phoshop-whyus-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px 8px;
    border-bottom: 1px solid rgba(139,26,26,0.12);
    position: relative;
    cursor: default;
    transition: background 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
}

.phoshop-whyus-card.whyus-visible {
    animation: whyus-card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--card-index) * 0.12s);
}

.phoshop-whyus-card:first-child {
    border-top: 1px solid rgba(139,26,26,0.12);
}

.phoshop-whyus-card::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--color-primary);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.3s ease;
    border-radius: 0 2px 2px 0;
}

.phoshop-whyus-card:hover::before {
    transform: scaleY(1);
}

.phoshop-whyus-card:hover {
    background: rgba(139,26,26,0.03);
}

/* ghost number — right side */
.phoshop-whyus-card-num {
    flex-shrink: 0;
    font-size: 2.8rem;
    font-weight: 900;
    color: rgba(139,26,26,0.07);
    letter-spacing: -0.04em;
    line-height: 1;
    transition: color 0.3s ease;
    user-select: none;
    width: 52px;
    text-align: right;
}

.phoshop-whyus-card:hover .phoshop-whyus-card-num {
    color: rgba(139,26,26,0.2);
}

/* body */
.phoshop-whyus-card-body {
    flex: 1;
    min-width: 0;
}

.phoshop-whyus-card-title {
    font-size: clamp(1.05rem, 1.6vw, 1.22rem);
    font-weight: 800;
    color: var(--color-dark);
    margin: 0 0 5px;
    line-height: 1.3;
    transition: color 0.25s ease;
}

.phoshop-whyus-card:hover .phoshop-whyus-card-title {
    color: var(--color-primary);
}

.phoshop-whyus-card-desc {
    font-size: 0.9rem;
    color: var(--color-muted);
    line-height: 1.65;
    margin: 0;
}

/* CTA button */
.phoshop-whyus-cta {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 12px 28px;
    background: var(--color-primary);
    color: #fff;
    border: 1.5px solid var(--color-primary);
    border-radius: 100px;
    font-weight: 700;
    font-size: .9rem;
    transition: background 0.25s ease, gap 0.25s ease;
}

.phoshop-whyus-cta:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    gap: 12px;
}

/* ── Keyframes ── */
@keyframes whyus-card-in {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes whyus-stage-in {
    /* ต้องคง translateX(-50%) ไว้ทุกเฟรม ไม่งั้นรูปจะเลื่อนไปกลาง section
       ระหว่างอนิเมชัน แล้วเด้งกลับซ้ายตอน float animation เริ่ม (0.9s) */
    from { opacity: 0; transform: translateX(-50%) scale(0.9) translateY(12px); }
    to   { opacity: 1; transform: translateX(-50%) scale(1) translateY(0); }
}

@keyframes whyus-tag-in {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to   { opacity: 1; transform: translate(-50%, 0); }
}

/* glass wipe reveals the clear scene by clipping the masked streaks open */
@keyframes whyus-wipe-in {
    from { opacity: 0; clip-path: inset(0 100% 0 0); }
    to   { opacity: 1; clip-path: inset(0 0 0 0); }
}

@keyframes whyus-shadow-pulse {
    0%, 100% { opacity: 0.85; width: 52%; }
    50%      { opacity: 1;    width: 56%; }
}

@keyframes whyus-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-14px); }
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .phoshop-whyus-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .phoshop-whyus-stage {
        max-width: 420px;
        margin: 0 auto;
        order: -1;
    }
    .phoshop-whyus-header { text-align: center; }
    .phoshop-whyus-subheading { margin-left: auto; margin-right: auto; }
    .phoshop-whyus-cta { align-self: center; }
}

@media (max-width: 640px) {
    .phoshop-whyus-wrap { padding: 56px 0 64px; }
    .phoshop-whyus-stage { max-width: 320px; }
    .phoshop-whyus-card { gap: 10px; padding: 16px 6px; }
    .phoshop-whyus-card-title { font-size: 1rem; }
    .phoshop-whyus-stage-tag { font-size: 0.72rem; padding: 6px 14px; }
}

/* ============================================================
   Social Proof Section
   ============================================================ */
.phoshop-sp-wrap {
    padding: 72px 0 80px;
}

.phoshop-sp-warp-container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;   /* กันชิดขอบจอ mobile (เดสก์ท็อปยังอยู่ใน max-width เท่าเดิม) */
}

/* Header */
.phoshop-sp-header {
    text-align: center;
    margin-bottom: 52px;
}
.phoshop-sp-heading {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 900;
    color: var(--color-dark);
    margin: 0 0 12px;
    line-height: 1.2;
}
.phoshop-sp-subheading {
    font-size: 1.05rem;
    color: #666;
    margin: 0;
}

/* ─── Stats ─── */
.phoshop-sp-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    margin-bottom: 52px;
    border: 2px solid var(--color-primary);
    border-radius: 16px;
    overflow: hidden;
}
.phoshop-sp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 32px 20px;
    background: #fff;
    border-right: 2px solid var(--color-primary);
}
.phoshop-sp-stat:last-child { border-right: none; }
.phoshop-sp-stat-num {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
}
.phoshop-sp-stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #555;
    text-align: center;
}

/* ─── Testimonials ─── */
.phoshop-sp-testimonials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.phoshop-sp-grid-image-row {
    display: grid;
    grid-template-columns: repeat(var(--sp-img-cols, 1), 1fr);
    gap: 16px;
    margin-bottom: 44px;
}
.phoshop-sp-grid-image {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    line-height: 0;
    aspect-ratio: var(--sp-img-ratio, 4 / 3);
    cursor: pointer;
    transition: transform 0.18s ease, opacity 0.18s ease;
}
.phoshop-sp-grid-image:hover { transform: scale(1.025); opacity: 0.92; }
.phoshop-sp-grid-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 16px;
    pointer-events: none;
}
@media (max-width: 640px) {
    .phoshop-sp-grid-image-row { grid-template-columns: 1fr; }
}

/* ── Image popup ── */
.sp-img-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.sp-img-popup[hidden] { display: none; }
.sp-img-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 10, 5, 0.72);
    animation: sp-popup-fade-in 0.22s ease both;
}
.sp-img-popup-frame {
    position: relative;
    max-width: min(92vw, 900px);
    width: 100%;
    /* no overflow:hidden here — close button sits outside, emoji are clipped by inner layer */
    animation: sp-popup-scale-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
/* emoji are clipped to the image area, not the whole frame */
.sp-img-popup-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    line-height: 0;
}
.sp-img-popup-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    /* border-radius handled by .sp-img-popup-img-wrap */
}
.sp-img-popup-bubble {
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 16px;
    padding: 12px 20px;
    max-width: 480px;
    width: max-content;
    animation: sp-bubble-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
    white-space: normal;
    word-break: break-word;
}
.sp-img-popup-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 9px solid transparent;
    border-top-color: #fff;
}
.sp-img-popup-bubble-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #3a2010;
    line-height: 1.55;
}
.sp-img-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    z-index: 10;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.15s, color 0.15s;
}
.sp-img-popup-close:hover { background: var(--color-primary, #8B1A1A); color: #fff; }

/* Franchise lightbox: ไม่มีแถบหัวใจ จึงให้ frame หดเท่ารูป — ปุ่มปิดจะอยู่มุมขวาบนของรูปจริง */
#phfr-lightbox .sp-img-popup-frame { width: auto; max-width: min(92vw, 900px); }
#phfr-lightbox .sp-img-popup-img-wrap { display: inline-block; }
#phfr-lightbox .sp-img-popup-img { width: auto; max-width: min(92vw, 900px); max-height: 86vh; }

@keyframes sp-popup-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes sp-popup-scale-in {
    from { opacity: 0; transform: scale(0.82); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes sp-bubble-in {
    from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(0.88); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0)    scale(1); }
}

/* ── Livestream emoji burst ── */
.sp-popup-emoji {
    position: absolute;
    bottom: 0;                  /* start at very bottom of image wrap */
    pointer-events: none;
    user-select: none;
    line-height: 1;
    animation: sp-emoji-rise 2s ease-in-out forwards;
    will-change: transform, opacity;
}
@keyframes sp-emoji-rise {
    0%   { transform: translateY(0)      translateX(0)                         scale(0.6);  opacity: 0;   }
    8%   { opacity: 1;                                                                                      }
    30%  { transform: translateY(-28%)   translateX(calc(var(--drift,0px)*0.4)) scale(1.1); opacity: 1;   }
    65%  { transform: translateY(-65%)   translateX(var(--drift,0px))           scale(0.95); opacity: 0.85; }
    100% { transform: translateY(-105%)  translateX(calc(var(--drift,0px)*1.2)) scale(0.7); opacity: 0;   }
}

/* ── Like badge on thumbnail ── */
.phoshop-sp-grid-image { position: relative; }
.sp-grid-like-badge {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.52);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    letter-spacing: 0.02em;
}

/* ── Popup like bar ── */
.sp-img-popup-likes {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 40px;
    padding: 8px 14px;
}
.sp-popup-likes-count {
    font-size: 1.5rem;
    font-weight: 900;
    color: #3a2010;
    line-height: 1;
    transition: transform 0.15s cubic-bezier(0.22,1,0.36,1), color 0.15s;
}
.sp-popup-likes-count.sp-likes-bump {
    transform: scale(1.35);
    color: #e03030;
}
.sp-popup-likes-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #888;
    flex-shrink: 0;
}
.sp-popup-react-btns {
    display: flex;
    gap: 6px;
    margin-left: auto;
}
.sp-popup-react-btn {
    font-size: 1.45rem;
    background: #fff;
    border: 1.5px solid #e8e0d8;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.12s cubic-bezier(0.22,1,0.36,1), background 0.12s;
    line-height: 1;
}
.sp-popup-react-btn:hover  { background: #f5f0eb; border-color: #d4b8a0; transform: scale(1.15); }
.sp-popup-react-btn:active { transform: scale(0.88); }
.sp-popup-react-btn.sp-btn-pop {
    animation: sp-btn-pop 0.28s cubic-bezier(0.22,1,0.36,1);
}
@keyframes sp-btn-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    100% { transform: scale(1); }
}
/* การ์ดที่ 4 และ 5 อยู่แถวล่าง 2 คอล กึ่งกลาง */
.phoshop-sp-testimonials .phoshop-sp-card:nth-child(4) { grid-column: 1 / 2; }
.phoshop-sp-testimonials .phoshop-sp-card:nth-child(5) { grid-column: 2 / 3; }
.phoshop-sp-card {
    position: relative;
    background: #fff;
    border: 2px solid #e8e0d8;
    border-radius: 14px;
    padding: 28px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.phoshop-sp-quote-text {
    font-size: 0.97rem;
    font-weight: 500;
    color: #333;
    line-height: 1.65;
    margin: 0 0 16px;
    flex: 1;
}
/* ─── Card footer: avatar + name ─── */
.phoshop-sp-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    border-top: 1.5px solid #f0e8e0;
    padding-top: 14px;
    margin-top: auto;
}
.phoshop-sp-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.phoshop-sp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.phoshop-sp-avatar-initials {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.phoshop-sp-author-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.phoshop-sp-author {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
}
.phoshop-sp-stars {
    font-size: 1.1rem;
    color: #f5a623;
    letter-spacing: 2px;
    line-height: 1;
}

/* ─── Section Label (เหนือ testimonials) ─── */
.phoshop-sp-section-label {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.phoshop-sp-section-label::before,
.phoshop-sp-section-label::after {
    content: '';
    flex: 1;
    height: 1.5px;
    background: #e8e0d8;
    border-radius: 1px;
}
.phoshop-sp-section-label-inner {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── Divider row ─── */
.phoshop-sp-divider-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 44px 0 32px;
}
.phoshop-sp-divider-line {
    flex: 1;
    height: 1.5px;
    background: #e8e0d8;
    border-radius: 1px;
}
.phoshop-sp-divider-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ─── Creator Grid ─── */
.phoshop-sp-creator-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 52px;
}
.phoshop-sp-creator-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    padding: 22px 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 0;
    color: #fff;
    background: #1a1a1a;
}
/* deco logo มุมขวาบน */
.phoshop-sp-creator-card .phoshop-sp-creator-deco {
    position: absolute;
    right: -16px;
    top: -16px;
    width: 100px;
    height: 100px;
    opacity: 0.15;
    transform: rotate(20deg);
    pointer-events: none;
    z-index: 0;
}
/* dark overlay */
.phoshop-sp-creator-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(0,0,0,0.15);
    pointer-events: none;
    z-index: 0;
}
.phoshop-sp-creator-card > * { position: relative; z-index: 1; }

/* Platform color themes */
.phoshop-sp-creator-card--tiktok    { background: linear-gradient(145deg, #2a2a3e 50%, #3a2a50); }
.phoshop-sp-creator-card--instagram { background: linear-gradient(145deg, #7b22b0 0%, #c82030 55%, #d07010 100%); }
.phoshop-sp-creator-card--youtube   { background: linear-gradient(145deg, #b01010 40%, #6a0000); }
.phoshop-sp-creator-card--facebook  { background: linear-gradient(145deg, #1a6acc 50%, #0d4aaa); }

/* ── Platform badge — ใน footer ── */
.phoshop-sp-platform-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px 4px 7px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
}
.phoshop-sp-platform-badge svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.phoshop-sp-platform-badge--tiktok,
.phoshop-sp-platform-badge--instagram,
.phoshop-sp-platform-badge--youtube,
.phoshop-sp-platform-badge--facebook { background: rgba(255,255,255,0.2); }

/* ── Quote text — กลางการ์ด ── */
.phoshop-sp-creator-card .phoshop-sp-quote-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.6;
    margin: 0 0 18px;
    padding: 0;
    flex: 1;
}

/* ── Footer: avatar + info + chips ── */
.phoshop-sp-creator-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 14px;
    flex-wrap: wrap;
}
.phoshop-sp-creator-footer-chips {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.phoshop-sp-creator-card .phoshop-sp-avatar {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-color: rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.18);
}
.phoshop-sp-creator-card .phoshop-sp-avatar-initials { color: #fff; }
.phoshop-sp-creator-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.phoshop-sp-creator-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.phoshop-sp-creator-handle {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    font-weight: 500;
}
/* follower chip */
.phoshop-sp-creator-followers {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.28);
    border-radius: 20px;
    padding: 4px 10px;
}

/* ─── Review Bar ─── */
.phoshop-sp-review-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
    background: var(--color-primary);
    border-radius: 14px;
    padding: 18px 32px;
    margin-bottom: 48px;
}
.phoshop-sp-review-bar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.phoshop-sp-review-bar-item + .phoshop-sp-review-bar-item {
    border-left: 1.5px solid rgba(255,255,255,0.25);
    padding-left: 28px;
}
.phoshop-sp-rbar-stars {
    font-size: 1rem;
    color: #ffc84a;
    letter-spacing: 1.5px;
    line-height: 1;
}
.phoshop-sp-rbar-text {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
}
.phoshop-sp-rbar-text strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

/* ─── CTA Bar ─── */
.phoshop-sp-cta-bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    background: var(--color-primary);
    border-radius: 16px;
    padding: 28px 36px;
}
.phoshop-sp-offer {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: #fff;
    margin: 0;
    line-height: 1.4;
}
.phoshop-sp-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.18s, color 0.18s;
}
.phoshop-sp-cta:hover {
    background: var(--color-accent);
    color: #fff;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .phoshop-sp-testimonials { grid-template-columns: 1fr 1fr; }
    .phoshop-sp-testimonials .phoshop-sp-card:nth-child(4) { grid-column: auto; }
    .phoshop-sp-testimonials .phoshop-sp-card:nth-child(5) { grid-column: auto; }
}
@media (max-width: 900px) {
    .phoshop-sp-creator-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    /* ── Review bar: 3 ไทล์เรียงแนวตั้งในแถบเดียว icon+value บน, label ล่าง ── */
    .phoshop-sp-review-bar   { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 18px; }
    .phoshop-sp-review-bar-item {
        flex-direction: column;
        text-align: center;
        gap: 6px;
        padding: 18px 0;
    }
    .phoshop-sp-review-bar-item + .phoshop-sp-review-bar-item {
        border-left: none;
        border-top: 1.5px solid rgba(255,255,255,0.18);
        padding-left: 0;
    }
    .phoshop-sp-rbar-stars { font-size: 1.2rem; letter-spacing: 3px; }
    .phoshop-sp-rbar-text strong { font-size: 1.3rem; }
    .phoshop-sp-rbar-text  { font-size: .92rem; opacity: .92; }

    /* ── Stats: 3 ไทล์เรียงในกรอบเดียว เส้นคั่นบางๆ ── */
    .phoshop-sp-stats        { grid-template-columns: 1fr; border-radius: 14px; }
    .phoshop-sp-stat         { border-right: none; border-bottom: 2px solid var(--color-primary); padding: 22px 20px; }
    .phoshop-sp-stat:last-child { border-bottom: none; }
    .phoshop-sp-stat-num     { font-size: 2.2rem; }
    .phoshop-sp-testimonials { grid-template-columns: 1fr; }
    .phoshop-sp-testimonials .phoshop-sp-card:nth-child(n) { grid-column: auto; }
    .phoshop-sp-cta-bar      { grid-template-columns: 1fr; text-align: center; padding: 24px 20px; }
    .phoshop-sp-cta          { justify-content: center; width: 100%; }
}

/* ─── Scroll Animation States ─── */
.sp-fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
.sp-scale-in {
    opacity: 0;
    transform: scale(0.88);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.sp-slide-up {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.sp-revealed {
    opacity: 1;
    transform: none;
}

/* ============================================================
   Promotion / Flash Sale Section — minimal (พื้นแดงแบรนด์ โทนขาวล้วน flat)
   ============================================================ */
.phoshop-section--promotion {
    background: var(--color-primary, #8B1A1A) !important;
    padding: 0 !important;
}
.phoshop-promo-wrap { background: transparent; padding: clamp(48px, 7vw, 80px) 0; }
.phoshop-promo-wrap .phoshop-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    align-items: start;
    column-gap: clamp(40px, 6vw, 80px);
    row-gap: 28px;
}
/* วางตำแหน่งชัดเจน (badge ถูกเอาออก จึง pin เองกัน auto-flow เพี้ยน) */
.phoshop-promo-left        { grid-column: 1; grid-row: 1 / 3; }
.phoshop-promo-timer-label { grid-column: 2; grid-row: 1; }
.phoshop-promo-right       { grid-column: 2; grid-row: 2; }

/* ── Row 1: timer label (badge ถูกเอาออกแล้ว) ── */
.phoshop-promo-timer-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em;
    color: rgba(255,255,255,0.7); text-transform: uppercase;
    margin: 0;
}
.phoshop-promo-timer-label svg { width: 15px; height: 15px; flex-shrink: 0; color: rgba(255,255,255,0.7); }

/* live dot — เรียบ ขาวโปร่ง ไม่มีสีทอง */
.phoshop-promo-pulse { position: relative; width: 8px; height: 8px; flex-shrink: 0; }
.phoshop-promo-pulse::before, .phoshop-promo-pulse::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; background: #fff;
}
.phoshop-promo-pulse::after { animation: promo-pulse 1.8s ease-out infinite; opacity: 0; }
@keyframes promo-pulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(2.6); opacity: 0; }
}

/* ── Left ── */
.phoshop-promo-left { display: flex; flex-direction: column; }
.phoshop-promo-heading {
    font-size: clamp(1.7rem, 3vw, 2.5rem); font-weight: 900; color: #fff;
    line-height: 1.2; margin: 0 0 10px; text-wrap: balance;
}
.phoshop-promo-sub {
    font-size: 1rem; color: rgba(255,255,255,0.8);
    margin: 0 0 24px; line-height: 1.6; max-width: 44ch;
}
.phoshop-promo-items {
    list-style: none; margin: 0 0 28px; padding: 0;
    display: flex; flex-direction: column; gap: 11px;
}
.phoshop-promo-items li {
    display: flex; align-items: center; gap: 12px;
    color: #fff; font-size: 1rem; font-weight: 600;
}
/* ติ๊กถูก — วงกลมขาวทึบ เครื่องหมายสีแดงแบรนด์ ให้เด่นขึ้น */
.phoshop-promo-items li svg {
    flex-shrink: 0; width: 22px; height: 22px; padding: 4px;
    background: #fff; color: var(--color-primary, #8B1A1A);
    border-radius: 50%; box-sizing: border-box;
}

/* Stock bar — เส้นบาง ขาวล้วน */
.phoshop-promo-stock { margin-bottom: 30px; }
.phoshop-promo-stock-bar-wrap {
    height: 4px; background: rgba(255,255,255,0.2); margin-bottom: 9px; overflow: hidden;
}
.phoshop-promo-stock-bar { height: 100%; background: #fff; }
.phoshop-promo-stock-text {
    font-size: 0.85rem; font-weight: 700; color: #fff; letter-spacing: 0.01em;
}

/* CTA — ขาวทึบ เหลี่ยม */
.phoshop-promo-cta {
    display: inline-flex; align-items: center; gap: 10px; align-self: flex-start;
    background: #fff; color: var(--color-primary, #8B1A1A);
    font-size: 1rem; font-weight: 800; padding: 14px 30px;
    text-decoration: none; white-space: nowrap;
    transition: background 0.18s, color 0.18s;
}
.phoshop-promo-cta:hover { background: var(--color-dark, #1a1a1a); color: #fff; }

/* ── Right: countdown + feed ── */
.phoshop-promo-right {
    display: flex; flex-direction: column; align-items: stretch;
    gap: 24px; min-height: 0; height: 100%;
}
.phoshop-promo-timer { display: flex; align-items: flex-start; gap: 12px; width: 100%; }
.phoshop-promo-unit {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.phoshop-promo-digit {
    display: block; width: 100%; text-align: center;
    font-size: clamp(3rem, 7vw, 4.6rem); font-weight: 800; color: #fff;
    background: rgba(255,255,255,0.1); padding: 22px 8px; line-height: 1;
    font-variant-numeric: tabular-nums;
}
.phoshop-promo-unit-label {
    font-size: 0.78rem; font-weight: 700; color: rgba(255,255,255,0.6);
    letter-spacing: 0.05em; text-transform: uppercase;
}
.phoshop-promo-colon {
    font-size: clamp(2.4rem, 5vw, 3.6rem); font-weight: 700;
    color: rgba(255,255,255,0.3); padding-top: 28px; flex-shrink: 0;
}

/* ── Live order feed — แถวเรียบ คั่นด้วยเส้น ไม่มีกล่อง/ไอคอนไล่สี ── */
.phoshop-promo-feed-wrap {
    width: 100%; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0;
}
.phoshop-promo-feed-header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-bottom: 10px; margin-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.25); flex-shrink: 0;
}
/* ออเดอร์ล่าสุด — เด่น */
.phoshop-promo-feed-title {
    display: inline-flex; align-items: center; gap: 9px;
    font-size: 1rem; font-weight: 800; color: #fff;
    letter-spacing: 0.01em;
}
.phoshop-promo-feed-viewers {
    font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,0.6);
    white-space: nowrap;
}
.phoshop-promo-feed {
    display: flex; flex-direction: column; flex: 1; overflow: hidden;
    position: relative; width: 100%;
}
.phoshop-promo-toast {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 2px; flex: 1; min-height: 0; box-sizing: border-box;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    opacity: 0; transform: translateX(-10px);
    transition: opacity 0.38s ease, transform 0.38s ease;
}
.phoshop-promo-toast.is-visible { opacity: 1; transform: none; }
.phoshop-promo-toast.is-hiding {
    opacity: 0; transform: translateX(6px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.phoshop-promo-toast-icon {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.4); background: none; color: #fff;
    display: flex; align-items: center; justify-content: center;
}
.phoshop-promo-toast-icon svg { width: 16px; height: 16px; }
.phoshop-promo-toast-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.phoshop-promo-toast-name { font-size: 0.9rem; font-weight: 700; color: #fff; }
.phoshop-promo-toast-text { font-size: 0.8rem; color: rgba(255,255,255,0.72); line-height: 1.4; }
.phoshop-promo-toast-text strong { color: #fff; font-weight: 800; }
.phoshop-promo-toast-time {
    font-size: 0.72rem; color: rgba(255,255,255,0.55);
    white-space: nowrap; flex-shrink: 0; align-self: center;
}

/* ── Responsive: จอเล็กเรียงคอลัมน์เดียว ── */
@media (max-width: 860px) {
    .phoshop-promo-wrap .phoshop-container {
        grid-template-columns: 1fr;
        grid-template-rows: none;
    }
    .phoshop-promo-left,
    .phoshop-promo-timer-label,
    .phoshop-promo-right { grid-column: 1; grid-row: auto; }
    .phoshop-promo-timer-label { order: 1; }
    .phoshop-promo-left        { order: 2; }
    .phoshop-promo-right       { order: 3; }
}

/* ============================================
   HOW TO ORDER
   ============================================ */
.phoshop-hto-wrap {
    padding: 72px 0 80px;
}
/* ซ่อน section ขั้นตอนการสั่งซื้อ บนมือถือ */
@media (max-width: 760px) {
    .phoshop-section--how-to-order { display: none; }
}
.phoshop-hto-header {
    text-align: center;
    margin-bottom: 64px;
}
.phoshop-hto-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(139,26,26,0.08);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 999px;
    margin-bottom: 16px;
}
.phoshop-hto-heading {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 14px;
    line-height: 1.2;
}
.phoshop-hto-heading mark {
    background: none;
    color: var(--color-primary);
    position: relative;
}
.phoshop-hto-heading mark::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 2px;
    width: 100%;
    height: 4px;
    background: var(--color-accent);
    border-radius: 2px;
    opacity: 0.5;
}
.phoshop-hto-sub {
    font-size: 1.05rem;
    color: var(--color-muted);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.7;
}

/* steps row — step + arrow สลับกัน */
.phoshop-hto-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

/* step card */
.phoshop-hto-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    max-width: 200px;
    padding: 0 8px;
}

/* icon container — เลขลอยบนมุม */
.phoshop-hto-icon-outer {
    position: relative;
    margin-bottom: 20px;
    padding-top: 80px;
}
.phoshop-hto-deco-num {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: clamp(52px, 6vw, 76px);
    font-weight: 900;
    color: var(--color-primary);
    opacity: 0.4;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s, color 0.4s;
}
.phoshop-hto-icon-wrap {
    width: 110px;
    height: 110px;
    border-radius: 28px;
    background: #f5ede8;
    border: 2px solid var(--color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transform-origin: center center;
    transition: background 0.35s, border-color 0.35s, opacity 0.35s, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.phoshop-hto-icon-wrap lord-icon {
    width: 80px !important;
    height: 80px !important;
}

/* inactive — เล็กลง จาง */
.phoshop-hto-step:not(.is-active) .phoshop-hto-icon-wrap {
    transform: scale(0.82);
    opacity: 0.5;
}
/* active — ใหญ่ขึ้น สีเข้ม */
.phoshop-hto-step.is-active .phoshop-hto-icon-wrap {
    transform: scale(1.18);
    background: #f0e4dc;
    border-color: var(--color-primary);
}
.phoshop-hto-step:not(.is-active) .phoshop-hto-deco-num {
    transform: translateX(-50%) scale(0.82);
    opacity: 0.25;
}
.phoshop-hto-step.is-active .phoshop-hto-deco-num {
    transform: translateX(-50%) scale(1.15);
    opacity: 0.6;
    color: var(--color-accent);
}
.phoshop-hto-step.is-active .phoshop-hto-step-title {
    color: var(--color-primary);
}

.phoshop-hto-step-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--color-dark);
    margin-bottom: 8px;
    transition: color 0.3s;
}
.phoshop-hto-step-desc {
    font-size: 0.88rem;
    color: var(--color-muted);
    line-height: 1.6;
}

/* arrow wrapper — ยืดเต็มช่องว่างระหว่าง step */
.phoshop-hto-arrow-wrap {
    flex: 0 0 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 56px;
}
.phoshop-hto-arrow {
    width: 60px;
    height: 20px;
    color: var(--color-primary);
    opacity: 0.35;
    overflow: visible;
}

.phoshop-hto-cta-wrap {
    text-align: center;
    margin-top: 52px;
}
.phoshop-hto-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--color-primary);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    padding: 14px 32px;
    border-radius: var(--radius);
    transition: background var(--transition);
}
.phoshop-hto-cta:hover { background: var(--color-dark); }

@media (max-width: 700px) {
    .phoshop-hto-steps {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    .phoshop-hto-step { max-width: 280px; padding: 0; }
    .phoshop-hto-arrow-wrap {
        transform: rotate(90deg);
        margin-bottom: 0;
        flex: 0 0 40px;
    }
}

/* ============================================
   PRICING / PACKAGES
   ============================================ */
.phoshop-pricing-wrap {
    padding: 72px 0 80px;
}
.phoshop-pricing-header {
    text-align: center;
    margin-bottom: 52px;
}
.phoshop-pricing-heading {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 10px;
}
.phoshop-pricing-sub {
    font-size: 1rem;
    color: var(--color-muted);
    margin-bottom: 14px;
}
.phoshop-pricing-freeship {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    border: 1.5px solid var(--color-light);
    border-radius: 99px;
    padding: 6px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-accent);
}
.phoshop-pricing-plans {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.phoshop-pricing-plan {
    background: #fff;
    border: 2px solid var(--color-light);
    border-radius: var(--radius-lg);
    padding: 32px 28px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: border-color var(--transition);
}
.phoshop-pricing-plan.is-popular {
    border-color: var(--color-primary);
    background: var(--color-lighter);
}
.phoshop-pricing-popular-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 4px 16px;
    border-radius: 99px;
    white-space: nowrap;
}
.phoshop-pricing-plan-name {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 4px;
}
.phoshop-pricing-plan-qty {
    font-size: 0.88rem;
    color: var(--color-muted);
    margin-bottom: 20px;
}
.phoshop-pricing-plan-price-wrap {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1.5px solid var(--color-light);
}
.phoshop-pricing-plan-orig {
    font-size: 0.88rem;
    color: var(--color-muted);
    text-decoration: line-through;
    margin-bottom: 2px;
}
.phoshop-pricing-plan-price {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1.1;
}
.phoshop-pricing-currency {
    font-size: 1.3rem;
    font-weight: 700;
    vertical-align: top;
    margin-top: 6px;
    display: inline-block;
}
.phoshop-pricing-plan-save {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-accent);
    margin-top: 4px;
}
.phoshop-pricing-plan-perks {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.phoshop-pricing-plan-perks li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text);
}
.phoshop-pricing-plan-perks li svg {
    color: var(--color-accent);
    flex-shrink: 0;
}
.phoshop-pricing-plan-cta {
    display: block;
    text-align: center;
    padding: 13px 20px;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 800;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    transition: background var(--transition), color var(--transition);
}
.phoshop-pricing-plan.is-popular .phoshop-pricing-plan-cta {
    background: var(--color-primary);
    color: #fff;
}
.phoshop-pricing-plan-cta:hover,
.phoshop-pricing-plan.is-popular .phoshop-pricing-plan-cta:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
    color: #fff;
}

@media (max-width: 800px) {
    .phoshop-pricing-plans { grid-template-columns: 1fr; max-width: 380px; margin: 0 auto; }
}

/* ============================================
   TRUST BADGES
   ============================================ */
.phoshop-trust-wrap {
    padding: 72px 0 80px;
}
.phoshop-trust-header {
    text-align: center;
    margin-bottom: 48px;
}
.phoshop-trust-heading {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 900;
    color: var(--color-dark);
    margin-bottom: 10px;
}
.phoshop-trust-sub {
    font-size: 1rem;
    color: var(--color-muted);
}
.phoshop-trust-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    padding: 32px 40px;
    margin-bottom: 48px;
}
.phoshop-trust-stat {
    flex: 1;
    text-align: center;
}
.phoshop-trust-stat-num {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 4px;
}
.phoshop-trust-stat-label {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
}
.phoshop-trust-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    margin: 0 16px;
}
.phoshop-trust-badges {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.phoshop-trust-badge {
    background: #fff;
    border: 1.5px solid var(--color-light);
    border-radius: var(--radius-lg);
    padding: 28px 20px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.phoshop-trust-badge-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: var(--color-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    flex-shrink: 0;
}
.phoshop-trust-badge-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-dark);
}
.phoshop-trust-badge-desc {
    font-size: 0.83rem;
    color: var(--color-muted);
    line-height: 1.5;
}

@media (max-width: 900px) {
    .phoshop-trust-badges { grid-template-columns: repeat(2, 1fr); }
    .phoshop-trust-stats { padding: 24px 20px; gap: 0; }
}
@media (max-width: 500px) {
    .phoshop-trust-badges { grid-template-columns: 1fr; }
    .phoshop-trust-stats { flex-wrap: wrap; gap: 24px; }
    .phoshop-trust-stat-divider { display: none; }
}

/* ============================================
   LINE SUBSCRIBE
   ============================================ */
/* ── Wrap ── */
.phoshop-linesub-wrap {
    max-width: var(--container);
    margin: 0 auto;
    padding: 2% 24px;   /* +ขอบข้างกันแถบเขียวชิดขอบจอ mobile (เดสก์ท็อปอยู่ใน max-width เท่าเดิม) */
}
.phoshop-linesub-wrapper { width: 100%; }

/* ── Band: พื้นเขียว LINE เต็มแผ่น flat ── */
.phoshop-linesub-inner {
    --line-green: #06C755;
    background: var(--line-green);
    color: #fff;
    border-radius: 8px;
    padding: clamp(36px, 5vw, 64px) clamp(28px, 5vw, 72px);
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: clamp(32px, 5vw, 72px);
    align-items: center;
}

/* ── Left: content ── */
.phoshop-linesub-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.phoshop-linesub-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 14px;
    margin-bottom: 18px;
}
.phoshop-linesub-heading {
    font-size: clamp(1.6rem, 3.2vw, 2.3rem);
    font-weight: 900;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.25;
    text-wrap: balance;
}
.phoshop-linesub-sub {
    font-size: clamp(0.95rem, 1.4vw, 1.05rem);
    color: rgba(255,255,255,0.9);
    margin-bottom: 24px;
    line-height: 1.65;
    max-width: 46ch;
}
.phoshop-linesub-perks {
    list-style: none;
    padding: 0;
    margin: 0 0 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
}
.phoshop-linesub-perks li {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.95rem;
    color: #fff;
    font-weight: 600;
}
.phoshop-linesub-check {
    width: 22px;
    height: 22px;
    background: #fff;
    color: var(--line-green);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ── CTA button: ขาวบนพื้นเขียว (กลับสี) ── */
.phoshop-linesub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #fff;
    color: var(--color-dark, #1a1a1a);
    font-size: 1.05rem;
    font-weight: 900;
    padding: 15px 32px;
    text-decoration: none;
    transition: background 0.18s, color 0.18s;
    margin-bottom: 12px;
}
.phoshop-linesub-btn:hover {
    background: var(--color-dark, #1a1a1a);
    color: #fff;
}
.phoshop-linesub-hint {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.8);
}

/* ── Right: QR card (กล่องขาวบนพื้นเขียว) ── */
.phoshop-linesub-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 20px;
}
.phoshop-linesub-qr-img,
.phoshop-linesub-qr-placeholder {
    width: 200px;
    height: 200px;
    object-fit: contain;
    display: block;
}
.phoshop-linesub-qr-placeholder {
    background: #edf7f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--line-green);
    font-size: 0.82rem;
    font-weight: 700;
}
.phoshop-linesub-qr-caption {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-dark, #1a1a1a);
    letter-spacing: 0.02em;
}

/* ── Responsive ── */
@media (max-width: 760px) {
    /* มือถือ: QR ขึ้นก่อน → ข้อความ → ปุ่ม (โฟกัสที่ QR เป็นพระเอก) */
    .phoshop-linesub-inner {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 28px;
        padding: 32px 22px;
    }
    .phoshop-linesub-right { order: -1; align-self: stretch; }
    .phoshop-linesub-content { align-items: center; width: 100%; }
    .phoshop-linesub-perks { justify-content: center; }
    .phoshop-linesub-sub { max-width: none; }
    /* ปุ่ม CTA เต็มความกว้าง กดง่ายขึ้นบนมือถือ */
    .phoshop-linesub-btn { display: flex; width: 100%; padding: 16px 24px; }
}
@media (max-width: 480px) {
    .phoshop-linesub-inner { border-radius: 8px; }
    .phoshop-linesub-qr-img,
    .phoshop-linesub-qr-placeholder { width: 180px; height: 180px; }
    /* perks เป็นรายการแนวตั้งชิดซ้าย อ่านง่ายกว่า wrap กลางจอ */
    .phoshop-linesub-perks {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        width: max-content;
        max-width: 100%;
        margin-inline: auto;
    }
}

/* ============================================================
   CONTACT PAGE  (page-contact.php)  —  prefix .phcp-
   2-column split: sticky left channels + scrollable right
   minimal: borders & bg-contrast for separation, no new shadows
   ============================================================ */
.phoshop-contact-page { background: var(--color-white); }
.phcp-container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---- Hero ---- */
.phcp-hero {
    position: relative;
    background: #fff;
    color: var(--color-dark);
    padding: 64px 1px 50px;
    overflow: hidden;
}
/* รูปพื้นหลัง (ตั้งค่าใน admin) */
.phcp-hero.has-bg {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
/* เลเยอร์สีขาวทับรูป — ให้พื้นหลังสว่าง ตัวหนังสือสีเข้มอ่านออก */
.phcp-hero::before {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,.82), rgba(255,255,255,.9));
    pointer-events: none;
}
.phcp-hero:not(.has-bg)::before {
    /* ไม่มีรูป — พื้นขาวอยู่แล้ว ไม่ต้องมี overlay */
    background: none;
}
/* ขีดแนวขวางสีขาวใส ถี่ๆ (scanline) ทับด้านบนสุด */
.phcp-hero::after {
    content: "";
    position: absolute; inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        rgba(61,26,0,.05) 0,
        rgba(61,26,0,.05) 1px,
        transparent 1px,
        transparent 4px
    );
    pointer-events: none;
    z-index: 1;
}
.phcp-hero-inner { position: relative; max-width: 780px; margin: 0 auto; text-align: center; z-index: 2; }
.phcp-hero-title { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 14px; }
.phcp-hero-intro { font-size: 1.05rem; color: var(--color-muted); max-width: 600px; margin: 0 auto; }

/* ---- Split layout ---- */
.phcp-split-section { padding: 72px 0; background: var(--color-white); }
.phcp-split {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 56px;
    align-items: start;
}

/* LEFT — sticky channels */
.phcp-aside { position: sticky; top: calc(var(--header-h) + 24px); }
.phcp-aside-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.8rem; font-weight: 800; color: var(--color-dark); margin: 4px 0 8px;
}
.phcp-aside-lottie { flex-shrink: 0; }
.phcp-aside-sub { color: var(--color-muted); margin: 22px 0 26px; }

/* ข้อมูลบริษัท (ที่อยู่/เลขนิติบุคคล) — การ์ดแบน มี accent บางๆ ด้านบน */
.phcp-aside-company {
    font-style: normal;
    margin-top: 18px;
    padding: 18px 18px 16px;
    border: 1px solid #f0e2d8;
    border-radius: 12px;
    background: #fdfbf9;
}
.phcp-aside-company-name {
    font-size: 1.02rem; font-weight: 700; color: var(--color-dark);
    margin: 0 0 12px; line-height: 1.45;
}
.phcp-aside-company-row {
    display: flex; align-items: flex-start; gap: 10px;
    margin: 0; padding: 8px 0;
    font-size: .92rem; color: var(--color-muted); line-height: 1.55;
    border-top: 1px solid #f0e2d8;
}
.phcp-aside-company-ic {
    flex-shrink: 0; color: var(--color-accent);
    display: inline-flex; margin-top: 1px;
}
.phcp-aside-company-tax { font-variant-numeric: tabular-nums; letter-spacing: .01em; }

.phcp-line-cta {
    display: flex; align-items: center; gap: 15px;
    background: var(--color-line); color: #fff;
    border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 22px;
    transition: background var(--transition);
}
.phcp-line-cta:hover { background: var(--color-line-dark); }
.phcp-line-cta-icon {
    flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.phcp-line-cta-body { display: flex; flex-direction: column; flex: 1; }
.phcp-line-cta-body strong { font-size: 1rem; font-weight: 700; }
.phcp-line-cta-body small { font-size: .85rem; opacity: .85; }
.phcp-line-cta-arrow { opacity: .85; }

.phcp-aside-direct { list-style: none; display: flex; flex-direction: column; gap: 4px; margin-bottom: 26px; }
.phcp-aside-direct li { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-bottom: 1px solid #f0e2d8; }
.phcp-aside-direct li:last-child { border-bottom: none; }
.phcp-aside-direct-ic {
    width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%;
    background: var(--color-lighter); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
}
.phcp-aside-direct-ic lord-icon { display: block; }
.phcp-aside-direct-body { display: flex; flex-direction: column; }
.phcp-aside-direct-body small { font-size: .76rem; color: var(--color-muted); text-transform: uppercase; letter-spacing: .06em; }
.phcp-aside-direct-body a,
.phcp-aside-direct-body .phcp-phone-entry { font-size: 1rem; font-weight: 600; color: var(--color-dark); }
.phcp-aside-direct-body a:hover { color: var(--color-primary); }

.phcp-aside-social-label { font-size: .82rem; font-weight: 700; color: var(--color-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.phcp-social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.phcp-social-link {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--color-lighter); border: 1px solid #f0e2d8;
    color: var(--color-dark); font-size: .9rem; font-weight: 600;
    padding: 12px 14px; border-radius: var(--radius);
    transition: all var(--transition);
}
.phcp-social-link:hover { border-color: var(--color-accent); color: var(--color-accent); }
.phcp-social-link svg { flex-shrink: 0; }
.phcp-aside-nosocial { font-size: .88rem; color: var(--color-muted); grid-column: 1 / -1; }

/* RIGHT — scrollable content */
.phcp-main-head { margin-bottom: 28px; }
.phcp-main-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; color: var(--color-dark); margin-bottom: 8px; }
.phcp-main-head p { color: var(--color-muted); }

.phcp-branch-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.phcp-branch-pill {
    font-family: inherit; font-size: .9rem; font-weight: 600; cursor: pointer;
    color: var(--color-dark); background: #fff;
    border: 1px solid #ecd9cc; border-radius: 999px; padding: 9px 20px;
    transition: all var(--transition);
}
.phcp-branch-pill:hover { border-color: var(--color-accent); color: var(--color-accent); }
.phcp-branch-pill.is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

/* ---- Searchable combobox (many branches) ---- */
.phcp-branch-select { position: relative; max-width: 420px; margin-bottom: 28px; }
.phcp-branch-select-toggle {
    width: 100%; display: flex; align-items: center; gap: 10px;
    font-family: inherit; font-size: .98rem; font-weight: 600; cursor: pointer;
    color: var(--color-dark); background: #fff;
    border: 1px solid #ecd9cc; border-radius: var(--radius);
    padding: 13px 16px; text-align: left;
    transition: border-color var(--transition);
}
.phcp-branch-select-toggle:hover { border-color: var(--color-accent); }
.phcp-branch-select.is-open .phcp-branch-select-toggle { border-color: var(--color-accent); }
.phcp-branch-select-ic { color: var(--color-accent); display: inline-flex; flex-shrink: 0; }
.phcp-branch-select-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phcp-branch-select-count { color: var(--color-muted); font-weight: 500; }
.phcp-branch-select-caret { color: var(--color-muted); flex-shrink: 0; transition: transform var(--transition); }
.phcp-branch-select.is-open .phcp-branch-select-caret { transform: rotate(180deg); }

.phcp-branch-select-panel {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 50;
    background: #fff; border: 1px solid #ecd9cc; border-radius: var(--radius);
    overflow: hidden;
    display: none;
}
.phcp-branch-select.is-open .phcp-branch-select-panel { display: block; }

.phcp-branch-search { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid #f0e2d8; }
.phcp-branch-search svg { color: var(--color-muted); flex-shrink: 0; }
.phcp-branch-search input {
    flex: 1; border: none; outline: none; background: transparent;
    font-family: inherit; font-size: .95rem; color: var(--color-text);
}
.phcp-branch-options { list-style: none; margin: 0; padding: 6px; max-height: 280px; overflow-y: auto; }
.phcp-branch-option {
    padding: 11px 14px; border-radius: 8px; cursor: pointer;
    font-size: .94rem; color: var(--color-dark);
    transition: background var(--transition);
}
.phcp-branch-option:hover,
.phcp-branch-option.is-highlighted { background: var(--color-lighter); }
.phcp-branch-option.is-active { background: var(--color-primary); color: #fff; font-weight: 600; }
.phcp-branch-option.is-hidden { display: none; }
.phcp-branch-noresult { padding: 16px 14px; text-align: center; color: var(--color-muted); font-size: .9rem; }

.phcp-branch-list { display: flex; flex-direction: column; gap: 24px; }
.phcp-branch-block {
    background: #fff;
    border: 1px solid #f0e2d8;
    border-radius: var(--radius-lg);
    padding: 26px;
    transition: border-color var(--transition);
}
.phcp-branch-block:hover { border-color: #e2c4b2; }
.phcp-branch-block.is-hidden { display: none; }

.phcp-branch-top {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    /* full-bleed divider: pull out to the card edges (cancel block padding) */
    margin: -26px -26px 20px;
    padding: 20px 26px;
    border-bottom: 1px solid #f0e2d8;
}
.phcp-branch-heading { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.phcp-branch-name {
    /* base size — JS (data-fit) shrinks this down for long names */
    font-size: 1.6rem; font-weight: 800; color: var(--color-dark);
    line-height: 1.25; min-width: 0;
}
/* ขณะ JS วัด: บังคับบรรทัดเดียวเพื่อหาขนาดที่พอดี */
.phcp-branch-name[data-fit]:not(.is-wrapped) { white-space: nowrap; }
.phcp-branch-name.is-wrapped { white-space: normal; overflow-wrap: anywhere; }

.phcp-branch-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.phcp-branch-badge {
    display: inline-flex; align-items: center;
    font-size: .72rem; font-weight: 600; letter-spacing: .01em;
    padding: 2px 10px; border-radius: 5px;
    line-height: 1.4; white-space: nowrap;
}
.phcp-branch-badge--primary { color: #fff; background: var(--color-accent); }
.phcp-branch-badge--hq      { color: var(--color-muted); background: #f0e8e1; }

.phcp-branch-actions { display: flex; gap: 10px; }

.phcp-branch-meta { list-style: none; display: flex; flex-direction: column; gap: 11px; margin-bottom: 20px; }
.phcp-branch-meta li { display: flex; align-items: flex-start; gap: 11px; font-size: .94rem; color: var(--color-text); line-height: 1.5; }
.phcp-branch-meta svg { flex-shrink: 0; margin-top: 3px; color: var(--color-accent); }
.phcp-branch-meta a { color: var(--color-text); }
.phcp-branch-meta a:hover { color: var(--color-primary); text-decoration: underline; }

/* copyable info line (address / hours / phone) */
.phcp-copy {
    position: relative;
    display: inline; box-decoration-break: clone; -webkit-box-decoration-break: clone;
    font: inherit; text-align: left; color: var(--color-text);
    background: none; border: 0; padding: 0; margin: 0; cursor: pointer;
    line-height: 1.5;
    text-decoration: underline dashed transparent;
    text-underline-offset: 4px;
    transition: color var(--transition), text-decoration-color var(--transition);
}
.phcp-copy:hover,
.phcp-copy:focus-visible {
    outline: none;
    color: var(--color-primary);
    text-decoration-color: currentColor;
}
.phcp-copy::after {
    content: attr(data-tip);
    position: absolute; left: 0; bottom: calc(100% + 8px);
    background: var(--color-dark); color: #fff;
    font-size: .72rem; font-weight: 600; letter-spacing: .02em;
    padding: 5px 9px; border-radius: var(--radius);
    white-space: nowrap; pointer-events: none;
    opacity: 0; transform: translateY(4px);
    transition: opacity .18s ease, transform .18s ease;
}
.phcp-copy.is-copied::after { opacity: 1; transform: translateY(0); }

/* labeled divider between branch sections (info / gallery / map) */
.phcp-branch-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0 16px;
}
.phcp-branch-divider::before,
.phcp-branch-divider::after {
    content: ""; flex: 1; height: 5px;
    background-image: radial-gradient(circle, #d0c8bf 1.5px, transparent 1.5px);
    background-size: 9px 5px;
    background-position: center;
    background-repeat: repeat-x;
}
.phcp-branch-divider span {
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--color-muted);
    white-space: nowrap;
}

/* per-branch gallery */
.phcp-gallery {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 20px;
}
.phcp-gallery-item {
    display: block; aspect-ratio: 1 / 1;
    background-size: cover; background-position: center; background-color: #ece3dc;
    border-radius: var(--radius);
    transition: opacity var(--transition), transform var(--transition);
}
.phcp-gallery-item:hover { opacity: .9; transform: scale(.985); }
.phcp-gallery-item:first-child:nth-last-child(1) { grid-column: 1 / -1; aspect-ratio: 16 / 9; }

.phcp-branch-map { position: relative; aspect-ratio: 16 / 7; background: #ece3dc; border-radius: var(--radius); overflow: hidden; }
.phcp-branch-map iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; display: block; }

/* Buttons */
.phcp-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: .9rem; font-weight: 600; cursor: pointer;
    padding: 9px 16px; border-radius: 999px; border: 1px solid transparent;
    transition: all var(--transition);
}
.phcp-btn--block { width: 100%; margin-top: 18px; }
.phcp-btn--ghost { background: #fff; border-color: #e7d6ca; color: var(--color-dark); }
.phcp-btn--ghost:hover { border-color: var(--color-accent); color: var(--color-accent); }
.phcp-btn--line { background: var(--color-line); color: #fff; }
.phcp-btn--line:hover { background: var(--color-line-dark); }
.phcp-btn--solid { background: var(--color-primary); color: #fff; }
.phcp-btn--solid:hover { background: var(--color-dark); }

.phcp-branch-empty {
    text-align: center; padding: 56px 24px; color: var(--color-muted);
    border: 1.5px dashed #e2cdbf; border-radius: var(--radius-lg); background: #fff;
}
.phcp-branch-empty svg { color: #d9bfae; margin-bottom: 14px; }
.phcp-branch-empty p { font-size: 1.05rem; margin-bottom: 18px; }

/* Message form */
.phcp-form-card {
    background: var(--color-lighter);
    border: 1px solid #f0e2d8;
    border-radius: var(--radius-lg);
    padding: 32px;
    padding-bottom: 0;
    margin-top: 32px;
    overflow: hidden;
}
.phcp-form-title { font-size: 1.4rem; font-weight: 800; color: var(--color-dark); margin-bottom: 6px; }
.phcp-form-desc { color: var(--color-muted); margin-bottom: 24px; }

.phcp-form { display: flex; flex-direction: column; gap: 18px; }
.phcp-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.phcp-field { display: flex; flex-direction: column; gap: 7px; }
.phcp-field label { font-size: .88rem; font-weight: 600; color: var(--color-dark); }
.phcp-req { color: var(--color-primary); }
.phcp-note { font-weight: 400; color: var(--color-muted); font-size: .82rem; }
.phcp-field input,
.phcp-field select,
.phcp-field textarea {
    font-family: inherit; font-size: .95rem; color: var(--color-text);
    background: #fff;
    border: 1px solid #e4d3c7; border-radius: var(--radius);
    padding: 12px 14px; width: 100%;
    transition: border-color var(--transition);
}
.phcp-field select {
    -webkit-appearance: none; -moz-appearance: none; appearance: none;
    padding-right: 40px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23874a2a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}
.phcp-field textarea { resize: vertical; min-height: 110px; }
.phcp-field input:focus,
.phcp-field select:focus,
.phcp-field textarea:focus { outline: none; border-color: var(--color-accent); }
.phcp-field input.phcp-invalid,
.phcp-field textarea.phcp-invalid { border-color: #d93025; }
.phcp-error { font-size: .8rem; color: #d93025; min-height: 1em; }

.phcp-submit {
    display: flex; align-items: center; justify-content: center; gap: 9px;
    font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer;
    background: var(--color-primary); color: #fff;
    border: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    padding: 18px 24px;
    width: calc(100% + 64px);
    margin: 24px -32px 0;
    transition: background var(--transition);
}
.phcp-submit:hover { background: var(--color-dark); }
.phcp-submit:disabled { opacity: .7; cursor: default; }
.phcp-submit-loading { display: inline-flex; align-items: center; gap: 8px; }
.phcp-spinner { animation: phcp-spin .8s linear infinite; }
@keyframes phcp-spin { to { transform: rotate(360deg); } }
.phcp-privacy { font-size: .8rem; color: var(--color-muted); text-align: center; }

/* Success */
.phcp-success { text-align: center; padding: 24px 0; }
.phcp-success-icon { width: 72px; height: 72px; margin: 0 auto 18px; }
.phcp-success-title { font-size: 1.4rem; font-weight: 800; color: var(--color-dark); margin-bottom: 8px; }
.phcp-success-msg { color: var(--color-muted); margin-bottom: 8px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---- Lightbox ---- */
.phcp-lightbox {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(20,10,4,.92);
    display: none; align-items: center; justify-content: center;
    padding: 32px;
}
.phcp-lightbox.is-open { display: flex; }
.phcp-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius); display: block; }
.phcp-lightbox-close {
    position: absolute; top: 22px; right: 26px;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background var(--transition);
}
.phcp-lightbox-close:hover { background: rgba(255,255,255,.24); }

/* ---- Responsive ---- */
@media (max-width: 980px) {
    .phcp-split { grid-template-columns: 1fr; gap: 36px; }
    .phcp-aside { position: static; }
    .phcp-aside .phcp-social-row { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
}
@media (max-width: 600px) {
    .phcp-hero { padding-top: calc(var(--header-h) + 44px); padding-bottom: 56px; }
    .phcp-split-section { padding: 48px 0; }
    .phcp-branch-block { padding: 20px; }
    .phcp-branch-top { flex-direction: column; align-items: flex-start; margin: -20px -20px 18px; padding: 16px 20px; }
    .phcp-form-row { grid-template-columns: 1fr; }
    .phcp-form-card { padding: 22px; padding-bottom: 0; }
    .phcp-submit { width: calc(100% + 44px); margin: 22px -22px 0; }
    .phcp-gallery { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   ANTI-BOT — honeypot (ซ่อนจาก user แต่ bot มองเห็น) + turnstile
   ============================================================ */
.phoshop-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}
.phoshop-turnstile { margin: 4px 0 16px; }

/* ============================================================
   Promo Hero — สไลด์ซ้าย + รูปโปรโมชั่นขวา
   ============================================================ */
.phoshop-promohero {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px 40px;
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.phoshop-promohero--noright { display: block; }

/* ซ้าย: สไลด์ — flex 7 ส่วน, ความสูงจาก aspect-ratio ของ slide */
.phoshop-promohero-slider { flex: 7 1 0; min-width: 0; }
.phoshop-promohero-swiper { border-radius: 16px; overflow: hidden; height: 100%; }
.phoshop-promohero-swiper .swiper-wrapper { height: 100%; }
.phoshop-promohero-slide {
    aspect-ratio: 2 / 1;
    background-size: cover; background-position: center; background-repeat: no-repeat;
    background-color: #f3ece6;
}

/* dots */
.phoshop-promohero-dots.swiper-pagination {
    position: absolute; bottom: 12px; left: 0; right: 0;
    display: flex; justify-content: center; gap: 7px; z-index: 3;
}
.phoshop-promohero-dots .swiper-pagination-bullet {
    width: 9px; height: 9px; border-radius: 999px;
    background: rgba(255,255,255,.6); opacity: 1;
    transition: width var(--transition), background var(--transition);
}
.phoshop-promohero-dots .swiper-pagination-bullet-active {
    width: 24px; background: #fff;
}

/* ขวา: flex 3 ส่วน — รูปแบ่งความสูงเท่ากันตามจำนวนจริง */
.phoshop-promohero-side {
    flex: 3 1 0; min-width: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.phoshop-promohero-side-item {
    flex: 1 1 0; display: block;
    border-radius: 16px; overflow: hidden;
    background: #f3ece6; min-height: 0;
    transition: opacity var(--transition);
}
.phoshop-promohero-side-item:hover { opacity: .92; }
.phoshop-promohero-side-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 900px) {
    .phoshop-promohero { flex-direction: column; }
    .phoshop-promohero-side { flex-direction: row; }
}
@media (max-width: 560px) {
    .phoshop-promohero { padding: 0 16px; }
    .phoshop-promohero-side { flex-direction: column; }
}

/* ============================================================
   FRANCHISE — Nav dropdown 2 ชั้น
   ใช้สไตล์ "เหมือน dropdown เดิม" (legacy .sub-menu: มน + เงา + จุดนำ)
   markup มี class .sub-menu อยู่แล้ว → ชั้นแรกได้สไตล์เดิมอัตโนมัติ
   ส่วนนี้เพิ่มเฉพาะสิ่งที่ legacy ไม่รองรับ: flyout ชั้นที่ 2 + caret ชั้นกลาง
   ============================================================ */
/* ฟอนต์เมนูแฟรนไชส์ใหญ่ขึ้นให้เห็นชัด (เฉพาะ dropdown แฟรนไชส์ ไม่กระทบหมวดหมู่) */
.phoshop-menu-franchise .sub-menu a {
    font-size: 1rem;        /* ~16px */
    font-weight: 600;
}
.phoshop-menu-franchise .sub-menu .sub-menu a {
    font-size: .98rem;      /* ชั้นไซซ์ S/M/L เล็กกว่านิดให้มีลำดับชั้น */
    font-weight: 500;
}

/* caret บอกว่ามีเมนูย่อยต่อ (ใช้กับชั้นกลาง: ร้านเฝอลุงโฮ/คีออส) */
.phoshop-sub-caret {
    width: 7px; height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(-45deg);   /* ชี้ขวา = มีเมนูย่อย */
    transition: transform .2s ease;
    opacity: .5;
    flex-shrink: 0;
    margin-left: auto;           /* ดัน caret ชิดขวา โดยไม่ดึง text ออกจากแนวจุดนำ */
}

/* ----- Desktop (>=901px): flyout ชั้นที่ 2 ออกด้านขวา ----- */
@media (min-width: 901px) {
    .phoshop-nav-menu .sub-menu .phoshop-has-sub { position: relative; }
    /* ชั้นที่ 2 วางขวาของชั้นแรก — ยกเลิก translateX(-50%) ของ legacy
       แล้ววางชิดขวาด้วย left:100% + ระยะห่าง ไม่ให้ทับชั้นแรก */
    .phoshop-nav-menu .sub-menu .sub-menu {
        top: 4px;
        left: 100%;
        margin-left: 28px;
        transform: translateX(10px);   /* state เริ่ม (ก่อนเปิด) เลื่อนขวาเล็กน้อย */
    }
    .phoshop-nav-menu .sub-menu .sub-menu::before {
        top: 18px;
        left: -6px;
        right: auto;
        transform: rotate(-45deg);
    }
    /* เปิดชั้นที่ 2 เมื่อ hover รายการแบบร้านค้า/คีออส */
    .phoshop-nav-menu .sub-menu .phoshop-has-sub:hover > .sub-menu {
        opacity: 1; visibility: visible;
        transform: translateX(0);
    }
    /* caret หมุนลงเมื่อ hover */
    .phoshop-nav-menu .sub-menu .phoshop-has-sub:hover > a .phoshop-sub-caret {
        transform: rotate(45deg);
    }
}

/* ----- Mobile (<=900px): accordion ----- */
@media (max-width: 900px) {
    /* ปิด-เปิดด้วย .is-open (JS toggle) — ทับ legacy ที่โชว์ static */
    .phoshop-nav-menu .phoshop-has-sub > .sub-menu {
        max-height: 0; overflow: hidden; padding-top: 0; padding-bottom: 0;
        transition: max-height .28s ease;
    }
    .phoshop-nav-menu .phoshop-has-sub.is-open > .sub-menu { max-height: 600px; padding: 4px 0; }
    .phoshop-nav-menu .phoshop-has-sub.is-open > a > .phoshop-sub-caret,
    .phoshop-nav-menu .phoshop-has-sub.is-open > a > .phoshop-chevron { transform: rotate(180deg); }
    .phoshop-nav-menu .sub-menu .sub-menu { margin-left: 12px; }
}

/* ============================================================
   FRANCHISE PAGE — Editorial / menu-board (flat, no shadow)
   ============================================================ */
.phfr {
    --phfr-display: 'Chonburi', 'Noto Sans Thai', serif;   /* display หนาแบบป้ายเมนู */
    --phfr-script:  'Charm', 'Noto Sans Thai', cursive;    /* ตัวเขียนเน้นคำ */
    --phfr-ink:     var(--color-dark);
    --phfr-paper:   #FBF7F1;
    --phfr-rule:    #E3D8C9;
    color: var(--phfr-ink);
    background: var(--phfr-paper);
    font-family: var(--font-main);
}
.phfr a { text-decoration: none; }

/* ---- 1) COVER ---- */
.phfr-cover {
    background: var(--color-primary);
    color: #fff;
    padding: clamp(56px, 9vw, 110px) 24px clamp(40px, 6vw, 72px);
    border-bottom: 3px solid var(--color-dark);
}
.phfr-cover-inner { max-width: 1080px; margin: 0 auto; }
.phfr-cover-top {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 16px; flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,.28);
    font-size: .76rem; letter-spacing: .22em; text-transform: uppercase;
    color: rgba(255,255,255,.82);
}
.phfr-edition { letter-spacing: .04em; text-transform: none; font-size: .82rem; }
.phfr-cover-title {
    font-family: var(--phfr-display);
    font-size: clamp(2.2rem, 6vw, 4rem);
    line-height: 1.3;             /* เผื่อสระบน/ล่างของฟอนต์ไทย ไม่ให้ตัวอักษรชนกัน */
    font-weight: 400;
    margin: 28px 0 0;
    letter-spacing: -.01em;
    word-break: break-word;
    overflow-wrap: break-word;
}
.phfr-cover-title em {
    font-family: inherit;       /* ใช้ Chonburi เหมือนทั้งบรรทัด ให้กลมกลืน */
    font-style: normal;
    color: var(--color-accent);
    position: relative;
    white-space: nowrap;
    padding-bottom: .04em;
    background-image: linear-gradient(var(--color-accent), var(--color-accent));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% .09em;   /* เส้นใต้หนาเป็น highlight */
}
.phfr-cover-sub {
    max-width: 620px;
    margin: 18px 0 0;
    font-size: clamp(1rem, 2.2vw, 1.18rem);
    line-height: 1.7;
    color: rgba(255,255,255,.9);
}

/* สารบัญแบบเมนูร้านอาหาร (เลข + ชื่อ + จุดไข่ปลา + ขนาด) */
.phfr-toc { margin-top: clamp(28px, 5vw, 48px); display: grid; gap: 4px; }
.phfr-toc-group {
    display: flex; align-items: baseline; gap: 14px;
    padding: 14px 0;
    border-top: 1px solid rgba(255,255,255,.22);
}
.phfr-toc-group:last-child { border-bottom: 1px solid rgba(255,255,255,.22); }
.phfr-toc-no {
    font-family: var(--phfr-display);
    font-size: 1.05rem; color: var(--color-light);
    min-width: 2.2ch;
}
.phfr-toc-label {
    font-size: 1.15rem; font-weight: 600; color: #fff;
    white-space: nowrap;
}
.phfr-toc-label:hover { color: var(--color-light); }
.phfr-toc-dots {
    flex: 1;
    border-bottom: 1.5px dotted rgba(255,255,255,.4);
    transform: translateY(-4px);
    min-width: 24px;
}
.phfr-toc-sizes { display: flex; gap: 8px; }
.phfr-toc-sizes a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px;
    border: 1px solid rgba(255,255,255,.45);
    font-size: .85rem; font-weight: 700; color: #fff;
    transition: background .15s, color .15s;
}
.phfr-toc-sizes a:hover { background: #fff; color: var(--color-primary); }
/* teaser เมื่อกลุ่มมีโมเดลเดียว */
.phfr-toc-soon {
    align-self: center;
    font-size: .8rem;
    color: rgba(255,255,255,.65);
}

/* ---- 2) WHY ---- */
.phfr-why {
    background: var(--phfr-paper);
    padding: clamp(48px, 7vw, 84px) 24px;
    border-bottom: 1px solid var(--phfr-rule);
}
.phfr-why-inner { max-width: 1080px; margin: 0 auto; }
.phfr-why-heading {
    font-family: var(--phfr-display);
    font-size: clamp(1.7rem, 4vw, 2.6rem);
    font-weight: 400; line-height: 1.2; color: var(--phfr-ink);
    text-align: center; text-wrap: balance;
    margin: 0 0 clamp(32px, 5vw, 52px);
}
.phfr-why-grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; gap: clamp(16px, 2.4vw, 24px);
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.phfr-why-card {
    position: relative;
    display: flex; flex-direction: column; align-items: flex-start;
    padding: clamp(28px, 3vw, 40px) clamp(24px, 2.6vw, 32px);
    background: #fff;
    border: 1px solid var(--phfr-rule);
    /* editorial / menu-board — เหลี่ยมคม ไม่มี border-radius */
    counter-increment: phfr-why;
    transition: border-color .25s ease, background .25s ease;
    /* เผยตัวนุ่ม ๆ จากค่าเริ่มต้นที่มองเห็นอยู่แล้ว */
    animation: phfrWhyReveal .6s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: var(--phfr-why-delay, 0ms);
}
/* เลขลำดับมุมขวาบน แบบสารบัญเมนู */
.phfr-why-card::after {
    content: counter(phfr-why, decimal-leading-zero);
    position: absolute; top: clamp(20px, 2.4vw, 28px); right: clamp(22px, 2.4vw, 30px);
    font-family: var(--phfr-display);
    font-size: 1.1rem; line-height: 1;
    color: var(--phfr-rule);
    transition: color .25s ease;
}
.phfr-why-grid { counter-reset: phfr-why; }
.phfr-why-card:hover {
    border-color: var(--color-primary);
    background: #fff;
}
.phfr-why-card:hover::after { color: var(--color-primary); }
.phfr-why-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 52px; height: 52px; margin-bottom: 22px;
    /* กรอบเส้นเหลี่ยม แทนวงกลมพื้นนุ่ม */
    border: 1px solid var(--phfr-rule);
    color: var(--color-primary);
    transition: border-color .25s ease;
}
.phfr-why-card:hover .phfr-why-icon { border-color: var(--color-primary); }
.phfr-why-icon svg { width: 26px; height: 26px; }
.phfr-why-card-title {
    font-family: var(--phfr-display);
    font-size: 1.22rem; font-weight: 400; line-height: 1.35;
    color: var(--phfr-ink); margin: 0 0 8px;
    text-wrap: balance;
}
.phfr-why-card-sub {
    font-size: .98rem; line-height: 1.7;
    color: var(--color-muted); margin: 0;
}
@keyframes phfrWhyReveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .phfr-why-card { animation: none; }
    .phfr-why-card:hover { transform: none; }
}

/* ---- 3) GROUPS / PACKAGES ---- */
.phfr-group { padding: clamp(48px, 7vw, 84px) 24px; }
.phfr-group:nth-of-type(even) { background: #fff; }
.phfr-group-inner { max-width: 1080px; margin: 0 auto; }
.phfr-group-head {
    display: flex; align-items: flex-start; gap: 20px;
    padding-bottom: 26px; margin-bottom: 36px;
    border-bottom: 2px solid var(--phfr-ink);
}
.phfr-group-no {
    font-family: var(--phfr-display);
    font-size: clamp(2.2rem, 6vw, 3.6rem);
    color: var(--color-accent);
    line-height: .9;
}
.phfr-group-title {
    font-family: var(--phfr-display);
    font-size: clamp(1.7rem, 4.5vw, 2.6rem);
    font-weight: 400; line-height: 1.1; color: var(--phfr-ink);
}
.phfr-group-tagline { margin-top: 8px; color: var(--color-muted); line-height: 1.6; max-width: 540px; }

/* ---- 3b) KIOSK — accordion การ์ด S/M/L (กดแล้วกางรายละเอียดในหน้า) ---- */
.phfr-cards {
    display: flex; flex-direction: column;
    border: 1px solid var(--phfr-ink);
}
.phfr-card {
    background: #fff;
    border-bottom: 1px solid var(--phfr-ink);
    scroll-margin-top: 90px;
    position: relative;
}
.phfr-card:last-child { border-bottom: none; }

/* teaser row เมื่อกลุ่มมีโมเดลเดียว */
.phfr-card--soon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(28px, 4vw, 44px) 24px;
    background: var(--phfr-paper);
    text-align: center;
}
.phfr-soon-text {
    margin: 0;
    font-family: var(--phfr-display);
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    color: var(--color-muted);
}

/* การ์ดที่ถูกตั้งเป็น "แนะนำ" — เน้นด้วยเส้นเขียวด้านซ้าย + พื้นอ่อน */
.phfr-card.is-recommended {
    border-left: 3px solid #035726;
    background: color-mix(in srgb, #035726 4%, #fff);
}
.phfr-card.is-recommended .phfr-card-head:hover {
    background: color-mix(in srgb, #035726 7%, #fff);
}
/* ป้าย RECOMMENDED — มุมขวาบนของการ์ด */
.phfr-card-recommend {
    position: absolute; top: 0; right: 0; z-index: 2;
    padding: 5px 12px;
    background: #035726; color: #fff;
    font-size: .68rem; font-weight: 700; letter-spacing: .12em;
    line-height: 1; pointer-events: none;
}

/* แถบหัวการ์ด — เป็นปุ่ม toggle เต็มความกว้าง */
.phfr-card-head {
    display: flex; align-items: stretch; gap: 0;
    width: 100%; padding: 0; margin: 0;
    background: none; border: none; cursor: pointer;
    text-align: left; font: inherit; color: inherit;
    transition: background .18s ease;
}
.phfr-card-head:hover { background: var(--phfr-paper); }
.phfr-card-head:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }

.phfr-card-media {
    flex: none; width: clamp(96px, 22vw, 168px); align-self: stretch;
    border-right: 1px solid var(--phfr-rule);
    background: var(--phfr-paper); overflow: hidden;
}
.phfr-card-media > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.phfr-card-media-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; width: 100%; height: 100%; min-height: 96px;
    color: var(--color-muted);
    background:
        repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(61,26,0,.04) 12px, rgba(61,26,0,.04) 24px);
}
.phfr-card-media-ph .phfr-card-letter {
    color: var(--color-primary); opacity: .35;
    font-family: var(--phfr-display); line-height: .8;
    font-size: clamp(2.2rem, 6vw, 3rem);
}
.phfr-card-media-note { font-size: .72rem; letter-spacing: .04em; }

.phfr-card-headinfo {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; justify-content: center; gap: 6px;
    padding: 18px clamp(18px, 3vw, 28px);
}
.phfr-card-name {
    font-size: 1.08rem; font-weight: 700; color: var(--phfr-ink); line-height: 1.3;
}
.phfr-card-size {
    display: inline-flex; align-items: center; margin-left: 10px;
    padding: 4px 12px;
    font-weight: 700; font-size: .95rem; letter-spacing: .06em; line-height: 1;
    color: #fff; background: var(--color-primary);
    border: 1px solid var(--color-primary); text-transform: uppercase;
    vertical-align: middle;
}
.phfr-card-head[aria-expanded="true"] .phfr-card-size {
    background: #035726; border-color: #035726;
}
.phfr-card-desc { color: var(--color-muted); line-height: 1.55; font-size: .94rem; }

/* ตัวอักษรไซซ์ใหญ่จางๆ ด้านขวาของการ์ด */
.phfr-card-sizemark {
    flex: none; align-self: stretch;
    display: flex; align-items: center; justify-content: center;
    width: clamp(72px, 12vw, 132px);
    padding: 0 clamp(12px, 2vw, 24px);
    font-family: var(--phfr-display); line-height: 1;
    font-size: clamp(3.2rem, 9vw, 5.6rem);
    color: var(--color-primary); opacity: .12;
    letter-spacing: -.02em; user-select: none;
    transition: opacity .18s ease, color .18s ease;
}
.phfr-card-head:hover .phfr-card-sizemark { opacity: .2; }
.phfr-card-head[aria-expanded="true"] .phfr-card-sizemark { color: #035726; opacity: .18; }
.phfr-card-toggle {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px;
}
.phfr-card-headprice { font-size: .92rem; color: var(--color-muted); line-height: 1; }
.phfr-card-headprice strong {
    font-family: var(--phfr-display); font-weight: 400;
    font-size: 1.25rem; color: var(--color-primary);
}
/* affordance แบบ chip — มีกรอบชัดเจน ข้อความ+ไอคอนจัดกึ่งกลางในกล่องเดียว */
.phfr-card-toggle-label {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; line-height: 1;
    border: 1px solid var(--phfr-ink);
    font-size: .88rem; font-weight: 600; color: var(--phfr-ink);
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.phfr-card-head:hover .phfr-card-toggle-label {
    background: var(--phfr-ink); color: #fff;
}
.phfr-card-head:hover .phfr-card-toggle-icon { stroke: #fff; }
.phfr-card-toggle-text { line-height: 1; }
/* chevron — หมุนเมื่อกาง */
.phfr-card-toggle-icon {
    width: 14px; height: 14px; flex: none; display: block;
    stroke: currentColor;
    transition: transform .25s ease;
}
.phfr-card-head[aria-expanded="true"] .phfr-card-toggle-icon { transform: rotate(180deg); }
.phfr-card-head[aria-expanded="true"] .phfr-card-toggle-label {
    background: #035726; color: #fff; border-color: #035726;
}

/* แผงรายละเอียด — กางลงในหน้า (grid-rows transition) */
.phfr-card-panel {
    display: grid; grid-template-rows: 0fr;
    transition: grid-template-rows .32s ease;
    border-top: 1px solid var(--phfr-rule);
    background: var(--phfr-paper);
}
.phfr-card-head[aria-expanded="true"] + .phfr-card-panel { grid-template-rows: 1fr; }
.phfr-card-panel-inner { overflow: hidden; }
.phfr-card-head[aria-expanded="false"] + .phfr-card-panel { border-top-color: transparent; }

.phfr-card-panel-inner > * { padding: clamp(20px, 3vw, 32px); }
/* แบ่ง 2 คอลัมน์เฉพาะตอนมี gallery — ถ้าไม่มี ให้รายละเอียดกินเต็มความกว้าง */
@media (min-width: 861px) {
    .phfr-card-panel-inner.has-gallery {
        display: grid; grid-template-columns: 1.3fr 1fr;
    }
    .phfr-card-panel-inner.has-gallery .phfr-card-gallery {
        border-right: 1px solid var(--phfr-rule);
    }
    .phfr-card-panel-inner:not(.has-gallery) .phfr-card-detail {
        display: grid; grid-template-columns: 1fr 1fr; gap: 22px clamp(28px, 5vw, 56px);
        align-items: start;
    }
    .phfr-card-panel-inner:not(.has-gallery) .phfr-card-cta { grid-column: 1 / -1; max-width: 320px; }
}

/* gallery ในแผง */
.phfr-card-gallery {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start;
}
.phfr-card-shot { margin: 0; overflow: hidden; border: 1px solid var(--phfr-rule); }
.phfr-card-shot img { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 1 / 1; cursor: zoom-in; transition: transform .3s cubic-bezier(0.22, 1, 0.36, 1); }
.phfr-card-shot:hover img { transform: scale(1.04); }
.phfr-card-shot.is-lead { grid-column: 1 / -1; }
.phfr-card-shot.is-lead img { aspect-ratio: 16 / 10; }

.phfr-card-detail { display: flex; flex-direction: column; gap: 22px; }
.phfr-card-specs { display: grid; gap: 0; }
.phfr-spec {
    display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
    font-size: .95rem; padding: 11px 0;
    border-bottom: 1px solid var(--phfr-rule);
}
.phfr-spec:first-child { padding-top: 0; }
.phfr-spec dt { color: var(--color-muted); }
.phfr-spec dd { font-weight: 700; color: var(--phfr-ink); }

.phfr-card-includes-title {
    font-size: 1.1rem; font-weight: 700; letter-spacing: .02em;
    color: var(--phfr-ink); margin: 0 0 12px;
    padding-bottom: 10px; border-bottom: 2px solid var(--phfr-ink);
}
.phfr-card-includes-list { list-style: none; display: grid; gap: 10px; margin: 0; }
.phfr-card-includes-list li {
    position: relative; padding-left: 28px;
    color: var(--phfr-ink); line-height: 1.55; font-size: 1.00rem;
}
.phfr-card-includes-list li::before {
    content: ""; position: absolute; left: 0; top: .25em;
    width: 18px; height: 18px;
    background-color: var(--color-accent);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.phfr-card-cta {
    display: block; text-align: center; margin-top: auto;
    padding: 13px 16px;
    background: var(--phfr-ink); color: #fff;
    font-weight: 600; font-size: 1.25rem;
    transition: background .18s ease;
}
.phfr-card-cta:hover { background: var(--color-primary); }

/* highlight เมื่อถูก anchor มาจากเมนู */
.phfr-card:target { background: var(--color-light); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
    .phfr-cards { grid-template-columns: 1fr; }
    .phfr-card { border-right: none; border-bottom: 1px solid var(--phfr-ink); }
    .phfr-card:last-child { border-bottom: none; }
    .phfr-card-letter { font-size: 4rem; }
}
@media (max-width: 560px) {
    .phfr-toc-group { flex-wrap: wrap; }
    .phfr-toc-dots { display: none; }
    .phfr-toc-sizes { width: 100%; margin-top: 6px; }
    .phfr-group-head { flex-direction: column; gap: 6px; }
}

/* ---- 1.5) STORY / ORIGIN ---- */
/* clip-x: หม้อลอย (.phfr-story-pot) ยื่นพ้นคอลัมน์ได้ แต่ต้องไม่ดันให้จอเลื่อนแนวนอน */
.phfr-story { padding: clamp(48px, 7vw, 88px) 24px; background: var(--phfr-paper); overflow-x: clip; }
.phfr-story-inner {
    max-width: 1080px; margin: 0 auto;
    display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.phfr-story-title {
    font-family: var(--phfr-display);
    font-size: clamp(1.7rem, 4vw, 2.7rem);
    font-weight: 400; line-height: 1.25; color: var(--phfr-ink);
    margin-bottom: 24px;
}
/* ปากกาเน้นข้อความ — กวาดไฮไลต์จากซ้ายไปขวาตอน scroll เข้ามาเห็น */
.phfr-story-mark {
    background-image: linear-gradient(120deg,
        color-mix(in srgb, var(--color-accent) 42%, transparent),
        color-mix(in srgb, var(--color-accent) 42%, transparent));
    background-repeat: no-repeat;
    background-position: 0 78%;
    background-size: 0% 42%;
    padding: 0 2px;
    transition: background-size 1.1s cubic-bezier(0.22, 1, 0.36, 1) .2s;
    -webkit-box-decoration-break: clone;
            box-decoration-break: clone;
}
.phfr-story-title.is-visible .phfr-story-mark { background-size: 100% 42%; }
/* ไฮไลต์คำในเนื้อเรื่อง — กวาดทีละคำแบบไล่ลำดับเมื่อย่อหน้าเข้ามาเห็น */
.phfr-story-body.is-visible .phfr-story-mark { background-size: 100% 42%; }
.phfr-story-body .phfr-story-mark:nth-of-type(1) { transition-delay: .25s; }
.phfr-story-body .phfr-story-mark:nth-of-type(2) { transition-delay: .55s; }
.phfr-story-body .phfr-story-mark:nth-of-type(3) { transition-delay: .85s; }
.phfr-story-body .phfr-story-mark:nth-of-type(4) { transition-delay: 1.15s; }
.phfr-story-body .phfr-story-mark:nth-of-type(5) { transition-delay: 1.45s; }
@media (prefers-reduced-motion: reduce) {
    .phfr-story-mark { transition: none; background-size: 100% 42%; }
}
.phfr-story-body p {
    color: var(--color-text); line-height: 1.85;
    font-size: clamp(1.15rem, 1.6vw, 1.35rem);
    margin-bottom: 20px; max-width: 36em;
}
.phfr-story-body p:last-child { margin-bottom: 0; }
/* ภาพ — ซ้อนรูปร้าน + หม้อลอย แบบ editorial */
.phfr-story-media { position: relative; }
.phfr-story-img {
    display: block; width: 100%; height: auto;
    aspect-ratio: 4 / 5; object-fit: cover;
}
.phfr-story-pot {
    position: absolute;
    right: -22%;
    bottom: -30%;
    height: auto;
    max-width: 420px;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform;
    animation: phfrStoryPotFloat 5.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
@keyframes phfrStoryPotFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-18px) rotate(1.5deg); }
}
@media (prefers-reduced-motion: reduce) {
    .phfr-story-pot { animation: none; }
}
/* แถบรูปบรรยากาศใต้บล็อกเรื่องราว — marquee เลื่อนขวา→ซ้ายตลอด, ลากเอง/กดดูได้ */
.phfr-story-strip {
    margin: clamp(32px, 5vw, 56px) auto 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;          /* ซ่อน scrollbar — ยังลาก/สครอลล์ได้ */
    cursor: grab;
    /* เฟดขอบซ้าย-ขวาให้ดูเลื่อนต่อเนื่อง */
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.phfr-story-strip::-webkit-scrollbar { display: none; }
.phfr-story-strip.is-dragging { cursor: grabbing; }
.phfr-story-track {
    display: flex;
    gap: clamp(12px, 1.5vw, 20px);
    width: max-content;
    animation: phfrStoryMarquee 40s linear infinite;
}
/* หยุดเลื่อนเมื่อ hover หรือกำลังลาก เพื่อให้กดรูปได้ง่าย */
.phfr-story-strip:hover .phfr-story-track,
.phfr-story-strip.is-dragging .phfr-story-track { animation-play-state: paused; }
@keyframes phfrStoryMarquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }   /* เลื่อนพ้นชุดแรกพอดี (track มี 2 ชุด) */
}
@media (prefers-reduced-motion: reduce) {
    .phfr-story-track { animation: none; }
}
.phfr-story-thumb {
    display: block;
    height: clamp(180px, 22vw, 280px);
    width: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    cursor: zoom-in;
    -webkit-user-drag: none;
    user-select: none;
    flex: 0 0 auto;
}

/* ---- 3a) ร้านเฝอลุงโฮ — แกลเลอรี + จุดเด่น ---- */
.phfr-shop {
    display: grid; grid-template-columns: 1.4fr 1fr; gap: 0;
    border: 1px solid var(--phfr-ink);
}
.phfr-shop-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 1fr;
    border-right: 1px solid var(--phfr-ink);
}
.phfr-shop-shot { margin: 0; overflow: hidden; }
.phfr-shop-shot img {
    display: block; width: 100%; height: 100%;
    object-fit: cover; aspect-ratio: 1 / 1;
}
.phfr-shop-shot:not(.is-lead) { border-top: 1px solid var(--phfr-ink); }
.phfr-shop-shot:not(.is-lead):nth-child(even) { border-left: 1px solid var(--phfr-ink); }
/* รูปแรกเด่น — เต็มความกว้าง 2 คอลัมน์ */
.phfr-shop-shot.is-lead { grid-column: 1 / -1; }
.phfr-shop-shot.is-lead img { aspect-ratio: 16 / 9; }

.phfr-shop-side {
    display: flex; flex-direction: column; justify-content: space-between;
    gap: 28px; padding: clamp(28px, 4vw, 44px); background: #fff;
}
.phfr-shop-detail-title {
    font-family: var(--phfr-display);
    font-size: clamp(1.4rem, 2.4vw, 1.85rem); font-weight: 400;
    line-height: 1.25; color: var(--phfr-ink);
    margin: 0 0 22px; padding-bottom: 18px;
    border-bottom: 2px solid var(--phfr-ink);
}
.phfr-shop-points { list-style: none; display: grid; gap: 0; margin: 0; }
.phfr-shop-point {
    display: flex; align-items: flex-start; gap: 16px;
    padding: 16px 0; border-bottom: 1px solid var(--phfr-rule);
}
.phfr-shop-point:last-child { border-bottom: none; }
.phfr-shop-point-no {
    flex: none;
    font-family: var(--phfr-display); font-size: 1.15rem; line-height: 1;
    color: var(--color-accent); padding-top: 2px;
}
.phfr-shop-point-text {
    color: var(--phfr-ink); line-height: 1.6; font-size: 1.02rem;
}
.phfr-shop-cta { margin-top: 0; }

/* ---- 3.5) ผู้ประกอบการ (ขายปลีก-ส่ง) ---- */
.phfr-wholesale {
    padding: clamp(48px, 7vw, 84px) 24px;
    background: #035726; color: #fff;
    border-top: 3px solid #035726;
}
/* หน้าผู้ประกอบการ: เว้นระยะบน section สินค้าให้ห่างจากบล็อกสีเขียว */
.phfr-wholesale-products { padding-top: clamp(40px, 6vw, 72px); }
.phfr-wholesale-inner {
    max-width: 1080px; margin: 0 auto;
    display: grid; grid-template-columns: 1.3fr .7fr; gap: clamp(28px, 4vw, 56px);
    align-items: center;
}
.phfr-wholesale-heading {
    font-family: var(--phfr-display);
    font-size: clamp(1.8rem, 4.4vw, 2.8rem);
    font-weight: 400; line-height: 1.2; color: #fff;
    margin-bottom: 18px;
}
.phfr-wholesale-lines p {
    font-size: 1.1rem; line-height: 1.75; color: rgba(255,255,255,.82);
    margin-bottom: 6px;
}
.phfr-wholesale-contact {
    display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px;
}
.phfr-wholesale-phone,
.phfr-wholesale-line {
    display: inline-flex; align-items: center; gap: 12px;
    padding: 14px 22px; border-radius: 12px;
    font-weight: 600; font-size: 1rem; line-height: 1.25;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.phfr-wholesale-phone:hover,
.phfr-wholesale-line:hover { transform: translateY(-2px); }
.phfr-wholesale-phone svg,
.phfr-wholesale-line svg { flex-shrink: 0; }
/* แสดง label เล็กเหนือค่า ในปุ่มติดต่อ */
.phfr-wholesale-cticon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
}
.phfr-wholesale-ctbody { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.phfr-wholesale-ctlabel { font-size: .72rem; font-weight: 500; letter-spacing: .02em; opacity: .7; }
.phfr-wholesale-ctval { font-size: 1.02rem; font-weight: 700; }
.phfr-wholesale-phone {
    background: #fff; color: #035726;
}
.phfr-wholesale-phone .phfr-wholesale-cticon { background: color-mix(in srgb, #035726 12%, #fff); color: #035726; }
.phfr-wholesale-phone:hover { background: #024a20; color: #fff; }
.phfr-wholesale-phone:hover .phfr-wholesale-cticon { background: rgba(255,255,255,.22); color: #fff; }
.phfr-wholesale-line {
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.45); color: #fff;
}
.phfr-wholesale-line .phfr-wholesale-cticon { background: #06C755; color: #fff; }
.phfr-wholesale-line:hover { background: #06C755; border-color: #06C755; }
.phfr-wholesale-line:hover .phfr-wholesale-cticon { background: rgba(255,255,255,.22); }
/* QR — การ์ดสีอ่อนบนพื้นเข้ม */
.phfr-wholesale-qr {
    display: flex; flex-direction: column; align-items: center; gap: 14px;

}
.phfr-wholesale-qr > img {
    width: 100%; max-width: 290px; height: auto; aspect-ratio: 1;
    object-fit: contain;
    background: #fff; padding: 14px; border-radius: 12px;
}
.phfr-wholesale-qr-note {
    font-size: .9rem; font-weight: 600; color: #fff; text-align: center;
    display: inline-flex; align-items: center; gap: 8px;
}
.phfr-wholesale-qr-ph {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; width: 100%; max-width: 200px; aspect-ratio: 1;
    border: 1.5px dashed rgba(255,255,255,.4); border-radius: 12px;
    color: rgba(255,255,255,.6); text-align: center; padding: 16px;
    font-size: .85rem;
}

/* ---- 5) COMPANY ADDRESS ---- */
.phfr-company {
    padding: 32px 24px; background: var(--phfr-paper);
    border-top: 1px solid var(--phfr-rule);
}
.phfr-company-inner { max-width: 1080px; margin: 0 auto; text-align: center; }
.phfr-company-name {
    font-family: var(--phfr-display); font-size: 1.25rem;
    color: var(--phfr-ink); margin-bottom: 6px;
}
.phfr-company-addr { color: var(--color-muted); line-height: 1.7; }
.phfr-company-tax { margin-top: 6px; font-size: .92rem; color: var(--color-muted); }
.phfr-company-tax span { color: var(--phfr-ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---- Responsive (new franchise blocks) ---- */
@media (max-width: 860px) {
    .phfr-story-inner { grid-template-columns: 1fr; gap: 32px; }
    .phfr-story-media { max-width: 420px; }
    .phfr-story-pot { right: -4%; width: 54%; max-width: 220px; }
    .phfr-shop { grid-template-columns: 1fr; }
    .phfr-shop-gallery { border-right: none; border-bottom: 1px solid var(--phfr-ink); }
    .phfr-wholesale-inner { grid-template-columns: 1fr; }
    .phfr-wholesale-qr { order: -1; align-items: flex-start; }
}

/* ============================================================
   Heritage section — ประวัติซอสฮอยซิน LUNGHO
   Editorial dark-story: ขวดใหญ่เอียงซ้าย + เล่าเรื่องแบบ scan ง่าย
   Palette: deep brown bg (#3D1A00) + warm gold accent (#E0A85C)
   ============================================================ */
/* section นี้ปล่อยให้ขวดล้นออกนอกขอบได้ เพื่อให้ดูมีมิติ
   (bg gradient ยัง clip อยู่ในกล่องเพราะ inset:0) */
.phoshop-section--heritage { overflow: visible; }
.phoshop-heritage {
    --ht-gold: #E0A85C;
    --ht-cream: #F5E9D8;
    --ht-display: 'Chonburi', 'Noto Sans Thai', serif;
    position: relative;
    overflow: visible;
    color: var(--ht-cream);
}
.phoshop-heritage-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(110% 80% at 22% 38%, rgba(224,168,92,0.18) 0%, transparent 55%),
        radial-gradient(90% 80% at 95% 95%, rgba(139,26,26,0.32) 0%, transparent 60%),
        linear-gradient(165deg, rgba(255,255,255,0.04) 0%, transparent 40%);
}
.phoshop-heritage .phoshop-container { position: relative; z-index: 1; }

.phoshop-heritage-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

/* ---- LEFT: floating bottle stage (ขวดใหญ่ เอียงซ้าย) ---- */
.phoshop-heritage-stage {
    position: relative;
    min-height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.phoshop-heritage-watermark {
    position: absolute;
    top: 50%;
    left: 48%;
    transform: translate(-50%, -50%) rotate(-90deg);
    font-family: var(--ht-display, serif);
    font-size: clamp(4.5rem, 10vw, 8.5rem);
    letter-spacing: .12em;
    font-weight: 700;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(245,233,216,0.11);
    text-stroke: 1.5px rgba(245,233,216,0.11);
    white-space: nowrap;
    user-select: none;
    pointer-events: none;
    z-index: 0;
}
.phoshop-heritage-halo {
    position: absolute;
    top: 50%;
    left: 46%;
    transform: translate(-50%, -50%);
    width: 100%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224,168,92,0.45) 0%, rgba(224,168,92,0.16) 40%, transparent 66%);
    z-index: 1;
}
/* ขวดใหญ่ ล้นออกนอก section ทั้งบน-ล่าง → ดูมีมิติ
   absolute + anchor กลาง stage แล้วยืดเกินขอบ */
.phoshop-heritage-bottle {
    position: absolute;
    z-index: 3;
    left: 50%;
    top: 50%;
    width: auto;
    height: 1080px;        /* ใหญ่กว่า stage (560px) → ล้นบน-ล่าง */
    max-width: none;
    object-fit: contain;
    /* กันลากรูป + กันเลือก */
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none;
    transform-origin: center center;
    transform: translate(-50%, -50%) rotate(-11deg);
    animation: heritage-bottle-in 1s cubic-bezier(0.22, 1, 0.36, 1) both,
               heritage-bottle-float 6s ease-in-out 1s infinite;
}
@keyframes heritage-bottle-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 48px)) rotate(-3deg) scale(0.93); }
    to   { opacity: 1; transform: translate(-50%, -50%) rotate(-11deg) scale(1); }
}
@keyframes heritage-bottle-float {
    0%, 100% { transform: translate(-50%, -50%) rotate(-11deg); }
    50%      { transform: translate(-50%, calc(-50% - 22px)) rotate(-9deg); }
}

/* ---- RIGHT: story (scannable) ---- */
.phoshop-heritage-content { max-width: 680px; }
.phoshop-heritage-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ht-gold);
}
.phoshop-heritage-eyebrow-line {
    width: 40px;
    height: 2px;
    background: var(--ht-gold);
    flex-shrink: 0;
}
.phoshop-heritage-heading {
    margin: 0 0 22px;
    font-family: var(--ht-display, serif);
    font-size: clamp(2.1rem, 4.6vw, 3.2rem);
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
}

/* pull-quote คำแปล — เน้นความหมายแทนย่อหน้า */
.phoshop-heritage-define {
    margin: 0 0 14px;
    font-family: var(--ht-display, serif);
    font-size: clamp(1.3rem, 2.4vw, 1.7rem);
    line-height: 1.5;
    color: rgba(245,233,216,0.78);
}
.phoshop-heritage-define-term { color: #fff; }
.phoshop-heritage-define-mean {
    color: var(--ht-gold);
    position: relative;
    white-space: nowrap;
    background-image: linear-gradient(var(--ht-gold), var(--ht-gold));
    background-repeat: no-repeat;
    background-position: 0 100%;
    background-size: 100% 2px;
    padding-bottom: 2px;
}
.phoshop-heritage-lead {
    margin: 0 0 30px;
    font-size: 1.08rem;
    line-height: 1.7;
    color: rgba(245,233,216,0.82);
}

/* จุดเด่น — definition rows ที่ scan ง่าย */
.phoshop-heritage-facts {
    margin: 0 0 30px;
    padding: 0;
    border-top: 1px solid rgba(245,233,216,0.14);
}
.phoshop-heritage-fact {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: baseline;
    padding: 18px 0;
    border-bottom: 1px solid rgba(245,233,216,0.14);
    margin: 0;
}
.phoshop-heritage-fact-k {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ht-gold);
}
.phoshop-heritage-fact-v {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--ht-cream);
    line-height: 1.45;
}

/* ส่วนประกอบ — check pills */
.phoshop-heritage-sub-label {
    margin: 0 0 12px;
    font-size: 1.35rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--ht-gold);
}
.phoshop-heritage-ingredients { margin-bottom: 30px; }
/* ส่วนประกอบ — รายการแนวนอน มี check สีทอง คั่นด้วยเส้นบางๆ ไม่มีกล่อง */
.phoshop-heritage-chips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px 26px;
}
.phoshop-heritage-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ht-cream);
}

.phoshop-heritage-chip-ico {
    box-sizing: border-box;
    color: #3D1A00;
    background: var(--ht-gold);
    border-radius: 50%;
    padding: 4px;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* มาตรฐานรับรองการผลิต — ข้อความล้วน + separator แบบ minimal */
.phoshop-heritage-trust { margin-top: 34px; }
.phoshop-heritage-sep {
    border: 0;
    height: 1px;
    margin: 0 0 22px;
    background: rgba(245,233,216,0.16);
}
.phoshop-heritage-certs {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
}
.phoshop-heritage-cert {
    position: relative;
    padding-left: 22px;
    margin-bottom: 12px;
    font-size: 1rem;
    line-height: 1.65;
    color: rgba(245,233,216,0.82);
}
.phoshop-heritage-cert:last-child { margin-bottom: 0; }
/* bullet จุดสีทอง */
.phoshop-heritage-cert::before {
    content: "";
    position: absolute;
    left: 0;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ht-gold);
}
/* วงเล็บภาษาไทย — ขึ้นบรรทัดใหม่ จางลงนิดนึง */
.phoshop-heritage-cert-sub {
    display: block;
    margin-top: 2px;
    color: rgba(245,233,216,0.55);
    font-size: .95rem;
}

/* --- มาตรฐานรับรอง: ซ้ายข้อความ / ขวารูปฉลากโภชนาการ --- */
.phoshop-heritage-trust-split.has-media {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 28px;
    align-items: start;
}
.phoshop-heritage-trust-text { min-width: 0; }
.phoshop-heritage-trust-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.phoshop-heritage-nutri {
    display: block;
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(245,233,216,0.16);
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    line-height: 0;
    transition: border-color .2s;
}
.phoshop-heritage-nutri:hover { border-color: var(--ht-gold); }
.phoshop-heritage-nutri img {
    display: block;
    width: 150px;
    max-width: 38vw;
    height: auto;
    border-radius: 4px;
}
.phoshop-heritage-nutri-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(20,16,12,0.78);
    color: #f5e9d8;
    opacity: 0;
    transition: opacity .2s;
}
.phoshop-heritage-nutri:hover .phoshop-heritage-nutri-zoom { opacity: 1; }
.phoshop-heritage-nutri-cap {
    font-size: .8rem;
    color: rgba(245,233,216,0.55);
    text-align: center;
}

/* lightbox ขยายรูปฉลากโภชนาการ */
.phoshop-heritage-lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5vh 5vw;
    background: rgba(12,9,7,0.92);
}
.phoshop-heritage-lb[hidden] { display: none; }
.phoshop-heritage-lb-img {
    max-width: 100%;
    max-height: 90vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    background: #fff;
}
.phoshop-heritage-lb-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    color: #f5e9d8;
    cursor: pointer;
    transition: background .2s;
}
.phoshop-heritage-lb-close:hover { background: rgba(255,255,255,0.22); }
@media (max-width: 640px) {
    .phoshop-heritage-trust-split.has-media {
        grid-template-columns: 1fr;
        gap: 18px;
    }
    .phoshop-heritage-trust-media { align-items: flex-start; }
    .phoshop-heritage-nutri img { width: 180px; max-width: 60vw; }
}

/* เลขทะเบียน อย. — กดเพื่อคัดลอกได้ */
.phoshop-heritage-reg {
    margin: 18px 0 0;
    font-size: .92rem;
    letter-spacing: .02em;
    color: rgba(245,233,216,0.6);
}
.phoshop-heritage-copy {
    position: relative;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.phoshop-heritage-copy:hover,
.phoshop-heritage-copy:focus-visible {
    background: rgba(224,168,92,0.14);
    outline: none;
}
.phoshop-heritage-copy strong {
    color: var(--ht-cream);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: .04em;
}
.phoshop-heritage-copy-ico {
    color: var(--ht-gold);
    opacity: .8;
    flex-shrink: 0;
}
.phoshop-heritage-copy.is-copied .phoshop-heritage-copy-ico { color: #5fbf72; }
/* tooltip */
.phoshop-heritage-copy-tip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--ht-cream);
    color: #3D1A00;
    font-size: .78rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}
.phoshop-heritage-copy-tip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--ht-cream);
}
.phoshop-heritage-copy:hover .phoshop-heritage-copy-tip,
.phoshop-heritage-copy:focus-visible .phoshop-heritage-copy-tip,
.phoshop-heritage-copy.is-copied .phoshop-heritage-copy-tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.phoshop-heritage-copy.is-copied .phoshop-heritage-copy-tip {
    background: #5fbf72;
    color: #fff;
}
.phoshop-heritage-copy.is-copied .phoshop-heritage-copy-tip::after { border-top-color: #5fbf72; }

/* ลิงก์ดาวน์โหลดใบรับรองมาตรฐาน (PDF) — pill แบนเข้ากับโทนเข้มของ section */
.phoshop-heritage-cert-doc {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 18px 12px 0 0;            /* เว้นช่องว่างระหว่างปุ่ม (ทั้งแถวเดียวกัน/ขึ้นบรรทัดใหม่) */
    padding: 12px 16px;
    border: 1px solid rgba(245,233,216,0.22);
    border-radius: 12px;
    background: transparent;          /* reset default <button> face (อย. ใช้ปุ่ม) */
    -webkit-appearance: none;
            appearance: none;
    color: var(--ht-cream);
    font: inherit;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}
.phoshop-heritage-cert-doc:hover,
.phoshop-heritage-cert-doc:focus-visible {
    background: rgba(224,168,92,0.12);
    border-color: var(--ht-gold);
    outline: none;
}
.phoshop-heritage-cert-doc-ic { color: var(--ht-gold); flex-shrink: 0; display: inline-flex; }
.phoshop-heritage-cert-doc-body { display: flex; flex-direction: column; line-height: 1.35; }
.phoshop-heritage-cert-doc-body strong { font-size: .95rem; font-weight: 700; color: var(--ht-cream); }
.phoshop-heritage-cert-doc-body small { font-size: .78rem; color: rgba(245,233,216,0.6); }
.phoshop-heritage-cert-doc-arrow { color: var(--ht-gold); opacity: .8; flex-shrink: 0; margin-left: auto; }

@media (max-width: 980px) {
    .phoshop-heritage-grid { grid-template-columns: 1fr; gap: 16px; }
    .phoshop-heritage-stage { min-height: 440px; order: -1; }
    .phoshop-heritage-bottle { max-width: 70%; max-height: 420px; }
    .phoshop-heritage-content { max-width: 100%; }
}
@media (max-width: 560px) {
    .phoshop-heritage-stage { min-height: 360px; }
    .phoshop-heritage-bottle { max-width: 64%; max-height: 340px; }
    .phoshop-heritage-fact { grid-template-columns: 90px 1fr; gap: 12px; }
    .phoshop-heritage-trust { padding: 18px; }
    .phoshop-heritage-badge-name { font-size: .9rem; }
    /* การ์ดใบรับรอง/เลข อย. — ยาวเต็มความกว้างบนมือถือ */
    .phoshop-heritage-cert-doc { display: flex; width: 100%; margin-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .phoshop-heritage-bottle { animation: heritage-bottle-in 0.6s ease both; transform: rotate(-11deg); }
}

/* ============================================================
   Cookie consent banner — minimal, flat
   ============================================================ */
.phoshop-cookie {
    /* อยู่เหนือ sticky LINE bar (z 9999, สูง ~60px) เสมอ */
    position: fixed; left: 16px; right: 16px; z-index: 10000;
    bottom: calc(var(--sticky-bar-h, 60px) + 16px);
    max-width: 760px; margin: 0 auto;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    background: var(--color-dark, #1a1a1a); color: #fff;
    border: 1px solid rgba(255,255,255,0.14);
    padding: 18px 22px;
    transform: translateY(140%); opacity: 0;
    transition: transform .35s cubic-bezier(0.22,1,0.36,1), opacity .35s ease;
}
.phoshop-cookie.is-visible { transform: none; opacity: 1; }
.phoshop-cookie-text {
    flex: 1; min-width: 220px; margin: 0;
    font-size: 0.9rem; line-height: 1.6; color: rgba(255,255,255,0.85);
}
.phoshop-cookie-link { color: #fff; text-decoration: underline; white-space: nowrap; }
.phoshop-cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.phoshop-cookie-btn {
    font-size: 0.88rem; font-weight: 700; padding: 10px 22px;
    border: 1px solid rgba(255,255,255,0.4); background: none; color: #fff;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.phoshop-cookie-decline:hover { border-color: #fff; }
.phoshop-cookie-accept {
    background: #fff; color: var(--color-dark, #1a1a1a); border-color: #fff;
}
.phoshop-cookie-accept:hover { background: var(--color-primary, #8B1A1A); border-color: var(--color-primary, #8B1A1A); color: #fff; }
@media (max-width: 560px) {
    .phoshop-cookie { flex-direction: column; align-items: stretch; gap: 14px; }
    .phoshop-cookie-actions { justify-content: stretch; }
    .phoshop-cookie-btn { flex: 1; }
}

/* ปุ่มจัดการคุกกี้ — ไอคอนวงกลม ลอยมุมซ้ายล่าง เหนือ LINE bar (C) */
.phoshop-cookie-manage {
    position: fixed; left: 16px; z-index: 9998;
    bottom: calc(var(--sticky-bar-h, 60px) + 16px);
    display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: var(--color-dark, #1a1a1a); color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer; opacity: 0.85;
    transition: opacity .15s, background .15s, border-color .15s, color .15s;
}
.phoshop-cookie-manage:hover { opacity: 1; }
.phoshop-cookie-manage svg { transition: transform .25s cubic-bezier(0.22,1,0.36,1); }
.phoshop-cookie-manage:hover svg { transform: rotate(-12deg); }

/* ยอมรับ → เขียว “คุกกี้พร้อมใช้” */
.phoshop-cookie-manage.is-accepted {
    background: #1f8a4c; border-color: #1f8a4c; opacity: 1;
}
/* ปฏิเสธ → แดงหม่น + ขีดทับ บอกว่าปิดการติดตามอยู่ */
.phoshop-cookie-manage.is-declined {
    background: #8a2b2b; border-color: #8a2b2b; opacity: 1;
}
.phoshop-cookie-manage.is-declined::after {
    content: ''; position: absolute;
    width: 2px; height: 130%; background: #fff;
    transform: rotate(45deg); border-radius: 2px;
    box-shadow: -2px 0 0 var(--color-dark, #1a1a1a);  /* เส้นคั่นให้ slash เด่นจากไอคอน */
}
/* ฟีดแบ็กตอนกด — เด้งสั้น ๆ ให้รู้ว่าบันทึกแล้ว */
.phoshop-cookie-manage.is-pop { animation: phoshop-cookie-pop .42s cubic-bezier(0.22,1,0.36,1); }
@keyframes phoshop-cookie-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.28); }
    60%  { transform: scale(0.92); }
    100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .phoshop-cookie-manage.is-pop { animation: none; }
    .phoshop-cookie-manage:hover svg { transform: none; }
}

/* ================================================================
   Section edit shortcut — เห็นเฉพาะ admin ที่ล็อกอิน
   (front-page.php, page-franchise.php, page-wholesale.php, page-contact.php)
   ================================================================ */
.phoshop-section,
.phfr-cover, .phfr-why, .phfr-group,
.phfr-gallery-section, .phfr-form-section, .phfr-wholesale,
.phcp-hero, .phcp-branch-block { position: relative; }
.phoshop-section-edit-link {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 60;
    padding: 5px 14px;
    font-size: .78rem;
    line-height: 1.4;
    color: #444;
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 999px;
    text-decoration: none;
    opacity: 0;
    transition: opacity .18s ease;
}
/* โผล่เมื่อ hover ที่ parent ของลิงก์ (ใช้ได้ทุกหน้า) */
:hover > .phoshop-section-edit-link { opacity: 1; }
.phoshop-section-edit-link:focus-visible { opacity: 1; }
.phoshop-section-edit-link:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}
