/* ========================================
   SHOPPING CART PAGE STYLES
   ======================================== */

.carrito-page {
    padding: 60px 0;
    min-height: 60vh;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Empty Cart */
.carrito-empty {
    text-align: center;
    padding: 80px 20px;
    animation: fadeIn 0.5s ease;
}

.carrito-empty i {
    font-size: 80px;
    color: var(--gray-300);
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.carrito-empty h2 {
    font-size: 28px;
    color: var(--gray-700);
    margin-bottom: 10px;
}

/* Cart Container */
.carrito-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
    animation: fadeInUp 0.6s ease;
}

/* Cart Items */
.carrito-items {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s;
}

.carrito-items:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.carrito-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--gray-200);
    animation: slideIn 0.3s ease;
    transition: background 0.3s;
}

.carrito-item:hover {
    background: var(--gray-50);
    border-radius: 8px;
}

.carrito-item:last-child {
    border-bottom: none;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.item-img:hover {
    transform: scale(1.05);
}

.item-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--gray-800);
    font-weight: 600;
}

.item-precio-tipo {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-light) 0%, rgba(134, 239, 172, 0.3) 100%);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

/* Quantity Control */
.qty-control {
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    overflow: hidden;
    background: white;
}

.qty-btn {
    background: var(--gray-100);
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
    color: var(--gray-700);
    font-weight: 600;
}

.qty-btn:hover {
    background: var(--primary);
    color: white;
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    font-weight: 600;
    color: var(--gray-800);
    font-size: 15px;
}

.btn-remove {
    background: transparent;
    border: none;
    color: var(--red-500);
    cursor: pointer;
    padding: 8px;
    font-size: 14px;
    transition: all 0.3s;
    border-radius: 4px;
}

.btn-remove:hover {
    color: white;
    background: var(--red-600);
}

/* Price Display */
.item-price-total {
    text-align: right;
}

.precio-unitario {
    color: var(--gray-500);
    font-size: 14px;
    margin-bottom: 5px;
}

.precio-total {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Summary Box */
.carrito-resumen {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 2px solid var(--gray-100);
}

.resumen-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-200);
    color: var(--gray-800);
}

.resumen-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    color: var(--gray-700);
    font-size: 15px;
}

.resumen-row.total {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    padding-top: 15px;
    border-top: 2px solid var(--gray-200);
    margin-top: 20px;
}

/* Checkout Form */
.formulario-datos {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--gray-200);
}

.formulario-datos h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--gray-800);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(134, 239, 172, 0.1);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

/* WhatsApp Button */
.btn-checkout {
    width: 100%;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 20px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-checkout:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-checkout:active {
    transform: translateY(0);
}

.btn-checkout i {
    font-size: 20px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 968px) {
    .carrito-container {
        grid-template-columns: 1fr;
    }
    
    .carrito-resumen {
        position: static;
    }
}

@media (max-width: 768px) {
    .carrito-page {
        padding: 40px 0;
    }
    
    .carrito-item {
        grid-template-columns: 80px 1fr;
        gap: 15px;
    }
    
    .item-price-total {
        grid-column: 2;
        text-align: left;
        margin-top: 10px;
    }
    
    .item-img {
        width: 80px;
        height: 80px;
    }
    
    .resumen-row.total {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .carrito-empty i {
        font-size: 60px;
    }
    
    .carrito-empty h2 {
        font-size: 24px;
    }
    
    .item-info h3 {
        font-size: 14px;
    }
    
    .precio-total {
        font-size: 18px;
    }
}
