/* =============================================
   PÁGINA DEL CARRITO - ESTILOS
   ============================================= */

/* Breadcrumb */
.breadcrumb-section {
    background: white;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: #764ba2;
}

.breadcrumb .separator {
    color: #999;
}

/* Título de la página */
.page-title {
    font-size: 2rem;
    color: #333;
    margin-bottom: 2rem;
    font-weight: 700;
}

/* Layout principal */
.carrito-page {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

.carrito-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

/* Contenido del carrito */
.carrito-content {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Items del carrito en página */
.carrito-item-page {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
    transition: background 0.2s;
}

.carrito-item-page:hover {
    background: #fafafa;
}

.carrito-item-page:last-child {
    border-bottom: none;
}

.carrito-item-imagen-page {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    flex-shrink: 0;
    border: 1px solid #e0e0e0;
}

.carrito-item-info-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.carrito-item-nombre-page {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.carrito-item-precio-page {
    font-size: 1.3rem;
    color: #667eea;
    font-weight: 700;
}

.carrito-item-controles-page {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.cantidad-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f5f5f5;
    padding: 0.5rem;
    border-radius: 8px;
}

.btn-cantidad-page {
    width: 35px;
    height: 35px;
    border: none;
    background: white;
    color: #667eea;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-cantidad-page:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

.carrito-item-cantidad-page {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.btn-eliminar-page {
    background: #fee;
    color: #f44;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
    margin-left: auto;
}

.btn-eliminar-page:hover {
    background: #f44;
    color: white;
    transform: scale(1.1);
}

.carrito-item-subtotal {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.3rem;
}

.carrito-item-subtotal strong {
    color: #333;
    font-weight: 600;
}

/* Carrito vacío */
.carrito-vacio-page {
    text-align: center;
    padding: 4rem 2rem;
}

.carrito-vacio-page .icono {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.carrito-vacio-page h3 {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.carrito-vacio-page p {
    color: #999;
    margin-bottom: 2rem;
}

.carrito-vacio-page .btn-primary {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: transform 0.2s;
}

.carrito-vacio-page .btn-primary:hover {
    transform: translateY(-2px);
}

/* Sidebar del resumen */
.carrito-sidebar {
    position: sticky;
    top: 2rem;
}

.resumen-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.resumen-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
}

.resumen-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.resumen-row {
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
    color: #666;
}

.resumen-row span:last-child {
    font-weight: 600;
    color: #333;
}

.resumen-separator {
    height: 1px;
    background: #e0e0e0;
    margin: 0.5rem 0;
}

.resumen-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.resumen-total span:last-child {
    color: #667eea;
}

.compra-minima-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.75rem;
    text-align: center;
    font-size: 0.9rem;
}

.compra-minima-info.oculto {
    display: none;
}

.compra-minima-info.cumplida {
    background: #d4edda;
    border-color: #28a745;
}

/* Botones del sidebar */
.btn-checkout-page {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-checkout-page:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-checkout-page.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-seguir-comprando {
    width: 100%;
    padding: 0.8rem;
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-seguir-comprando:hover {
    background: #667eea;
    color: white;
}

.btn-vaciar-carrito {
    width: 100%;
    padding: 0.8rem;
    background: white;
    color: #f44;
    border: 2px solid #f44;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-vaciar-carrito:hover {
    background: #f44;
    color: white;
}

/* Info de envío */
.info-envio {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    color: #333;
    margin-bottom: 0.2rem;
}

.info-item small {
    color: #666;
    font-size: 0.85rem;
}

/* Loading spinner */
.carrito-loading {
    text-align: center;
    padding: 3rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 1024px) {
    .carrito-layout {
        grid-template-columns: 1fr 350px;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .carrito-layout {
        grid-template-columns: 1fr;
    }
    
    .carrito-sidebar {
        position: static;
        order: -1;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .carrito-item-page {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .carrito-item-imagen-page {
        width: 100%;
        height: 200px;
    }
    
    .carrito-item-controles-page {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .carrito-page {
        padding: 1rem 0;
    }
    
    .breadcrumb-section {
        margin-bottom: 1rem;
    }
    
    .page-title {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }
    
    .carrito-content {
        padding: 1rem;
    }
    
    .carrito-item-page {
        padding: 1rem;
    }
}
