/* Estilos generales del contenedor del carrito */
.cart-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    font-family: 'Shadows Into Light', cursive; /* Tipografía */
}

.cart-title {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
    font-size: 28px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

/* Estilos para cada item del carrito */
.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background-color: #f9f9f9;
}

/* Estilos para la fila de encabezados */
.cart-header {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: center;
    background-color: #f5f5f5;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Permite que los elementos se ajusten en pantallas pequeñas */
}

/* Estilos para la fila de encabezados */
.cart-header {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
    font-weight: bold;
    text-align: center;
    background-color: #f5f5f5;
    margin-bottom: 10px;
    flex-wrap: wrap; /* Permite que los elementos se ajusten en pantallas pequeñas */
}

.cart-header > div {
    padding: 10px 5px; /* Reducido para móviles */
    box-sizing: border-box;
}

/* Estilos para pantallas medianas/grandes */
@media (min-width: 768px) {
    .cart-header > div {
        padding: 0 20px; /* Aumentamos el padding en pantallas más grandes */
    }
}

/* Estilos para pantallas muy grandes */
@media (min-width: 1200px) {
    .cart-header > div {
        padding: 0 60px; /* Tu valor preferido para pantallas grandes */
    }
}

/* Distribución flexible de las columnas */
.header-product {
    flex: 3 1 200px; /* Crece 3 veces, se encoge, mínimo 200px */
    text-align: left;
}

.header-price, 
.header-quantity, 
.header-subtotal, 
.header-iva, 
.header-total {
    flex: 1 1 100px; /* Crece 1 vez, se encoge, mínimo 100px */
}

.header-actions {
    flex: 1 1 80px;
}

/* Estilos para móviles */
@media (max-width: 767px) {
    .cart-header {
        display: none; /* Ocultamos los encabezados en móviles */
    }
    
    .cart-item {
        flex-direction: column;
        padding: 15px;
        border-bottom: 1px solid #eee;
    }
    
    .cart-item > div {
        width: 100%;
        padding: 5px 0;
        display: flex;
        justify-content: space-between;
    }
    
    .cart-item > div::before {
        content: attr(data-label);
        font-weight: bold;
        margin-right: 10px;
    }
    
    .item-product {
        flex-direction: column;
    }
    
    .item-quantity {
        justify-content: flex-start;
    }
}


/* Estilos para las secciones de cada item */
.item-product {
    display: flex;
    align-items: center;
    gap: 15px;
}


.item-product img {
    border-radius: 5px;
    border: 1px solid #ddd;
}

.item-price, 
.item-subtotal, 
.item-iva, 
.item-total {
    font-weight: bold;
    color: #333;
}

/* Estilos para los botones de cantidad */
.item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: none;
    background-color: #f0f0f0;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.quantity-btn:hover {
    background-color: #e0e0e0;
}

/* Estilos para el botón de eliminar */
.remove-btn {
    padding: 8px 15px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.remove-btn:hover {
    background-color: #ff0000;
}

/* Estilos para el resumen del carrito */
.cart-summary {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 18px;
}

.summary-item:last-child {
    margin-bottom: 0;
    font-weight: bold;
    font-size: 20px;
    color: #333;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* Estilos para el botón de generar PDF */
.boton-pdf {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0;
    padding: 15px;
    background-color: #8cbb40;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.boton-pdf:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
/* Estilos para el botón de generar PDF */
.boton-pedido {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 30px auto 0;
    padding: 15px;
    background-color: #8cbb40;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.boton-pedido:hover {
    background-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos responsivos */
@media (max-width: 992px) {
    .cart-item {
        grid-template-columns: 1fr 1fr 1fr;
        grid-template-rows: auto auto;
        row-gap: 20px;
    }
    
    .item-product {
        grid-column: 1 / 4;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 1fr 1fr;
    }
    
    .item-product {
        grid-column: 1 / 3;
    }
    
    .item-actions {
        grid-column: 1 / 3;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .cart-container {
        padding: 15px;
    }
    
    .cart-item {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 20px 0;
    }
    
    .item-product {
        width: 100%;
        margin-bottom: 15px;
    }
    
    .summary-item {
        flex-direction: column;
    }
    
    .summary-item span:last-child {
        margin-top: 5px;
    }
}