/* Order Page Styles - As Seen On TV Style */

:root {
    --primary: #e63946;
    --primary-dark: #c1121f;
    --secondary: #1d3557;
    --accent: #f4a261;
    --success: #2a9d8f;
    --light: #f1faee;
    --dark: #1d3557;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-600: #6c757d;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--gray-100);
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.order-header {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--dark) 100%);
    padding: 15px 0;
    text-align: center;
}

.order-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.order-header .logo {
    height: 50px;
}

.header-badge {
    background: var(--primary);
    color: var(--white);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Content */
.order-main {
    padding: 40px 0;
}

/* Product Section */
.product-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.product-image img {
    width: 100%;
    border-radius: 8px;
}

.product-info h1 {
    font-size: 28px;
    color: var(--secondary);
    margin-bottom: 15px;
}

.product-description {
    color: var(--gray-600);
    margin-bottom: 20px;
    font-size: 16px;
}

.price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.compare-price {
    text-decoration: line-through;
    color: var(--gray-600);
    font-size: 18px;
}

.current-price {
    font-size: 36px;
    font-weight: bold;
    color: var(--primary);
}

.shipping-badge {
    background: var(--success);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* Upsells Section */
.upsells-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.upsells-section h2 {
    text-align: center;
    color: var(--secondary);
    margin-bottom: 25px;
    font-size: 24px;
}

.upsells-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.upsell-card {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upsell-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.upsell-card.selected {
    border-color: var(--success);
    background: rgba(42, 157, 143, 0.05);
}

.upsell-card img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 15px;
}

.upsell-card h3 {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.upsell-price {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.upsell-price .compare {
    text-decoration: line-through;
    color: var(--gray-600);
    font-size: 14px;
}

.upsell-price .price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
}

.upsell-price .each {
    font-size: 12px;
    color: var(--gray-600);
}

/* Quantity Controls */
.quantity-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin: 15px 0;
}

.qty-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--primary);
    background: var(--white);
    color: var(--primary);
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover:not(:disabled) {
    background: var(--primary);
    color: var(--white);
}

.qty-btn:disabled {
    border-color: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

.qty-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--secondary);
    min-width: 30px;
    text-align: center;
}

.upsell-subtotal {
    font-size: 14px;
    font-weight: 600;
    color: var(--success);
    min-height: 20px;
    margin: 0;
}

.upsell-card.selected {
    border-color: var(--success);
    background: rgba(42, 157, 143, 0.05);
}

/* Summary item quantity */
.item-qty {
    font-size: 12px;
    color: var(--gray-600);
    margin-left: 5px;
}

/* Order Summary */
.order-summary {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.order-summary h2 {
    color: var(--secondary);
    margin-bottom: 20px;
    font-size: 22px;
}

.summary-items {
    border-bottom: 1px solid var(--gray-200);
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.summary-item .item-name {
    font-weight: 500;
}

.summary-item .item-price {
    font-weight: bold;
    color: var(--secondary);
}

.summary-item .remove-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 16px;
}

.summary-row.total {
    font-size: 22px;
    font-weight: bold;
    color: var(--secondary);
    border-top: 2px solid var(--gray-200);
    padding-top: 15px;
    margin-top: 10px;
}

/* Checkout Section */
.checkout-section {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.checkout-section h2 {
    color: var(--secondary);
    margin-bottom: 25px;
    font-size: 22px;
    text-align: center;
}

#checkout-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Footer */
.order-footer {
    background: var(--secondary);
    color: var(--white);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .product-section {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-info h1 {
        font-size: 24px;
    }

    .current-price {
        font-size: 28px;
    }

    .price-box {
        justify-content: center;
    }

    .order-header .container {
        justify-content: center;
    }

    .upsells-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .product-section,
    .upsells-section,
    .order-summary,
    .checkout-section {
        padding: 20px;
    }

    .header-badge {
        font-size: 12px;
        padding: 6px 15px;
    }
}

/* Customer Form Styles */
.customer-form {
    margin-bottom: 30px;
}

.customer-form .form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.customer-form .form-group {
    margin-bottom: 15px;
}

.customer-form label {
    display: block;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 6px;
    font-size: 14px;
}

.customer-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.customer-form input:focus {
    outline: none;
    border-color: var(--primary);
}

.customer-form input.error {
    border-color: var(--primary);
}

/* PayPal Container */
.paypal-container {
    margin: 25px 0;
}

#paypal-button-container {
    min-height: 45px;
}

.secure-notice {
    text-align: center;
    color: var(--gray-600);
    font-size: 13px;
    margin-top: 15px;
}

.secure-notice::before {
    content: "🔒 ";
}

/* Order Success */
.order-success {
    text-align: center;
    padding: 60px 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 40px auto;
}

.order-success .success-icon {
    width: 80px;
    height: 80px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.order-success .success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.order-success h2 {
    color: var(--success);
    margin-bottom: 10px;
    font-size: 28px;
}

.order-success .order-number {
    font-size: 20px;
    font-weight: bold;
    color: var(--secondary);
    background: var(--gray-100);
    padding: 12px 25px;
    border-radius: 8px;
    display: inline-block;
    margin: 20px 0;
}

.order-success p {
    color: var(--gray-600);
    margin: 10px 0;
    font-size: 16px;
}

.order-success .email-notice {
    color: var(--secondary);
    font-weight: 500;
    margin-top: 25px;
}

.order-success .continue-shopping {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 35px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
}

.order-success .continue-shopping:hover {
    background: var(--primary-dark);
}
