/* =============================================
   CHECKOUT PAGE STYLES — CLEAN LIGHT THEME (HAVOC SIM PODIUM)
   ============================================= */

:root {
    --co-bg: #f8fafc;
    --co-card-bg: #ffffff;
    --co-navy: #0f172a;
    --co-text-muted: #64748b;
    --co-border: #e2e8f0;
    --co-border-subtle: #f1f5f9;
    --co-red: #e11d24;
    --co-red-hover: #c8161d;
    --co-gold: #d97706;
    --co-gold-light: rgba(217, 119, 6, 0.08);
    --co-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    --co-shadow-hover: 0 10px 30px rgba(225, 29, 36, 0.12);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body.checkout-page {
    background: var(--co-bg);
    color: var(--co-navy);
    min-height: 100vh;
    font-family: "Outfit", sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

/* Header & Top Bar */
.co-topbar-wrapper {
    background: #ffffff;
    border-bottom: 1px solid var(--co-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
    width: 100%;
}

.co-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0.85rem 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.co-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    min-width: 0;
}

.co-logo .logo-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
}

.co-logo .logo-text {
    line-height: 1.15;
    min-width: 0;
}

.co-logo .logo-main {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--co-navy);
    letter-spacing: 2px;
}

.co-logo .logo-sub {
    font-size: 0.6rem;
    color: var(--co-red);
    font-weight: 800;
    letter-spacing: 3px;
}

.co-logo .logo-unit-text {
    font-size: 0.65rem;
    color: var(--co-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.co-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--co-text-muted);
}

.co-back {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--co-navy);
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    flex-shrink: 0;
    background: #f1f5f9;
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    border: 1px solid var(--co-border);
}

.co-back:hover {
    background: #e2e8f0;
    color: var(--co-red);
    transform: translateX(-2px);
}

/* Main Layout Grid */
.co-main {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 1.75rem;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
    width: 100%;
    min-height: calc(100vh - 70px);
    align-items: flex-start;
    box-sizing: border-box;
}

/* Left Column: Customer & Payment */
.co-left {
    padding: 2rem 2.25rem;
    background: var(--co-card-bg);
    border: 1px solid var(--co-border);
    border-radius: 20px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: var(--co-shadow);
}

.co-section {
    margin-bottom: 2rem;
}

.co-section:last-child {
    margin-bottom: 1.5rem;
}

.co-section h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0 0 1.25rem 0;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--co-border);
    color: var(--co-navy);
    letter-spacing: -0.3px;
}

.co-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.15rem;
    width: 100%;
}

.co-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    width: 100%;
    min-width: 0;
}

.co-field label {
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--co-navy);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.co-field input,
.co-field select {
    background: #f8fafc;
    border: 1.5px solid var(--co-border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    color: var(--co-navy);
    font-family: "Outfit", sans-serif;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    outline: none;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.co-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-color: #f8fafc;
    padding-right: 2.2rem;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.co-field select option {
    background: #ffffff;
    color: var(--co-navy);
}

.co-field input:focus,
.co-field select:focus {
    border-color: var(--co-red);
    background: #ffffff;
    box-shadow: 0 0 0 3.5px rgba(225, 29, 36, 0.12);
}

.co-field input::placeholder {
    color: #94a3b8;
}

/* Phone Row Container */
.co-phone-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.co-phone-row select {
    width: 130px;
    flex-shrink: 0;
}

.co-phone-row input {
    flex: 1;
    min-width: 0;
    width: 100%;
}

/* Payment Options */
.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.15rem 1.35rem;
    border: 1.5px solid var(--co-border);
    border-radius: 14px;
    background: #ffffff;
    transition: all 0.25s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 0.85rem;
}

.payment-option:hover {
    border-color: rgba(225, 29, 36, 0.4);
    background: #fffafa;
}

.payment-option.selected {
    border-color: var(--co-red);
    background: rgba(225, 29, 36, 0.03);
    box-shadow: 0 4px 16px rgba(225, 29, 36, 0.12);
}

.payment-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.25s;
}

.payment-option.selected .payment-radio {
    border-color: var(--co-red);
}

.payment-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--co-red);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.payment-option.selected .payment-radio::after {
    opacity: 1;
    transform: scale(1);
}

.payment-icon {
    width: 28px;
    height: 28px;
    color: var(--co-red);
    flex-shrink: 0;
}

.payment-option strong {
    font-size: 0.98rem;
    display: block;
    margin-bottom: 0.2rem;
    color: var(--co-navy);
    font-weight: 800;
}

.payment-option p {
    font-size: 0.82rem;
    color: var(--co-text-muted);
    margin: 0;
    line-height: 1.35;
}

/* Pay Button */
.btn-pay {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.15rem 2rem;
    background: linear-gradient(135deg, var(--co-red), var(--co-red-hover));
    color: #ffffff;
    font-family: "Outfit", sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 1px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 18px rgba(225, 29, 36, 0.3);
    box-sizing: border-box;
}

.btn-pay svg {
    width: 20px;
    height: 20px;
    stroke: #ffffff;
}

.btn-pay:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(225, 29, 36, 0.45);
}

.btn-pay:active {
    transform: translateY(0);
}

.btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Right Column: Order Summary */
.co-right {
    width: 100%;
    min-width: 0;
}

.co-summary-card {
    position: sticky;
    top: 85px;
    padding: 1.85rem;
    background: var(--co-card-bg);
    border: 1px solid var(--co-border);
    border-radius: 20px;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    box-shadow: var(--co-shadow);
}

.co-summary-card h2 {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 1.25rem 0;
    color: var(--co-navy);
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--co-border);
    letter-spacing: -0.3px;
}

/* Summary Items */
.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.summary-img {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 1px solid var(--co-border);
}

.summary-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
    width: 100%;
}

.summary-details strong {
    font-size: 0.95rem;
    line-height: 1.3;
    color: var(--co-navy);
    font-weight: 800;
    min-width: 0;
    word-break: break-word;
}

.summary-meta {
    font-size: 0.82rem;
    color: var(--co-text-muted);
    line-height: 1.35;
}

.summary-price {
    font-size: 1rem;
    font-weight: 800;
    color: var(--co-navy);
    flex-shrink: 0;
    white-space: nowrap;
}

.summary-divider {
    height: 1px;
    background: var(--co-border);
    margin: 1.2rem 0;
    width: 100%;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.92rem;
    color: var(--co-text-muted);
    margin-bottom: 0.6rem;
    width: 100%;
}

.summary-free {
    color: #10b981;
    font-weight: 800;
}

.summary-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--co-navy);
    margin-top: 0.5rem;
}

.summary-total span:last-child {
    color: var(--co-red);
    font-size: 1.4rem;
    font-weight: 800;
}

/* Discount Section - Prominent & Crisp */
.co-discount-section {
    margin: 1.1rem 0;
    padding: 1rem 1.15rem;
    background: #fffafa;
    border: 1.5px dashed rgba(225, 29, 36, 0.35);
    border-radius: 14px;
    width: 100%;
    box-sizing: border-box;
}

.discount-section-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--co-red);
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.discount-input-group {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    min-width: 0;
}

.discount-input-group input {
    flex: 1;
    min-width: 0;
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--co-border);
    border-radius: 10px;
    background: #ffffff;
    color: var(--co-navy);
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    outline: none;
    box-sizing: border-box;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.discount-input-group input:focus {
    border-color: var(--co-red);
    box-shadow: 0 0 0 3px rgba(225, 29, 36, 0.12);
}

.btn-apply {
    background: var(--co-navy);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.92rem;
    letter-spacing: 0.5px;
    padding: 0 1.4rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-apply:hover {
    background: var(--co-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 36, 0.25);
}

.discount-message {
    margin-top: 0.55rem;
    font-size: 0.86rem;
    font-weight: 600;
}

.discount-message.success { color: #10b981; }
.discount-message.error { color: #ef4444; }
.summary-discount { color: #10b981; font-weight: 800; }

.secure-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--co-text-muted);
    width: 100%;
}

.card-logos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.card-logo {
    display: inline-block;
    padding: 3px 10px;
    background: #f1f5f9;
    border: 1px solid var(--co-border);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    color: var(--co-navy);
    letter-spacing: 0.5px;
}

/* Checkbox and Legal Styling */
.co-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--co-text-muted);
    cursor: pointer;
    margin-bottom: 0.6rem;
}

.co-checkbox-label a {
    color: var(--co-red);
    text-decoration: underline;
}

.co-checkbox-label input[type="checkbox"] {
    accent-color: var(--co-red);
    width: 16px;
    height: 16px;
}

/* =============================================
   RESPONSIVE DESIGN (All screens 320px - 4K)
   ============================================= */
@media (max-width: 992px) {
    .co-main {
        grid-template-columns: 1fr;
        padding: 1.25rem 1rem 3rem;
    }
    
    .co-summary-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .co-left, .co-summary-card {
        padding: 1.25rem 1.1rem;
        border-radius: 14px;
    }

    .co-phone-row {
        flex-direction: row;
        gap: 8px;
    }

    .co-phone-row select {
        width: 105px !important;
        flex-shrink: 0;
    }

    .co-phone-row input {
        flex: 1;
        min-width: 0;
    }
}
