/* ชั้นตกแต่ง (design layer) ของแสงชัยการเกษตร — โหลดหลัง styles.css ทุกหน้า

   ทำไมแยกไฟล์: เจ้าของขอให้เว็บดูสากลและมืออาชีพขึ้นโดยข้อมูลต้องไม่หาย
   ไฟล์นี้แตะเฉพาะหน้าตา (สี ระยะ ตัวอักษร การ์ด ปุ่ม) ไม่แตะโครงสร้าง HTML
   ที่ JavaScript ใช้ดึงข้อมูล จึงไม่มีทางทำให้สินค้า ราคา หรือรูปหาย
   ย้อนกลับ: ลบบรรทัด <link rel="stylesheet" href="theme.css"> ออกจากหน้า เว็บกลับเป็นแบบเดิมทันที

   หลักการ
   - เขียวธรรมชาติของร้าน (เขียวเข้ม + ใบไม้ + เหลืองป้าย) แต่ลดเสียงรบกวน ใช้เหลืองเฉพาะปุ่มหลัก
   - ตัวอักษรไทยอ่านง่าย ขนาดหัวข้อไล่ระดับชัด ช่องไฟกว้างพอบนมือถือ
   - การ์ด ปุ่ม ช่องกรอก ใช้มุมโค้งและเงาชุดเดียวกันทั้งเว็บ
   - รูปสินค้าไม่ยืด (object-fit) และมีสัดส่วนคงที่ทุกการ์ด
   - ไม่เพิ่มรูปหรือฟอนต์ใหม่ที่ต้องโหลดหนัก ใช้ฟอนต์ชุดเดิม */

:root {
  --green: #0b5a34;
  --green-2: #117a48;
  --green-soft: #e6f2ea;
  --green-ink: #0a3a23;
  --lime: #b6e05c;
  --yellow: #ffd21f;
  --ink: #16241d;
  --ink-2: #33463c;
  --muted: #64746b;
  --cream: #f7f9f5;
  --line: #dfe7e1;
  --line-strong: #c7d3ca;
  --shadow-sm: 0 1px 2px rgba(16, 45, 30, .06), 0 2px 8px rgba(16, 45, 30, .05);
  --shadow-md: 0 8px 24px rgba(16, 45, 30, .10);
  --shadow: 0 18px 44px rgba(16, 45, 30, .14);
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
}

body { color: var(--ink); background: #fff; line-height: 1.7; }
h1, h2, h3, h4 { color: var(--ink); letter-spacing: -.01em; line-height: 1.35; text-wrap: balance; overflow-wrap: break-word; }
.hero h1, .hero h2, .contact-card h2, .job-copy h2, .knowledge-copy h2, .showcase-main-copy strong, .spotlight-card h3, .spotlight-card h2 { color: #fff; }
.showcase-main-copy b { color: var(--green); }
h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.35; }
.section-heading h2, h2 { font-size: clamp(24px, 2.6vw, 32px); }
p { overflow-wrap: break-word; }
img { max-width: 100%; }
.section { padding: clamp(56px, 7vw, 88px) 0; }
.eyebrow { font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--green-2); }
.hero .eyebrow, .contact-card .eyebrow, .knowledge-copy .eyebrow, .job-copy .eyebrow { color: var(--yellow); }
.text-link { color: var(--green-2); text-decoration: none; border-bottom: 1.5px solid transparent; transition: border-color .2s var(--ease); }
.text-link:hover { border-bottom-color: currentColor; }
/* ลิงก์แบบข้อความที่เป็นทางไปต่อ ให้พื้นที่แตะอย่างน้อย 40px */
.text-link, .spotlight-card a, .facebook-link, .admin-entry, .footer-map, .cart-title > a, .product-not-found a, .catalog-card a { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; }

/* ---------- ปุ่มและช่องกรอก: ชุดเดียวกันทั้งเว็บ ---------- */
.button, .line-button, .search button, .filter-chip, .detail-actions button, .checkout-form button, .job-pills a {
  min-height: 46px;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: .01em;
}
.button { padding: 12px 22px; gap: 8px; box-shadow: none; }
.button:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.button.primary { background: var(--yellow); color: #1a2a1f; }
.button.primary:hover { background: #ffdb45; }
.button.ghost { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.button.ghost:hover { background: rgba(255, 255, 255, .12); }
.button.white { background: #fff; color: var(--green); }
.button.light { background: rgba(255, 255, 255, .14); color: #fff; border: 1.5px solid rgba(255, 255, 255, .35); }
.button.outline-white { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .7); }
.line-button { display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; background: #06c755; }
.line-button:hover { background: #05b34c; transform: translateY(-1px); }
input, select, textarea { accent-color: var(--green-2); }
.checkout-grid input, .checkout-grid select, .checkout-grid textarea, .member-form input, .quantity-row input, .cart-item input {
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  padding: 11px 13px;
  font: inherit;
  background: #fff;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.checkout-grid input:focus, .checkout-grid select:focus, .checkout-grid textarea:focus, .member-form input:focus, .quantity-row input:focus, .cart-item input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(17, 122, 72, .14);
  outline: none;
}

/* ---------- แถบบนและหัวเว็บ ---------- */
.topbar { background: var(--green-ink); color: #cfe6d8; font-size: 12.5px; }
.site-header { border-bottom: 1px solid var(--line); box-shadow: 0 1px 0 rgba(16, 45, 30, .03); }
.header-main { min-height: 88px; gap: 24px; }
.brand img { border-radius: 8px; }
.search { height: 48px; border: 1.5px solid var(--line-strong); border-radius: 12px; background: #fff; }
.search:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(17, 122, 72, .14); }
.search input { padding: 0 16px; font-size: 15px; }
.search input::placeholder { color: #8a978f; }
.search button { min-height: 0; border-radius: 0; padding: 0 22px; }
.header-actions { gap: 18px; }
.action-link { color: var(--ink-2); font-weight: 600; }
.action-link:hover { color: var(--green-2); }
.nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.nav-inner { display: flex; gap: 6px; }
.nav a { padding: 12px 12px; margin: 4px 0; border-bottom: 0; border-radius: 8px; font-size: 14.5px; color: var(--ink-2); }
.nav a:hover { background: var(--green-soft); color: var(--green); }
.nav a.active { background: var(--green-soft); color: var(--green); }

/* ---------- ฮีโร่และป้ายโปรบนสุด ---------- */
.hero { height: auto; min-height: 520px; padding: 72px 0; }
.hero-overlay { background: linear-gradient(105deg, rgba(4, 44, 26, .86) 0%, rgba(4, 44, 26, .62) 55%, rgba(4, 44, 26, .28) 100%); }
/* ภาษาไทยมีสระบน-ล่าง ต้องเว้นบรรทัดอย่างน้อย 1.3 ไม่งั้นตัวอักษรซ้อนกัน */
.hero h1 { font-size: clamp(30px, 4.2vw, 50px); line-height: 1.32; letter-spacing: -.01em; }
.hero-content > p:not(.eyebrow) { font-size: clamp(15px, 1.4vw, 18px); max-width: 620px; opacity: .95; }
.hero-buttons .button { min-width: 168px; }
.showcase-main { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.showcase-main img { object-fit: cover; }
.showcase-card { border-radius: 14px; padding: 20px; box-shadow: var(--shadow-sm); border-color: var(--line); }
.showcase-card:hover { border-color: var(--green-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.showcase-card-icon { border-radius: 12px; background: var(--green-soft); color: var(--green); }
.showcase-card span { color: var(--green-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.showcase-card strong { font-size: 16.5px; line-height: 1.3; }
.showcase-card em { color: var(--muted); font-style: normal; font-size: 14px; }

/* ---------- ช่องทางติดต่อด่วน ---------- */
.quick-contact-grid { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.quick-contact-grid a { text-decoration: none; transition: background .2s var(--ease); }
.quick-contact-grid a:hover { background: var(--green-soft); }
.quick-contact-grid span { color: var(--green-2); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; }
.quick-contact-grid strong { font-size: 17px; color: var(--ink); }
.quick-contact-grid small { color: var(--muted); }

/* ---------- การ์ดหมวด / สินค้า / แค็ตตาล็อก: สัดส่วนรูปคงที่ ไม่ยืด ---------- */
.category-card { border-radius: var(--r-lg); padding: 0 0 20px; border-color: var(--line); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.category-card > img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.category-card strong { font-size: 15.5px; padding: 0 12px; }
.category-card small { color: var(--muted); padding: 0 12px; }
.product-card, .catalog-card, .admin-product-card { border-radius: var(--r-lg); border-color: var(--line); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.product-card:hover, .catalog-card:hover, .admin-product-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-image, .admin-product-image { aspect-ratio: 4 / 3; height: auto; background: #f1f5f2; overflow: hidden; }
.product-image img, .admin-product-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-card > img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: #f1f5f2; }
.catalog-card > div { padding: 18px 18px 20px; display: grid; gap: 6px; }
.catalog-card span { color: var(--green-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; }
.catalog-card h2 { font-size: 17px; line-height: 1.35; margin: 0; }
.catalog-card p { color: var(--muted); font-size: 14px; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.catalog-card .catalog-stock { color: var(--green); font-size: 15px; margin-top: 4px; }
.catalog-card a { display: inline-flex; align-items: center; min-height: 40px; color: var(--green-2); font-weight: 700; text-decoration: none; }
.catalog-card a:hover { text-decoration: underline; }
.admin-product-info strong { font-size: 15.5px; line-height: 1.35; }
.admin-product-info span { color: var(--green); font-weight: 700; }
.product-foot button, .catalog-card button { border-radius: 10px; }

/* ---------- แค็ตตาล็อก ---------- */
.catalog-intro { background: linear-gradient(180deg, var(--green-soft), #fff); padding: clamp(36px, 6vw, 64px) 0; }
.catalog-intro h1 { font-size: clamp(26px, 4vw, 44px); line-height: 1.3; overflow-wrap: break-word; }
.catalog-toolbar { gap: 10px; }
.filter-chip { min-height: 42px; padding: 8px 16px; border: 1.5px solid var(--line-strong); color: var(--green); background: #fff; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease); }
.filter-chip:hover { border-color: var(--green-2); background: var(--green-soft); }
.filter-chip.active { background: var(--green); color: #fff; border-color: var(--green); }
.catalog-count { color: var(--muted); font-size: 14px; }
.catalog-empty { border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg); padding: 40px 24px; text-align: center; background: var(--cream); }
.catalog-empty h2 { font-size: 20px; }
.subcategory-directory { border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }

/* ---------- หน้ารายละเอียดสินค้า ---------- */
.product-breadcrumb { font-size: 13.5px; color: var(--muted); }
.product-breadcrumb a { color: var(--green-2); }
.product-detail-image { border-radius: var(--r-lg); border: 1px solid var(--line); background: #f4f7f4; min-height: 0; aspect-ratio: 1 / 1; overflow: hidden; }
.product-detail-image img { object-fit: contain; width: 100%; height: 100%; padding: 16px; box-sizing: border-box; }
.product-detail-copy h1 { font-size: clamp(24px, 3vw, 36px); line-height: 1.3; }
.detail-category { color: var(--green-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 12.5px; }
.detail-status { border-radius: 14px; background: var(--cream); border: 1px solid var(--line); padding: 16px 18px; }
.detail-status strong { font-size: 24px; color: var(--green); }
.detail-actions { gap: 10px; flex-wrap: wrap; }
.detail-actions button { padding: 0 22px; }
.detail-call { border: 1.5px solid var(--green); color: var(--green); background: #fff; border-radius: 10px; }
.detail-notes { color: var(--muted); font-size: 14px; }
.product-specs { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.product-specs small { color: var(--muted); letter-spacing: .04em; }

/* ---------- ตะกร้า / ใบสั่งซื้อ ---------- */
.cart-item { border-radius: 14px; box-shadow: var(--shadow-sm); border-color: var(--line); }
.cart-item img { border-radius: 10px; object-fit: contain; background: #f4f7f4; }
.cart-item h2 { font-size: 16.5px; }
.cart-item button { font-weight: 700; }
.order-summary { border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-md); border-color: var(--line); }
.order-summary h2 { font-size: 20px; }
.checkout-form h2 { font-size: 22px; }
.member-gate { border-radius: 14px; }
.member-benefit-summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.member-benefit-summary strong { text-align: right; overflow-wrap: break-word; }
.order-success { border-radius: var(--r-lg); }

/* ---------- ส่วนแนะนำ / งาน / ความรู้ ---------- */
.spotlight-card { border-radius: var(--r-lg); }
.spotlight-card img { object-fit: cover; }
.job-pills a { min-height: 40px; display: inline-flex; align-items: center; border-radius: 999px; }
.knowledge-highlight, .job-layout, .about-grid, .facebook-card { border-radius: var(--r-lg); }
.job-layout img, .about-grid > img, .knowledge-visual img { border-radius: 14px; object-fit: cover; }
.gallery-grid figure { border-radius: 14px; overflow: hidden; }
.gallery-grid img { object-fit: cover; }
.contact-card { border-radius: var(--r-lg); box-shadow: var(--shadow-md); }
.trust-row { color: rgba(255, 255, 255, .9); }
.guide-grid article, .faq-list details { border-radius: 14px; }

/* ---------- ท้ายเว็บ ---------- */
footer { background: var(--green-ink); color: #b8cdbf; }
.footer-grid { padding-block: 52px 40px; }
.footer-col h4 { letter-spacing: .08em; text-transform: uppercase; font-size: 12.5px; color: #fff; opacity: .85; }
.footer-col a { color: #d6e6db; text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.footer-contact li { line-height: 1.7; }
.footer-bottom { font-size: 12.5px; }
.admin-entry { opacity: .7; }

/* ---------- แถบล่างมือถือ ---------- */
.mobile-actions a { min-height: 52px; display: flex; align-items: center; justify-content: center; font-size: 14px; }

/* ---------- Loading / empty / error ---------- */
[hidden] { display: none !important; }
.toast { border-radius: 10px; }
.form-message, .cart-message { font-weight: 600; }
.local-warning, .draft-warning { border-radius: 12px; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .spotlight-grid { grid-template-columns: 1fr 1fr; }
  .spotlight-card { min-height: 280px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 240px; }
  .quick-contact-grid { grid-template-columns: repeat(2, 1fr); }
  .product-detail-grid { gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- มือถือ ---------- */
@media (max-width: 900px) {
  .container { width: min(100% - 32px, 1180px); }
  .header-main { gap: 12px; padding: 12px 0; }
  .brand img { width: 120px; height: 54px; }
  /* เมนูหลักไม่ซ่อนอีกต่อไป ให้ปัดซ้ายขวาได้ (ของเดิมซ่อนทั้งแถบบนมือถือ) */
  .nav { display: block; }
  .nav-inner { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 2px; padding-inline: 0; }
  .nav-inner::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; padding: 12px 12px; }
  .hero { min-height: 0; padding: 48px 0; }
  .hero h1 { font-size: clamp(28px, 8vw, 36px); }
  .promo-showcase-grid { grid-template-columns: 1fr; }
  .showcase-side { grid-template-columns: 1fr 1fr; }
  .category-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-grid, .catalog-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .catalog-card > div { padding: 14px; }
  .catalog-card h2 { font-size: 15.5px; }
  .catalog-intro h1 { font-size: clamp(24px, 7vw, 32px); }
  .product-detail-grid { grid-template-columns: 1fr; gap: 24px; width: min(100% - 32px, 1180px); max-width: 100%; }
  .product-detail-image, .product-detail-copy { min-width: 0; max-width: 100%; }
  .product-detail-image { aspect-ratio: 4 / 3; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 84px 1fr; }
  .cart-item label, .cart-item button { grid-column: 2; }
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-grid .full { grid-column: 1; }
  .order-summary { position: static; }
  .quick-contact-grid { grid-template-columns: 1fr 1fr; }
  .quick-contact-grid a { padding: 16px; }
  .spotlight-grid { grid-template-columns: 1fr; }
  .spotlight-card { min-height: 220px; }
  .gallery-grid { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding-block: 36px 28px; }
  .contact-card { padding: 28px 22px; flex-direction: column; align-items: flex-start; gap: 18px; }
  .section { padding: 48px 0; }
  body { padding-bottom: 64px; }   /* กันแถบล่างบังเนื้อหาท้ายหน้า */
}

@media (max-width: 480px) {
  .product-grid, .catalog-grid { grid-template-columns: 1fr; }
  .showcase-side { grid-template-columns: 1fr; }
  .quick-contact-grid { grid-template-columns: 1fr; }
  .hero-buttons { display: grid; }
  .hero-buttons .button { width: 100%; }
}

/* ---------- ลดการเคลื่อนไหวตามที่ผู้ใช้ตั้งไว้ ---------- */
@media (prefers-reduced-motion: reduce) {
  .button:hover, .category-card:hover, .product-card:hover, .catalog-card:hover, .showcase-card:hover, .line-button:hover { transform: none; }
}

/* =====================================================================
   ดีไซน์ V2 (20 ก.ย. 2569) — โทนเว็บค้าปลีกไทยอ่านง่าย (อ้างอิงลำดับข้อมูลของไทวัสดุ) เอกลักษณ์เขียว-เหลืองแสงชัย
   ขนาดตัวอักษรตาม brief: เนื้อหา 16–18px · ชื่อสินค้า 16–18px · ราคา 22–26px
   หัวข้อ section 24–32px · ฮีโร่ 28–46px · ไทยเว้นบรรทัด 1.5–1.7 · น้ำหนักฟอนต์ 400/600/700
   ถอดออกได้ทั้งบล็อกนี้ (ตั้งแต่บรรทัดนี้ถึงท้ายไฟล์) โดยไม่กระทบข้อมูล
   ===================================================================== */

/* ---------- ตัวอักษรพื้นฐาน ---------- */
body { font-size: 17px; line-height: 1.65; }
p, li, td, th, input, textarea, select, button { line-height: 1.6; }
h1, h2, h3, h4 { line-height: 1.35; font-weight: 700; }
/* น้ำหนัก 650/750/800/850/900 ที่ไฟล์เดิมใช้ ให้ตกที่ 3 น้ำหนักที่โหลดจริง (400/600/700) */
b, strong, .text-link, .filter-chip, .tag, .product-foot button, .catalog-card a, .catalog-card span, .placeholder-image, .service-grid span { font-weight: 700; }
.trust-row, .nav a, .action-link, .job-pills a { font-weight: 600; }
h2, .section-heading h2 { font-size: clamp(24px, 2.6vw, 32px); line-height: 1.35; }
.eyebrow { font-size: 13px; letter-spacing: .06em; text-transform: none; }
.section-heading { align-items: end; gap: 16px; }
.section-note { color: var(--muted); font-size: 15px; }
.topbar { font-size: 13px; }
.button, .line-button { font-size: 16px; }
.service-grid strong { font-size: 17px; }
.service-grid small { font-size: 14.5px; }
.spotlight-card h3 { font-size: 20px; }
.spotlight-card p, .about-grid p, .about-grid li, .job-copy p:not(.eyebrow), .knowledge-copy p:not(.eyebrow), .contact-card p:not(.eyebrow), .footer-brand p { font-size: 16px; line-height: 1.7; }
.job-copy h2, .contact-card h2, .knowledge-copy h2 { font-size: clamp(24px, 2.8vw, 34px); }
.footer-col a, .footer-contact li { font-size: 15px; }

/* ---------- หัวเว็บ: ช่องค้นหาเด่น เมนูหมวดชัด ---------- */
.search { height: 52px; border: 2px solid var(--green); }
.search input { font-size: 16px; }
.search button { font-size: 16px; padding: 0 24px; }
.nav a { font-size: 15.5px; }
.action-link { font-size: 15.5px; }

/* ---------- ป้ายต้อนรับ (editorial banner) ---------- */
.editorial-banner { padding: 20px 0 6px; }
.editorial-banner-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) 1.1fr;
  align-items: stretch;
  min-height: 420px;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #0b3a22;
  color: #fff;
  box-shadow: var(--shadow-md);
}
.editorial-banner-picture { position: absolute; inset: 0; margin: 0; }
.editorial-banner-picture img { width: 100%; height: 100%; object-fit: cover; object-position: right center; display: block; }
/* ไล่เฉดเขียวเข้มทับซ้ายให้ตัวหนังสือขาวอ่านได้ (ต้นฉบับซ้ายเป็นใบไม้ทึบอยู่แล้ว) */
.editorial-banner-picture::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(6, 40, 24, .94) 0%, rgba(6, 40, 24, .80) 34%, rgba(6, 40, 24, .18) 60%, rgba(6, 40, 24, 0) 76%); }
.editorial-banner-note { position: absolute; right: 12px; bottom: 10px; font-size: 11.5px; color: rgba(255, 255, 255, .8); background: rgba(0, 0, 0, .35); padding: 3px 9px; border-radius: 999px; z-index: 2; }
.editorial-banner-copy { position: relative; z-index: 1; padding: clamp(28px, 4vw, 52px); display: grid; align-content: center; gap: 14px; max-width: 620px; }
.editorial-banner-kicker { margin: 0; font-size: 13px; letter-spacing: .04em; color: var(--yellow); font-weight: 600; }
.editorial-banner-copy h1 { margin: 0; font-size: clamp(28px, 3.4vw, 44px); line-height: 1.3; letter-spacing: -.01em; color: #fff; max-width: none; text-wrap: balance; }
.editorial-banner-text { margin: 0; font-size: clamp(16px, 1.2vw, 17.5px); line-height: 1.7; color: rgba(255, 255, 255, .9); max-width: 520px; }
.editorial-banner-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.editorial-banner-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.editorial-banner-links a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; font-size: 15px; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); text-decoration: none; }
.editorial-banner-links a:hover { background: rgba(255, 255, 255, .22); border-color: #fff; }
.nowrap { white-space: nowrap; }

/* ฮีโร่เดิม (หลังบ้านแก้ข้อความได้) ลดเป็นบล็อกต้อนรับ/แนะนำร้าน ใต้โปรโมชั่น */
.hero { min-height: 0; padding: 56px 0; }
.hero .hero-title { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.32; letter-spacing: -.01em; margin: 0 0 16px; max-width: 720px; color: #fff; }

/* ---------- แถบแบรนด์ ---------- */
.brands-section { padding: clamp(40px, 5vw, 64px) 0; background: #fff; }
.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
/* หมวด 7 หมวดให้อยู่แถวเดียวบนจอกว้าง ไม่เหลือใบเดียวตกแถว */
.category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* หน้าแค็ตตาล็อก: ลดช่องว่างระหว่างหัวเรื่องกับกล่องหมวด (เดิมเว้นซ้อนกัน ~170px) */
.catalog-content.section { padding-top: 28px; }
.brand-grid > a {
  min-height: 92px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 16px;
  color: var(--ink-2);
  text-decoration: none;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}
.brand-grid > a:hover, .brand-grid > a:focus-visible { border-color: var(--green-2); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.brand-grid > a img { display: block; width: 100%; max-width: 132px; height: 44px; object-fit: contain; }
.brand-grid > a.text-only span { text-align: center; line-height: 1.3; }

/* ---------- การ์ดหมวด / สินค้า / แค็ตตาล็อก / หน้ารายละเอียด ---------- */
.category-card strong { font-size: 17px; }
.category-card small { font-size: 14.5px; }
.admin-product-info strong { font-size: 16.5px; line-height: 1.45; }
.admin-product-info small { font-size: 13px; }
.admin-product-info span { font-size: 16px; }
.catalog-card h2 { font-size: 17.5px; line-height: 1.4; }
.catalog-card p { font-size: 15px; line-height: 1.6; }
.catalog-card .catalog-stock { font-size: 16px; }
.catalog-card a { font-size: 15.5px; }
.catalog-intro h1 { font-size: clamp(28px, 3.6vw, 44px); line-height: 1.3; }
.catalog-intro p:last-child { font-size: 17px; }
.filter-chip { font-size: 15px; }
.catalog-count { font-size: 15px; }
.product-detail-copy h1 { font-size: clamp(24px, 3vw, 32px); line-height: 1.35; }
.detail-model, .product-detail-copy p { font-size: 16.5px; line-height: 1.7; }
.detail-status strong { font-size: 24px; }
.detail-status small { font-size: 13.5px; }
.detail-notes li { font-size: 15px; }
.cart-item h3, .cart-item strong { font-size: 16.5px; }
.order-summary strong { font-size: 22px; }

/* ---------- แท็บเล็ต / มือถือ ---------- */
@media (max-width: 1024px) {
  .brand-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  body { font-size: 16px; }
  .editorial-banner { padding: 12px 0 4px; }
  .editorial-banner-inner { display: block; min-height: 0; }
  /* มือถือ: ภาพอยู่บน (ตัดส่วนขวาที่มีแปลงผัก) ข้อความอยู่ใต้ภาพบนพื้นเขียวเข้ม */
  .editorial-banner-picture { position: relative; aspect-ratio: 4 / 3; max-height: 260px; overflow: hidden; }
  .editorial-banner-picture img { object-position: center; }
  .editorial-banner-picture::after { background: linear-gradient(180deg, rgba(6, 40, 24, 0) 55%, rgba(6, 40, 24, .9) 100%); }
  .editorial-banner-copy { padding: 18px 18px 22px; gap: 10px; max-width: none; }
  .editorial-banner-copy h1 { font-size: clamp(26px, 7vw, 30px); }
  .editorial-banner-text { font-size: 16px; }
  .editorial-banner-actions .button { flex: 1 1 45%; }
  .search { height: 48px; }
  .brand-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .brand-grid > a { min-height: 72px; padding: 10px 12px; font-size: 14px; }
  .brand-grid > a img { height: 34px; }
  .hero .hero-title { font-size: clamp(24px, 7vw, 30px); }
  .catalog-card h2 { font-size: 16px; }
  .detail-status strong { font-size: 22px; }
}
@media (max-width: 420px) {
  .editorial-banner-actions .button { flex: 1 1 100%; }
}


/* =====================================================================
   รอบ 21 ก.ย. 2569 — ขัดเงาหน้าสินค้า/ตะกร้า + ปิดจุดที่ตรวจพบบน viewport จริง 375/390/768/1440
   (ตรวจด้วย Chrome device emulation ผ่าน DevTools Protocol ไม่ใช่ iframe · ผลใน design-v3-2026-09-21/)
   ===================================================================== */

/* ---------- พื้นที่แตะที่ตรวจพบต่ำกว่า 32px ---------- */
.action-link { display: inline-flex; align-items: center; min-height: 44px; }                       /* ☎ / 🛒 บนหัวเว็บ (เดิม 26px) */
.subcategory-directory a { display: inline-flex; align-items: center; min-height: 40px; }           /* ลิงก์หมวดย่อยหน้าแค็ตตาล็อก (เดิม 27px) */
.product-breadcrumb a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 2px; } /* เส้นทางหน้า (เดิม 22px) */
.cart-title > a { min-height: 44px; }

/* ---------- ตะกร้า: ราคาต่อหน่วย / รวมต่อรายการ / ปุ่มลบ ---------- */
.cart-item { grid-template-columns: 110px 1fr auto auto; gap: 14px 16px; padding: 14px; align-items: center; }
.cart-item > div { min-width: 0; }
.cart-item h2 { line-height: 1.4; overflow-wrap: break-word; }
.cart-item p { font-size: 14.5px; }
.cart-item strong { display: block; color: var(--green); font-size: 20px; margin-top: 4px; }           /* ราคาต่อหน่วย ฿8,900 */
.cart-line-total { display: block; color: var(--muted); font-size: 14.5px; margin-top: 2px; }          /* รวม ฿17,800 (แสดงเมื่อจำนวน > 1) */
.cart-item label { display: grid; gap: 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.cart-item input { width: 84px; min-height: 44px; padding: 8px 10px; font-size: 16px; text-align: center; }
.cart-item button { min-height: 44px; min-width: 64px; padding: 0 14px; border: 1.5px solid #e2b4b4; border-radius: 10px; background: #fff; color: #a12525; font-size: 15px; }
.cart-item button:hover { background: #fdf1f1; border-color: #a12525; }
.order-summary > div { align-items: baseline; }
.order-summary strong { font-size: 20px; text-align: right; }
.order-summary #summarySubtotal { font-size: 24px; color: var(--green); }
.member-benefit-summary strong { font-size: 17px; line-height: 1.5; }

/* ---------- หน้ารายละเอียดสินค้า ---------- */
.product-detail-image img { object-fit: contain; background: #fff; }
.detail-status { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-status strong { line-height: 1.3; }
.quantity-row input { min-height: 44px; width: 96px; font-size: 16px; text-align: center; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.detail-actions .button { min-height: 48px; }

/* ---------- มือถือ ---------- */
@media (max-width: 800px) {
  .cart-item { grid-template-columns: 84px 1fr; grid-template-rows: auto auto; row-gap: 12px; }
  .cart-item img { width: 84px; height: 84px; }
  .cart-item label { grid-column: 1 / 2; grid-row: 2; }
  .cart-item button { grid-column: 2 / 3; grid-row: 2; justify-self: end; }
  .cart-item input { width: 84px; }
  .cart-title { flex-direction: column; align-items: flex-start; gap: 6px; }
  .detail-actions .button { flex: 1 1 100%; }
}
@media (max-width: 420px) {
  .detail-status { grid-template-columns: 1fr; }
}

/* ---------- ตัวเลือกหมวดหลัก → หมวดย่อย บนหน้าแค็ตตาล็อก (26 ก.ย. 2569) ---------- */
.catalog-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 16px; }
.catalog-filter-field { display: grid; gap: 6px; min-width: 0; flex: 1 1 260px; max-width: 360px; }
.catalog-filter-field > span { font-size: 13.5px; font-weight: 600; color: var(--muted); }
.catalog-select { position: relative; display: flex; align-items: center; }
.catalog-select::after {
  content: "";
  position: absolute;
  right: 16px;
  width: 9px; height: 9px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-3px) rotate(45deg);
  pointer-events: none;
}
.catalog-select select {
  appearance: none;
  width: 100%;
  min-height: 48px;
  padding: 10px 42px 10px 14px;
  font: inherit;
  font-size: 16px;                       /* 16px กันเบราว์เซอร์มือถือซูมเองตอนแตะ */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  cursor: pointer;
  text-overflow: ellipsis;
}
.catalog-select select:hover { border-color: var(--green-2); }
.catalog-select select:focus-visible { outline: 2px solid var(--green-2); outline-offset: 2px; }
.catalog-select select:disabled { background: var(--cream); color: var(--muted); cursor: not-allowed; }
.catalog-filter-reset {
  min-height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
}
.catalog-filter-reset:hover { border-color: var(--green); color: var(--green); }
@media (max-width: 760px) {
  .catalog-filter { gap: 10px; }
  .catalog-filter-field { flex: 1 1 100%; max-width: none; }
  .catalog-filter-reset { flex: 1 1 100%; }
  /* แถวปุ่มหมวดเดิมยาวหลายบรรทัดบนมือถือ — ให้ dropdown ทำหน้าที่แทน ปุ่มยังอยู่ในหน้าเว็บและลิงก์เดิมยังใช้ได้ */
  .catalog-toolbar { display: none; }
}
