/* --- Base Styles --- */
:root {
    --theme-primary: #D4AF37; /* Gold for Branding & Active States */
    --theme-accent: #FF4500;  /* OrangeRed for Actions */
    --text-color: #F0F0F0; /* Soft White for text */
    --background-color: #4C1A22; /* Dark Maroon background */
    --container-bg: #5E2A32; /* Lighter Maroon for cards/containers */
    --white-color: #FFFFFF;
    --nav-height: 60px;
}

body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    /* Add padding to the bottom to prevent content from being hidden by the nav bar */
    padding-bottom: calc(var(--nav-height) + 20px);
}

/* --- Header --- */
header {
    background-color: var(--container-bg);
    padding: 15px 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    border-bottom: 3px solid var(--theme-primary);
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
    color: var(--theme-primary);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* --- Top Navigation (เพิ่มใหม่) --- */
.top-nav {
    background-color: var(--container-bg);
    padding: 12px 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.home-actions-container {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1200px;
    margin: 0 auto;
}

.top-nav .search-container {
    flex-grow: 1;
    display: flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.2); /* พื้นหลังช่องค้นหาโปร่งใสเล็กน้อย */
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    margin: 0; /* ลบ margin เดิมที่อาจจะกวนกัน */
    max-width: none;
}

.top-nav .search-container:focus-within {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.3);
    background-color: rgba(0, 0, 0, 0.3);
}

.top-nav .search-icon {
    color: #A9A9A9;
    margin-right: 10px;
    position: static; /* ยกเลิก absolute จากของเดิม */
    transform: none;
}

.top-nav #home-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    color: var(--text-color);
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    padding: 0; /* ลบ padding เดิม */
    box-shadow: none;
}

.notification-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
    padding: 4px 8px;
    font-family: 'Kanit', sans-serif;
    min-width: 50px;
    transition: color 0.3s;
}

.notification-btn:hover {
    color: var(--theme-primary);
}

.icon-wrapper {
    position: relative;
    font-size: 1.4rem;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 50%;
    border: 2px solid var(--container-bg);
    font-weight: 600;
}

.btn-text {
    font-size: 11px;
    margin-top: 2px;
}

/* --- Main Content --- */
main {
    padding: 20px;
}

main h2 {
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

/* --- Slideshow --- */
.slideshow-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Modern way to set responsive ratio */
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--container-bg); /* Placeholder color */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    visibility: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image covers the slide area without distortion */
}

.slide-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(240, 240, 240, 0.4);
    border: 1px solid rgba(0,0,0,0.3);
    cursor: pointer;
    transition: background-color 0.3s;
}

.dot.active {
    background-color: var(--theme-accent); /* Use accent for slide dots to make them pop */
}

/* --- Category Filter --- */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid var(--theme-primary);
    background-color: transparent;
    color: var(--theme-primary);
    border-radius: 20px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
}

.filter-btn:hover {
    background-color: rgba(212, 175, 55, 0.1); /* Transparent gold */
}

.filter-btn.active {
    background-color: var(--theme-primary);
    color: #2C3E50; /* Dark text on gold button for contrast */
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    /* Creates responsive columns: they will be at least 160px wide, 
       and will fit as many as possible on one line. */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
}

.product-card {
    background-color: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    overflow: hidden; /* Ensures the image corners are rounded */
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card.hide {
    display: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

/* Specific style for payment action buttons within order-detail */
.payment-actions {
    display: flex;
    flex-direction: column; /* Stack buttons vertically */
    gap: 10px;
}

/* For smaller screens, stack order action buttons */
.order-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

@media (max-width: 480px) {
    .order-actions {
        flex-direction: column;
    }
}

.product-image img {
    width: 100%;
    height: auto;
    display: block;
}

.product-info {
    padding: 15px;
    flex-grow: 1; /* Allows the button to be pushed to the bottom */
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 1rem;
    font-weight: 400;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.product-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-accent);
    margin: 0 0 15px 0;
}

.add-to-cart-btn {
    background-color: var(--theme-accent);
    color: var(--white-color);
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    font-weight: 400;
    transition: background-color 0.2s, transform 0.1s ease-out;
    margin-top: auto; /* Pushes button to the bottom of the card */
}

.add-to-cart-btn:hover {
    background-color: #E03D00; /* Darker OrangeRed */
}

.add-to-cart-btn:active {
    transform: scale(0.95);
}

/* Animation for Add to Cart button */
.add-to-cart-btn.added {
    background-color: #27ae60; /* Success Green */
    animation: pop-effect 0.3s ease-out;
}

@keyframes pop-effect {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* --- Bottom Navigation Bar --- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    background-color: var(--container-bg);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.4);
    z-index: 1000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-decoration: none;
    color: #A9A9A9; /* Lighter gray for dark nav */
    font-size: 12px;
    transition: color 0.3s;
}

.nav-item i {
    font-size: 22px;
    margin-bottom: 4px;
}

.nav-item.active,
.nav-item:hover {
    color: var(--theme-primary);
}

/* --- Emphasized Shopping Cart Button --- */
.cart-button-wrapper {
    /* This wrapper helps with positioning the floating button */
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.cart-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background-color: var(--theme-accent);
    color: var(--white-color);
    border-radius: 50%;
    border: 4px solid var(--container-bg);
    /* Lifts the button up */
    transform: translateY(-20px);
    box-shadow: 0 -3px 10px rgba(0,0,0,0.15);
    transition: transform 0.2s ease-out, background-color 0.2s;
}

.cart-button:hover {
    transform: translateY(-23px); /* Slightly more lift on hover */
    background-color: #E03D00; /* Darker OrangeRed */
}

.cart-button i {
    font-size: 28px;
}

.cart-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    background-color: #e74c3c; /* Red for notification */
    color: var(--white-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid var(--white-color);
    /* Hidden by default, will be shown via JS */
    transform: scale(0);
    transform-origin: center;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
}
.cart-badge.visible {
    transform: scale(1);
}

/* --- Cart Page --- */
.cart-item {
    display: flex;
    align-items: center;
    background-color: var(--container-bg);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    gap: 15px;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-name {
    font-weight: 600;
    margin: 0 0 5px 0;
}

.cart-item-price {
    margin: 0;
    color: var(--text-color);
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #777;
    background-color: #444;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color); /* This is now light text */
}

.quantity-display {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 18px;
    cursor: pointer;
}

.empty-cart-message {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.1rem;
    color: #b0bec5;
}

#cart-summary {
    background-color: var(--container-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-top: 20px;
}

#cart-summary h3 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: left;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 400;
}

.summary-row.total-row {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--theme-primary);
}

.summary-row.discount-row {
    color: #27ae60; /* Green for discount */
    font-weight: 600;
}

.coupon-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#coupon-input {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: var(--background-color);
    border: 1px solid #777;
    border-radius: 5px;
    color: var(--text-color);
    font-family: 'Kanit', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

#coupon-input:focus {
    outline: none;
    border-color: var(--theme-primary);
}

#apply-coupon-btn {
    padding: 10px 20px;
    background-color: var(--theme-primary);
    color: #2C3E50;
    border: none;
    border-radius: 5px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

#apply-coupon-btn:hover {
    background-color: #b89a30;
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--theme-accent);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkout-btn:hover {
    background-color: #E03D00;
}

/* --- Search Bar (หน้าอื่นๆ ที่ไม่ใช่ Top Nav) --- */
.search-container {
    position: relative;
    margin: 0 auto 25px auto;
    max-width: 500px;
}

#search-input {
    width: 100%;
    padding: 12px 20px 12px 45px; /* Add padding for icon */
    background-color: var(--container-bg);
    border: 1px solid #777;
    border-radius: 25px;
    color: var(--text-color);
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    box-sizing: border-box; /* Important for padding and width */
    transition: border-color 0.3s, box-shadow 0.3s;
}

#search-input::placeholder {
    color: #A9A9A9;
}

#search-input:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.3);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #A9A9A9;
}

/* --- Profile Page --- */
.profile-header {
    background-color: var(--container-bg);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.profile-avatar-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 15px auto;
}

.profile-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--theme-primary);
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.avatar-upload-label {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: var(--container-bg);
    color: var(--text-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--theme-primary);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.avatar-upload-label:hover {
    background-color: var(--theme-primary);
    color: var(--container-bg);
}

.avatar-upload-label i {
    font-size: 16px;
}

.avatar-actions {
    display: flex; /* Changed to column layout */
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
}

.avatar-actions .action-btn.set-default {
    padding: 8px 24px;
    border-radius: 20px;
    font-weight: 600;
    width: 60%; /* Give the save button a specific width */
    max-width: 220px;
    margin-right: 0; /* Override margin from address page style */
}

.cancel-avatar-link {
    font-size: 0.9rem;
    color: #A9A9A9;
    text-decoration: none;
    transition: color 0.2s;
}

.cancel-avatar-link:hover {
    color: var(--text-color);
    text-decoration: underline;
}

.profile-name {
    margin: 0 0 5px 0;
    font-size: 1.4rem;
    font-weight: 600;
}

.profile-email {
    margin: 0;
    color: #A9A9A9;
    font-size: 0.9rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.stat-box {
    background-color: var(--container-bg);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.stat-box h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    font-weight: 400;
    color: #A9A9A9;
}

.stat-box p {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--theme-primary);
}

.stat-box-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.stat-box-link .stat-box {
    transition: background-color 0.2s, transform 0.2s;
    height: 100%;
    box-sizing: border-box;
}

.stat-box-link:hover .stat-box {
    background-color: rgba(255, 255, 255, 0.05);
    transform: translateY(-3px);
}

.profile-menu {
    background-color: var(--container-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    margin-bottom: 25px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    transition: background-color 0.2s;
}

.menu-item:last-child {
    border-bottom: none;
}

.menu-item:hover {
    background-color: rgba(0,0,0,0.1);
}

.menu-item i:first-child {
    font-size: 20px;
    width: 40px;
    color: var(--theme-primary);
}

.menu-item span {
    flex-grow: 1;
}

.menu-item i.fa-chevron-right {
    color: #777;
}

.logout-btn {
    width: 100%;
    padding: 15px;
    background-color: transparent;
    color: var(--theme-accent);
    border: 2px solid var(--theme-accent);
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.logout-btn:hover {
    background-color: var(--theme-accent);
    color: var(--white-color);
}

/* --- Confirmation Modal --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: var(--container-bg);
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.visible .modal-content {
    transform: scale(1);
}

.modal-content.slip-modal {
    padding: 0;
    max-width: 450px;
    background-color: var(--background-color);
}

.modal-content.slip-modal .modal-header {
    background-color: var(--container-bg);
    padding: 15px 20px;
    margin-bottom: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
}

.modal-content.slip-modal .modal-body {
    padding: 0;
}

.modal-content.slip-modal img {
    width: 100%;
    height: auto;
    display: block;
}

.modal-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: var(--text-color);
}

.modal-content p {
    margin-bottom: 25px;
    color: #A9A9A9;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.modal-btn-secondary, .modal-btn-primary {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.modal-btn-secondary {
    background-color: #777;
    color: var(--text-color);
}

.modal-btn-secondary:hover {
    background-color: #888;
}

.modal-btn-primary {
    background-color: var(--theme-accent);
    color: var(--white-color);
}

.modal-btn-primary:hover {
    background-color: #E03D00;
}

/* --- Report/Order Page --- */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.order-card {
    background-color: var(--container-bg);
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    gap: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.order-card-header, .order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-id {
    font-weight: 600;
    color: var(--text-color);
}

.order-date {
    font-size: 0.9rem;
    color: #A9A9A9;
}

.order-card-body {
    padding: 10px 0;
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.order-card-body p {
    margin: 0;
    color: #A9A9A9;
}

.order-total {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--theme-primary);
}

.order-status {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--white-color);
}

.status-completed {
    background-color: #27ae60; /* Green */
}

.status-processing {
    background-color: #f39c12; /* Yellow */
}

.status-cancelled {
    background-color: #e74c3c; /* Red */
}

/* New: Wrapper for status and its note */
.order-status-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* New style for cancellation reason on report page */
.order-cancel-reason {
    margin: 4px 0 0;
    font-size: 0.85rem;
    color: #e74c3c;
    line-height: 1;
}

/* New status colors for report & order detail */
.status-pending-payment {
    background-color: #e74c3c; /* Red */
}

.status-pending-review {
    background-color: #f39c12; /* Yellow */
}

.status-paid {
    background-color: #27ae60; /* Green */
}

/* New button styles for order actions */
.action-btn-secondary, .action-btn-primary {
    padding: 12px 20px;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%; /* Make buttons full width */
    box-sizing: border-box;
}

.action-btn-primary {
    background-color: var(--theme-accent);
    color: var(--white-color);
    border: none;
}

.action-btn-primary:hover {
    background-color: #E03D00;
}

.action-btn-secondary {
    background-color: transparent;
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Style for "แจ้งชำระเงิน" button on report page */
.notify-payment-from-report {
    /* Override default action-btn-primary full width */
    width: auto;
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-left: auto; /* Push to the right */
    /* Inherit colors from action-btn-primary */
    background-color: var(--theme-accent);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    display: inline-flex; /* Use inline-flex to keep icon and text together */
    align-items: center;
    gap: 8px;
}

/* --- Order Detail Modal Specific Styles --- */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(128, 128, 128, 0.2);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h4 {
    margin: 0;
}

.close-modal-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #A9A9A9;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    text-align: left;
}

.order-detail-item {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.order-detail-item img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.order-detail-info {
    flex-grow: 1;
}

.order-detail-info p {
    margin: 0;
}

.order-detail-info .item-name {
    font-weight: 600;
}

.order-detail-info .item-qty {
    font-size: 0.9rem;
    color: #A9A9A9;
}

.order-detail-price {
    font-weight: 600;
}

.order-summary-section {
    border-top: 1px solid rgba(128, 128, 128, 0.2);
    margin-top: 20px;
    padding-top: 20px;
}

.order-summary-section .summary-row {
    font-size: 1rem;
    font-weight: 400;
}

.order-summary-section .summary-row.total {
    font-size: 1.2rem;
    font-weight: 600;
}

/* --- Toast Notification (เพิ่มใหม่) --- */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: var(--theme-primary); /* ใช้สีทองของธีม */
    color: #2C3E50; /* ตัวหนังสือสีเข้มเพื่อให้ตัดกับพื้นสีทอง */
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 2000;
    width: max-content;
    max-width: 90%;
}

.toast-notification.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* --- Media Queries (ซ่อนข้อความแจ้งเตือนบนจอมือถือ) --- */
@media (max-width: 480px) {
    .btn-text {
        display: none;
    }
}
/* =========================================
   Notification Page Styles
========================================= */
.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    background-color: var(--container-bg);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    gap: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
    border-left: 4px solid transparent;
}

.notification-item:hover {
    transform: translateY(-2px);
    background-color: rgba(255, 255, 255, 0.05);
}

/* สไตล์สำหรับข้อความที่ยังไม่ได้อ่าน */
.notification-item.unread {
    border-left-color: var(--theme-primary); /* แถบสีทองด้านซ้าย */
    background-color: rgba(212, 175, 55, 0.1);
}

.noti-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white-color);
    flex-shrink: 0;
}

/* สีไอคอนแยกตามประเภทการแจ้งเตือน */
.noti-icon.promo { background-color: #e74c3c; } /* โปรโมชั่น สีแดง */
.noti-icon.order { background-color: #27ae60; } /* ออเดอร์ สีเขียว */
.noti-icon.system { background-color: #3498db; } /* ระบบ สีฟ้า */

.noti-content {
    flex-grow: 1;
}

.noti-content h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: var(--text-color);
}

.notification-item.unread .noti-content h4 {
    color: var(--theme-primary); /* ตัวหนังสือสีทองถ้ายังไม่อ่าน */
}

.noti-content p {
    margin: 0 0 8px 0;
    font-size: 0.85rem;
    color: #A9A9A9;
    line-height: 1.4;
}

.noti-time {
    font-size: 0.75rem;
    color: #777;
    font-weight: 300;
}
/* =========================================
   KYC Page Styles
========================================= */
.kyc-container {
    max-width: 600px;
    margin: 0 auto;
}

/* กล่องสถานะ */
.kyc-status {
    text-align: center;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.kyc-status.unverified {
    background-color: rgba(231, 76, 60, 0.15); /* พื้นหลังสีแดงอ่อน */
    border: 1px solid #e74c3c;
    color: #e74c3c;
}

.kyc-status.verified {
    background-color: rgba(39, 174, 96, 0.15); /* พื้นหลังสีเขียวอ่อน (ไว้เปลี่ยนตอนยืนยันผ่าน) */
    border: 1px solid #27ae60;
    color: #27ae60;
}

.kyc-status.pending {
    background-color: rgba(243, 156, 18, 0.15); /* พื้นหลังสีส้มอ่อน (รอตรวจสอบ) */
    border: 1px solid #f39c12;
    color: #f39c12;
}

/* ฟอร์มกรอกข้อมูล */
.kyc-form {
    background-color: var(--container-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="password"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    background-color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group input[type="password"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="number"]::placeholder {
    color: #A9A9A9;
}

.form-group input[type="text"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* ปุ่มส่งข้อมูล */
.submit-kyc-btn {
    width: 100%;
    padding: 14px;
    background-color: var(--theme-primary);
    color: #2C3E50;
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 10px;
}

.submit-kyc-btn:hover {
    background-color: #b89a30;
}

.submit-kyc-btn:active {
    transform: scale(0.98);
}

.quick-amount-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: -5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* --- Bank Info Section (New) --- */
.bank-info-section {
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.bank-info-section > p { /* Target the first p tag */
    margin: 0 0 15px 0;
    color: #A9A9A9;
}

.bank-info-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.bank-info-section .bank-details {
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: left;
    margin-top: 0;
}

.bank-info-section .bank-details p {
    display: flex;
    align-items: flex-start; /* Aligns items to the top */
    gap: 8px;
    margin: 5px 0;
    color: var(--text-color);    
}

.bank-info-section .bank-details strong {
    color: var(--theme-primary);
    min-width: 80px;
    display: inline-block;
}

.bank-info-section img {
    max-width: 180px;
    width: 100%;
    border-radius: 8px;
    background-color: white;
    padding: 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* --- Inline Copy Button (New) --- */
.copy-btn-inline {
    background: none;
    border: none;
    color: var(--theme-primary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 0 0 0 5px;
    transition: color 0.2s;
}

.copy-btn-inline:hover {
    color: var(--white-color);
}

/* --- File Drop Area --- */
.file-drop-area {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 30px;
    border: 2px dashed #A9A9A9;
    border-radius: 8px;
    background-color: var(--background-color);
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    text-align: center;
    box-sizing: border-box;
    margin-top: 8px;
}

.file-drop-area:hover {
    background-color: rgba(212, 175, 55, 0.05);
}

.file-drop-area.is-dragover {
    border-color: var(--theme-primary);
    background-color: rgba(212, 175, 55, 0.1);
    border-style: solid;
}

.file-drop-area .file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

.file-drop-area .file-msg {
    color: #A9A9A9;
    font-size: 0.9rem;
}

.file-drop-area .file-name {
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.file-drop-area .file-name i {
    margin-right: 8px;
    color: var(--theme-primary);
}
/* =========================================
   Address Page Styles
========================================= */
.address-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* การ์ดที่อยู่ */
.address-card {
    background-color: var(--container-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-left: 4px solid transparent;
    transition: transform 0.2s;
}

.address-card.is-default {
    border-left-color: var(--theme-primary); /* แถบสีทองสำหรับที่อยู่หลัก */
    background-color: rgba(212, 175, 55, 0.05);
}

.address-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.contact-name {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--theme-primary);
}

/* ป้ายกำกับค่าเริ่มต้น */
.default-badge {
    background-color: var(--theme-primary);
    color: #2C3E50;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
}

.contact-phone {
    margin: 0 0 10px 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

.contact-phone i {
    color: #A9A9A9;
    font-size: 0.85rem;
    margin-right: 5px;
}

.address-detail {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: #A9A9A9;
    line-height: 1.5;
}

/* ปุ่มจัดการ (แก้ไข, ลบ, ตั้งค่าเริ่มต้น) */
.address-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 12px;
}

.action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.action-btn.set-default {
    margin-right: auto; /* ดันปุ่มนี้ไปทางซ้าย */
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.action-btn.delete {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.5);
}

.action-btn.delete:hover {
    background-color: rgba(231, 76, 60, 0.1);
}

/* ปุ่มเพิ่มที่อยู่ใหม่ (เส้นประ) */
.add-new-address-btn {
    width: 100%;
    padding: 30px 15px;
    background-color: transparent;
    color: var(--theme-primary);
    border: 2px dashed var(--theme-primary);
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
}

.add-new-address-btn:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.add-new-address-btn i {
    font-size: 1.8rem;
}
/* =========================================
   Toggle Switch (สวิตช์เปิด-ปิด)
========================================= */
.toggle-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.toggle-label {
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 400;
}

/* ตัวโครงสวิตช์ */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

/* ซ่อน Checkbox เดิม */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* พื้นหลังสวิตช์ */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
}

/* วงกลมสวิตช์ */
.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

/* เมื่อสวิตช์ถูกเปิด (Checked) */
input:checked + .slider {
    background-color: var(--theme-primary); /* สีทองเมื่อเปิด */
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--theme-primary);
}

/* เลื่อนวงกลมไปทางขวาเมื่อเปิด */
input:checked + .slider:before {
    transform: translateX(24px);
    background-color: #2C3E50; /* วงกลมเปลี่ยนเป็นสีเข้มให้ตัดกับสีทอง */
}

/* ทำให้สวิตช์ขอบมน */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}
/* =========================================
   Profile KYC Badge Styles
========================================= */
.profile-name {
    display: flex;
    flex-direction: column; /* วางป้ายสถานะไว้ใต้ชื่อในมือถือ หรือใช้ row ถ้าต้องการวางข้างกัน */
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* สีตามสถานะ */
.kyc-badge.unverified {
    background-color: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.5);
}

.kyc-badge.pending {
    background-color: rgba(243, 156, 18, 0.2);
    color: #f39c12;
    border: 1px solid rgba(243, 156, 18, 0.5);
}

.kyc-badge.verified {
    background-color: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.5);
}

/* ปรับแต่งสำหรับหน้าจอที่กว้างขึ้น ให้ป้ายสถานะอยู่ข้างชื่อ */
@media (min-width: 480px) {
    .profile-name {
        flex-direction: row;
        justify-content: center;
    }
    .kyc-badge {
        font-size: 0.75rem;
    }
}

.notify-payment-from-report:hover {
    background-color: #E03D00;
}
/* =========================================
   Affiliate Page Styles
========================================= */
.affiliate-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Dashboard --- */
.affiliate-dashboard {
    background-color: var(--container-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    text-align: center;
    border-top: 4px solid var(--theme-primary);
}

.dashboard-main-stat p {
    color: #A9A9A9;
    margin: 0 0 5px 0;
    font-size: 0.95rem;
}

.dashboard-main-stat h3 {
    color: var(--theme-primary);
    font-size: 2.2rem;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.withdraw-btn {
    background-color: var(--theme-primary);
    color: #2C3E50;
    border: none;
    padding: 10px 30px;
    border-radius: 25px;
    font-family: 'Kanit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    margin-bottom: 20px;
}

.withdraw-btn:hover {
    background-color: #b89a30;
}

.withdraw-btn:active {
    transform: scale(0.95);
}

.dashboard-sub-stats {
    display: flex;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 15px;
}

.sub-stat-box {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
}

.sub-stat-box i {
    font-size: 1.5rem;
    color: var(--theme-primary);
}

.stat-info {
    text-align: left;
}

.stat-info p {
    margin: 0;
    font-size: 0.75rem;
    color: #A9A9A9;
}

.stat-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* --- Referral Section --- */
.referral-section {
    background-color: var(--container-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.referral-section h4 {
    margin: 0 0 5px 0;
    color: var(--theme-primary);
    font-size: 1.1rem;
}

.referral-section p {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    color: #A9A9A9;
}

.copy-link-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.copy-link-box input {
    flex-grow: 1;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    padding: 10px 15px;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
}

.copy-btn {
    background-color: var(--theme-primary);
    color: #2C3E50;
    border: none;
    padding: 0 15px;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 15px;
}

.social-share p {
    margin: 0;
}

.social-icons {
    display: flex;
    gap: 10px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.social-btn:hover {
    transform: translateY(-2px);
}

.social-btn.line { background-color: #00B900; }
.social-btn.facebook { background-color: #1877F2; }
.social-btn.twitter { background-color: #1DA1F2; }

/* --- Affiliate History --- */
.affiliate-history {
    background-color: var(--container-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.history-header h4 {
    margin: 0;
    color: var(--text-color);
}

.history-header a {
    color: var(--theme-primary);
    font-size: 0.85rem;
    text-decoration: none;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.history-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.history-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.history-icon.success { background-color: #27ae60; }
.history-icon.order { background-color: #f39c12; }
.history-icon.withdraw { background-color: #e74c3c; }
.history-icon.pending { background-color: #f39c12; }
.history-icon.failed { background-color: #e74c3c; }

.history-detail {
    flex-grow: 1;
}

.history-name {
    margin: 0 0 3px 0;
    font-size: 0.95rem;
    color: var(--text-color);
}

.history-date {
    margin: 0;
    font-size: 0.75rem;
    color: #A9A9A9;
}

.view-slip-link {
    font-size: 0.8rem;
    color: #3498db;
    text-decoration: none;
    margin-top: 4px;
    display: inline-block;
    font-weight: 400;
}

.view-slip-link:hover {
    text-decoration: underline;
}

.history-reason {
    margin: 4px 0 0 0;
    font-size: 0.8rem;
    color: #e74c3c;
}

.history-amount {
    font-weight: 600;
    font-size: 1rem;
    white-space: nowrap;
}

.history-amount.positive { color: #2ecc71; }
.history-amount.negative { color: #e74c3c; }
.history-amount.pending { color: #f39c12; }

/* =========================================
   Checkout Page Styles
========================================= */
.checkout-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding-bottom: 20px;
}

.checkout-section {
    background-color: var(--container-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.section-header h4 {
    margin: 0;
    color: var(--theme-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-link {
    color: #3498db;
    font-size: 0.9rem;
    text-decoration: none;
}

/* ที่อยู่จัดส่ง */
.checkout-address .contact-name {
    font-weight: 600;
    margin: 0 0 5px 0;
    color: var(--text-color);
}

.checkout-address .address-detail {
    margin: 0;
    font-size: 0.9rem;
    color: #A9A9A9;
    line-height: 1.5;
}

/* รายการสินค้า */
.checkout-items {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 15px;
}

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

.checkout-item img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    object-fit: cover;
}

.checkout-item .item-info {
    flex-grow: 1;
}

.checkout-item .item-name {
    margin: 0 0 3px 0;
    font-weight: 400;
    font-size: 0.95rem;
}

.checkout-item .item-price {
    margin: 0;
    color: #A9A9A9;
    font-size: 0.85rem;
}

.checkout-item .item-total {
    font-weight: 600;
    color: var(--text-color);
}

.checkout-coupon {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
}

/* วิธีการชำระเงิน */
.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.payment-option {
    display: block;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none; /* ซ่อนปุ่ม radio เดิม */
}

.payment-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: all 0.2s;
}

.payment-content i {
    font-size: 1.4rem;
    color: #A9A9A9;
    width: 30px;
    text-align: center;
}

.payment-option input[type="radio"]:checked + .payment-content {
    border-color: var(--theme-primary);
    background-color: rgba(212, 175, 55, 0.1);
}

.payment-option input[type="radio"]:checked + .payment-content i {
    color: var(--theme-primary);
}

/* สรุปยอดรวมด้านล่าง */
.checkout-summary {
    background-color: var(--container-bg);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.4);
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.checkout-summary .grand-total {
    color: var(--theme-accent);
    font-size: 1.4rem;
}

.confirm-order-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--theme-accent);
    color: var(--white-color);
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 15px;
}

.confirm-order-btn:hover {
    background-color: #E03D00;
}
/* =========================================
   Checkout Coupon Styles
========================================= */
#checkout-coupon-input {
    flex-grow: 1;
    padding: 10px 15px;
    background-color: var(--background-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-color);
    font-family: 'Kanit', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

#checkout-coupon-input::placeholder {
    color: #A9A9A9;
}

#checkout-coupon-input:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

#checkout-apply-coupon-btn {
    padding: 10px 20px;
    background-color: var(--theme-primary);
    color: #2C3E50; /* สีตัวอักษรเข้มเพื่อให้ตัดกับสีปุ่ม */
    border: none;
    border-radius: 8px;
    font-family: 'Kanit', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    flex-shrink: 0;
}

#checkout-apply-coupon-btn:hover {
    background-color: #b89a30; /* สีตอนเอาเมาส์ชี้ */
}

#checkout-apply-coupon-btn:active {
    transform: scale(0.95); /* เอฟเฟกต์ปุ่มยุบตอนกด */
}