/* ===== ESTILOS PARA MODALES Y CARRITO ===== */

/* Modal Base */
.product-modal,
.cart-modal,
.checkout-modal,
.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.product-modal.active,
.cart-modal.active,
.checkout-modal.active,
.confirmation-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content,
.cart-modal-content,
.checkout-modal-content,
.confirmation-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* ===== MODAL DE PRODUCTO ===== */
.modal-content {
    max-width: 1000px;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3rem;
}

.modal-image {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.modal-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.product-description {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 10px;
}

.product-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.product-description p {
    color: var(--gray-color);
    line-height: 1.6;
}

/* Selector de Tallas */
.size-selector {
    margin: 2rem 0;
}

.size-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.size-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.8rem;
}

.size-btn {
    padding: 0.8rem;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.size-btn:hover {
    border-color: var(--primary-color);
    background: white;
}

.size-btn.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Selector de Cantidad */
.quantity-selector {
    margin: 2rem 0;
}

.quantity-selector h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: fit-content;
    background: var(--light-color);
    padding: 0.5rem;
    border-radius: 50px;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.qty-input {
    width: 60px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1.2rem;
    font-weight: 600;
}

/* Botón Añadir al Carrito */
.btn-add-to-cart {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 2rem 0;
    transition: all 0.3s ease;
}

.btn-add-to-cart:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Características del Producto */
.product-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--light-color);
}

.feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--gray-color);
}

.feature i {
    width: 35px;
    height: 35px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

/* ===== MODAL DE CARRITO ===== */
.cart-modal-content {
    max-width: 600px;
    width: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 1px solid var(--light-color);
}

.cart-header h2 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.8rem;
}

.cart-items-container {
    padding: 2rem;
    max-height: 400px;
    overflow-y: auto;
}

.cart-empty {
    text-align: center;
    padding: 3rem;
    color: var(--gray-color);
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 15px;
    margin-bottom: 1rem;
}

.cart-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    margin-bottom: 0.3rem;
}

.cart-item-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.3rem;
    border-radius: 20px;
}

.cart-qty-btn {
    width: 25px;
    height: 25px;
    background: var(--light-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.3s ease;
}

.cart-qty-btn:hover {
    background: var(--primary-color);
    color: white;
}

.cart-remove {
    background: none;
    border: none;
    color: #f5576c;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cart-remove:hover {
    transform: scale(1.2);
}

.cart-footer {
    padding: 2rem;
    border-top: 1px solid var(--light-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.total-amount {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-checkout {
    width: 100%;
    padding: 1.2rem;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
}

.btn-checkout:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===== MODAL DE CHECKOUT ===== */
.checkout-modal-content {
    max-width: 1100px;
    width: 100%;
    padding: 3rem;
}

.checkout-modal-content h2 {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.checkout-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.checkout-section {
    margin-bottom: 2rem;
}

.checkout-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--light-color);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Métodos de Pago */
.payment-info-box {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #ecfdf5;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid #10b981;
}

.payment-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.payment-icon i {
    font-size: 1.8rem;
    color: white;
}

.payment-text h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.payment-text p {
    color: var(--gray-color);
    line-height: 1.6;
    font-size: 0.95rem;
}

.payment-methods-selector {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-option-static {
    cursor: default;
}

.payment-card.active {
    background: white;
    border: 2px solid #10b981;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
}

.payment-card.active i {
    font-size: 2.5rem;
    color: #10b981;
}

.payment-card.active div strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--dark-color);
}

.payment-card.active div p {
    color: var(--gray-color);
    font-size: 0.9rem;
    margin: 0;
}

.payment-option {
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-color);
    border: 2px solid transparent;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.payment-option input:checked + .payment-card {
    background: white;
    border-color: var(--primary-color);
}

.payment-card i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Resumen del Pedido */
.order-summary {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.order-summary h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}

.summary-items {
    margin-bottom: 1.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
}

.summary-totals {
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    margin-top: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
}

.summary-row.total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 1rem;
}

.btn-confirm-order {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.btn-confirm-order:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-confirm-order i {
    font-size: 1.3rem;
}

/* ===== MODAL DE CONFIRMACIÓN ===== */
.confirmation-content {
    max-width: 500px;
    padding: 3rem;
    text-align: center;
}

.success-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-animation i {
    font-size: 3rem;
    color: white;
}

.btn-whatsapp {
    width: 100%;
    padding: 1.2rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn-whatsapp i {
    font-size: 1.5rem;
}

.confirmation-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.order-number {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 10px;
    margin: 2rem 0;
}

.order-number strong {
    display: block;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 0.5rem;
}

.confirmation-details {
    margin: 2rem 0;
}

.confirmation-details p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin: 1rem 0;
    color: var(--gray-color);
}

.confirmation-details i {
    color: var(--primary-color);
}

.btn-continue-shopping {
    width: 100%;
    padding: 1rem 2.5rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-continue-shopping:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ===== NOTIFICACIONES ===== */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: white;
    padding: 1rem 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    min-width: 300px;
}

.notification.show {
    right: 20px;
}

.notification.success {
    border-left: 4px solid var(--secondary-color);
}

.notification.success i {
    color: var(--secondary-color);
}

.notification.warning {
    border-left: 4px solid #f59e0b;
}

.notification.warning i {
    color: #f59e0b;
}

.notification i {
    font-size: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .checkout-sections {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
        padding: 2rem;
    }
    
    .size-options {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .checkout-modal-content {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modal-content,
    .cart-modal-content,
    .checkout-modal-content,
    .confirmation-content {
        max-width: 95%;
        max-height: 95vh;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .cart-item {
        flex-direction: column;
    }
    
    .cart-item-controls {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
}