/* ===== CHECKOUT PAGE CSS ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --navy: #1B2A4A;
    --navy-dark: #0f1e38;
    --green: #28a745;
    --green-hover: #218838;
    --green-light: #d4edda;
    --red: #dc3545;
    --yellow: #ffc107;
    --orange: #fd7e14;
    --white: #ffffff;
    --off-white: #f5f7fa;
    --gray-50: #f8f9fa;
    --gray-100: #eef1f5;
    --gray-200: #dee2e6;
    --gray-300: #ced4da;
    --gray-400: #adb5bd;
    --gray-500: #6c757d;
    --text-primary: #1a1a2e;
    --text-secondary: #4a4a5a;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.07);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.13);
    --radius: 10px;
    --transition: 0.25s ease;
}

body {
    font-family: 'Manrope', -apple-system, sans-serif;
    background: #f0f2f5;
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
}

.hidden { display: none !important; }

/* ===== URGENCY BAR ===== */
.urgency-bar {
    background: linear-gradient(90deg, #e8a000, #ffc107, #e8a000);
    color: #1a1000;
    padding: 11px 16px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.urgency-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.urgency-fire { font-size: 18px; }
.urgency-timer {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(0,0,0,0.15);
    padding: 4px 14px;
    border-radius: 6px;
}
.timer-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 32px;
}
.timer-block span {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.timer-block small { font-size: 9px; letter-spacing: 1px; opacity: 0.8; }
.timer-sep { font-size: 22px; font-weight: 900; margin-bottom: 10px; }

/* ===== HEADER ===== */
.co-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    padding: 14px 0;
}
.co-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.co-logo {
    font-size: 26px;
    font-weight: 900;
    color: var(--navy);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.co-header-trust {
    display: flex;
    gap: 20px;
}
.co-trust-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

/* ===== DISCOUNT BAR ===== */
.discount-applied-bar {
    background: #ebfaf0;
    border-bottom: 1px solid #b2dfcc;
    padding: 10px 0;
}
.discount-badge-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #1a5c32;
    font-weight: 600;
}
.discount-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.promo-pill {
    margin-left: auto;
    background: var(--green);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 12px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}

/* ===== MAIN LAYOUT ===== */
.co-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}
.co-main {
    padding: 30px 0 50px;
}
.co-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 28px;
    align-items: start;
}

/* ===== FORM COLUMN ===== */
.co-form-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== PURCHASE TABS ===== */
.purchase-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--gray-200);
    background: white;
}
.ptab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: all var(--transition);
    text-align: left;
}
.ptab.active {
    background: var(--navy);
    color: white;
}
.ptab:not(.active):hover { background: var(--gray-100); }
.ptab-icon { font-size: 20px; flex-shrink: 0; }
.ptab-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.ptab.active .ptab-label { color: white; }
.ptab:not(.active) .ptab-label { color: var(--navy); }
.ptab-sub-label {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 500;
}
.ptab.active .ptab-sub-label { color: rgba(255,255,255,0.75); }
.ptab:not(.active) .ptab-sub-label { color: var(--text-muted); }
.ptab-badge {
    position: absolute;
    top: -1px;
    right: 10px;
    background: var(--green);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 0 0 6px 6px;
    letter-spacing: 0.5px;
}

/* ===== PACKAGES ===== */
.packages-section {
    background: white;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.packages-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pkg-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition);
    background: white;
    position: relative;
}
.pkg-card:last-child { margin-bottom: 0; }
.pkg-card:hover { border-color: var(--navy); }
.pkg-card.pkg-selected {
    border-color: var(--green);
    background: #f6fff9;
    box-shadow: 0 0 0 1px var(--green);
}
.pkg-radio { flex-shrink: 0; }
.pkg-radio-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    transition: all var(--transition);
    position: relative;
}
.pkg-radio-dot.active {
    border-color: var(--green);
    background: var(--green);
}
.pkg-radio-dot.active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}
.pkg-img { flex-shrink: 0; }
.pkg-product-visual {
    width: 52px;
    height: 64px;
    background: linear-gradient(145deg, #eef1f5, #dde4ec);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-direction: column;
    line-height: 1;
    text-align: center;
}
.pkg-product-visual small { font-size: 10px; font-weight: 700; color: var(--navy); }
.pkg-info { flex: 1; }
.pkg-row-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pkg-name { font-size: 14px; font-weight: 700; color: var(--navy); }
.pkg-label {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}
.best-value { background: #fff3d4; color: #a06000; }
.top-seller { background: #ffe8e8; color: #c00; }
.pkg-qty { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.pkg-saving { font-size: 12px; color: var(--green); margin-top: 2px; }
.pkg-pricing { text-align: right; flex-shrink: 0; }
.pkg-old-price {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}
.pkg-new-price {
    font-size: 20px;
    font-weight: 800;
    color: var(--green);
    line-height: 1;
}
.pkg-new-price small { font-size: 11px; font-weight: 600; }
.pkg-total { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== TRUST ROW ===== */
.trust-row {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    background: white;
    border-radius: var(--radius);
    padding: 16px 14px;
    box-shadow: var(--shadow-sm);
}
.trust-icon-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    flex: 1;
}
.trust-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.trust-icon-item span { font-size: 11px; font-weight: 600; color: var(--text-secondary); }

/* ===== FORM SECTIONS ===== */
.form-section {
    background: white;
    border-radius: var(--radius);
    padding: 22px 22px 24px;
    box-shadow: var(--shadow-sm);
}
.form-section-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--navy);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}
.form-row { margin-bottom: 14px; }
.form-row:last-child { margin-bottom: 0; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}
.form-group input,
.form-group select {
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--gray-50);
    transition: all var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group select:focus {
    border-color: var(--navy);
    background: white;
    box-shadow: 0 0 0 3px rgba(27,42,74,0.1);
}
.form-group input.error { border-color: var(--red); }
.form-group input::placeholder { color: var(--gray-400); }

/* ===== PAYMENT METHODS ===== */
.payment-methods {
    display: flex;
    gap: 0;
    margin-bottom: 18px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}
.pay-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.pay-tab.active {
    background: white;
    color: var(--navy);
    box-shadow: inset 0 -3px 0 var(--navy);
}
.pay-tab:not(.active):hover { background: var(--gray-100); }

/* ===== CC FORM ===== */
.cc-icons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.cc-icon {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.cc-icon.visa { background: #1a1f71; color: white; }
.cc-icon.mc { background: #eb001b; color: white; }
.cc-icon.amex { background: #016fd0; color: white; }
.cc-icon.discover { background: #ff6600; color: white; }
.cc-lock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--green);
    font-weight: 600;
    margin-left: auto;
}
.card-input-wrap { position: relative; }
.card-input-wrap input { width: 100%; padding-right: 40px; }
.card-type-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
}
.cvv-tooltip {
    cursor: help;
    color: var(--text-muted);
    font-size: 12px;
}

/* ===== PAYPAL FORM ===== */
.paypal-form {
    text-align: center;
    padding: 30px 20px;
    background: #f7f9fc;
    border-radius: 8px;
    border: 1.5px dashed var(--gray-300);
    margin-bottom: 16px;
}
.paypal-logo { margin-bottom: 10px; }
.paypal-info p { font-size: 14px; color: var(--text-muted); }

/* ===== TERMS ===== */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 18px 0;
    padding: 14px;
    background: var(--gray-50);
    border-radius: 8px;
    border: 1.5px solid var(--gray-200);
}
.terms-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--green);
    cursor: pointer;
}
.terms-check label {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    cursor: pointer;
}
.terms-check label a { color: var(--navy); font-weight: 700; text-decoration: underline; }

/* ===== ORDER BUTTON ===== */
.order-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #28a745, #20913c);
    color: white;
    border: none;
    padding: 18px 20px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition);
    font-family: inherit;
    box-shadow: 0 6px 20px rgba(40,167,69,0.35);
    position: relative;
    overflow: hidden;
}
.order-btn:hover {
    background: linear-gradient(135deg, #20913c, #1a7a30);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(40,167,69,0.45);
}
.order-btn:active { transform: translateY(0); }
.order-btn::after {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}
@keyframes shimmer { 0%{left:-100%} 100%{left:100%} }

.order-sub {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 12px;
    color: var(--green);
    margin-top: 10px;
    font-weight: 600;
}

/* ===== PAYMENT LOGOS ===== */
.payment-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}
.pay-logo {
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.5px;
    border: 1.5px solid var(--gray-200);
    color: var(--text-muted);
}

/* ===== SUMMARY COL ===== */
.summary-sticky {
    position: sticky;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.summary-box {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.summary-header {
    background: var(--navy);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.summary-header h3 { font-size: 16px; font-weight: 800; }
.summary-discount-tag {
    background: var(--green);
    color: white;
    font-size: 11px;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    letter-spacing: 0.5px;
}
.summary-product {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-100);
}
.summary-pen-visual {
    width: 56px;
    height: 70px;
    background: linear-gradient(145deg, #eef1f5, #dde4ec);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.summary-product-name { font-size: 15px; font-weight: 800; color: var(--navy); }
.summary-product-qty { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.summary-discount-badge {
    font-size: 11px;
    color: var(--green);
    font-weight: 600;
    margin-top: 4px;
}
.summary-lines { padding: 14px 20px 0; }
.summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 5px 0;
}
.summary-line-discount { color: var(--green); font-weight: 600; }
.free-shipping { color: var(--green); font-weight: 700; }
.summary-divider { height: 1px; background: var(--gray-200); margin: 12px 20px; }
.summary-total-line {
    display: flex;
    justify-content: space-between;
    padding: 0 20px 18px;
    font-size: 20px;
    font-weight: 900;
    color: var(--navy);
}
.guarantee-box {
    margin: 0 16px 16px;
    padding: 14px;
    background: #f6fff9;
    border: 1.5px solid #b2dfcc;
    border-radius: 8px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}
.guarantee-icon { font-size: 28px; flex-shrink: 0; }
.guarantee-text strong { font-size: 13px; color: var(--navy); display: block; margin-bottom: 4px; }
.guarantee-text p { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ===== WHAT'S INCLUDED ===== */
.whats-included {
    background: white;
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.whats-included h4 {
    font-size: 13px;
    font-weight: 800;
    color: var(--navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}
.whats-included ul { list-style: none; }
.whats-included li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    padding: 4px 0;
}
.wi-check {
    color: var(--green);
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* ===== SUMMARY REVIEWS ===== */
.summary-reviews {
    background: white;
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--green);
}
.summary-stars { color: var(--yellow); font-size: 16px; margin-bottom: 6px; letter-spacing: 2px; }
.summary-reviews p { font-size: 13px; color: var(--text-secondary); font-style: italic; margin-bottom: 4px; }
.summary-reviews small { font-size: 12px; color: var(--text-muted); }

/* ===== FOOTER ===== */
.co-footer {
    background: var(--navy);
    color: rgba(255,255,255,0.6);
    padding: 28px 0;
    text-align: center;
}
.co-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.co-footer-links a {
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    text-decoration: none;
    transition: color var(--transition);
}
.co-footer-links a:hover { color: white; }
.co-footer-copy { font-size: 13px; margin-bottom: 8px; }
.co-footer-disc { font-size: 11px; max-width: 700px; margin: 0 auto; line-height: 1.5; opacity: 0.7; }

/* ===== SOCIAL PROOF POPUP ===== */
.social-popup {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: white;
    border-radius: 10px;
    padding: 14px 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 300px;
    z-index: 9000;
    transform: translateX(-120%);
    transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
    border-left: 4px solid var(--green);
}
.social-popup.show { transform: translateX(0); }
.social-popup-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.social-popup-text { flex: 1; }
.social-popup-text strong { font-size: 13px; color: var(--navy); }
.social-popup-text span { font-size: 13px; color: var(--text-secondary); }
.popup-time { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.popup-close {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}

/* ===== PROCESSING OVERLAY ===== */
.processing-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.processing-box {
    background: white;
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.processing-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--green);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.processing-box h3 { font-size: 20px; font-weight: 800; color: var(--navy); margin-bottom: 6px; }
.processing-box p { font-size: 14px; color: var(--text-muted); }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .co-grid { grid-template-columns: 1fr; }
    .co-summary-col { order: -1; }
    .summary-sticky { position: static; }
}
@media (max-width: 640px) {
    .urgency-inner { gap: 8px; font-size: 12px; }
    .timer-block span { font-size: 18px; }
    .co-header-inner { flex-direction: column; gap: 8px; }
    .co-header-trust { gap: 14px; }
    .purchase-tabs { grid-template-columns: 1fr; }
    .ptab:first-child { border-bottom: 2px solid var(--gray-200); }
    .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
    .pkg-card { flex-wrap: wrap; }
    .pkg-pricing { width: 100%; text-align: left; display: flex; gap: 10px; align-items: center; }
    .trust-row { display: grid; grid-template-columns: 1fr 1fr; }
    .co-container { padding: 0 16px; }
}
