/* ==========================================
   Payment Page - White & Gold Luxury Theme
   ========================================== */

.luxury-payment-page {
    background-color: #faf9f6;
    color: #333333;
    font-family: 'Prompt', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Header สไตล์ทอง-ขาว หรูหรา */
.luxury-header {
    background: #ffffff;
    border-bottom: 2px solid #f1e5c8;
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(184, 134, 11, 0.08);
}

.nav-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-left-group {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}

.nav-right-group {
    display: flex;
    align-items: center;
}

.luxury-header .logo a {
    color: #b8860b;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.luxury-header .gold-badge {
    background: linear-gradient(135deg, #dfac6c 0%, #b8860b 100%);
    color: #ffffff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.wallet-badge {
    background: #fffdf5;
    border: 1px solid #f1e5c8;
    padding: 6px 15px;
    border-radius: 30px;
    color: #555;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wallet-badge strong {
    color: #b8860b;
}

.btn-back {
    color: #555;
    background: #ffffff;
    border: 1px solid #d4af37;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.btn-back:hover {
    color: #ffffff;
    background: #b8860b;
    border-color: #b8860b;
}

/* Main Container & Card */
.payment-container {
    max-width: 850px;
    margin: 40px auto;
    padding: 0 20px;
}

.payment-card-luxury {
    background: #ffffff;
    border: 1px solid #f1e5c8;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 10px 30px rgba(184, 134, 11, 0.1);
}

.payment-header-title h2 {
    color: #b8860b;
    font-size: 1.8rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.payment-header-title p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.cart-summary-section h3 {
    font-size: 1.2rem;
    color: #333;
    border-bottom: 2px solid #f1e5c8;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* รายการสินค้าสไตล์ทอง-ขาว (แสดงรูปภาพและปุ่มรายละเอียด) */
.cart-items-list-luxury {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

.cart-item {
    background: #faf9f6;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    border-color: #d4af37;
    background: #fffdf5;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
}

.cart-item-detail-group {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.cart-item-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #d4af37;
    flex-shrink: 0;
}

.cart-item-info h4 {
    margin: 0 0 4px 0;
    font-size: 1.05rem;
    color: #222;
    font-weight: 600;
}

.cart-item-info p {
    margin: 0 0 6px 0;
    font-size: 0.88rem;
    color: #b8860b;
    font-weight: 500;
}

/* ปุ่มดูรายละเอียดเพิ่มเติม */
.btn-detail-more {
    background: transparent;
    color: #2563eb;
    border: none;
    padding: 0;
    font-family: 'Prompt', sans-serif;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: underline;
    transition: color 0.2s;
}

.btn-detail-more:hover {
    color: #1d4ed8;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ช่องปรับจำนวนสินค้า */
.qty-input {
    background: #ffffff;
    border: 1px solid #ccc;
    color: #333;
    width: 55px;
    padding: 8px;
    text-align: center;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 0.95rem;
}

.qty-input:focus {
    outline: none;
    border-color: #b8860b;
    box-shadow: 0 0 8px rgba(184, 134, 11, 0.25);
}

/* ปุ่มลบสินค้า */
.btn-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Prompt', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-danger:hover {
    background: #ef4444;
    color: #fff;
}

/* สรุปยอดเงินรวม */
.payment-summary-luxury {
    margin-top: 30px;
    background: #fffdf5;
    border: 1px solid #f1e5c8;
    border-radius: 12px;
    padding: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.98rem;
    color: #666;
}

.summary-row.total-row {
    border-top: 1px solid #e5d5a8;
    padding-top: 15px;
    margin-top: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #222;
}

.gold-text {
    color: #b8860b !important;
}

/* ปุ่มชำระเงินทองคำ */
.payment-actions {
    margin-top: 30px;
}

.btn-gold-payment {
    width: 100%;
    background: linear-gradient(135deg, #dfac6c 0%, #b8860b 100%);
    color: #ffffff;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Prompt', sans-serif;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.25);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-gold-payment:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.4);
}

/* Loading Overlay */
.luxury-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.spinner-box {
    text-align: center;
    color: #b8860b;
    font-size: 1.2rem;
}

.spinner-box i {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ==========================================
   Advanced Toast System Styles (สไตล์ Admin)
   ========================================== */

#toast-container {
    position: fixed;
    z-index: 99999;
    font-family: 'Prompt', sans-serif;
    pointer-events: none;
}

/* 1. Toast แจ้งเตือนทั่วไป (เด้งขวาบน) */
.custom-toast-normal {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    color: #333333;
    border: 1px solid #d4af37;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    pointer-events: auto;
    animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    max-width: 90vw;
}

.custom-toast-normal.success { border-color: #28a745; }
.custom-toast-normal.error { border-color: #dc3545; }
.custom-toast-normal.warning { border-color: #ff9800; }

.toast-normal-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-icon-badge {
    width: 24px; height: 24px;
    background: rgba(212, 175, 55, 0.2);
    color: #b8860b;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* 2. Toast มีปฏิสัมพันธ์ (อยู่ตรงกลางจอ ธีมส้ม 3 บรรทัด ปุ่ม ใช่/ไม่ใช่ - สไตล์ Admin) */
.interactive-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 420px;
    background: linear-gradient(145deg, #ffffff 0%, #fffdf9 100%);
    border: 2px solid #ff9800; /* ธีมสีส้มเด่นชัด */
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25), 0 0 25px rgba(255, 152, 0, 0.2);
    padding: 25px;
    text-align: center;
    pointer-events: auto;
    animation: zoomInScale 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* บรรทัดที่ 1: หัวข้อธีมสีส้ม */
.toast-line-1 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #e65100;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* บรรทัดที่ 2: ข้อความสื่อถึงผู้ใช้ */
.toast-line-2 {
    font-size: 1.05rem;
    color: #333333;
    line-height: 1.5;
}

/* บรรทัดที่ 3: ปุ่มตัวเลือก ใช่ / ไม่ */
.toast-line-3-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 5px;
}

.toast-btn-yes, .toast-btn-no {
    flex: 1;
    padding: 10px 20px;
    border-radius: 8px;
    font-family: 'Prompt', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toast-btn-yes {
    background: linear-gradient(135deg, #ff9800 0%, #e65100 100%);
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.4);
}

.toast-btn-yes:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.6);
}

.toast-btn-no {
    background: #f1f1f1;
    color: #555555;
    border: 1px solid #ccc;
}

.toast-btn-no:hover {
    background: #e2e2e2;
    color: #222222;
}

/* Keyframe Animations */
@keyframes slideInRight {
    from { opacity: 0; transform: translateY(-20px) translateX(30px); }
    to { opacity: 1; transform: translateY(0) translateX(0); }
}

@keyframes zoomInScale {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.85); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes fadeOutScale {
    to { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
}

/* Responsive สำหรับหน้าจอขนาดเล็ก (มือถือ) */
@media (max-width: 768px) {
    .nav-between {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }
    .nav-left-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .nav-right-group {
        justify-content: flex-end;
    }
    .payment-card-luxury {
        padding: 20px 15px;
    }
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .cart-item-actions {
        width: 100%;
        justify-content: space-between;
    }
    .interactive-toast {
        width: 92%;
        padding: 20px 15px;
    }
}