/* Base Styles */
:root {
    --ec-primary: #e53935;
    --ec-primary-dark: #c62828;
    --ec-primary-light: #ffcdd2;
    --ec-secondary: #f5f5f5;
    --ec-dark: #212121;
    --ec-light: #ffffff;
    --ec-gray: #757575;
    --ec-gray-light: #e0e0e0;
    --ec-success: #4caf50;
    --ec-warning: #ff9800;
    --ec-danger: #f44336;
    --ec-border-radius: 8px;
    --ec-shadow-sm: 0 1px 3px rgba(0,0,0,0.12);
    --ec-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --ec-shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', Arial, sans-serif;
    background-color: #f9f9f9;
    color: var(--ec-dark);
    line-height: 1.6;
}

/* Checkout Container */
.ec-checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Checkout Header */
.ec-checkout-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}

.ec-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--ec-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.ec-logo i {
    margin-right: 10px;
}

.ec-logo a {
    color: inherit;
    text-decoration: none;
}

.ec-checkout-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.ec-checkout-steps:before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--ec-gray-light);
    z-index: 1;
}

.ec-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
}

.ec-step-number {
    width: 32px;
    height: 32px;
    background-color: var(--ec-gray-light);
    color: var(--ec-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.ec-step-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--ec-gray);
    transition: all 0.3s ease;
}

.ec-step-active .ec-step-number {
    background-color: var(--ec-primary);
    color: var(--ec-light);
}

.ec-step-active .ec-step-title {
    color: var(--ec-primary);
    font-weight: 600;
}

/* Checkout Main Layout */
.ec-checkout-main {
    display: flex;
    gap: 30px;
}

.ec-shipping-section {
    flex: 2;
    background-color: var(--ec-light);
    padding: 25px;
    border-radius: var(--ec-border-radius);
    box-shadow: var(--ec-shadow);
}

.ec-order-summary {
    flex: 1;
    background-color: var(--ec-light);
    padding: 25px;
    border-radius: var(--ec-border-radius);
    box-shadow: var(--ec-shadow);
    align-self: flex-start;
    position: sticky;
    top: 20px;
}

/* Section Headers */
.ec-section-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--ec-gray-light);
}

.ec-section-header h2 {
    font-size: 20px;
    color: var(--ec-dark);
    display: flex;
    align-items: center;
}

.ec-section-header i {
    margin-right: 10px;
    color: var(--ec-primary);
}

.ec-form-section {
    margin-bottom: 30px;
}

.ec-form-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--ec-dark);
    display: flex;
    align-items: center;
}

.ec-form-section i {
    margin-right: 8px;
    color: var(--ec-primary);
    font-size: 14px;
}

/* Form Elements */
.ec-form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.ec-form-group {
    flex: 1;
    margin-bottom: 15px;
    position: relative;
}

.ec-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ec-dark);
}

.ec-form-group input,
.ec-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--ec-gray-light);
    border-radius: var(--ec-border-radius);
    font-size: 14px;
    transition: all 0.3s ease;
}

.ec-form-group input:focus,
.ec-form-group select:focus {
    outline: none;
    border-color: var(--ec-primary);
    box-shadow: 0 0 0 2px rgba(229, 57, 53, 0.1);
}

.ec-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--ec-gray);
}

/* Payment Methods */
.ec-payment-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.ec-payment-option {
    position: relative;
}

.ec-payment-option input {
    position: absolute;
    opacity: 0;
}

.ec-payment-option label {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--ec-gray-light);
    border-radius: var(--ec-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
}

.ec-payment-option input:checked + label {
    border-color: var(--ec-primary);
    background-color: rgba(229, 57, 53, 0.05);
    box-shadow: 0 0 0 1px var(--ec-primary);
}

.ec-payment-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--ec-secondary);
    border-radius: 50%;
    margin-right: 15px;
    color: var(--ec-primary);
    font-size: 18px;
}

.ec-payment-label {
    font-weight: 500;
    font-size: 15px;
}

.ec-payment-method-fields {
    padding: 20px;
    background-color: var(--ec-secondary);
    border-radius: var(--ec-border-radius);
    margin-top: 15px;
}

.ec-paypal-info {
    text-align: center;
    padding: 15px;
}

.ec-paypal-info i {
    color: #003087;
    font-size: 24px;
    margin-bottom: 10px;
}

.ec-paypal-info p {
    color: var(--ec-dark);
}

/* Order Summary */
.ec-summary-header h3 {
    display: flex;
    align-items: center;
}

.ec-summary-header i {
    margin-right: 10px;
    color: var(--ec-primary);
}

.ec-summary-items {
    margin-bottom: 20px;
}

.ec-summary-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--ec-gray-light);
}

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

.ec-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background-color: #f9f9f9;
    border-radius: 4px;
    overflow: hidden;
}

.ec-item-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ec-item-details {
    flex: 1;
}

.ec-item-details h4 {
    font-size: 15px;
    margin-bottom: 5px;
    color: var(--ec-dark);
}

.ec-item-variant {
    font-size: 13px;
    color: var(--ec-gray);
    margin-bottom: 5px;
}

.ec-item-price {
    font-weight: 500;
    color: var(--ec-dark);
    margin-bottom: 5px;
}

.ec-item-quantity {
    font-size: 13px;
    color: var(--ec-gray);
}

.ec-summary-totals {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid var(--ec-gray-light);
    border-bottom: 1px solid var(--ec-gray-light);
}

.ec-total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
}

.ec-total-row:last-child {
    margin-bottom: 0;
}

.ec-total-grand {
    font-weight: 600;
    font-size: 16px;
    color: var(--ec-primary);
}

.ec-security-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--ec-gray-light);
    font-size: 13px;
    color: var(--ec-gray);
}

.ec-security-info p {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.ec-security-info i {
    margin-right: 8px;
    color: var(--ec-primary);
}

/* Buttons */
.ec-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--ec-border-radius);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
}

.ec-btn i {
    margin-right: 8px;
}

.ec-btn-primary {
    background-color: var(--ec-primary);
    color: var(--ec-light);
}

.ec-btn-primary:hover {
    background-color: var(--ec-primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--ec-shadow);
}

.ec-btn-secondary {
    background-color: transparent;
    color: var(--ec-primary);
    border: 1px solid var(--ec-primary);
}

.ec-btn-secondary:hover {
    background-color: rgba(229, 57, 53, 0.1);
}

.ec-form-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

/* Error States */
.ec-field-error {
    border-color: var(--ec-danger) !important;
}

.ec-field-error:focus {
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2) !important;
}

.ec-error-message {
    color: var(--ec-danger);
    font-size: 12px;
    margin-top: 5px;
}

.ec-form-error {
    display: flex;
    align-items: center;
    background-color: #ffebee;
    color: var(--ec-danger);
    padding: 12px 15px;
    border-radius: var(--ec-border-radius);
    margin-bottom: 20px;
    animation: fadeIn 0.3s ease;
}

.ec-form-error i {
    margin-right: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .ec-checkout-main {
        flex-direction: column;
    }
    
    .ec-order-summary {
        position: static;
        margin-top: 30px;
    }
    
    .ec-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .ec-checkout-steps:before {
        top: 12px;
    }
    
    .ec-step-number {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
    
    .ec-step-title {
        font-size: 12px;
    }
    
    .ec-payment-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
        margin-right: 10px;
    }
    
    .ec-payment-label {
        font-size: 14px;
    }
    
    .ec-form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .ec-btn {
        width: 100%;
    }
}