/* ========== CARRITO SECTION ========== */
.carrito-section {
    background: #f5f5f5;
    padding: 60px 0;
    min-height: 70vh;
}

.carrito-titulo {
    font-size: 36px;
    font-weight: 800;
    color: #000;
    text-align: center;
    margin: 0 0 40px 0;
    letter-spacing: 1px;
}

.carrito-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

/* ========== CARRITO VACÍO ========== */
.carrito-vacio {
    background: #fff;
    border-radius: 15px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.vacio-icono {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.carrito-vacio h3 {
    font-size: 24px;
    color: #333;
    margin: 0 0 10px 0;
}

.carrito-vacio p {
    color: #666;
    margin: 0 0 30px 0;
}

/* ========== PRODUCTOS ========== */
.carrito-productos {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.carrito-item {
    display: grid;
    grid-template-columns: 100px 1fr auto auto auto;
    gap: 20px;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #f0f0f0;
    transition: all 0.3s ease;
}

.carrito-item:hover {
    background: #f8f8f8;
}

.carrito-item:last-child {
    border-bottom: none;
}

.item-imagen {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-imagen img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.item-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.item-precio {
    color: #666;
    font-size: 15px;
    margin: 0;
}

.item-cantidad {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0f0f0;
    border-radius: 30px;
    padding: 8px 15px;
}

.item-cantidad button {
    background: #000;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-cantidad button:hover:not(:disabled) {
    background: #e74c3c;
    transform: scale(1.1);
}

.item-cantidad button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.item-cantidad span {
    font-size: 16px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.item-subtotal {
    font-size: 20px;
    font-weight: 800;
    color: #27ae60;
}

.item-eliminar {
    background: transparent;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.item-eliminar:hover {
    background: #fee;
    transform: scale(1.1);
}

.item-eliminar svg {
    width: 24px;
    height: 24px;
}

/* ========== RESUMEN ========== */
.carrito-resumen {
    background: #fff;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 100px;
}

.resumen-titulo {
    font-size: 20px;
    font-weight: 800;
    color: #000;
    margin: 0 0 20px 0;
    text-align: center;
    letter-spacing: 0.5px;
}

.resumen-items {
    border-top: 2px solid #f0f0f0;
    border-bottom: 2px solid #f0f0f0;
    padding: 20px 0;
    margin-bottom: 20px;
}

.resumen-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 15px;
}

.resumen-item:last-child {
    margin-bottom: 0;
}

.resumen-item.total {
    font-size: 22px;
    font-weight: 800;
    color: #000;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.text-success {
    color: #27ae60;
}

/* ========== BOTONES ========== */
.btn-finalizar-compra {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
    padding: 18px 30px;
    border-radius: 50px;
    border: none;
    width: 100%;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 20px rgba(231, 76, 60, 0.3);
}

.btn-finalizar-compra:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.5);
}

.btn-continuar-comprando,
.btn-seguir-comprando {
    display: block;
    text-align: center;
    color: #666;
    text-decoration: none;
    padding: 15px;
    font-size: 14px;
    transition: color 0.3s ease;
}

.btn-continuar-comprando:hover,
.btn-seguir-comprando:hover {
    color: #e74c3c;
}

.btn-seguir-comprando {
    background: #000;
    color: #fff;
    padding: 15px 35px;
    border-radius: 30px;
    font-weight: 700;
    margin-top: 20px;
    display: inline-block;
}

.btn-seguir-comprando:hover {
    background: #e74c3c;
    color: #fff;
}

/* ========== BENEFICIOS ========== */
.carrito-beneficios {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.beneficio {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #666;
    font-size: 13px;
}

.beneficio svg {
    width: 22px;
    height: 22px;
    color: #27ae60;
    flex-shrink: 0;
}

/* ========== MODAL CHECKOUT ========== */
.modal-checkout {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-checkout.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-checkout-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-checkout-content {
    position: relative;
    background: #fff;
    border-radius: 20px;
    max-width: 700px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f0f0;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-close-btn:hover {
    background: #e74c3c;
    color: #fff;
    transform: rotate(90deg);
}

.checkout-titulo {
    font-size: 28px;
    font-weight: 800;
    color: #000;
    margin: 0 0 30px 0;
    text-align: center;
}

.paso-titulo {
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin: 0 0 25px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #e74c3c;
}

/* ========== FORMULARIO ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* ========== MÉTODOS DE PAGO ========== */
.metodos-pago-grid {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.metodo-pago-card {
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
}

.metodo-pago-card:hover {
    border-color: #e74c3c;
    background: #fff5f5;
}

.metodo-pago-card input[type="radio"] {
    display: none;
}

.metodo-pago-card input[type="radio"]:checked + .metodo-contenido {
    border-color: #e74c3c;
}

.metodo-pago-card input[type="radio"]:checked ~ .metodo-contenido {
    background: #fff5f5;
}

.metodo-contenido {
    display: flex;
    align-items: center;
    gap: 15px;
}

.metodo-icono {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.metodo-icono.yape {
    background: linear-gradient(135deg, #722381 0%, #4a1559 100%);
}

.metodo-icono.plin {
    background: linear-gradient(135deg, #00a3e0 0%, #0077b6 100%);
}

.metodo-icono.tarjeta {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: #fff;
}

.metodo-icono svg {
    width: 35px;
    height: 35px;
}

.metodo-info strong {
    display: block;
    font-size: 16px;
    color: #000;
    margin-bottom: 4px;
}

.metodo-info small {
    color: #666;
    font-size: 13px;
}

/* ========== INSTRUCCIONES PAGO ========== */
.instrucciones-pago {
    background: #f8f8f8;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.instrucciones-pago h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.instrucciones-pago ol {
    margin: 0;
    padding-left: 20px;
}

.instrucciones-pago ol li {
    margin-bottom: 8px;
    color: #333;
}

.qr-container {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 15px;
}

.qr-container img {
    max-width: 250px;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 15px;
}

.qr-container p {
    margin: 5px 0;
    font-size: 14px;
    color: #333;
}

.tarjeta-info {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #27ae60;
}

.tarjeta-info p {
    margin: 8px 0;
    color: #333;
}

/* ========== RESUMEN FINAL ========== */
.resumen-final {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.resumen-final h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.resumen-item-final {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.total-final {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: 800;
    color: #e74c3c;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
}

/* ========== ACCIONES CHECKOUT ========== */
.checkout-acciones {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-siguiente,
.btn-atras,
.btn-confirmar-pedido {
    flex: 1;
    padding: 15px 25px;
    border-radius: 30px;
    border: none;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-siguiente,
.btn-confirmar-pedido {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #fff;
}

.btn-siguiente:hover,
.btn-confirmar-pedido:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.4);
}

.btn-atras {
    background: #f0f0f0;
    color: #666;
}

.btn-atras:hover {
    background: #e0e0e0;
}

/* ========== MODAL CONFIRMACIÓN ========== */
.modal-confirmacion {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    align-items: center;
    justify-content: center;
}

.modal-confirmacion.active {
    display: flex;
}

.modal-confirmacion-content {
    background: #fff;
    border-radius: 20px;
    padding: 50px 40px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    animation: bounceIn 0.5s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.confirmacion-icono {
    font-size: 80px;
    margin-bottom: 20px;
}

.modal-confirmacion-content h2 {
    font-size: 32px;
    font-weight: 800;
    color: #27ae60;
    margin: 0 0 15px 0;
}

.modal-confirmacion-content p {
    color: #666;
    margin: 10px 0;
}

.codigo-pedido {
    background: #f8f8f8;
    padding: 15px 25px;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 18px;
}

.codigo-pedido strong {
    color: #e74c3c;
    font-size: 24px;
}

.confirmacion-texto {
    font-size: 14px;
    color: #333;
    margin: 20px 0;
}

.confirmacion-acciones {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-volver-inicio,
.confirmacion-acciones .btn-seguir-comprando {
    flex: 1;
    padding: 15px 20px;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 700;
}

.btn-volver-inicio {
    background: #f0f0f0;
    color: #333;
}

/* ========== NOTIFICACIONES ========== */
.notificacion {
    position: fixed;
    top: 100px;
    right: -400px;
    background: #27ae60;
    color: #fff;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    z-index: 10002;
    transition: right 0.3s ease;
    font-weight: 600;
}

.notificacion.show {
    right: 20px;
}

.notificacion.error {
    background: #e74c3c;
}

/* ========== BOTÓN AGREGAR CARRITO ========== */
.btn-agregar-carrito {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    padding: 20px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(52, 152, 219, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-agregar-carrito:hover {
    background: #fff;
    color: #3498db;
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
}

.btn-agregar-carrito svg {
    width: 28px;
    height: 28px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 992px) {
    .carrito-grid {
        grid-template-columns: 1fr;
    }

    .carrito-resumen {
        position: relative;
        top: 0;
    }

    .carrito-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }

    .item-cantidad {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .item-subtotal {
        grid-column: 1 / -1;
        text-align: center;
    }

    .item-eliminar {
        grid-column: 1 / -1;
        width: fit-content;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .modal-checkout-content {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .checkout-acciones {
        flex-direction: column;
    }

    .confirmacion-acciones {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .carrito-titulo {
        font-size: 24px;
    }

    .carrito-item {
        grid-template-columns: 1fr;
        padding: 15px;
    }

    .item-imagen {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .item-info {
        text-align: center;
    }
}