/* Custom Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

:root {
    --color-orange: #E05C1D;
    --color-orange-glow: rgba(224, 92, 29, 0.25);
    --color-gold: #D4AF37;
    --color-gold-hover: #F3C343;
    --color-bg-dark: #0F0F11;
    --color-bg-card: rgba(26, 26, 30, 0.75);
    --color-border: rgba(212, 175, 55, 0.2);
    --color-text-white: #FFFFFF;
    --color-text-gray: #A1A1AA;
    --font-primary: 'Montserrat', 'Noto Sans Thai', sans-serif;
}

body {
    background-color: var(--color-bg-dark);
    color: var(--color-text-white);
    font-family: var(--font-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Gradients/Glows for Luxury Vibe */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--color-orange-glow) 0%, rgba(15, 15, 17, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, rgba(15, 15, 17, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Typography Helper */
.gold-text {
    color: var(--color-gold);
    background: linear-gradient(135deg, var(--color-gold) 0%, #F5E0A3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.text-gold {
    color: var(--color-gold);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Header Styles */
.header {
    background-color: rgba(15, 15, 17, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1.2rem 2rem;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.lang-select {
    background-color: #1A1A1E;
    color: var(--color-text-white);
    border: 1px solid var(--color-border);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    outline: none;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

.lang-select:hover, .lang-select:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Main Layout */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Hero Section */
.hero-section {
    padding: 2rem 0 5rem 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #161619;
    aspect-ratio: 4 / 5;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1.2rem;
    transition: transform 0.8s ease;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
}

.hero-image-wrapper:hover .hero-img {
    transform: scale(1.05);
}

.badge-premium {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    background: linear-gradient(135deg, var(--color-gold) 0%, #A87E15 100%);
    color: #000;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.hero-text-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--color-text-white) 30%, var(--color-text-gray) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-gray);
    line-height: 1.7;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 1rem;
}

.feature-item {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.feature-icon {
    font-size: 1.8rem;
    background-color: rgba(224, 92, 29, 0.1);
    border: 1px solid rgba(224, 92, 29, 0.3);
    padding: 0.4rem;
    border-radius: 12px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
}

.feature-item h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.feature-item p {
    font-size: 0.9rem;
    color: var(--color-text-gray);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 2.2rem;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-primary);
    text-decoration: none;
    border: none;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-orange) 0%, #B84310 100%);
    color: var(--color-text-white);
    box-shadow: 0 10px 25px var(--color-orange-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(224, 92, 29, 0.4);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Pre-order Section Container */
.preorder-section {
    padding: 5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-gray);
    margin-bottom: 3.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.preorder-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3rem;
}

/* Card Common Styling (Glassmorphism) */
.calculator-card, .form-card, .dashboard-card {
    background-color: var(--color-bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Package List styling */
.package-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

.package-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.2rem;
    transition: all 0.3s ease;
}

.package-item:hover {
    border-color: rgba(224, 92, 29, 0.3);
    background-color: rgba(224, 92, 29, 0.02);
}

.package-details {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
}

.package-icon {
    font-size: 2.2rem;
    min-width: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.package-thumb-icon {
    width: 44px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.package-item:hover .package-thumb-icon {
    transform: scale(1.12);
}

.pack-multi {
    filter: drop-shadow(0 4px 10px rgba(224, 92, 29, 0.4));
}

.carton-multi {
    filter: drop-shadow(0 6px 12px rgba(212, 175, 55, 0.5));
}

.package-desc {
    font-size: 0.85rem;
    color: var(--color-text-gray);
    margin-top: 0.1rem;
}

.price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 2rem;
    min-width: 100px;
}

.unit-price {
    font-size: 1.2rem;
    font-weight: 700;
}

.discount-badge {
    background-color: #34A853;
    color: #FFF;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.2rem;
    text-transform: uppercase;
}

.discount-gold {
    background: linear-gradient(135deg, var(--color-gold) 0%, #A87E15 100%);
    color: #000;
}

/* Qty Controls */
.qty-control {
    display: flex;
    align-items: center;
    background-color: #141416;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.btn-qty {
    background: transparent;
    color: var(--color-text-white);
    border: none;
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-qty:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.qty-input {
    background: transparent;
    color: var(--color-text-white);
    border: none;
    width: 50px;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    -moz-appearance: textfield;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Calc Summary */
.calc-summary {
    margin-top: 2.5rem;
    background-color: rgba(212, 175, 55, 0.03);
    border: 1px dashed var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 1.05rem;
    color: var(--color-text-gray);
}

.summary-line.highlight {
    font-size: 1.3rem;
    font-weight: 800;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
    color: var(--color-text-white);
}

.summary-val {
    font-weight: 700;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.4rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-gray);
}

.form-control {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--color-text-white);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--color-orange);
    box-shadow: 0 0 10px rgba(224, 92, 29, 0.15);
    background-color: rgba(255, 255, 255, 0.06);
}

.form-control:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.01);
}

textarea.form-control {
    resize: vertical;
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1.8rem;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 0.3rem;
    cursor: pointer;
}

.form-checkbox label {
    font-size: 0.85rem;
    color: var(--color-text-gray);
    cursor: pointer;
    user-select: none;
}

.error-text {
    color: #EA4335;
    background-color: rgba(234, 67, 53, 0.1);
    border: 1px solid rgba(234, 67, 53, 0.3);
    border-radius: 8px;
    padding: 0.8rem;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.btn-submit {
    background: linear-gradient(135deg, var(--color-gold) 0%, #A87E15 100%);
    color: #000;
    box-shadow: 0 10px 25px rgba(212, 175, 55, 0.2);
}

.btn-submit:hover {
    background: linear-gradient(135deg, var(--color-gold-hover) 0%, #B88E1D 100%);
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.3);
}

/* Gmail Auth Box */
.gmail-auth-container {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.auth-instruction {
    font-size: 0.85rem;
    color: var(--color-text-gray);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.btn-google {
    background-color: #FFFFFF;
    color: #757575;
    border: 1px solid #DADCE0;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: background-color 0.2s, box-shadow 0.2s;
    width: 100%;
    justify-content: center;
}

.btn-google:hover {
    background-color: #F8F9FA;
    box-shadow: 0 1px 3px rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
    color: #3C4043;
}

.google-icon {
    display: block;
}

.user-profile-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0.8rem 1rem;
    text-align: left;
}

.user-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #FFF;
    border: 2px solid var(--color-gold);
}

.user-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.user-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-text-white);
}

.user-email {
    font-size: 0.8rem;
    color: var(--color-text-gray);
}

.btn-signout {
    background: transparent;
    color: #EA4335;
    border: 1px solid rgba(234, 67, 53, 0.4);
    border-radius: 6px;
    padding: 0.35rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: all 0.2s;
}

.btn-signout:hover {
    background-color: rgba(234, 67, 53, 0.1);
    border-color: #EA4335;
}

/* Dashboard Section */
.dashboard-section {
    padding: 5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.orders-table th {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-text-gray);
    padding: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
}

.orders-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.95rem;
}

.orders-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.order-badge-pending {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--color-gold);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.25rem 0.6rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* Footer styling */
.footer {
    background-color: #09090B;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    color: var(--color-text-gray);
    font-size: 0.9rem;
}

.footer-note {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Google Sign-in Mock Modal */
.google-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.google-modal-card {
    background-color: #FFFFFF;
    color: #202124;
    border-radius: 8px;
    width: 100%;
    max-width: 450px;
    padding: 2.5rem;
    box-shadow: 0 12px 24px rgba(0,0,0,0.25);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.google-modal-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.google-logo-modal {
    margin-bottom: 0.5rem;
}

.google-modal-title {
    font-size: 1.5rem;
    font-weight: 400;
    color: #202124;
}

.google-modal-instruction {
    text-align: center;
    color: #5f6368;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.mock-accounts-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
}

.mock-account-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.8rem;
    background: transparent;
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.2s;
}

.mock-account-btn:hover {
    background-color: #f7f8f9;
}

.mock-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #E8EAED;
}

.mock-details {
    display: flex;
    flex-direction: column;
}

.mock-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: #3c4043;
}

.mock-email {
    font-size: 0.8rem;
    color: #5f6368;
}

.divider-google-modal {
    display: flex;
    align-items: center;
    text-align: center;
    color: #5f6368;
    font-size: 0.8rem;
    margin: 0.5rem 0;
}

.divider-google-modal::before,
.divider-google-modal::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #dadce0;
}

.divider-google-modal:not(:empty)::before {
    margin-right: .5em;
}

.divider-google-modal:not(:empty)::after {
    margin-left: .5em;
}

.form-group-modal {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.form-control-modal {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 0.95rem;
    outline: none;
    color: #202124;
}

.form-control-modal:focus {
    border-color: #1a73e8;
    box-shadow: inset 0 0 0 1px #1a73e8;
}

.btn-google-modal-submit {
    background-color: #1a73e8;
    color: #FFFFFF;
    border: none;
    border-radius: 4px;
    padding: 0.8rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-google-modal-submit:hover {
    background-color: #1557b0;
}

.google-modal-footer {
    display: flex;
    justify-content: flex-end;
}

.btn-cancel-modal {
    background: transparent;
    color: #1a73e8;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.btn-cancel-modal:hover {
    background-color: #f4f8fe;
}

/* Responsiveness */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-image-wrapper {
        max-width: 450px;
        margin: 0 auto;
    }

    .preorder-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }

    .main-content {
        padding: 2rem 1rem;
    }

    .calculator-card, .form-card, .dashboard-card {
        padding: 1.5rem;
    }

    .package-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .price-info {
        align-items: flex-start;
        margin-right: 0;
    }

    .qty-control {
        width: 100%;
        justify-content: space-between;
    }

    .btn-qty {
        flex: 1;
    }
    
    .qty-input {
        flex: 2;
    }
}
