/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

:root {
    --primary-color: #f8b195;
    --secondary-color: #f67280;
    --accent-color: #c06c84;
    --light-color: #fff5f5;
    --dark-color: #6c5b7b;
    --gray-color: #f1f1f1;
    --text-color: #333;
    --border-radius: 8px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--accent-color);
    font-size: 2.5rem;
}

h2 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

/* Checkout Container */
.checkout-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.checkout-forms {
    flex: 1 1 60%;
    min-width: 300px;
}

.order-summary {
    flex: 1 1 35%;
    min-width: 300px;
}

/* Section Styling */
.checkout-section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.checkout-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Form Styling */
.form-group {
    margin-bottom: 1.2rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(248, 177, 149, 0.3);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
}

/* Payment Options */
.payment-options {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-option i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.payment-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(248, 177, 149, 0.1);
}

.payment-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.payment-form {
    margin-top: 1.5rem;
}

.paypal-button {
    background-color: #0070ba;
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.paypal-button:hover {
    background-color: #005ea6;
}

.verify-button {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.verify-button:hover {
    background-color: #5a4a68;
}

/* Order Summary Styling */
.order-items {
    margin-bottom: 1.5rem;
}

.order-item {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

/* Styling for product icons in order summary */
.item-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius);
    background-color: #f8f4f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.item-icon i {
    transition: transform 0.3s ease;
}

.order-item:hover .item-icon i {
    transform: scale(1.2);
}

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.item-price {
    color: #666;
    font-size: 0.9rem;
}

.item-discount {
    color: var(--secondary-color);
    font-size: 0.85rem;
    font-weight: 600;
}

.item-total {
    font-weight: 600;
    font-size: 1.1rem;
}

.order-totals {
    border-top: 2px dashed #eee;
    padding-top: 1rem;
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.totals-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--accent-color);
    border-top: 1px solid #eee;
    padding-top: 0.8rem;
    margin-top: 0.8rem;
}

/* Promo Code */
.promo-code {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
}

.apply-button {
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    white-space: nowrap;
}

.apply-button:hover {
    background-color: #5a4a68;
}

/* Review Button */
.review-button {
    width: 100%;
    background-color: var(--dark-color);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    margin-bottom: 1rem;
}

.review-button:hover {
    background-color: #5a4a68;
}

/* Place Order Button */
.place-order-button {
    width: 100%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 4px 8px rgba(246, 114, 128, 0.3);
}

.place-order-button:hover {
    background-color: #e56574;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(246, 114, 128, 0.4);
}

/* Modal Styling */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--text-color);
}

.review-content {
    margin: 1.5rem 0;
}

.review-section {
    margin-bottom: 1.5rem;
}

.review-section h3 {
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
}

.secondary-button {
    background-color: #eee;
    color: var(--text-color);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.secondary-button:hover {
    background-color: #ddd;
}

.primary-button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.primary-button:hover {
    background-color: #e56574;
}

/* Confirmation Modal */
.confirmation-content {
    text-align: center;
    padding: 1rem 0;
}

.confirmation-content i {
    font-size: 4rem;
    color: #4CAF50;
    margin-bottom: 1rem;
}

.confirmation-content h2 {
    color: #4CAF50;
    margin-bottom: 1rem;
}

.confirmation-content p {
    margin-bottom: 1rem;
}

.confirmation-content button {
    margin-top: 1rem;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .checkout-container {
        flex-direction: column-reverse;
    }

    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .payment-options {
        flex-direction: column;
    }

    .payment-option {
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }

    .payment-option i {
        margin-bottom: 0;
    }

    .modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-buttons {
        flex-direction: column;
    }
}
