/* Checkout Page Styles - Completo con Sistema de Direcciones */

/* Checkout Container */
.checkout-container {
    margin: 40px 0 80px;
}

.checkout-login-message {
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 40px;
    text-align: center;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.checkout-login-message a {
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.checkout-login-message a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Checkout Form Container */
.checkout-form-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
}

.checkout-left {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(13, 51, 39, 0.08);
    height: fit-content;
}

.checkout-right {
    position: sticky;
    top: 30px;
    height: fit-content;
}

/* Checkout Sections */
.checkout-section {
    margin-bottom: 50px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.checkout-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.checkout-section h2 {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
    letter-spacing: -0.3px;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 14px;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    font-family: var(--body-font);
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    background-color: white;
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.1);
}

.form-control:hover {
    border-color: var(--secondary-color);
    background-color: white;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Address Selection Styles for Checkout */

/* Address Selection Container */
.address-selection-container {
    margin-bottom: 30px;
    padding: 25px;
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    border-radius: 16px;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.address-selection-container h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

/* Saved Addresses */
.saved-addresses {
    margin-bottom: 20px;
}

.address-option {
    margin-bottom: 15px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: white;
    animation: slideIn 0.3s ease-out;
}

.address-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.address-option:last-child {
    margin-bottom: 0;
}

.address-option label {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    cursor: pointer;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    width: 100%;
}

.address-option input[type="radio"] {
    margin-right: 15px;
    margin-top: 5px;
    transform: scale(1.3);
    accent-color: var(--primary-color);
}

.address-option input[type="radio"]:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

.address-option input[type="radio"]:checked + .address-preview {
    color: var(--primary-color);
    background-color: rgba(13, 51, 39, 0.02);
}

.address-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: rgba(13, 51, 39, 0.02);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Address Preview */
.address-preview {
    flex: 1;
    line-height: 1.5;
}

.address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.address-header strong {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
    font-family: var(--heading-font);
}

.address-option:hover .address-header strong {
    color: var(--secondary-color);
}

.default-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.address-option:hover .default-badge {
    transform: scale(1.05);
}

.address-preview div {
    margin-bottom: 3px;
    color: #666;
    font-size: 14px;
}

.address-preview div:last-child {
    margin-bottom: 0;
}

/* Address Actions */
.address-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Add New Address Button */
#add-new-address-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#add-new-address-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 51, 39, 0.2);
}

#add-new-address-btn:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

#add-new-address-btn svg {
    transition: transform 0.3s ease;
}

#add-new-address-btn:hover svg {
    transform: rotate(90deg);
}

/* Manual Address Form */
.manual-address-form {
    margin-top: 20px;
}

/* Save Address Option */
#save-address-option {
    margin-top: 25px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(13, 51, 39, 0.03) 0%, rgba(176, 136, 64, 0.03) 100%);
    border-radius: 12px;
    border: 1px solid rgba(13, 51, 39, 0.1);
}

/* Checkbox Container */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-container label {
    cursor: pointer;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    color: #666;
    font-size: 14px;
}

.checkmark {
    position: relative;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-color: white;
    border: 2px solid #e8e8e8;
    border-radius: 4px;
    margin-right: 12px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.checkbox-container:hover .checkmark {
    border-color: var(--secondary-color);
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

/* Loading State for Address Selection */
.address-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.address-loading .spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 15px;
    animation: spin 1s linear infinite;
}

/* Empty State for No Addresses */
.no-addresses-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(13, 51, 39, 0.02) 0%, rgba(176, 136, 64, 0.02) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(13, 51, 39, 0.2);
    margin-bottom: 20px;
}

.no-addresses-message h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.no-addresses-message p {
    color: #666;
    margin-bottom: 0;
    font-size: 16px;
    font-weight: 300;
}

/* Success states */
.address-option.newly-added {
    border-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
    animation: pulse 2s ease-in-out;
}

/* Shipping Options */
.shipping-options {
    margin-top: 25px;
}

.shipping-option {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.shipping-option:hover {
    border-color: var(--secondary-color);
    background-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.shipping-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(13, 51, 39, 0.03);
}

.shipping-option input {
    margin-right: 15px;
    margin-top: 5px;
    transform: scale(1.2);
}

.shipping-option label {
    flex: 1;
    cursor: pointer;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.shipping-name {
    display: block;
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.shipping-price {
    display: block;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 5px;
}

.shipping-info {
    display: block;
    font-size: 14px;
    color: #666;
    font-weight: 300;
}

/* Payment Options */
.payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 35px;
}

.payment-option {
    flex: 1;
    min-width: 200px;
}

.payment-option label {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
}

.payment-option label:hover {
    border-color: var(--secondary-color);
    background-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

.payment-option input:checked + label {
    border-color: var(--primary-color);
    background-color: rgba(13, 51, 39, 0.03);
}

.payment-logo {
    width: 45px;
    height: 30px;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.payment-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.payment-name {
    font-weight: 600;
    color: var(--primary-color);
}

/* PayPal Container */
.paypal-container {
    margin-top: 25px;
    padding: 25px;
    background-color: var(--light-bg);
    border-radius: 12px;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

/* Card Payment Form */
.card-payment-form {
    margin-top: 25px;
    padding: 25px;
    background-color: var(--light-bg);
    border-radius: 12px;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.payment-btn {
    margin-top: 25px;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(13, 51, 39, 0.3);
    transition: all 0.3s ease;
}

.payment-btn:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, #7e2a3e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(110, 37, 55, 0.4);
}

/* Order Summary */
.order-summary {
    background-color: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.order-summary h2 {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-bg);
    text-align: center;
    letter-spacing: -0.3px;
}

/* Checkout Items */
.checkout-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.checkout-item:last-child {
    border-bottom: none;
}

.checkout-item-image {
    position: relative;
    margin-right: 15px;
    flex-shrink: 0;
}

.checkout-item-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.checkout-item-quantity {
    position: absolute;
    top: -8px;
    right: -8px;
    background: linear-gradient(135deg, var(--accent-color) 0%, #7e2a3e 100%);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(110, 37, 55, 0.3);
}

.checkout-item-details {
    flex: 1;
    margin-right: 15px;
}

.checkout-item-details h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.checkout-item-details p {
    font-size: 12px;
    color: #666;
    margin-bottom: 0;
}

.checkout-item-total {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 16px;
}

/* Summary Totals */
.summary-totals {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--light-bg);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 16px;
}

.summary-row:last-child {
    margin-bottom: 0;
}

.total-row {
    font-weight: 700;
    font-size: 20px;
    color: var(--primary-color);
    padding-top: 15px;
    margin-top: 15px;
    border-top: 2px solid var(--primary-color);
}

.coupon-row {
    color: var(--accent-color);
    font-weight: 600;
}

/* Payment Processing UI */
.payment-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.loader-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    box-shadow: var(--shadow-heavy);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 25px;
    animation: spin 1s linear infinite;
}

/* Payment Message */
.payment-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.message-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    max-width: 450px;
    box-shadow: var(--shadow-heavy);
}

.message-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-size: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.payment-message.error .message-icon {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
}

.message-content h2 {
    font-family: var(--heading-font);
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary-color);
    letter-spacing: -0.3px;
}

.message-content p {
    margin-bottom: 30px;
    color: #666;
    line-height: 1.6;
    font-weight: 300;
}

.message-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* New Address Modal Specific Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: var(--shadow-heavy);
    border: 1px solid rgba(13, 51, 39, 0.08);
    max-height: 90vh;
    overflow-y: auto;
}

#new-address-modal .modal-content {
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-modal:hover {
    background-color: var(--accent-color);
    color: white;
}

#new-address-modal h2 {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
    padding-right: 40px;
}

#new-address-modal .form-row {
    display: flex;
    gap: 20px;
}

#new-address-modal .form-row .form-group {
    flex: 1;
}

.form-footer {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

/* Error Messages */
#new-address-errors {
    margin-bottom: 20px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    font-weight: 500;
    border: 2px solid;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Form Controls in Address Section */
.address-selection-container .form-control,
.manual-address-form .form-control {
    background-color: white;
    border: 2px solid #e8e8e8;
}

.address-selection-container .form-control:focus,
.manual-address-form .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(176, 136, 64, 0.1);
}

/* Checkout Result Pages (Success, Cancel, Error) */

/* Common styles for all result pages */
.checkout-success-container,
.checkout-cancel-container,
.checkout-error-container {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
    background-color: white;
    border-radius: 20px;
    box-shadow: var(--shadow-medium);
    text-align: center;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.success-icon,
.cancel-icon,
.error-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.success-icon {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(40, 167, 69, 0.2) 100%);
    border: 2px solid rgba(40, 167, 69, 0.3);
}

.cancel-icon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(255, 193, 7, 0.2) 100%);
    border: 2px solid rgba(255, 193, 7, 0.3);
}

.error-icon {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(220, 53, 69, 0.2) 100%);
    border: 2px solid rgba(220, 53, 69, 0.3);
}

.checkout-success-container h1,
.checkout-cancel-container h1,
.checkout-error-container h1 {
    font-family: var(--heading-font);
    font-size: 32px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.success-message,
.cancel-message,
.error-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
    font-weight: 300;
}

.success-actions,
.cancel-actions,
.error-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
}

/* Success page specific styles */
.order-details {
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.order-number {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.order-date {
    color: #666;
}

/* Cancel page specific styles */
.order-info {
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    padding: 20px;
    border-radius: 12px;
    margin: 30px 0;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.order-id {
    font-size: 16px;
    color: #666;
}

/* Error page specific styles */
.error-details {
    background: linear-gradient(135deg, rgba(13, 51, 39, 0.02) 0%, rgba(176, 136, 64, 0.02) 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0 30px;
    text-align: left;
    border: 1px solid rgba(13, 51, 39, 0.08);
}

.error-details p {
    margin-bottom: 15px;
    color: #555;
}

.error-details ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 10px;
}

.error-details li {
    margin-bottom: 8px;
    color: #666;
}

.contact-support {
    margin-top: 30px;
    font-size: 14px;
    color: #666;
}

.contact-support a {
    color: var(--accent-color);
    text-decoration: underline;
    font-weight: 500;
}

.contact-support a:hover {
    color: var(--primary-color);
}

/* Order Tracking Styles */

/* Tracking container */
.tracking-container {
    max-width: 800px;
    margin: 40px auto 80px;
}

.tracking-form-container {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(13, 51, 39, 0.08);
    margin-bottom: 40px;
}

.tracking-form-container h2 {
    font-family: var(--heading-font);
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    letter-spacing: -0.3px;
}

/* Tracking result */
.tracking-result {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--shadow-medium);
    border: 1px solid rgba(13, 51, 39, 0.08);
    overflow: hidden;
}

.tracking-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4d3a 100%);
    color: var(--light-color);
    padding: 25px 30px;
    position: relative;
}

.tracking-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.03)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>');
    opacity: 0.4;
}

.tracking-header h2 {
    font-family: var(--heading-font);
    font-size: 28px;
    font-weight: 600;
    color: var(--light-color);
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.order-date {
    font-size: 14px;
    opacity: 0.8;
    position: relative;
    z-index: 1;
}

/* Status badge */
.status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.status-pending {
    background-color: #ffc107;
    color: #333;
}

.status-processing {
    background-color: #17a2b8;
    color: white;
}

.status-shipped {
    background-color: #6f42c1;
    color: white;
}

.status-delivered {
    background-color: #28a745;
    color: white;
}

.status-cancelled {
    background-color: #dc3545;
    color: white;
}

/* Tracking status */
.tracking-status {
    padding: 30px;
    background: linear-gradient(135deg, var(--light-bg) 0%, #f0f0f0 100%);
    border-bottom: 1px solid rgba(13, 51, 39, 0.08);
}

/* Order timeline */
.order-timeline {
    margin-top: 20px;
}

.timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 30px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: #e8e8e8;
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 0 10px;
    text-align: center;
}

.timeline-item::before {
    content: '';
    width: 16px;
    height: 16px;
    background-color: #e8e8e8;
    border: 3px solid white;
    border-radius: 50%;
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.timeline-item.active::before {
    background-color: var(--primary-color);
    border-color: white;
    width: 24px;
    height: 24px;
    top: 12px;
}

.timeline-item.completed::before {
    background-color: #28a745;
    border-color: white;
}

.timeline-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 30px;
}

.timeline-status {
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.timeline-item.active .timeline-status {
    color: var(--primary-color);
    font-size: 16px;
}

.timeline-desc {
    font-size: 12px;
    color: #666;
}

/* Tracking details */
.tracking-details {
    padding: 30px;
}

.tracking-section {
    margin-bottom: 40px;
}

.tracking-section:last-child {
    margin-bottom: 0;
}

.tracking-section h3 {
    font-family: var(--heading-font);
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.tracking-number {
    margin: 20px 0;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    margin-top: 10px;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

/* Responsive styles */
@media (max-width: 1024px) {
    .checkout-form-container {
        gap: 30px;
    }
    
    .checkout-left {
        padding: 30px;
    }
    
    .order-summary {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .checkout-form-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .checkout-right {
        position: static;
        order: -1;
    }
    
    .order-summary {
        margin-bottom: 0;
    }
    
    .payment-options {
        flex-direction: column;
    }
    
    .payment-option {
        min-width: auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .shipping-option {
        padding: 15px;
    }
    
    .payment-option label {
        padding: 15px;
    }
    
    /* Address Selection Responsive */
    .address-selection-container {
        padding: 20px;
    }
    
    .address-option label {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .address-option input[type="radio"] {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .default-badge {
        align-self: flex-start;
    }
    
    .address-actions {
        justify-content: center;
    }
    
    #add-new-address-btn {
        width: 100%;
        justify-content: center;
    }
    
    #new-address-modal .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    #new-address-modal .form-footer {
        flex-direction: column;
        gap: 10px;
    }
    
    #new-address-modal .form-footer button {
        width: 100%;
    }
    
    /* Result pages responsive */
    .checkout-success-container,
    .checkout-cancel-container,
    .checkout-error-container {
        padding: 30px 20px;
        margin: 40px auto;
    }
    
    .success-icon,
    .cancel-icon,
    .error-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }
    
    .checkout-success-container h1,
    .checkout-cancel-container h1,
    .checkout-error-container h1 {
        font-size: 26px;
    }
    
    .success-message,
    .cancel-message,
    .error-message {
        font-size: 16px;
    }
    
    .success-actions,
    .cancel-actions,
    .error-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .success-actions a,
    .cancel-actions a,
    .error-actions a {
        width: 100%;
    }
    
    /* Tracking responsive */
    .timeline {
        flex-direction: column;
        margin-left: 20px;
    }
    
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        width: 4px;
        height: 100%;
    }
    
    .timeline-item {
        padding: 0 0 30px 30px;
        text-align: left;
    }
    
    .timeline-item::before {
        left: 0;
        top: 0;
        transform: none;
    }
    
    .timeline-item.active::before {
        left: -4px;
        top: -4px;
    }
    
    .timeline-date {
        margin-bottom: 5px;
    }
    
    .tracking-form-container,
    .tracking-result {
        padding: 20px;
    }
    
    .tracking-header {
        padding: 20px;
    }
    
    .tracking-header h2 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .checkout-container {
        margin: 20px 0 40px;
    }
    
    .checkout-left {
        padding: 20px;
    }
    
    .order-summary {
        padding: 20px;
    }
    
    .checkout-section {
        margin-bottom: 30px;
        padding-bottom: 25px;
    }
    
    .checkout-section h2 {
        font-size: 20px;
    }
    
    .checkout-success-container,
    .checkout-cancel-container,
    .checkout-error-container {
        padding: 25px 15px;
        margin: 30px auto;
    }
    
    .error-details {
        padding: 15px;
    }
    
    .tracking-container {
        margin: 20px auto 40px;
    }
    
    .tracking-form-container,
    .tracking-result {
        padding: 15px;
    }
    
    .tracking-details {
        padding: 15px;
    }
    
    .status-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Ocultar el botón de radio en las opciones de pago */
.payment-option input[type="radio"] {
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Asegurar que el label mantenga la funcionalidad de clic */
.payment-option label {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    margin-bottom: 0;
    text-transform: none;
    letter-spacing: normal;
    font-weight: normal;
    width: 100%;
}

/* Mantener los estilos hover y checked */
.payment-option label:hover {
    border-color: var(--secondary-color);
    background-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-light);
}

/* Estilo cuando está seleccionado (usando :has() para detectar input checked) */
.payment-option:has(input[type="radio"]:checked) label {
    border-color: var(--primary-color);
    background-color: rgba(13, 51, 39, 0.03);
}