/* =====================================================================
   หน้าแรก: แบนเนอร์สไลด์ + เมนูลัด 4 ช่อง (โหลดจาก pages/home.php)
   ===================================================================== */

/* ---------- แบนเนอร์สไลด์ ---------- */
#shopBannerCarousel .hero-overlay-scrim {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.55) 100%) !important;
}
@media (min-width: 768px) {
    #shopBannerCarousel .hero-content-anchor { padding: 0 1.25rem 1.1rem !important; }
    /* กรอบกระจกครอบข้อความ: อ่านออกทุกรูป */
    #shopBannerCarousel .hero-caption {
        width: fit-content;
        max-width: min(720px, 100%);
        padding: 0.8rem 0.9rem 0.8rem 1.1rem;
        border-radius: 16px;
        background: rgba(10, 12, 22, 0.42);
        border: 1px solid rgba(255, 255, 255, 0.16);
        backdrop-filter: blur(10px) saturate(1.2);
        -webkit-backdrop-filter: blur(10px) saturate(1.2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }
    #shopBannerCarousel .hero-banner-title { font-size: clamp(1.25rem, 2.2vw, 2rem); line-height: 1.15; }
}
#shopBannerCarousel .hero-adaptive-badge {
    background: color-mix(in srgb, var(--hero-badge, #38bdf8) 85%, #000) !important;
    color: #fff !important;
    border: 0 !important;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--hero-badge, #38bdf8) 40%, transparent);
}
#shopBannerCarousel .hero-adaptive-badge i { color: #fff !important; }

/* ปุ่มรายละเอียด: ปุ่มขาวทึบ ลูกศรเลื่อนตอนชี้ */
.hero-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0.48rem 0.95rem;
    border-radius: 50rem;
    background: #fff;
    color: #0f172a !important;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    transition: background 0.2s ease, color 0.2s ease;
}
.hero-detail-btn span, .hero-detail-btn i { color: inherit !important; }
/* ธีมมืดบังคับลิงก์เป็นสีขาว (storefront.css) ต้องชนะกฎนั้นไม่งั้นตัวหนังสือขาวบนปุ่มขาว */
html body #shopBannerCarousel a.hero-detail-btn,
html body #shopBannerCarousel a.hero-detail-btn :is(span, i) { color: #0f172a !important; }
html body #shopBannerCarousel a.hero-detail-btn:hover,
html body #shopBannerCarousel a.hero-detail-btn:hover :is(span, i) { color: #fff !important; }
.hero-detail-btn i { font-size: 0.75rem; transition: translate 0.2s ease; }
.hero-detail-btn:hover { background: var(--app-primary, #38bdf8); color: #fff !important; }
.hero-detail-btn:hover i { translate: 3px 0; }

/* ลูกศร: วงกลมกระจกเล็ก 2 ข้างของแถบบอกสไลด์ มุมขวาล่าง (ไม่ทับกล่องข้อความซ้ายล่าง) */
#shopBannerCarousel .carousel-indicators { align-items: center; }
#shopBannerCarousel .carousel-indicators .hero-nav-arrow {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    margin: 0 4px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(8, 10, 20, 0.35);
    color: #fff;
    opacity: 1;
    text-indent: 0;
    font-size: 0.7rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
#shopBannerCarousel .carousel-indicators .hero-nav-arrow i { color: #fff !important; }
#shopBannerCarousel .carousel-indicators .hero-nav-arrow:hover {
    background: var(--app-primary, #38bdf8);
    border-color: var(--app-primary, #38bdf8);
    transform: scale(1.08);
    box-shadow: 0 0 16px color-mix(in srgb, var(--app-primary, #38bdf8) 65%, transparent);
}
#shopBannerCarousel .carousel-indicators .hero-nav-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* จุดบอกสไลด์ -> แถบเวลาที่วิ่งจนเปลี่ยนสไลด์ (ตรงกับ data-bs-interval 4500) */
#shopBannerCarousel .carousel-indicators { gap: 6px; margin-bottom: 0.85rem !important; justify-content: flex-end; margin-right: 1.25rem; }
#shopBannerCarousel .carousel-indicators [data-bs-slide-to] {
    position: relative;
    width: 26px !important;
    height: 4px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 99px !important;
    background: rgba(255, 255, 255, 0.35) !important;
    opacity: 1 !important;
    overflow: hidden;
    transition: width 0.3s ease;
}
#shopBannerCarousel .carousel-indicators .active { width: 46px !important; }
#shopBannerCarousel .carousel-indicators .active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: #fff;
    transform-origin: left center;
    animation: heroProgress 4.5s linear both;
}
#shopBannerCarousel:hover .carousel-indicators .active::after { animation-play-state: paused; }
@keyframes heroProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) {
    #shopBannerCarousel .carousel-indicators .active::after { animation: none; transform: none; }
}
/* มือถือ: แบนเนอร์เตี้ย ใช้ข้อความเล็กและปุ่มเล็ก */
@media (max-width: 767.98px) {
    .hero-detail-btn { padding: 0.25rem 0.6rem; font-size: 0.66rem; gap: 5px; box-shadow: none; }
    .hero-detail-btn i { font-size: 0.58rem; }
}

/* ---------- เมนูลัด 4 ช่อง: แต่ละช่องคนละสี (สีผูกกับประเภทเมนู hsc-tone-*) ---------- */
.page-home .home-shortcut-card {
    --hsc-a: #7c3aed; --hsc-b: #a855f7; --hsc-ink: #4c1d95;
}
.page-home .home-shortcut-card.hsc-tone-violet  { --hsc-a: #6d28d9; --hsc-b: #a855f7; --hsc-ink: #5b21b6; }
.page-home .home-shortcut-card.hsc-tone-pink    { --hsc-a: #db2777; --hsc-b: #f472b6; --hsc-ink: #be185d; }
.page-home .home-shortcut-card.hsc-tone-gold    { --hsc-a: #ea580c; --hsc-b: #fbbf24; --hsc-ink: #c2410c; }
.page-home .home-shortcut-card.hsc-tone-emerald { --hsc-a: #047857; --hsc-b: #34d399; --hsc-ink: #047857; }
.page-home .home-shortcut-card.hsc-tone-blue    { --hsc-a: #1d4ed8; --hsc-b: #38bdf8; --hsc-ink: #1d4ed8; }
.page-home .home-shortcut-card.hsc-tone-indigo  { --hsc-a: #4338ca; --hsc-b: #818cf8; --hsc-ink: #4338ca; }
.page-home .home-shortcut-card.hsc-tone-teal    { --hsc-a: #0f766e; --hsc-b: #2dd4bf; --hsc-ink: #0f766e; }
.page-home .home-shortcut-card.hsc-tone-red     { --hsc-a: #b91c1c; --hsc-b: #f87171; --hsc-ink: #b91c1c; }
.page-home .home-shortcut-card.hsc-tone-slate   { --hsc-a: #1e293b; --hsc-b: #64748b; --hsc-ink: #1e293b; }

.page-home .home-shortcut-grid .home-shortcut-card {
    aspect-ratio: auto !important;
    min-height: 118px;
    align-items: stretch !important;
    color: #fff;
    border: 1px solid color-mix(in srgb, #fff 22%, transparent) !important;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--hsc-a), var(--hsc-b)) !important;
    box-shadow: 0 12px 28px -14px color-mix(in srgb, var(--hsc-a) 80%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: translate 0.25s ease, box-shadow 0.25s ease;
}
.page-home .home-shortcut-grid .home-shortcut-card.has-image { aspect-ratio: 16 / 9 !important; align-items: flex-end !important; }
.page-home .home-shortcut-grid .home-shortcut-card:hover {
    translate: 0 -4px;
    box-shadow: 0 20px 36px -14px color-mix(in srgb, var(--hsc-a) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.page-home .home-shortcut-card:not(.has-image)::after { display: none !important; }

/* พื้นหลัง: ลายจุด + แสงสะท้อนมุมซ้ายบน + วงแหวนจางมุมขวาล่าง */
.page-home .home-shortcut-card-fallback { display: block !important; font-size: inherit !important; overflow: hidden; }
.page-home .home-shortcut-card .hsc-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.28) 1px, transparent 1.4px);
    background-size: 14px 14px;
    -webkit-mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
    mask-image: linear-gradient(115deg, transparent 35%, #000 100%);
    opacity: 0.7;
}
.page-home .home-shortcut-card .hsc-glow {
    position: absolute;
    width: 75%;
    aspect-ratio: 1;
    top: -45%;
    left: -20%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 65%);
}
.page-home .home-shortcut-card .hsc-ring {
    position: absolute;
    width: 150px;
    height: 150px;
    right: -42px;
    bottom: -58px;
    border-radius: 50%;
    border: 18px solid rgba(255, 255, 255, 0.1);
    transition: scale 0.4s ease;
}
.page-home .home-shortcut-card:hover .hsc-ring { scale: 1.12; }

/* เนื้อหา: ข้อความซ้าย + ไอคอนในกรอบกระจกขวา */
.page-home .home-shortcut-card-label.hsc-split {
    align-items: center !important;
    gap: 12px;
    padding: 16px 16px 16px 18px !important;
    text-shadow: none !important;
}
.page-home .home-shortcut-card-label > .hsc-text { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; overflow: visible !important; white-space: normal !important; }
.page-home .home-shortcut-card .hsc-title { font-weight: 800; font-size: 1.05rem; line-height: 1.2; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; color: #fff !important; }
.page-home .home-shortcut-card .hsc-sub { margin-top: 3px; font-size: 0.75rem; font-weight: 500; line-height: 1.3; opacity: 0.9; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 100%; color: #fff !important; }
.page-home .home-shortcut-card .hsc-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 10px 4px 12px;
    border-radius: 50rem;
    background: rgba(255, 255, 255, 0.95);
    font-size: 0.72rem;
    font-weight: 700;
    overflow: visible !important;
    transition: gap 0.2s ease;
}
.page-home .home-shortcut-card .hsc-go,
.page-home .home-shortcut-card .hsc-go :is(span, i) { color: var(--hsc-ink) !important; }
.page-home .home-shortcut-card .hsc-go i { font-size: 0.65rem; }
.page-home .home-shortcut-card:hover .hsc-go { gap: 10px; }

.page-home .home-shortcut-card-label > .hsc-tile {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0.12));
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 10px 22px -8px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    rotate: 8deg;
    overflow: visible !important;
    transition: rotate 0.3s ease, translate 0.3s ease;
}
.page-home .home-shortcut-card-label > .hsc-tile i { font-size: 1.6rem; color: #fff !important; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.25)); }
.page-home .home-shortcut-card:hover .hsc-tile { rotate: 0deg; translate: 0 -3px; }

/* ช่องที่ใส่รูปเอง: ชื่อด้านล่าง + ลูกศรวงกลม */
.page-home .home-shortcut-card.has-image .home-shortcut-card-label { align-items: flex-end !important; padding: 12px 14px !important; }
.page-home .home-shortcut-card.has-image .hsc-sub { display: none; }
.page-home .home-shortcut-card-label > .hsc-arrow {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    overflow: visible !important;
    transition: background 0.2s ease, translate 0.2s ease;
}
.page-home .home-shortcut-card-label > .hsc-arrow i { font-size: 0.78rem; color: #fff !important; }
.page-home .home-shortcut-card:hover .hsc-arrow { background: #fff; translate: 3px 0; }
.page-home .home-shortcut-card:hover .hsc-arrow i { color: var(--hsc-ink) !important; }

/* มือถือ 2 คอลัมน์: ไอคอนบน ข้อความล่าง */
@media (max-width: 767.98px) {
    .page-home .home-shortcut-grid .home-shortcut-card { min-height: 112px; border-radius: 16px; }
    .page-home .home-shortcut-card-label.hsc-split { flex-direction: column-reverse; align-items: flex-start !important; justify-content: space-between; gap: 10px; padding: 12px !important; }
    .page-home .home-shortcut-card-label > .hsc-tile { width: 40px; height: 40px; border-radius: 12px; rotate: 0deg; }
    .page-home .home-shortcut-card-label > .hsc-tile i { font-size: 1.05rem; }
    .page-home .home-shortcut-card .hsc-title { font-size: 0.9rem; }
    .page-home .home-shortcut-card .hsc-sub { font-size: 0.68rem; }
    .page-home .home-shortcut-card .hsc-go { display: none; }
    .page-home .home-shortcut-card .hsc-ring { width: 110px; height: 110px; border-width: 14px; }
}

/* ---------- ธีม Clean: การ์ดขาว ไอคอนเป็นสีประจำช่อง ---------- */
html body.ls.ls-look-clean .page-home .home-shortcut-grid .home-shortcut-card:not(.has-image) {
    background: var(--surface, #fff) !important;
    color: var(--text-main, #0f172a);
    box-shadow: none;
}
html body.ls.ls-look-clean .page-home .home-shortcut-grid .home-shortcut-card:not(.has-image):hover {
    border-color: color-mix(in srgb, var(--hsc-a) 45%, var(--clean-line, #e8e8e8)) !important;
    box-shadow: 0 14px 30px -18px color-mix(in srgb, var(--hsc-a) 70%, transparent);
}
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) :is(.hsc-glow, .hsc-ring) { display: none; }
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) .hsc-dots {
    background-image: radial-gradient(color-mix(in srgb, var(--hsc-a) 22%, transparent) 1px, transparent 1.4px);
}
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) .hsc-title { color: var(--text-main, #0f172a) !important; }
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) .hsc-sub { color: var(--text-muted, #6c6c6c) !important; opacity: 1; }
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) .hsc-go { background: color-mix(in srgb, var(--hsc-a) 10%, transparent); }
html body.ls.ls-look-clean .page-home .home-shortcut-card:not(.has-image) .hsc-tile {
    background: linear-gradient(135deg, var(--hsc-a), var(--hsc-b));
    border-color: transparent;
    box-shadow: 0 10px 20px -10px color-mix(in srgb, var(--hsc-a) 80%, transparent);
    backdrop-filter: none;
}

/* ตัวเลือกเมนูลัดจากหน้าปรับแต่งร้าน */
html body.ls.ls-shortcut-simple .page-home .home-shortcut-grid .home-shortcut-card:not(.has-image) {
    background: var(--surface, #fff) !important;
    border: 1px solid var(--home-card-border, rgba(148, 163, 184, .28)) !important;
    box-shadow: 0 8px 22px -16px color-mix(in srgb, var(--hsc-a) 55%, transparent) !important;
}
html body.ls.ls-shortcut-simple .page-home .home-shortcut-card:not(.has-image) :is(.hsc-glow, .hsc-ring) { display: none !important; }
html body.ls.ls-shortcut-simple .page-home .home-shortcut-card:not(.has-image) .hsc-dots { opacity: .35; }
html body.ls.ls-shortcut-simple .page-home .home-shortcut-card:not(.has-image) .hsc-title { color: var(--text-main, #0f172a) !important; }
html body.ls.ls-shortcut-simple .page-home .home-shortcut-card:not(.has-image) .hsc-sub { color: var(--text-muted, #64748b) !important; opacity: 1; }
html body.ls.ls-shortcut-simple .page-home .home-shortcut-card:not(.has-image) .hsc-tile {
    background: linear-gradient(145deg, var(--hsc-a), var(--hsc-b));
    border-color: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

html body.ls.ls-shortcut-outline .page-home .home-shortcut-grid .home-shortcut-card:not(.has-image) {
    background: color-mix(in srgb, var(--surface, #fff) 72%, transparent) !important;
    border: 1.5px solid color-mix(in srgb, var(--hsc-a) 58%, var(--home-card-border, #cbd5e1)) !important;
    box-shadow: none !important;
}
html body.ls.ls-shortcut-outline .page-home .home-shortcut-card:not(.has-image) :is(.hsc-glow, .hsc-ring) { display: none !important; }
html body.ls.ls-shortcut-outline .page-home .home-shortcut-card:not(.has-image) .hsc-dots { opacity: .25; }
html body.ls.ls-shortcut-outline .page-home .home-shortcut-card:not(.has-image) .hsc-title { color: var(--text-main, #0f172a) !important; }
html body.ls.ls-shortcut-outline .page-home .home-shortcut-card:not(.has-image) .hsc-sub { color: var(--text-muted, #64748b) !important; opacity: 1; }
html body.ls.ls-shortcut-outline .page-home .home-shortcut-card:not(.has-image) .hsc-go {
    background: color-mix(in srgb, var(--hsc-a) 10%, transparent);
    outline: 1px solid color-mix(in srgb, var(--hsc-a) 28%, transparent);
}

/* ---------- แถบจุดเด่นบริการ: 3 การ์ดไอคอน + ช่องทางติดต่อ ---------- */
.page-home .home-trust-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.page-home .home-trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--app-primary, #38bdf8) 6%, transparent);
    border: 1px solid color-mix(in srgb, var(--app-primary, #38bdf8) 16%, transparent);
    transition: border-color 0.25s ease, translate 0.25s ease;
}
.page-home .home-trust-item:hover { border-color: color-mix(in srgb, var(--app-primary, #38bdf8) 45%, transparent); translate: 0 -2px; }
.page-home .home-trust-icon {
    display: grid;
    place-items: center;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--app-primary, #38bdf8), var(--app-secondary, #2563eb));
    box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--app-primary, #38bdf8) 80%, transparent);
}
.page-home .home-trust-icon i { color: #fff !important; font-size: 1.05rem; }
.page-home .home-trust-item strong { display: block; font-size: 0.9rem; color: var(--home-text-title, var(--text-main)); }
.page-home .home-trust-item small { display: block; margin-top: 2px; font-size: 0.74rem; line-height: 1.4; color: var(--home-text-desc, var(--text-muted)); }
.page-home .home-trust-contact { padding-top: 4px; }
@media (max-width: 767.98px) {
    .page-home .home-trust-grid { grid-template-columns: 1fr; gap: 8px; }
    .page-home .home-trust-item { padding: 11px 13px; }
    .page-home .home-trust-icon { flex-basis: 38px; width: 38px; height: 38px; border-radius: 12px; }
}
html body.ls.ls-look-clean .page-home .home-trust-item { background: var(--clean-soft, rgba(0, 0, 0, 0.02)); border-color: var(--clean-line, #e8e8e8); }
html body.ls.ls-look-clean .page-home .home-trust-icon { background: color-mix(in srgb, var(--app-primary, #38bdf8) 12%, transparent); box-shadow: none; }
html body.ls.ls-look-clean .page-home .home-trust-icon i { color: var(--app-primary-text, var(--app-primary, #38bdf8)) !important; }


/* ---------- Flash Sale (หน้าแรก) ----------
   การ์ดสีเดียวกับธีม ขอบไล่สีส้ม-ชมพู ฝั่งซ้ายเป็นแผงข้อมูล (ลดสูงสุด / นับถอยหลัง / จำนวนรายการ) ฝั่งขวาเป็นแถวสินค้าเลื่อนได้
   มีสินค้าน้อยก็ไม่เหลือพื้นที่ว่างโล่ง เพราะแผงซ้ายกินพื้นที่ส่วนหนึ่ง และพื้นหลังเป็นสีการ์ดปกติ */
.page-home .home-flash {
    --flash-a: #f97316;
    --flash-b: #e11d48;
    position: relative;
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 18px;
    padding: 18px;
    border-radius: 22px;
    background:
        radial-gradient(420px 220px at 0% 0%, color-mix(in srgb, var(--flash-b) 22%, transparent), transparent 70%),
        var(--home-card-bg, #0f172a);
    border: 1.5px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 18px 40px -24px color-mix(in srgb, var(--flash-b) 70%, transparent);
    isolation: isolate;
}
/* ขอบไล่สี */
.page-home .home-flash::before {
    content: "";
    position: absolute;
    inset: -1.5px;
    z-index: -1;
    padding: 1.5px;
    border-radius: inherit;
    background: linear-gradient(120deg, var(--flash-a), var(--flash-b) 45%, color-mix(in srgb, var(--flash-b) 15%, transparent) 75%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* แผงซ้าย */
.page-home .home-flash-side {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 18px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(140deg, var(--flash-b), var(--flash-a));
    isolation: isolate;
}
.page-home .home-flash-side::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 1px, transparent 1.4px);
    background-size: 14px 14px;
    -webkit-mask-image: linear-gradient(160deg, transparent 35%, #000);
    mask-image: linear-gradient(160deg, transparent 35%, #000);
}
.page-home .home-flash-side, .page-home .home-flash-side * { color: #fff; }
.page-home .home-flash-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 99px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}
.page-home .home-flash-badge i { color: #fde047 !important; animation: homeFlashBolt 1.6s ease-in-out infinite; }
@keyframes homeFlashBolt { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.page-home .home-flash-title { margin: 0; font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.page-home .home-flash-max { display: block; font-size: 2.6rem; font-weight: 900; letter-spacing: -0.02em; text-shadow: 0 6px 18px rgba(0, 0, 0, 0.25); }
.page-home .home-flash-sub { font-size: 0.8rem; opacity: 0.9; }
.page-home .home-flash-clock { display: flex; flex-direction: column; gap: 6px; font-variant-numeric: tabular-nums; }
.page-home .home-flash-clock-label { display: inline-flex; align-items: center; gap: 6px; font-size: 0.76rem; font-weight: 600; opacity: 0.92; }
.page-home .home-flash-clock-tiles { display: inline-flex; align-items: center; gap: 4px; }
.page-home .home-flash-clock b { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 11px; background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(255, 255, 255, 0.18); font-size: 1.15rem; font-weight: 800; }
.page-home .home-flash-clock i { font-style: normal; font-weight: 800; opacity: 0.85; }
.page-home .home-flash-clock [data-flash-days] { display: inline-flex; align-items: center; gap: 3px; margin-right: 4px; }
.page-home .home-flash-clock [data-flash-days][hidden] { display: none; }
.page-home .home-flash-clock small { font-size: 0.72rem; }
.page-home .home-flash-count { font-size: 0.78rem; opacity: 0.92; }
.page-home .home-flash-count b { font-size: 0.95rem; }

/* แถวสินค้า */
.page-home .home-flash-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 14px; align-items: stretch; overflow-x: auto; padding: 2px 2px 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.page-home .home-flash-card {
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--home-text-title, #fff) 4%, transparent);
    border: 1px solid var(--home-card-border, rgba(255, 255, 255, 0.1));
    text-decoration: none;
    scroll-snap-align: start;
    transition: translate 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.page-home .home-flash-card:hover { translate: 0 -4px; border-color: color-mix(in srgb, var(--flash-a) 60%, transparent); box-shadow: 0 14px 28px -16px color-mix(in srgb, var(--flash-b) 80%, transparent); }
.page-home .home-flash-card.is-ended { opacity: 0.5; pointer-events: none; }
.page-home .home-flash-img { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; background: rgba(148, 163, 184, 0.12); }
.page-home .home-flash-img img { width: 100%; height: 100%; object-fit: cover; transition: scale 0.35s ease; }
.page-home .home-flash-card:hover .home-flash-img img { scale: 1.05; }
.page-home .home-flash-img > i { font-size: 2rem; color: #94a3b8 !important; }
.page-home .home-flash-off { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: linear-gradient(120deg, var(--flash-b), var(--flash-a)); font-size: 0.76rem; font-weight: 800; color: #fff !important; box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--flash-b) 80%, transparent); }
.page-home .home-flash-off i { color: #fde047 !important; font-size: 0.7rem; }
.page-home .home-flash-body { display: flex; flex: 1; flex-direction: column; gap: 7px; padding: 11px 12px 12px; }
.page-home .home-flash-name { font-weight: 700; font-size: 0.88rem; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--home-text-title, #f8fafc) !important; }
.page-home .home-flash-prices { display: flex; align-items: baseline; gap: 7px; flex-wrap: wrap; }
.page-home .home-flash-prices b { font-size: 1.2rem; font-weight: 900; background: linear-gradient(120deg, var(--flash-a), var(--flash-b)); -webkit-background-clip: text; background-clip: text; color: transparent !important; }
.page-home .home-flash-prices s { font-size: 0.76rem; color: var(--text-muted, #94a3b8) !important; }
.page-home .home-flash-bar { height: 7px; border-radius: 99px; background: color-mix(in srgb, var(--flash-b) 18%, transparent); overflow: hidden; }
.page-home .home-flash-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--flash-a), var(--flash-b)); }
.page-home .home-flash-meta { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 600; color: var(--text-muted, #94a3b8) !important; }
.page-home .home-flash-meta i { color: var(--flash-a) !important; }
.page-home .home-flash-meta span { color: inherit !important; }
.page-home .home-flash-cta { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; border-radius: 12px; background: linear-gradient(120deg, var(--flash-b), var(--flash-a)); font-size: 0.84rem; font-weight: 700; }
.page-home .home-flash-cta, .page-home .home-flash-cta * { color: #fff !important; }
.page-home .home-flash-cta i { transition: translate 0.2s ease; }
.page-home .home-flash-card:hover .home-flash-cta i { translate: 3px 0; }

/* ธีมสว่าง / Clean */
body.theme-light .page-home .home-flash-card { background: #fff; }
html body.ls.ls-look-clean .page-home .home-flash { box-shadow: none; }
html body.ls.ls-look-clean .page-home .home-flash-card { background: var(--clean-soft, #fff); border-color: var(--clean-line, #e8e8e8); }

@media (max-width: 991.98px) {
    .page-home .home-flash { grid-template-columns: 1fr; gap: 14px; padding: 14px; border-radius: 18px; }
    .page-home .home-flash-side { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; row-gap: 6px; padding: 14px; }
    .page-home .home-flash-badge { grid-column: 1 / -1; justify-self: start; }
    .page-home .home-flash-title { grid-column: 1; }
    .page-home .home-flash-max { display: inline; font-size: 1.9rem; }
    .page-home .home-flash-sub { grid-column: 1; }
    .page-home .home-flash-clock { grid-column: 2; grid-row: 2 / span 2; align-items: flex-end; }
    .page-home .home-flash-count { display: none; }
}
@media (max-width: 575.98px) {
    .page-home .home-flash-side { grid-template-columns: 1fr; }
    .page-home .home-flash-clock { grid-column: 1; grid-row: auto; align-items: flex-start; flex-direction: row; align-items: center; }
    .page-home .home-flash-clock b { min-width: 34px; height: 34px; font-size: 1rem; }
    .page-home .home-flash-row { grid-auto-columns: 58%; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .page-home .home-flash-badge i { animation: none; }
}


/* แท็บเล็ต / จอเล็กที่มีแบนเนอร์ข้าง: เมนูลัด 2x2 ไม่ให้ตัวหนังสือเบียด */
@media (min-width: 768px) and (max-width: 1099.98px) {
    .page-home .home-shortcut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
