@charset "UTF-8";

/* =========================================
   1. ตัวแปรสีหลัก (Color Palette)
   ========================================= */
:root {
    --bg-cream: #FDF9F1;
    --dark-green: #155A46;
    --light-green: #E8F2EF;
    --orange: #F37D33;
    --yellow: #F7B526;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #FFFFFF;
}

/* =========================================
   2. ตั้งค่าพื้นฐาน (Global Styles)
   ========================================= */
body { 
    font-family: 'Prompt', sans-serif; 
    background-color: var(--bg-cream); 
    color: var(--text-dark); 
    margin: 0; 
    padding: 0; 
    overflow-x: hidden; 
}

h1, h2, h3, h4, .cute-font { 
    font-family: 'Itim', cursive; 
    font-weight: normal; 
}

a { text-decoration: none; }
img { max-width: 100%; height: auto; }

/* =========================================
   3. แถบนำทาง (Navbar)
   ========================================= */
.navbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: var(--bg-cream); position: relative; z-index: 10;}
.logo-nav { display: flex; align-items: center; gap: 10px; font-size: 1.5rem; color: var(--dark-green); font-weight: bold; }
.logo-nav img { height: 40px; width: auto; }
.nav-links { display: flex; gap: 20px; }
.nav-links a { color: var(--text-dark); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: var(--orange); }

/* Buttons & Titles */
.btn-primary { background: var(--yellow); color: var(--dark-green); padding: 12px 30px; border-radius: 30px; font-size: 1.2rem; font-family: 'Itim', cursive; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: none; cursor: pointer; transition: 0.3s; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 5px 15px rgba(247, 181, 38, 0.4); }
.btn-orange { background: var(--orange) !important; color: var(--white) !important; }
.btn-orange:hover { box-shadow: 0 5px 15px rgba(243, 125, 51, 0.4) !important; }

.section-title { text-align: center; font-size: 2.2rem; color: var(--dark-green); margin-bottom: 30px; display: flex; align-items: center; justify-content: center; gap: 15px; margin-top: 0;}
.section-title::before, .section-title::after { content: '🌿'; font-size: 1.5rem; }
.title-white { color: var(--white) !important; }

/* =========================================
   4. ส่วน Hero (ส่วนบนสุด)
   ========================================= */
.hero { position: relative; min-height: 500px; display: flex; justify-content: center; align-items: center; padding: 60px 5%; text-align: center; background-color: var(--bg-cream); }
.hero-bg { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; z-index: 0; }
.hero-text { position: relative; z-index: 2; max-width: 600px; }
.hero h1 { font-size: 3.5rem; color: var(--dark-green); line-height: 1.2; margin: 0 0 15px 0; text-shadow: 0 2px 10px rgba(253, 249, 241, 0.9); }
.hero h1 span { color: var(--orange); }
.hero p { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 30px; line-height: 1.6; font-weight: 500; text-shadow: 0 2px 10px rgba(253, 249, 241, 0.9); }

/* =========================================
   5. ส่วนประโยชน์ดีๆ (Benefits)
   ========================================= */
.benefits { padding: 40px 5% 50px; position: relative; z-index: 2; background-color: var(--bg-cream); }
.benefits .grid-4 { max-width: 900px; margin: 0 auto; } 
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.card-light { background: var(--light-green); padding: 30px 20px; border-radius: 20px; text-align: center; box-shadow: 0 5px 15px rgba(0,0,0,0.02); }
.card-light img { height: 80px; width: auto; margin-bottom: 15px; }
.card-light h3 { font-family: 'Prompt', sans-serif; font-size: 1.1rem; margin: 0 0 10px; font-weight: 600; }
.card-light p { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.5; }

/* =========================================
   6. ส่วนตัวอย่างภาพ (Preview)
   ========================================= */
.preview-sec { background: var(--dark-green); padding: 50px 5% 60px; text-align: center; position: relative; color: var(--white); }
.preview-sec .section-title { color: var(--yellow); }
.preview-gallery { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; margin: 0 auto 40px; max-width: 1200px; } 
.preview-gallery img { width: 18%; min-width: 180px; border-radius: 10px; border: 5px solid var(--white); box-shadow: 0 10px 20px rgba(0,0,0,0.2); transition: 0.3s;} 
.preview-gallery img:hover { transform: scale(1.05); }

/* =========================================
   7. ทำไมพ่อแม่ถึงชอบ (Why Parents Love)
   ========================================= */
.why-sec { padding: 60px 5%; position: relative; background-color: var(--bg-cream); }
.why-sec .grid-4 { max-width: 900px; margin: 0 auto; }
.card-why { text-align: center; padding: 10px; }
.card-why img { height: 80px; width: auto; margin-bottom: 15px; }
.card-why h3 { color: var(--orange); font-family: 'Prompt', sans-serif; font-size: 1.1rem; margin: 0 0 10px; font-weight: 600; }
.card-why p { font-size: 0.9rem; color: var(--text-light); margin: 0; line-height: 1.5; }
.decor-giraffe { position: absolute; right: 0; bottom: -50px; width: 180px; }

/* =========================================
   8. วิธีใช้งาน (Steps)
   ========================================= */
.steps-sec { padding: 40px 5% 80px; position: relative; background: var(--bg-cream); text-align: center; }
.steps-container { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.step-box { background: var(--white); padding: 30px 20px; border-radius: 20px; width: 200px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); position: relative; }
.step-num { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--orange); color: var(--white); width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-family: 'Prompt'; }
.step-box img { height: 70px; width: auto; margin-bottom: 15px; }
.step-box h3 { margin: 0 0 10px; color: var(--dark-green); }
.step-box p { font-size: 0.9rem; margin: 0; color: var(--text-light); }
.step-arrow { color: var(--yellow); font-size: 2rem; font-weight: bold; }
.decor-monkey { position: absolute; left: 5%; top: 50px; width: 150px; }

/* =========================================
   9. รีวิว (Reviews)
   ========================================= */
.review-sec { background: var(--dark-green); padding: 60px 5%; text-align: center; }
.review-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; max-width: 900px; margin: 0 auto; }
.review-card { background: var(--white); padding: 40px 20px 20px; border-radius: 20px; width: 280px; box-sizing: border-box; position: relative; margin-top: 40px; box-shadow: 0 10px 20px rgba(0,0,0,0.1);} 
.review-card img { width: 80px; height: 80px; border-radius: 50%; position: absolute; top: -40px; left: 50%; transform: translateX(-50%); border: 4px solid var(--white); object-fit: cover;}
.stars { color: var(--yellow); font-size: 1.2rem; margin-bottom: 10px; }
.review-card p { font-size: 0.95rem; color: var(--text-light); font-style: italic; margin-bottom: 15px; }
.review-card h4 { font-family: 'Prompt'; font-size: 0.9rem; color: var(--text-dark); margin: 0; font-weight: 600; }

/* =========================================
   10. แพ็กเกจ (Pricing) - ล็อกกรอบ 900px และดันข้อความหลบการ์ตูน
   ========================================= */
.pricing-sec { background-color: var(--bg-cream); padding: 80px 5%; }
.pricing-wrapper { max-width: 900px; margin: 0 auto; position: relative; } /* ล็อกกรอบใหญ่ 900px */
.decor-lion { position: absolute; left: 0; bottom: -20px; width: 220px; z-index: 3; } /* สิงโตชิดซ้ายสุดในกรอบ */
.decor-bird { position: absolute; right: 0; top: -40px; width: 120px; z-index: 3; } /* นกชิดขวาสุดในกรอบ */

.pricing-box { background: var(--white); border-radius: 30px; padding: 40px 40px 40px 230px; box-sizing: border-box; box-shadow: 0 15px 40px rgba(0,0,0,0.08); display: flex; width: 100%; border: 3px solid var(--light-green); position: relative; z-index: 2; } /* padding-left 230px ดันข้อความหลบสิงโต */

.price-left { flex: 1; padding-right: 30px; border-right: 2px dashed #eee; }
.price-right { flex: 1; padding-left: 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center;}
.badge { background: var(--orange); color: var(--white); padding: 5px 15px; border-radius: 20px; font-size: 1rem; display: inline-block; margin-bottom: 10px; }
.pricing-box h2 { color: var(--dark-green); font-size: 2.2rem; margin: 0 0 5px; }
.price-subtitle { font-size: 1.2rem; color: var(--orange); font-weight: 600; margin-top: 0; font-family: 'Prompt';}
.pricing-box ul { list-style: none; padding: 0; margin: 20px 0; }
.pricing-box li { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; color: var(--text-light); font-size: 1rem; }
.pricing-box li::before { content: '✔️'; color: var(--dark-green); }
.old-price { text-decoration: line-through; color: #999; font-size: 1.1rem; }
.special-text { color: var(--text-dark); font-weight: 600; margin-top: 5px;}
.new-price { color: var(--orange); font-size: 4rem; font-weight: bold; line-height: 1; margin: 5px 0 15px; }
.new-price span { font-size: 1.5rem; font-weight: normal; }
.secure-text { font-size: 0.8rem; color: #888; margin-top: 15px; }

/* =========================================
   11. คำถามที่พบบ่อย (FAQ Accordion)
   ========================================= */
.faq-sec { background-color: var(--white); padding: 60px 5%; }
.faq-wrapper { max-width: 900px; margin: 0 auto; position: relative; } /* ล็อกกรอบใหญ่ 900px */
.decor-elephant { position: absolute; left: 0; bottom: -20px; width: 220px; z-index: 3; } /* ช้างชิดซ้ายสุดในกรอบ */

.faq-box { background: var(--white); border-radius: 30px; padding: 40px 40px 40px 230px; box-sizing: border-box; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.05); border: 2px solid var(--light-green); position: relative; z-index: 2;} /* padding-left 230px ดันข้อความหลบช้าง */

.faq-item { margin-bottom: 10px; border-radius: 10px; overflow: hidden; border: 1px solid #eee; background: var(--bg-cream); transition: 0.3s; }
.faq-question { display: flex; justify-content: space-between; align-items: center; padding: 15px 20px; font-weight: 600; color: var(--dark-green); cursor: pointer; }
.faq-question .arrow { transition: transform 0.3s; font-size: 0.8rem; }
.faq-answer { max-height: 0; padding: 0 20px; overflow: hidden; transition: all 0.3s ease-out; color: var(--text-light); font-size: 0.95rem; line-height: 1.6; }
.faq-answer p { margin: 0; padding-bottom: 15px; }
.faq-item.active { background: var(--light-green); border-color: #d1e5df; }
.faq-item.active .faq-answer { max-height: 300px; } 
.faq-item.active .arrow { transform: rotate(180deg); }

/* =========================================
   12. แจ้งชำระเงิน (Checkout) 
   ========================================= */
.checkout-sec { background-color: var(--light-green); padding: 80px 5%; display: flex; justify-content: center; position: relative;}
.checkout-box { background: var(--white); border-radius: 30px; padding: 40px; max-width: 900px; width: 100%; box-shadow: 0 15px 40px rgba(243, 125, 51, 0.15); border: 4px dashed var(--orange); position: relative; z-index: 2;} 

.payment-info-horizontal { background: var(--light-green); border-radius: 15px; padding: 25px; display: flex; justify-content: space-between; align-items: center; border: 2px solid var(--dark-green); margin-bottom: 25px; gap: 20px;}
.bank-details-left { flex: 1; text-align: left; }
.bank-header { display: flex; align-items: center; gap: 15px; margin-bottom: 10px; }

.bank-logo-small { width: 50px !important; height: 50px !important; object-fit: contain; background: var(--white); border-radius: 50%; padding: 5px; border: 1px solid #ccc; }
.qr-right { display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--white); padding: 15px; border-radius: 10px; border: 1px dashed #ccc; width: 150px;}
.qr-img { width: 120px !important; height: 120px !important; object-fit: cover; }

.bank-header h3 { margin: 0; color: var(--dark-green); font-size: 1.5rem; font-family: 'Prompt', sans-serif; font-weight: 600;}
.acc-num { font-size: 1.1rem; margin: 8px 0; display: flex; align-items: center; gap: 10px;}
.btn-copy { background: var(--white); border: 1px solid #ccc; padding: 4px 10px; border-radius: 5px; cursor: pointer; font-family: inherit; font-size: 0.85rem; transition: 0.2s; color: var(--text-dark);}
.btn-copy:hover { background: #eee; }
.acc-name { margin: 8px 0; color: var(--text-light); }
.payment-note { background: var(--white); color: var(--orange); padding: 5px 15px; border-radius: 20px; display: inline-block; margin-top: 10px; font-weight: bold; border: 1px solid var(--orange); font-size: 0.9rem;}
.qr-text { font-size: 0.85rem; color: var(--text-light); margin: 0;}
.btn-save-qr { background: var(--dark-green); color: var(--white); border: none; padding: 6px 15px; border-radius: 5px; font-family: inherit; font-size: 0.85rem; cursor: pointer; transition: 0.2s; width: 100%;}
.btn-save-qr:hover { background: #0f4031; }

.upload-group { margin-bottom: 25px; display: flex; align-items: center; gap: 15px;}
.upload-group label { font-weight: 600; color: var(--dark-green); white-space: nowrap;}
.upload-group input[type="file"] { padding: 10px; background: var(--bg-cream); border: 1px dashed var(--dark-green); border-radius: 8px; cursor: pointer; flex: 1; font-family: inherit;}

.form-horizontal { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; align-items: end; }
.form-group-inline { margin-bottom: 0; }
.form-group-inline label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--dark-green); font-size: 0.9rem;}
.form-group-inline input { width: 100%; padding: 12px; border: 2px solid #ccc; border-radius: 10px; font-family: inherit; font-size: 1rem; box-sizing: border-box; transition: 0.2s;}
.form-group-inline input:focus { border-color: var(--orange); outline: none; }

.btn-submit-inline { width: 100%; background: var(--orange); color: var(--white); border: none; padding: 12px; font-size: 1.25rem; border-radius: 10px; font-family: 'Itim'; cursor: pointer; transition: 0.3s; height: 48px; box-shadow: 0 4px 10px rgba(243, 125, 51, 0.2);}
.btn-submit-inline:hover { background: #e06c2b; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(243, 125, 51, 0.4); }
.btn-submit-inline:disabled { background: #ccc; cursor: not-allowed; transform: none; box-shadow: none; }

/* =========================================
   13. ส่วนท้าย (Footer)
   ========================================= */
.footer { background: var(--dark-green); padding: 60px 5% 20px; position: relative; }
.footer::before {
    content: "";
    position: absolute;
    top: -19px; 
    left: 0;
    width: 100%;
    height: 20px;
    background: radial-gradient(circle at 10px 0, transparent 10px, var(--dark-green) 11px);
    background-size: 20px 20px;
    background-repeat: repeat-x;
}

.footer * { font-family: 'Itim', cursive !important; color: var(--white) !important; }

.footer-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 30px; max-width: 1000px; margin: 0 auto 40px; }
.footer-col h3 { font-size: 1.8rem; margin-top: 0; margin-bottom: 10px;}
.footer-col p { font-size: 1.1rem; line-height: 1.6; margin: 5px 0; }
.love-text { font-size: 1.3rem; margin-top: 15px; color: var(--yellow) !important; }
.social-links { display: flex; gap: 10px; margin-top: 15px; }
.social-links a { background: var(--white) !important; color: var(--dark-green) !important; width: 40px; height: 40px; display: flex; justify-content: center; align-items: center; border-radius: 50%; text-decoration: none; font-size: 1.2rem; transition: 0.2s;}
.social-links a:hover { transform: scale(1.1); }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 20px; font-size: 1rem; opacity: 0.8;}

/* =========================================
   14. Loading Screen
   ========================================= */
.overlay-loader { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(253, 249, 241, 0.9); z-index: 9999; justify-content: center; align-items: center; flex-direction: column; }
.spinner { border: 6px solid #f3f3f3; border-top: 6px solid var(--orange); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* =========================================
   15. Mobile Responsive
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero-bg { opacity: 0.2; } 
    .hero-text { background: rgba(253, 249, 241, 0.7); padding: 20px; border-radius: 20px; }
    .decor-giraffe, .decor-monkey, .decor-lion, .decor-elephant, .decor-bird { display: none; }
    
    /* รีเซ็ต Padding ของกล่องในมือถือ */
    .pricing-box, .faq-box { max-width: 100%; }
    .pricing-box { padding: 30px 20px; flex-direction: column; }
    .price-left { border-right: none; border-bottom: 2px dashed #eee; padding-right: 0; padding-bottom: 20px; margin-bottom: 20px; }
    .price-right { padding-left: 0; }
    .faq-box, .checkout-box { padding: 30px 20px; }
    
/* แจ้งชำระเงินในมือถือ */
    .payment-info-horizontal { flex-direction: column; text-align: center; padding: 20px 15px; }
    .bank-details-left { width: 100%; display: flex; flex-direction: column; align-items: center; }
    
    /* จัดระเบียบหัวธนาคาร */
    .bank-header { justify-content: center; width: 100%; }
    .bank-header h3 { white-space: nowrap; } /* บังคับไม่ให้ชื่อธนาคารตกบรรทัด */
    
    /* จัดระเบียบเลขบัญชีและปุ่มคัดลอกให้เรียงลงมาเป็นแนวตั้ง */
    .acc-num { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 15px 0; }
    .acc-num strong { font-size: 1.5rem; color: var(--orange); letter-spacing: 1px; line-height: 1; }
    .btn-copy { padding: 8px 20px; font-size: 1rem; width: auto; }
    
    /* จัดการกรอบคิวอาร์โค้ดไม่ให้แคบเกินไป */
    .qr-right { width: 100%; max-width: 220px; margin-top: 10px; box-sizing: border-box; }
    
    .form-horizontal { grid-template-columns: 1fr; gap: 15px; }
    .upload-group { flex-direction: column; align-items: flex-start; gap: 10px; }
    .upload-group input[type="file"] { width: 100%; box-sizing: border-box; }

    /* =========================================
       📱 ระบบสไลด์ปัดซ้าย-ขวา (Carousel) สำหรับมือถือ
       ========================================= */
    /* 1. เปลี่ยน Container ให้เรียงแนวนอน และเลื่อนได้ */
    .grid-4, .preview-gallery, .steps-container, .review-grid {
        display: flex;
        flex-wrap: nowrap; /* ห้ามตกบรรทัดใหม่ */
        overflow-x: auto; /* ให้เลื่อนซ้ายขวาได้ */
        scroll-snap-type: x mandatory; /* ปัดแล้วดูดเข้าตรงกลาง */
        justify-content: flex-start;
        gap: 15px;
        padding-bottom: 15px; /* เผื่อพื้นที่ให้เงาตกกระทบ */
        scroll-padding-left: 5%; /* จัดตำแหน่งเริ่มให้มีขอบนิดๆ */
        
        /* ซ่อนแถบ Scrollbar ให้ดูสะอาดตา */
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .grid-4::-webkit-scrollbar, .preview-gallery::-webkit-scrollbar, .steps-container::-webkit-scrollbar, .review-grid::-webkit-scrollbar {
        display: none;
    }

    /* 2. กำหนดขนาดของแต่ละกล่อง (โชว์ 80% ของจอ เพื่อให้เห็นกล่องถัดไปแง้มๆ อยู่) */
    .card-light, .card-why, .preview-gallery img, .step-box, .review-card {
        scroll-snap-align: center; /* ดูดมาหยุดตรงกลางจอ */
        flex: 0 0 80%; /* ความกว้างกล่อง 80% ของหน้าจอ */
        max-width: 80%;
        margin: 0; /* รีเซ็ต margin เดิม */
    }

    /* 3. ปรับจูนเฉพาะจุดให้สวยงาม */
    .step-arrow { display: none; } /* ซ่อนลูกศรในมือถือ เพราะเราใช้การปัดแทนแล้ว */
    .review-card { margin-top: 40px; } /* คงระยะขอบบนไว้ให้รูปโปรไฟล์ไม่โดนตัด */
    .preview-gallery img { min-width: 80%; } /* ทับคำสั่ง min-width เดิม */

    /* 4. เพิ่มพื้นที่ว่างตอนปัดสุดขอบขวา */
    .grid-4::after, .preview-gallery::after, .steps-container::after, .review-grid::after {
        content: '';
        flex: 0 0 5%; 
    }
}