:root {
    --primary-blue: #2563EB;
    --alert-red: #D92D20;
    --gray-border: #D1D5DB;
    --bg-page: #E5E7EB;
    --text-dark: #111827;
    --text-gray: #6B7280;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-dark);
    line-height: 1.5;
}

/* --- HEADER & RED BAR --- */
.top-nav {
    background: white;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid #ddd;
}

.logo {
    font-weight: 900;
    font-size: 22px;
    font-style: italic;
    letter-spacing: -1px;
}

.secure-badge {
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.red-bar {
    background-color: #DA291C;
    color: white;
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- MAIN CONTAINER --- */
.main-wrapper {
    max-width: 1100px;
    margin: 30px auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    /* overflow: hidden; Removed to prevent clipping or z-index issues */
}

/* --- LEFT COLUMN: FORM --- */
.form-col {
    flex: 1.4;
    padding: 40px;
}

/* Responsive Layout */
/* Responsive Layout - TABLET & BELOW */
@media (max-width: 900px) {
    .main-wrapper {
        flex-direction: column;
        margin: 0;
        /* Remove outer margin on smaller screens */
        width: 100%;
        border-radius: 0;
        /* Full width, no corners */
        box-shadow: none;
        /* Flat on mobile/tablet */
    }

    /* Move Sidebar to TOP on mobile if requested, usually bottom for checkout */
    .sidebar-col {
        order: 2;
        border-left: none;
        border-top: 1px solid #eee;
        padding: 30px;
        /* Slightly reduced padding */
    }

    .form-col {
        order: 1;
        padding: 30px;
    }
}

/* --- MOBILE SPECIFIC --- */
@media (max-width: 600px) {

    .form-col,
    .sidebar-col {
        padding: 20px;
        /* Compact padding for phones */
    }

    .red-bar {
        font-size: 13px;
        /* Smaller text in header */
    }

    h1 {
        font-size: 20px !important;
        /* Force smaller product title */
    }
}

h2.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

/* --- CUSTOM V SHRED INPUTS (Floating Labels) --- */
.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input,
.input-group select {
    width: 100%;
    height: 56px;
    padding: 24px 16px 8px;
    /* Top padding for label space */
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    font-size: 16px;
    background: white;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--text-dark);
}

.input-group label {
    position: absolute;
    left: 16px;
    top: 18px;
    /* Centered initially */
    font-size: 16px;
    color: var(--text-gray);
    pointer-events: none;
    transition: all 0.2s ease;
}

/* Float Trigger: Focus OR Valid (has value) */
.input-group input:focus+label,
.input-group input:not(:placeholder-shown)+label,
.input-group select:focus+label,
.input-group select:valid+label {
    top: 8px;
    font-size: 12px;
    font-weight: 500;
}

/* Phone Row */
.phone-row {
    display: flex;
    gap: 12px;
}

.phone-select {
    width: 100px;
    position: relative;
}

.phone-select select {
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
}

/* Simplify select */
.phone-input {
    flex: 1;
}

/* --- PAYMENT TOGGLES --- */
.payment-toggles {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
}

.pay-option {
    flex: 1;
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.pay-option.selected {
    background: #1F2937;
    color: white;
    border-color: #1F2937;
}

.pay-option.apple {
    background: black;
    color: white;
    border-color: black;
}

/* --- STRIPE ELEMENT --- */
#payment-element {
    min-height: 250px;
    margin-bottom: 20px;
    position: relative;
    z-index: 10;
}

/* --- RIGHT COLUMN: SIDEBAR --- */
.sidebar-col {
    flex: 1;
    background-color: #F9FAFB;
    padding: 40px;
    border-left: 1px solid #E5E7EB;
}

@media (max-width: 600px) {
    .sidebar-col {
        padding: 25px;
    }
}

.product-card {
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 25px;
}

.product-img-placeholder {
    height: 180px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 14px;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.checklist li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #4B5563;
}

.check {
    color: #111827;
    font-weight: bold;
}

.price-block {
    margin-bottom: 20px;
}

.big-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
}

.strikethrough {
    text-decoration: line-through;
    color: #9CA3AF;
    font-size: 16px;
    margin-left: 8px;
}

.guarantee {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    gap: 12px;
    align-items: center;
}

.guarantee-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.submit-btn {
    width: 100%;
    background-color: #FCD34D;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    padding: 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}

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

/* UTIL */
.hidden {
    display: none;
}

#error-message {
    color: #DC2626;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}
