/* ============================================================
   UX/UI ปรับปรุงหน้าแรก — 2026-11-20
   โหลดต่อจาก main-css.css (ทับเฉพาะจุดที่ปรับ ไม่แก้ไฟล์เดิม)
   ============================================================ */

/* ฟอนต์: ไฟล์ .woff ใหม่ ถูกชี้จาก main-css.css (แทน .ttf) */

/* ---------- ให้ทั้งหน้าเลื่อนแบบปกติ (เดิม body เป็นตัวเลื่อน ทำให้มือถือเลื่อนไม่ลื่น) ---------- */
html, body { height: auto; }
html { overflow-x: hidden; }
body { overflow-x: clip; overflow-y: visible; }

/* ---------- โลโก้บัตร Payso (เดิมหดเหลือ 0px บนมือถือ) ---------- */
.cpn-logo { max-width: 100%; }
.cpn-logo img { width: auto !important; max-width: none !important; aspect-ratio: 1054 / 382; } /* กันรูป lazy กว้าง 0px แล้วไม่ยอมโหลด */

/* ---------- หัวข้อใหญ่ ไม่ให้เหลือคำเดียวในบรรทัดสุดท้าย ---------- */
h1, h2 { text-wrap: balance; }

/* ---------- ปุ่ม/ลิงก์เล็ก ให้กดง่ายขึ้น (อย่างน้อย ~40px) ---------- */
#main-th .breadcrumb .badge,
#main-en .breadcrumb .badge { display: inline-flex; align-items: center; min-height: 36px; padding: .5rem .95rem; font-size: .85rem; }
footer a.small { display: inline-block; padding: .55rem 0; }
#policy-th .pol-contact .btn { min-height: 44px; }

/* ============================ มือถือ ============================ */
@media (max-width: 575.98px) {
    /* ตัวหนังสือเล็กสุด 14px */
    small, .small { font-size: .875rem !important; }
    section .badge.rounded-full { font-size: .82rem !important; }
    section .badge.rounded-pill { font-size: .78rem !important; }

    /* ระยะห่างแต่ละส่วนกระชับขึ้น */
    section > .container.py-5 { padding-top: 1.75rem !important; padding-bottom: 1.75rem !important; }
    section.py-4 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
    section .text-center.mb-5 { margin-bottom: 1.5rem !important; }
    section h2 { font-size: 1.45rem; }

    /* ---- Hero: ให้เห็นปุ่มสั่งจองในจอแรก ---- */
    #main-th > .container, #main-en > .container { padding-top: 4.25rem !important; padding-bottom: 1.5rem !important; margin-top: 1rem !important; }
    #main-th h1, #main-en h1 { font-size: 1.6rem !important; line-height: 1.35 !important; margin-bottom: .75rem !important; }
    #main-th h1 + p, #main-en h1 + p { font-size: .95rem !important; margin-bottom: 1rem; }
    #main-th .badge.py-1-5, #main-en .badge.py-1-5 { margin-bottom: .9rem !important; }
    #main-th .col-lg-5 img, #main-en .col-lg-5 img { max-width: 210px; height: auto; margin-top: .5rem; }

    /* ---- ขั้นตอน 4 ข้อ: เป็นแถวแนวนอน ไอคอนซ้าย ข้อความขวา ---- */
    #step-th .row, #step-en .row { --bs-gutter-y: .75rem; }
    #step-th .card-step, #step-en .card-step { padding-top: 0 !important; }
    #step-th .card-step .card-body, #step-en .card-step .card-body {
        display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; align-items: start; text-align: left !important; padding: 16px 34px 14px 14px;
    }
    #step-th .card-step .step-icon, #step-en .card-step .step-icon { grid-row: 1 / span 2; margin: 0 !important; width: 56px; height: 56px; }
    #step-th .card-step .step-icon img, #step-en .card-step .step-icon img { width: 34px; height: 34px; max-width: none; }
    #step-th .card-step .card-title, #step-en .card-step .card-title { font-size: 1.05rem !important; margin: 2px 0 4px; }
    #step-th .card-step .card-text, #step-en .card-step .card-text { font-size: .9rem !important; margin: 0; }
    #step-th .card-step .step-number, #step-en .card-step .step-number { font-size: 1.6rem !important; top: 8px !important; right: 12px !important; }

    /* ---- ช่องทางชำระเงิน: การ์ดเตี้ยลง ไอคอนอยู่ข้างหัวข้อ ---- */
    #card-payment .row.g-4 { --bs-gutter-y: .75rem; }
    #card-payment .cpn-pay-card { padding: 16px; display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; }
    #card-payment .cpn-pay-card .cpn-icon { grid-row: 1 / span 2; margin: 0 !important; width: 40px; height: 40px; font-size: 19px; }
    #card-payment .cpn-pay-card h3 { margin: 0; font-size: 1.05rem; }
    #card-payment .cpn-pay-card > p, #card-payment .cpn-pay-card > .cpn-logo { grid-column: 1 / -1; }
    #card-payment .cpn-pay-card > p.cpn-muted { grid-column: 2; margin: 2px 0 0 !important; font-size: .9rem; }
    #card-payment .cpn-pay-card-hi > p.small { margin: 8px 0 0 !important; }
    #card-payment .cpn-pay-card-hi > .cpn-logo { margin-top: 10px; justify-self: start; }
    #card-payment .p-4.p-lg-5 { padding: 1.1rem !important; }
    #card-payment .p-4.p-lg-5 .row.g-4 { --bs-gutter-y: .6rem; margin-bottom: 1rem !important; }
    #card-payment .cpn-step-no { width: 28px; height: 28px; font-size: .9rem; }
    #card-payment .p-4.p-lg-5 p { font-size: .92rem; }

    /* ---- พื้นที่ให้บริการ: รูปเต็มกรอบ ---- */
    #province-th .card .position-relative, #province-en .card .position-relative { height: 190px !important; }
    #province-th .card .position-relative img, #province-en .card .position-relative img { width: 100% !important; height: 100% !important; max-height: none; object-fit: cover; display: block; }
    #province-th .card .card-body, #province-en .card .card-body { padding: 1rem 1.15rem 1.15rem !important; }
    #province-th .card h3, #province-en .card h3 { white-space: nowrap; }
    #province-th .card .badge, #province-en .card .badge { white-space: nowrap; }

    /* ---- หน้าเชียงใหม่/กรุงเทพ: การ์ดโซนพื้นที่ กระชับ ป้ายย่านเรียงต่อกัน ---- */
    #province-th .row > .col > .review-card, #province-en .row > .col > .review-card { padding: 1.1rem !important; }
    #province-th .review-card .social-icon, #province-en .review-card .social-icon { width: 56px !important; height: 56px !important; margin-bottom: .6rem !important; }
    #province-th .review-card .social-icon i, #province-en .review-card .social-icon i { font-size: 28px !important; }
    #province-th .review-card > h2, #province-en .review-card > h2 { font-size: 1.25rem; margin-bottom: .75rem !important; }
    #province-th .review-card .card.card-body, #province-en .review-card .card.card-body { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; padding: .75rem; }
    #province-th .review-card .card.card-body > .badge, #province-en .review-card .card.card-body > .badge { margin: 0 !important; padding: .45rem .85rem !important; font-size: .85rem !important; }

    /* ---- นโยบาย: การ์ดสรุปเป็นแถวแนวนอน (ไอคอนซ้าย ข้อความขวา) ไม่ให้ตกบรรทัด ---- */
    body #policy-th > .container > .row.row-cols-1, body #policy-en > .container > .row.row-cols-1 { --bs-gutter-y: .75rem; margin-bottom: 1.5rem !important; }
    body #policy-th .pol-card .card-body, body #policy-en .pol-card .card-body { padding: 14px 16px !important; gap: 14px !important; align-items: center; }
    body #policy-th .pol-icon, body #policy-en .pol-icon { width: 2.8rem; height: 2.8rem; font-size: 1.3rem; border-radius: .85rem; }
    body #policy-th .pol-card h3, body #policy-en .pol-card h3 { font-size: 1rem !important; margin-bottom: 0 !important; }
    body #policy-th .pol-big, body #policy-en .pol-big { font-size: 1.1rem; line-height: 1.35; margin-bottom: 2px !important; }
    body #policy-th .pol-card p, body #policy-en .pol-card p { font-size: .85rem !important; line-height: 1.45; }

    /* ---- นโยบาย: ขั้นตอนยกเลิก เป็นแถว เลขซ้าย ข้อความขวา ป้ายไม่ตกบรรทัด ---- */
    body #policy-th .pol-panel, body #policy-en .pol-panel { padding: 1.1rem !important; margin-bottom: 1.25rem !important; }
    body #policy-th .pol-panel .row, body #policy-en .pol-panel .row { --bs-gutter-y: .6rem; }
    body #policy-th .pol-stage, body #policy-en .pol-stage { display: grid; grid-template-columns: 2.1rem 1fr; column-gap: 12px; align-items: start; padding: .85rem .95rem; }
    body #policy-th .pol-stage .pol-no, body #policy-en .pol-stage .pol-no { grid-row: 1 / span 3; margin: 0; width: 2rem; height: 2rem; }
    body #policy-th .pol-stage h3, body #policy-en .pol-stage h3 { font-size: 1rem; margin: 3px 0 2px; }
    body #policy-th .pol-stage p, body #policy-en .pol-stage p { font-size: .85rem; margin-bottom: .45rem; }
    body #policy-th .pol-fee, body #policy-en .pol-fee { justify-self: start; white-space: nowrap; font-size: .8rem; padding: .25rem .7rem; }
    body #policy-th .pol-contact, body #policy-en .pol-contact { padding: 1.25rem !important; }
    body #policy-th .pol-contact h3, body #policy-en .pol-contact h3 { font-size: 1.05rem !important; }
    #step-en .card-step .card-title { font-size: .98rem !important; }
    body #policy-th, body #policy-en { padding-bottom: 4.5rem !important; }

    /* ---- ป้ายคุกกี้: เป็นแถบเตี้ยด้านล่าง ไม่บังครึ่งจอ ---- */
    #cookie-consent { padding: 12px 14px !important; left: 8px !important; right: 8px !important; bottom: 8px !important; border-radius: 16px !important; }
    #cookie-consent .cookie-icon { display: none; }
    #cookie-consent .col-md-auto.mb-3 { display: none; }
    #cookie-consent h5 { font-size: .95rem; margin-bottom: 2px !important; }
    #cookie-consent p.small { font-size: .78rem !important; line-height: 1.45; }
    #cookie-consent .col-md-auto.mt-3 { margin-top: .6rem !important; }
    #cookie-consent .btn { padding: .45rem 1.1rem; font-size: .9rem; }
}
