/* ซ่อน/แสดงเวอร์ชัน */
.hero-mobile{ display:none; }
.hero-desktop{ display:block; }

@media (max-width: 767.98px){
  .hero-desktop{ display:none; }
  .hero-mobile{ display:block; }

  /* page-hero มือถือให้สูงอัตโนมัติ (ไม่ไปแตะของหน้าอื่น) */
  .hero-mobile.page-hero{
    height:auto; min-height:unset; margin-top:12px;
  }

  /* สไลด์แบบ CSS scroll-snap (ไม่ต้องใช้ไลบรารี) */
  .hero-slider{
  display: flex;
  overflow-x: hidden;
}
  .hero-slide{
    flex:0 0 100%;
    scroll-snap-align:start;
  }
  .hero-slide img{
    width:100%; height:auto; object-fit:contain;
    padding:0 8px; box-sizing:border-box;  /* ขอบซ้าย-ขวาเล็กน้อย */
  }

  /* จุดบอกตำแหน่งสไลด์ */
  .hero-dots{
    display:flex; justify-content:center; gap:6px;
    margin-top:8px;
  }
  .hero-dots button{
    width:8px; height:8px; border:0; border-radius:50%;
    background:#d1d5db; cursor:pointer;
  }
  .hero-dots button.is-active{ background:#0970fa; }
}
@media (max-width: 767.98px){
  .hero-slider{
    overflow-x: auto !important;   /* ⭐ สำคัญ */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;           /* ⭐ เพิ่มให้ drag ลื่น */
  }
}


/* ===== HERO BASE ===== */
.page-hero{
  position: relative;
}



.hero-slide.is-hero-sale{
  position: relative;
  min-width: 100%;
}

.hero-slide:not(.is-hero-sale){
  height: auto;
}

.hero-slide img{
  width:100%;
  height:auto;
  object-fit: cover;
  display:block;
}

/* ===== OVERLAY ===== */
.hero-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.8),
    rgba(0,0,0,.4),
    rgba(0,0,0,.1)
  );
}

/* ===== CONTENT (เฉพาะ slide แรก) ===== */
.hero-content{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:20px;
  color:#fff;
  font-family:'Kanit';
}

.hero-price{
  font-size:13px;
  opacity:.9;
  margin-bottom:6px;
}

.hero-title{
  font-size:28px;
  font-weight:500;
  line-height: 1.35;
  margin:0 0 10px;
  transform: skewX(-6deg);
}

.hero-sub{
  font-size:14px;
  opacity:.9;
  margin-bottom:16px;
}

/* ===== CTA ===== */
.hero-btn{
  width:160px;
  padding:12px 0;
  text-align:center;
  border-radius:999px;
  background:#fc7801; /* สี Bogbowl */
  color:#fff;
  font-weight:600;
  text-decoration:none;
  box-shadow:0 6px 16px rgba(0,0,0,.3);
}

.hero-note{
  font-size:11px;
  opacity:.7;
  margin-top:10px;
}

/* ===== ป้องกัน slide อื่นมี content ===== */
.hero-slide:not(.is-hero-sale) .hero-content,
.hero-slide:not(.is-hero-sale) .hero-overlay{
  display:none;
}


/* ===== ABOUT SECTION (Wix-like) ===== */
.about-section{
  background:#fff;
  padding: clamp(40px, 7vw, 96px) 0;
}

/* Grid 2 คอลัมน์: ซ้าย (รูปใหญ่กิน 2 แถว) | ขวา (ข้อความ + รูปเล็ก) */
.about-grid{
  display:grid;
  grid-template-columns: 1.08fr 0.92fr;
  grid-template-areas:
    "img1 copy"
    "img1 img2";
  gap: clamp(20px, 4vw, 48px) clamp(24px, 5vw, 64px);
  align-items:start;
  margin-inline:auto;

}

/* วางตำแหน่งกริด */
.about-img--left  { grid-area: img1; }
.about-copy       { grid-area: copy; }
.about-img--right { grid-area: img2; }

/* กล่องรูปภาพ */
.about-img{
  border-radius: 18px;
  overflow: hidden;
}
.about-img img{
  width:100%; height:100%;
  display:block;
  object-fit: cover;
  object-position: center;
}

/* ขนาด/ระยะของรูป (เดสก์ท็อป) — ปรับตามดีไซน์จริง */
.about-img--left{
  display:flex;
  justify-content:center;   /* จัดกลางใน column */
}

.about-img--right img{
  width: 448px;
  height: 305px;
  object-fit: cover;
  margin-top: 55px;
}

/* Eyebrow (ไม่มีใน base.css) */
.eyebrow{
  color: var(--brand-orange);
  font-weight: 500;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: 14px;
  margin-bottom: .5rem;
}

/* ใช้ h2 จาก base.css เป็นหลัก; ใส่เฉพาะจูนเพิ่มเติม */
.about-title{
  display: inline-block;      /* ให้ transform จาก h2 ทำงานพอดี */
  transform-origin: left center;
}

/* ถ้าอยากใช้คลาสเดิมแทน .desc ก็ทำ mirror ให้ชัดเจน (หรือไม่ต้องมีเลยก็ได้) */
.about-desc{ /* หรือ ลบแล้วใช้ .desc จาก base.css */
  color:#605E5E;
  font-size: 14px;  /* แก้เติมหน่วย */
  line-height: 1.7;
  margin-bottom: 1rem;
}

/* Responsive: จัดกริดเป็นคอลัมน์เดียวบนมือถือ */
@media (max-width: 767.98px){
  .about-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "img1"
      "copy"
      "img2";
  }
  .about-img--left img{
    width: 100%;
    height: 360px;
    margin-top: 16px;
    margin-left: 0;
  }
  .about-img--right img{
    width: 100%;
    height: 240px;
    margin-top: 12px;
  }
}

/* Force outline-style button: กรอบน้ำเงินโชว์ตลอด */
.about-section .about-btn {
  background: var(--brand-blue) !important;
  color: #fff !important;
  border-color: var(--brand-blue) !important;
  border-style: solid !important;
  border-width: 2px !important;
  padding: .6rem 1.3rem;        
  border-radius: .6rem;
  font-weight: 700;
  display: inline-block;
  text-decoration: none;
  transition: all .25s ease;
}

/* Hover แค่สลับพื้น-ตัวหนังสือ */
.about-section .about-btn:hover {
  background: var(--brand-blue) !important;
  color: #3b2419 !important;
}
/* ========== ABOUT (เฉพาะมือถือ) ========== */
@media (max-width: 640px){

  /* ดันบล็อกห่างแบนเนอร์ + รางน้ำซ้าย/ขวา */
  .about-section{
    padding-top: clamp(64px, 12vw, 96px);
  }
  .about-section .container{
    padding-left: 16px;
    padding-right: 16px;
  }

  /* กริด -> 1 คอลัมน์ (ใช้ flex เพื่อควบคุม order) */
  .about-grid{
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  /* eyebrow */
  .about-section .eyebrow{
    font-size: 12px;
    margin-bottom: 6px;
  }

  /* หัวข้อ */
  .about-section .about-title{
    font-size: 26px;
    line-height: 1.35;
    text-wrap: balance;
    margin-bottom: 12px;
  }

  /* เนื้อความ */
  .about-section .about-copy .desc{
    font-size: 16px;
    line-height: 1.7;
    text-align: justify;
    text-justify: inter-character;
    white-space: normal;
    word-spacing: 0;
    letter-spacing: normal;
    text-align-last: left;
    text-indent: 1.5em;
    margin: 0 0 12px;
  }
  .about-section .about-copy .desc:last-child{ margin-bottom: 0; }

  /* ปุ่ม "อ่านต่อ" – อยู่ก่อนรูป */
  .about-section .about-btn{
    margin-top: 12px;
    order: 2;    /* ปุ่มก่อนรูป */
  }

  /* รูป -> บังคับไว้ล่างสุด */
  .about-section .about-img{
    border-radius: 14px;
    overflow: hidden;
    max-height: 360px;
    margin-top: 6px;
    order: 3;    /* ✅ รูปอยู่ท้ายสุด */
  }
  .about-section .about-img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 14px;
  }

  /* ซ่อนรูปขวาในมือถือ */
  .about-section .about-img--right{
    display: none;
  }
}

/* (ตัวเลือก) เว้นระยะใต้แบนเนอร์ให้ชัดอีกนิด – ใช้กับหน้าหลักด้วย */
.page-hero{
  margin-bottom: clamp(12px, 3vw, 24px);
}


/* ===== WHY BOGBOWL (REVERTED DESIGN + WHITE CARD) ===== */
#whybb{
  height: auto;
  padding: 32px 0;              /* เท่าเดิม */
  background: #fff;
  overflow: hidden;

  /* ขนาดการ์ด/ช่องไฟ ตามของเดิม */
  --why-card-h: 130px;
  --why-gap: 12px;
}

/* ซ้าย/ขวา สองคอลัมน์ (ของเดิม) */
#whybb .whybb__container{
  display: flex;
  align-items: stretch;          /* ให้ซ้าย/ขวาสูงใกล้เคียงกัน */
  justify-content: space-between;
  gap: 32px;                     /* เท่าเดิม */
  flex-wrap: nowrap;
}

/* ฝั่งซ้าย (ของเดิม) */
#whybb .whybb__left{
  flex: 0 1 54%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* หัวเรื่อง: เอาคืน -> weight 400 + เอียง */
#whybb .whybb__title{
  margin: 0;
  font-weight: 400;              /* คืนค่าเดิม */
  font-size: 30px;               /* เดิม */
  line-height: 1.25;
  color: #3b2419;
  transform: skewX(-6deg);       /* คืนค่าเดิม */
}
#whybb .whybb__brand{ color: var(--brand-yellow); }  /* เดิมใช้เหลือง */
#whybb .whybb__sub{ margin-top: 6px; color: #6b7280; }

/* กริดการ์ด 2 คอลัมน์ (ของเดิม) */
#whybb .whybb__grid{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: var(--why-gap);
}

/* การ์ด: รักษาขนาด/รัศมี/เงาแบบเดิม แต่เปลี่ยนหน้าตาเป็นพื้นขาว + ขอบอ่อน */
#whybb .whybb__card{
  min-height: var(--why-card-h);
  border-radius: 28px;            /* เดิม 28 */
  padding: 16px;                  /* เดิม 16 */
  box-shadow: 0 10px 24px rgba(0,0,0,.08);  /* เดิม */
  background: #fff;               /* ✅ พื้นขาว */
  border: 1px solid var(--border, #e5e7eb);/* ✅ ขอบอ่อน */
  display: block;                 /* ✅ ไม่ใช้ grid เพื่อไม่ไปกระทบเลย์เอาต์เดิม */
}
#whybb .whybb__card--wide{ grid-column: span 2; }

/* ไอคอน: ใช้ขนาดเดิม เพื่อบาลานซ์กับดีไซน์เดิม */
#whybb .whybb__icon{
  width: 38px; height: 38px;      /* เดิม */
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef2f7;            /* พื้นไอคอนอ่อน ๆ */
  color: var(--brand-blue);
}
#whybb .whybb__icon svg{ width: 18px; height: 18px; }

/* โทน icon ต่อการ์ด (ไม่เปลี่ยนพื้นหลังการ์ดแล้ว) */
#whybb .whybb--blue   .whybb__icon{ background:#eef5ff; color:var(--brand-blue); }
#whybb .whybb--orange .whybb__icon{ background:#fff1e6; color:var(--brand-orange); }
#whybb .whybb--yellow .whybb__icon{ background:#fff7d6; color:var(--brand-yellow); }
#whybb .whybb--pale   .whybb__icon{ background:#f3f4f6; color:#334155; }
#whybb .whybb--navy   .whybb__icon{ background:#0f172a; color:#fff; }

/* ข้อความในการ์ด (ของเดิม) + แก้ไม่ให้ “ไหลเป็นเสา” บนเดสก์ท็อป */
#whybb .whybb__cardTitle{
  margin: 6px 0 4px;
  font-weight: 600;
  font-size: 17px;
  line-height: 1.3;
}
#whybb .whybb__cardDesc{
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  font-weight: 400;
  white-space: normal;        /* ✅ ตัดบรรทัดปกติ */
  word-break: normal;         /* ✅ ไม่บังคับหั่นคำกลางตัว */
  overflow-wrap: break-word;  /* ✅ กันคำยาวล้น */
}

/* รูปด้านขวา: ใช้ของเดิม (ไม่มีพื้นเหลือง) */
#whybb .whybb__right{
  flex: 0 1 46%;
  min-height: calc(var(--why-card-h) * 3 + var(--why-gap) * 2);
  display: flex; align-items: center; justify-content: center;
  border-radius: 24px;
  overflow: hidden;
  background: transparent;
}
#whybb .whybb__imgBg{ display: none; }
#whybb .whybb__img{
  position: static;
  width: 100%; height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

/* กัน CSS อื่นมากระทบรูป */
#whybb img{ max-width:100%; float:none; }

/* ===== Mobile (เหมือนเดิม แต่กันตัวหนังสือล้น) ===== */
@media (max-width: 480px){

  #whybb{ padding:16px 0; }

  #whybb .whybb__container{
    flex-direction: column;
    gap:16px;
    align-items: stretch;
  }

  #whybb .whybb__title{
    font-size: clamp(1.6rem, 6.2vw, 2.2rem);
    line-height: 1.38;
    word-break: keep-all;
    white-space: normal;
  }
  #whybb .whybb__title span{ display:inline-block; }
  #whybb .whybb__sub{ font-size:13px; margin:0 0 10px; }

  /* การ์ดในมือถือ */
  #whybb{ --why-card-h:88px; --why-gap:8px; }
  #whybb .whybb__grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:var(--why-gap);
    margin-top:8px;
  }
  #whybb .whybb__card{
    min-height:var(--why-card-h);
    padding:10px 14px;
    border-radius:16px;
  }
  #whybb .whybb__icon{ width:26px; height:26px; border-radius:8px; margin-bottom:2px; }
  #whybb .whybb__icon svg{ width:12px; height:12px; }

  #whybb .whybb__cardTitle{
    font-size:13px; font-weight:600; margin:0 0 2px;
    line-height:1.25; word-break:keep-all; line-break:loose; hyphens:none;
  }
  #whybb .whybb__cardDesc{
    font-size:12px; font-weight:400; line-height:1.55; margin:0;
    white-space:normal;
    word-break: break-word;     /* ✅ มือถือให้ยอมตัดคำยาว ๆ */
    overflow-wrap:anywhere;
    text-wrap:pretty;
  }

  /* รูปไว้ล่าง ไม่ล้น */
  #whybb .whybb__right{
    order:2; width:100%; max-width:86%; margin:0 auto;
    min-height:auto; aspect-ratio:auto;
  }
  #whybb .whybb__img{ position:static; width:100%; height:auto; }
}


/* ================== PRODUCTS ================== */
.products-section{
  background:#ffffff;             /* อ่อนลงให้ใกล้ภาพต้นแบบ */
}

.products-section .container{
  margin-left: auto;
  margin-right: auto;
}


.products-title{
  text-align:center;
   font-weight: 400;
  color: #342216;
  line-height: 1.45;
  font-size: 30px;
  margin-bottom: .75rem;
  transform: skewX(-6deg);
}
.products-title span{ color:#0970fa; } /* คำว่า Bogbowl เป็นน้ำเงิน */
.products-sub{
  text-align:center;
  color: #605E5E;     /* slate-600 */
  margin:0 0 1.75rem;
  font-size:16px;
  line-height:1.7;
}


/* Grid */
.products-grid{
  display:grid;
  gap: 1.5rem;
  width: 100%;
}
@media (min-width: 768px){
  .products-grid{ grid-template-columns: repeat(3, 1fr); }
}

/* Card */
.product-card{
  position: relative;
  background:#fff;
  border-radius: 18px;           /* โค้งใหญ่ */
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.06);
}

/* Badge เหลืองมุมขวาบน */
.product-badge{
  position:absolute;
  top: .9rem; right: 1rem;
  background:#f7dd1e;
  color:#1f2937;
  font-size: 13px;
  padding: .35rem .75rem;
  border-radius: 999px;
  line-height:1;
}

/* ส่วนหัวในการ์ด */
.product-head{ margin: .25rem 0 .5rem; }
.product-title{
  margin:0;
  font-weight: 400;
  font-size: 30px;
  color:#342216;
}

.product-sub{
  font-size: 13px;
  color:#64748b;
  margin-top: .15rem;
}

/* รายการจุด */
.product-points{
  margin: .5rem 0 1rem;
  padding-left: 1.1rem;
}
.product-points li{
  list-style: disc;
  line-height: 1.7;
  margin: .25rem 0;
  color: #342216;
  font-size: 14px;
}

/* เส้นแบ่งกลางการ์ด */
.product-sep{
  height:1px;
  background: rgba(0,0,0,.08);
  margin: .25rem 0 .9rem;
}

/* แถวล่าง: ราคา + ปุ่ม */
.product-foot{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
}
.product-price{
  color:#0f172a;
  font-size: 14px;
  font-weight: 400;
}
.btn-orange{
  display:inline-block;
  background:#fc7801;
  color:#fff;
  padding:.6rem 1.1rem;
  border-radius: 14px;
  font-weight:700;
  text-decoration:none;
  box-shadow: 0 6px 14px rgba(252,120,1,.35);
  transition: transform .08s ease, opacity .2s ease;
  white-space: nowrap;
}
.btn-orange:hover{ opacity:.95; }
.btn-orange:active{ transform: translateY(1px); }
.btn-orange.pill{ border-radius: 999px; }

/* ปรับมือถือ: ปุ่มลงบรรทัดถัดไปและเต็มความกว้างถ้าจอแคบมาก */
@media (max-width:420px){
  .product-foot{ flex-direction:column; align-items:stretch; }
  .btn-orange{ text-align:center; }
}

/* ====== PRODUCTS: CTA (ชั่งตัก) ====== */
.products-cta{
  background:#0970fa;
  color:#fff;
  border-radius:1rem;
  padding:1.5rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:1rem;
  margin-top:2rem;
  margin-bottom:2rem;
}
@media (min-width:768px){
  .products-cta{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
}
.products-cta__text{ flex:1; text-align:center; }
@media (min-width:768px){
  .products-cta__text{ text-align:left; }
}
.products-cta__title{
  margin:0;
  font-size:20px;        /* ~ text-xl */
  font-weight:700;
}
.products-cta__desc{
  margin:.5rem 0 0;
  font-size:14px;
  color:rgba(255,255,255,.9);
}
.products-cta__action{ text-align:center; }
.products-cta__price{
  font-size:18px;        /* ~ text-lg */
  font-weight:700;
  color:#f7dd1e;
}
.products-cta__unit{
  font-size:12px;
  margin-top:.25rem;
  opacity:.95;
}

/* ====== PRODUCTS: ปุ่มท้ายส่วน ====== */
.products-footer{ text-align:center; }
.btn-lg{ font-size:16px; padding:.8rem 1.5rem; }


/* ========== PRODUCTS (มือถือ) ========== */
@media (max-width: 480px){

  /* หัวข้อหลักของ section: ให้เท่ากับ #whybb */
  .products-title{
    font-size: clamp(1.6rem, 6.2vw, 2.2rem);
    line-height: 1.38;
    /* คงสไตล์เดิมไว้ */
    font-weight: 400;
    transform: skewX(-6deg);
    margin-bottom: 10px;
  }

  /* คำบรรยายใต้หัวข้อ */
  .products-sub{
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 12px;
  }

  /* หัวข้อในการ์ดแต่ละสินค้า (ลดลงเล็กน้อยให้บาลานซ์กับหัวข้อหลัก) */
  .product-title{
    font-size: 22px;     /* เดิม 30px */
    line-height: 1.3;
  }

  /* ข้อความย่อยในการ์ด */
  .product-sub{
    font-size: 12px;     /* เดิม 13px */
  }

  /* รายการจุด */
  .product-points li{
    font-size: 13px;     /* เดิม 14px */
    line-height: 1.6;
  }

  /* ราคา */
  .product-price{
    font-size: 13px;     /* เดิม 14px */
  }

  /* ปุ่ม: อ่านง่ายขึ้นบนจอเล็ก */
  .btn-lg,
  .btn-orange{
    font-size: 14px;
    padding: .7rem 1.2rem;
  }
}

/* ===== NAVBAR (INDEX ONLY) — Mobile layout, single clean block ===== */
@media (max-width: 767.98px){

  /* ดันคอนเทนต์ลงตามความสูงแถบเมนู */
  .site-header{
    padding-top: var(--nav-height) !important;
  }

  /* ให้แถบเมนูติดบนสุด */
  .site-header .nav-bar{
    position: fixed !important;
    top: 0; left: 0; right: 0;
    height: var(--nav-height) !important;
    z-index: 1000;
  }

  /* ใช้ .container.nav เป็น anchor ในการจัด absolute */
  .site-header .nav-bar .container.nav{
    position: relative !important;
    height: 100% !important;
  }

  /* ซ่อนรายการเมนูบนแถบบน (ยังเปิดจาก hamburger ได้) */
  .site-header .nav-menu{
    display: none !important;
  }

  /* ซ้ายสุด: ปุ่มแฮมเบอร์เกอร์ */
  .site-header .nav-toggle{
    position: absolute !important;
    left: 12px; top: 50%;
    transform: translateY(-50%);
    display: inline-flex !important;
    margin: 0 !important;
  }

  /* กลางจริง: โลโก้ */
  .site-header .nav-left{ position: static !important; }
  .site-header .nav-left .logo{
    position: absolute !important;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
  }
  .site-header .logo img{
    height: 56px !important; /* ปรับได้ */
  }

  /* ขวาสุด: ไอคอน (คน + ตะกร้า) */
  .site-header .nav-right{
    position: absolute !important;
    right: 12px; top: 50%;
    transform: translateY(-50%);
    display: inline-flex !important;
    align-items: center !important;
    gap: 16px !important;
  }
  /* ถ้าเผลอมี .nav-right ซ้อนกัน ให้แบนชั้นใน */
  .site-header .nav-right .nav-right{
    display: contents !important;
  }

  /* มือถือ: ไม่ต้องมีตัวหนังสือ “เข้าสู่ระบบ” */
  .site-header .nav-login{
    font-size: 0 !important;
    padding: 6px !important;
    line-height: 1 !important;
  }
  .site-header .nav-login svg{
    width: 24px !important;
    height: 24px !important;
  }

  /* ตะกร้า + bubble เลข */
  .site-header .icon-cart{
    width: 24px !important;
    height: 24px !important;
  }
  .site-header .nav-cart{
    position: relative !important;
    color: var(--brand-orange) !important;
  }
  .site-header #cart-count{
    position: absolute !important;
    top: -6px; right: -10px;
    background: var(--brand-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
  }
}


