/* รีเซ็ตค่าพื้นฐาน */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

/* แถบเมนู (Navigation Bar) */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #ffffff;
    padding: 15px 8%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .logo {
    font-size: 22px;
    font-weight: bold;
    color: #ff5722;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #ff5722;
}

/* แบนเนอร์โปรโมชั่น (Promo Banner) */
.promo-banner {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://unsplash.com') no-repeat center center/cover;
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 20px;
}

.banner-text h2 {
    font-size: 38px;
    margin-bottom: 10px;
}

.banner-text p {
    font-size: 16px;
    margin-bottom: 20px;
}

.btn-shop {
    display: inline-block;
    background-color: #ff5722;
    color: #fff;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-shop:hover {
    background-color: #e64a19;
}

/* ส่วนแสดงสินค้า (Product Section) */
.product-section {
    padding: 50px 8%;
}

.product-section h2 {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* การ์ดสินค้า (Product Card) */
.product-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    position: relative;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
}

.badge-sale {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #d32f2f;
    color: #fff;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 3px;
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 18px;
    margin-bottom: 8px;
    color: #222;
}

.product-desc {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* ระบบราคา */
.price-container {
    margin-bottom: 15px;
}

.price-normal {
    font-size: 20px;
    font-weight: bold;
    color: #ff5722;
}

.price-discount {
    font-size: 20px;
    font-weight: bold;
    color: #d32f2f;
    margin-right: 8px;
}

.price-original {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

/* ปุ่มสั่งซื้อ */
.btn-buy {
    display: block;
    text-align: center;
    background-color: #25d366; /* สีเขียวสไตล์ Line/WhatsApp */
    color: #fff;
    padding: 10px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.2s;
}

.btn-buy:hover {
    background-color: #128c7e;
}

/* ส่วนท้ายเว็บ */
.main-footer {
    background-color: #222;
    color: #bbb;
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
}

.main-footer p {
    margin-bottom: 5px;
}

/* รองรับมือถือ */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 10px;
    }
    .nav-links li {
        margin: 0 10px;
    }
    .banner-text h2 {
        font-size: 28px;
    }
}
/* ==========================================
   ส่วนเพิ่มเติม: หน้าละเอียดสินค้า (Product Detail)
   ========================================== */

.detail-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 40px 8%;
    background-color: #fff;
    margin-top: 20px;
}

/* ฝั่งรูปภาพ */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #eee;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
}

.thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border 0.2s;
}

.thumb:hover, .thumb.active {
    border-color: #ff5722;
}

/* ฝั่งข้อมูลการสั่งซื้อ */
.product-order-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.detail-title {
    font-size: 32px;
    color: #222;
    margin: 10px 0 5px 0;
}

.detail-sku {
    font-size: 13px;
    color: #888;
    margin-bottom: 20px;
}

.instock {
    color: #2e7d32;
    font-weight: bold;
}

.short-desc {
    color: #666;
    margin-bottom: 25px;
    font-size: 15px;
}

/* ตัวเลือกสินค้า */
.options-container {
    width: 100%;
    border-top: 1px dashed #ddd;
    border-bottom: 1px dashed #ddd;
    padding: 20px 0;
    margin-bottom: 25px;
}

.option-group {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.option-group label {
    width: 80px;
    font-weight: bold;
    color: #444;
}

.radio-options {
    display: flex;
    gap: 10px;
}

.option-btn {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 6px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.option-btn.active, .option-btn:hover {
    border-color: #ff5722;
    color: #ff5722;
    background-color: #fff3e0;
}

/* ตัวปรับจำนวน */
.quantity-selector {
    display: flex;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: hidden;
}

.quantity-selector button {
    background-color: #eee;
    border: none;
    width: 35px;
    height: 35px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background-color: #ddd;
}

.quantity-selector input {
    width: 50px;
    height: 35px;
    text-align: center;
    border: none;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
    font-size: 16px;
}

/* ปุ่มสั่งซื้อ */
.btn-buy-now {
    display: inline-block;
    background-color: #25d366;
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 30px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    transition: transform 0.2s, background 0.2s;
}

.btn-buy-now:hover {
    background-color: #128c7e;
    transform: translateY(-2px);
}

/* ส่วนแท็บรายละเอียดด้านล่าง */
.info-tabs-section {
    padding: 40px 8%;
    background-color: #fff;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

.tab-header {
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab-title {
    display: inline-block;
    padding-bottom: 10px;
    border-bottom: 2px solid #ff5722;
    color: #ff5722;
}

.tab-content {
    color: #555;
    font-size: 15px;
}

.tab-content ul {
    margin-left: 20px;
    margin-top: 10px;
}

.tab-content li {
    margin-bottom: 5px;
}

/* ปรับปรุงให้รองรับมือถือ */
@media (max-width: 768px) {
    .detail-container {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 20px 5%;
    }
    .main-image {
        height: 300px;
    }
    .detail-title {
        font-size: 24px;
    }
    .btn-buy-now {
        width: 100%;
        text-align: center;
    }
}
/* ==========================================
   ส่วนเพิ่มเติม: หน้ายืนยันการสั่งซื้อ (Checkout)
   ========================================== */

.checkout-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    padding: 40px 8%;
    max-width: 1400px;
    margin: 0 auto;
}

.checkout-form-section, .summary-box, .payment-box {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 25px;
}

.checkout-form-section h2 {
    font-size: 22px;
    color: #222;
    margin-bottom: 25px;
    border-bottom: 2px solid #ff5722;
    padding-bottom: 10px;
}

/* การจัดฟอร์มกรอกข้อมูล */
.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input, .form-group textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #ff5722;
    outline: none;
}

/* กล่องอัปโหลดสลิป */
.slip-upload-box {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff8f5;
    border: 2px dashed #ffb399;
    border-radius: 6px;
    text-align: center;
}

.slip-upload-box h3 {
    font-size: 16px;
    color: #e64a19;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.file-input-wrapper {
    position: relative;
    cursor: pointer;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #555;
    font-weight: bold;
}

.hidden-placeholder {
    display: none;
}

.hidden-preview {
    display: none;
}

#slipPreview {
    max-width: 200px;
    max-height: 300px;
    margin-top: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn-submit-order {
    width: 100%;
    background-color: #ff5722;
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 25px;
    transition: background 0.2s;
}

.btn-submit-order:hover {
    background-color: #e64a19;
}

/* ฝั่งสรุปรายการสั่งซื้อ */
.summary-box h3, .payment-box h3 {
    font-size: 18px;
    color: #222;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
    color: #555;
}

.free-shipping {
    color: #2e7d32;
    font-weight: bold;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #eee;
    font-size: 18px;
    font-weight: bold;
    color: #d32f2f;
}

/* กล่องคิวอาร์โค้ด */
.payment-instruction {
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
    text-align: center;
}

.qrcode-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border: 1px solid #eee;
}

.qr-img {
    width: 200px;
    height: 200px;
}

.bank-details {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    font-size: 14px;
    color: #444;
    line-height: 1.8;
}

/* ปรับปรุงการแสดงผลบนมือถือ */
@media (max-width: 992px) {
    .checkout-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 4%;
    }
}

@media (max-width: 576px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
