 /* ---- Hard reset ภายในบล็อกเพื่อกันของเดิมมาทับ ---- */
  #fs-section .fs-media::before,
  #fs-section .fs-media::after,
  #fs-section .fs-sticker::before,
  #fs-section .fs-sticker::after { content:none !important; }
  #fs-section.fs-theme-flawless{
  --bg-1: #3b302b;      /* cocoa */
  --bg-2: #2c2623;      /* espresso */
  --txt:  #EEE9E6;
  --muted:#CFC7C2;
  --gold1:#F4C8A1;      /* rose-gold light */
  --gold2:#C89B72;      /* rose-gold deep */
  --ink:  #181818;
  --flw-gold: #b88a63; 
}

/* พื้นหลังบล็อก กับขอบหรู */
#fs-section.fs-theme-flawless .container{
  background: radial-gradient(1200px 520px at 15% 20%, rgba(244,200,161,.12), transparent 55%),
              radial-gradient(900px 420px at 85% 80%, rgba(244,200,161,.09), transparent 60%),
              linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid rgba(244,200,161,.20);
  border-radius: 28px;
  padding: 36px 28px 40px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
}
#fs-section.fs-theme-flawless .container {
  position: relative;
  isolation: isolate;
}
#fs-section.fs-theme-flawless .container::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    600px 400px at 50% 10%,
    rgba(244,200,161,0.25),
    transparent 70%
  );
  z-index: -1;
  filter: blur(60px);
}

/* หัวข้อสายหรู */
#fs-section.fs-theme-flawless .title-underline{
  color: transparent;
  background: linear-gradient(90deg, var(--gold1), var(--gold2));
  -webkit-background-clip: text;
  background-clip: text;

}
#fs-section.fs-theme-flawless .title-underline::after{
  background: linear-gradient(90deg, var(--gold1), var(--gold2));
}

/* คำบรรยาย */
#fs-section.fs-theme-flawless p,
#fs-section.fs-theme-flawless .text-muted{
  color: var(--muted) !important;
  opacity: .95;
}

/* แถบนับถอยหลังดีไซน์บล็อกพรีเมียม */
#fs-section.fs-theme-flawless #fs-countdown > div{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(244,200,161,.25);
  color: var(--txt);
  min-width: 86px;
  padding: 10px 12px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 6px 16px rgba(0,0,0,.15);
}

/* การ์ดสินค้า – ปรับลุคหรู */
#fs-section.fs-theme-flawless .fs-card{
  background: linear-gradient(180deg,#fff,#f8f7f6);
  border-radius: 16px;
  box-shadow: 0 12px 36px rgba(0,0,0,.10);
  transition: transform .22s ease, box-shadow .22s ease, filter .22s ease;
  overflow: clip;
}
#fs-section.fs-theme-flawless .fs-card:hover{
  transform: translateY(-5px);
  box-shadow: 0 20px 46px rgba(0,0,0,.16);
}

/* สติ๊กเกอร์ราคา/สถานะ – เม็ดโกลว์ */
#fs-section.fs-theme-flawless .fs-sticker{
  font-weight: 800;
  letter-spacing:.2px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.22));
}
#fs-section.fs-theme-flawless .fs-sticker.fs-danger{
  background: linear-gradient(135deg,#ff5e57,#e53935);
}
#fs-section.fs-theme-flawless .fs-sticker.fs-dark{
  background: linear-gradient(135deg,#23272f,#0f1218);
}
#fs-section.fs-theme-flawless .fs-sticker.fs-primary{
  background: linear-gradient(135deg,#5aa1ff,#0d6efd);
}

/* รูปสินค้าให้ดูใสคม */
#fs-section.fs-theme-flawless .fs-media{
  background: #f0f2f4;
}
#fs-section.fs-theme-flawless .fs-media img{
  transform: scale(1.01);
  transition: transform .35s ease;
}
#fs-section.fs-theme-flawless .fs-card:hover .fs-media img{
  transform: scale(1.04);
}

/* ชื่อ/ราคา */
#fs-section.fs-theme-flawless .fs-title{
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .2px;
}
#fs-section.fs-theme-flawless .card-body .h5.fw-bold,
#fs-section.fs-theme-flawless .card-body .h5{
  color: var(--ink);
}

/* Progress bar – โทนโกลด์ */
#fs-section.fs-theme-flawless .progress{
  background: #ececec;
  border-radius: 999px;
}
#fs-section.fs-theme-flawless .progress-bar{
  background: linear-gradient(90deg,var(--gold1),var(--gold2));
  border-radius: 999px;
}
#fs-section.fs-theme-flawless .btn.btn-dark:active {
  transform: scale(0.96) translateY(1px);
  filter: brightness(0.98);
}
/* ปุ่มให้หรูและตอบสนอง */
#fs-section.fs-theme-flawless .btn.btn-dark{
  color:#101010; 
  background: linear-gradient(135deg,var(--gold1),var(--gold2));
  border: none;
  box-shadow: 0 10px 24px rgba(200,155,114,.35);
  font-weight: 700;
}


#fs-section.fs-theme-flawless .btn.btn-dark:hover{
  filter: brightness(1.03);
  transform: translateY(-2px);
  color: #fff;
}


.btn-flawless-viewall::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(214,177,132,0.1));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.btn-flawless-viewall:hover {
  color: #fff;
  background: linear-gradient(135deg, #b58a63, #dcb78b);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(214, 177, 132, 0.45);
}




#fs-section.fs-theme-flawless .btn.btn-outline-secondary{
  color: var(--gold2);
  border-color: rgba(200,155,114,.55);
  background: rgba(200,155,114,.06);
  font-weight: 700;
}
#fs-section.fs-theme-flawless .btn.btn-outline-secondary:hover{
  background: rgba(200,155,114,.14);
  color: #0f0f0f;
}

/* เส้นคั่นใต้หัวข้อ – ทำให้เนียนขึ้นในธีมหรู */
#fs-section.fs-theme-flawless .fs-divider{
  background: linear-gradient(90deg, rgba(244,200,161,.0), rgba(244,200,161,.45), rgba(244,200,161,.0));
  opacity: .35;
}

/* กริด – เงานุ่มๆ เมื่อเลื่อนเข้ามา (ผูกกับ JS ด้านล่าง) */
#fs-section.fs-theme-flawless .fs-card{
  opacity: 0; transform: translateY(14px);
}
#fs-section.fs-theme-flawless .fs-card.reveal-in{
  opacity: 1; transform: translateY(0);
  transition: opacity .5s ease, transform .5s ease;
}
  /* ---- Card & media ---- */
  #fs-section .fs-card{
    border:0; border-radius: .9rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    transition: transform .22s ease, box-shadow .22s ease;
  }
  #fs-section .fs-card:hover{
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,.10);
  }

  /* ใช้ aspect-ratio แทน .ratio เพื่อตัดปัญหาทุกอย่าง */
  #fs-section .fs-media{
    position: relative; overflow: hidden;
    border-top-left-radius: .9rem; border-top-right-radius: .9rem;
    aspect-ratio: 4 / 3;  /* ปรับเป็น 1/1 ถ้าต้องการสี่เหลี่ยมจตุรัส */
    background: #f6f7f9;
  }
  #fs-section .fs-media > img{
    position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:1;
  }

  /* ป้ายสติ๊กเกอร์ custom (ไม่ใช้ .badge) */
  #fs-section .fs-sticker{
    position:absolute; top:.6rem; left:.6rem; z-index:2;
    padding:.38rem .7rem; border-radius: 999px; font-size:.75rem; line-height:1;
    font-weight:800; color:#fff; box-shadow: 0 4px 12px rgba(0,0,0,.15);
    letter-spacing:.2px;
  }
  #fs-section .fs-right{ left:auto; right:.6rem; }
  #fs-section .fs-danger{ background:#e53935; }
  #fs-section .fs-dark{ background:#111827; }
  #fs-section .fs-primary{ background:#0d6efd; }

  /* ชื่อสินค้า 2 บรรทัดพอดี ๆ */
  #fs-section .fs-title{
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
    overflow:hidden; min-height:1.8rem;
  }

  /* Countdown center on mobile */
  @media (max-width: 991.98px){
    #fs-countdown{ justify-content: center !important; }
  }

    #fs-section .fs-divider {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, #000 0%, #aaa 50%, #000 100%);
    opacity: 0.15;
    border-radius: 10px;
  }
  @media (prefers-color-scheme: dark) {
    #fs-section .fs-divider {
      background: linear-gradient(90deg, #fff 0%, #777 50%, #fff 100%);
      opacity: 0.2;
    }
  }

    .title-underline::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 80px;
    height: 4px;
    background-color: #d9b48f;
    border-radius: 10px;
    transition: width 0.4s ease-in-out;
  }

  /* เพิ่มเอฟเฟกต์ hover นิด ๆ ให้ดูแพง */
  .title-underline:hover::after {
    width: 120px;
  }


/* ปุ่ม "ดูสินค้าทั้งหมด" โทนหรู + Fade Effect */
.btn-flawless-viewall {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #dcb78b, #b58a63);
  color: #1b1b1b;
  font-weight: 700;
  border: none;
  border-radius: 999px;
  padding: 14px 38px;
  font-size: 1.1rem;
  transition: all 0.35s ease;
  box-shadow: 0 8px 25px rgba(214, 177, 132, 0.35);
  overflow: hidden;
}

/* เอฟเฟกต์เฟด + ซอฟต์โกลว์ */
.btn-flawless-viewall::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(214,177,132,0.1));
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: inherit;
}

.btn-flawless-viewall:hover {
  color: #fff;
  background: linear-gradient(135deg, #b58a63, #dcb78b);
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(214, 177, 132, 0.45);
}

.btn-flawless-viewall:hover::before {
  opacity: 1;
}

.btn-flawless-viewall svg {
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn-flawless-viewall:hover svg {
  transform: translateX(5px);
  opacity: 0.85;
}

.btn-flawless-viewall:active {
  transform: scale(0.96);
  box-shadow: 0 6px 18px rgba(214, 177, 132, 0.3);
}



/* ใช้เฉพาะในส่วน Flash Sale เท่านั้น */
#fs-section.fs-theme-flawless {
  --flw-gold: #b88a63; /* สีทองนวลของธีม */
}

#fs-section.fs-theme-flawless .btn-dark {
  transition: all .3s ease;
}
#fs-section.fs-theme-flawless .btn-dark:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
#fs-section.fs-theme-flawless .btn-dark:active {
  transform: scale(.97);
}

/* ปุ่มดูรายละเอียด (outline) – เพิ่มไฟวิ่ง แต่ใช้เฉพาะใน section นี้ */
#fs-section.fs-theme-flawless .btn-outline-secondary {
  transition: all .35s ease;
  position: relative;
  overflow: hidden;
}
#fs-section.fs-theme-flawless .btn-outline-secondary:hover {
  transform: translateY(-2px);
  color: var(--flw-gold) !important;
  background-color: var(--flw-gold);
  border-color: var(--flw-gold);
  box-shadow: 0 6px 14px rgba(184,138,99,.35);
}
/* เส้นไฟวิ่ง */
#fs-section.fs-theme-flawless .btn-outline-secondary::before {
  content:"";
  position:absolute; inset:0;
  left:-100%;
  background: linear-gradient(120deg, rgba(255,255,255,.35), rgba(255,255,255,0));
  transition:left .5s ease;
}
#fs-section.fs-theme-flawless .btn-outline-secondary:hover::before { left:100%; }

/* เคารพผู้ใช้ที่ปิด motion */
@media (prefers-reduced-motion: reduce) {
  #fs-section.fs-theme-flawless .btn-dark,
  #fs-section.fs-theme-flawless .btn-outline-secondary {
    transition: none;
    transform: none !important;
  }
}



