.filtros-categorias {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.filtro-btn {
    padding: 12px 24px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filtro-btn.active,
.filtro-btn:hover {
    background: var(--primary-color);
    color: white;
}

.grid-servicios {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.card-servicio {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card-servicio:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}


.servicio-imagen {
    position: relative;
    width: 90%;
    overflow: hidden;
}

.servicio-imagen img {
    width: 300px;
    object-fit: cover;
}

.descuento-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e74c3c;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-weight: bold;
}

.servicio-info {
    padding: 25px;
}

.servicio-precio {
    margin: 15px 0;
}

.precio-original {
    text-decoration: line-through;
    color: var(--dark-gray);
    margin-right: 10px;
}

.precio-actual {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
}

.servicio-acciones {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-ver-detalle,
.btn-agregar-carrito {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-ver-detalle {
    background: var(--light-gray);
    color: var(--primary-color);
}

.btn-agregar-carrito {
    background: var(--primary-color);
    color: white;
}

.btn-agregar-carrito:hover {
    background: var(--secondary-color);
}

.card-servicio-mini{
    display: grid;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.card-servicio-mini img{
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 6px;
}

/* Carrito flotante */
.carrito-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 350px;
    z-index: 1000;
}

/* Carrito */
.pagina-carrito {
    padding: 50px 0;
}

.carrito-vacio {
    text-align: center;
    padding: 80px 0;
}

.carrito-vacio h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.item-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: var(--primary-color);
}

.item-descripcion {
    font-size: 0.9em;
    color: var(--dark-gray);
    margin: 0 0 5px 0;
}

.item-duracion {
    font-size: 0.8em;
    color: var(--secondary-color);
}

.precio-unitario {
    font-weight: bold;
    color: var(--primary-color);
}

.cantidad-controls {
    display: flex;
    align-items: center;
    gap: 5px;
}

.carrito-icono {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    position: relative;
}

.carrito-contenido {
    display: grid;
    grid-template-columns: 2fr 1fr;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    padding: 20px;
    border: 2px solid var(--light-gray);
    gap: 0px;
    margin-top: 10px;
}


.carrito-header {
    display: grid;
    grid-template-columns: 350px 1fr 1fr 1fr 1fr 25px;
    gap: 15px;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 15px;
}
/* LISTA DE ITEMS */
.items-carrito {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-carrito {
    display: grid;
    grid-template-columns: 350px 1fr 1fr 1fr 1fr 25px;
    gap: 5px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

/* Asegurar que las imágenes se vean */
.item-imagen img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    display: block;
    background: #f0f0f0; /* Color de fondo si la imagen falla */
}

.form-cantidad {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-cantidad {
    width: 30px;
    height: 30px;
    border: 1px solid var(--light-gray);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.btn-cantidad:hover {
    background: var(--light-gray);
}

.input-cantidad {
    width: 50px;
    text-align: center;
    padding: 5px;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
}

.btn-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
}
.btn-eliminar:hover {
    background: #ffe6e6;
}

/* Responsive */
@media (max-width: 968px) {
    .carrito-contenido {
        grid-template-columns: 1fr;
    }
    
    .carrito-header {
        display: none;
    }
    
    .item-carrito {
        grid-template-columns: 60px 1fr;
        grid-template-areas: 
            "imagen info"
            "precio cantidad"
            "subtotal eliminar";
        gap: 15px;
        padding: 15px;
    }
    
    .item-imagen { 
        grid-area: imagen; 
        justify-self: center;
    }
    .item-info { 
        grid-area: info; 
    }
    .item-precio { 
        grid-area: precio; 
        text-align: center;
    }
    .item-cantidad { 
        grid-area: cantidad; 
        justify-self: center;
    }
    .item-subtotal { 
        grid-area: subtotal; 
        text-align: center;
        font-size: 1.1em;
    }
    .item-eliminar { 
        grid-area: eliminar; 
        justify-self: center;
    }
    
    .cantidad-controls {
        justify-content: center;
    }
}


.resumen-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.resumen-linea {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
}

.resumen-linea.total {
    border-top: 2px solid var(--primary-color);
    margin-top: 10px;
    font-size: 1.2em;
}

.resumen-acciones {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-comprar {
    font-size: 1.1em;
    padding: 15px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-servicios {
        grid-template-columns: 1fr;
    }
    
    .carrito-contenido {
        width: 300px;
        right: -50px;
    }
    
    .hero-tienda h1 {
        font-size: 2.2em;
    }
}

.carrito-icono:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

#contador-carrito {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    font-size: 0.8em;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}


.item-carrito-mini {
    display: block;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.item-carrito-mini:last-child {
    border-bottom: none;
}

.item-nombre {
    flex: 2;
    font-size: 0.9em;
}

.item-cantidad, .item-precio {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

/* Estilos para producto.php y carrito.php */
.detalle-producto {
    padding: 50px 0;
}

.breadcrumb {
    margin-bottom: 30px;
    font-size: 0.9em;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.producto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.producto-imagen {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.producto-imagen img {
    width: 100%;
    object-fit: cover;
}

.producto-info h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.producto-precio {
    margin: 25px 0;
}

.precio-actual {
    font-size: 2.5em;
    font-weight: bold;
}

.producto-meta {
    display: flex;
    gap: 20px;
    margin: 20px 0;
}

.cantidad-selector {
    margin: 25px 0;
}

.cantidad-selector label {
    display: block;
    margin-bottom: 10px;
    font-weight: bold;
}

.cantidad-selector select {
    padding: 10px;
    border: 2px solid var(--light-gray);
    border-radius: 5px;
    font-size: 1.1em;
}

.garantias {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 10px;
    margin-top: 30px;
}

.garantias ul {
    list-style: none;
    padding: 0;
}

.garantias li {
    padding: 5px 0;
    position: relative;
    padding-left: 25px;
}

.garantias li:before {
    content: "✓";
    color: #27ae60;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Tabs */
.detalles-tabs {
    display: flex;
    border-bottom: 2px solid var(--light-gray);
    margin-bottom: 30px;
}

.tab-btn {
    padding: 15px 30px;
    border: none;
    background: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: bold;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* --- MEJORAS PARA EL CARRITO --- */

/* Imágenes consistentes en el carrito */
.item-imagen img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid var(--light-gray);
    background: #f8f9fa;
}

/* Mejor alineación de items del carrito */
.item-carrito {
    display: grid;
    grid-template-columns: 300px 120px 150px 120px 50px;
    gap: 15px;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.item-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.item-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
    color: var(--primary-color);
    line-height: 1.3;
}

.item-descripcion {
    font-size: 0.85em;
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Corrección de precios y alineación */
.item-precio, .item-subtotal {
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
}

.precio-unitario {
    font-size: 1.1em;
}

.item-subtotal {
    font-size: 1.2em;
    color: var(--secondary-color);
}

/* Controles de cantidad mejorados */
.cantidad-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-cantidad {
    width: 35px;
    height: 35px;
    border: 2px solid var(--primary-color);
    background: white;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.btn-cantidad:hover {
    background: var(--primary-color);
    color: white;
}

.input-cantidad {
    width: 60px;
    text-align: center;
    padding: 8px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-weight: bold;
    font-size: 1em;
}

/* Resumen corregido */
.resumen-linea {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--light-gray);
}

.resumen-linea.total {
    border-top: 2px solid var(--primary-color);
    margin-top: 15px;
    font-size: 1.3em;
    font-weight: bold;
    color: var(--secondary-color);
}

/* Header del carrito corregido */
.carrito-header {
    display: grid;
    grid-template-columns: 300px 120px 150px 120px 50px;
    gap: 15px;
    padding: 15px 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-weight: bold;
    margin-bottom: 15px;
    text-align: center;
}

.carrito-header span:first-child {
    text-align: left;
}

/* Botón eliminar mejorado */
.btn-eliminar {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.3em;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-eliminar:hover {
    background: #ffe6e6;
    transform: scale(1.1);
}

/* Responsive mejorado */
@media (max-width: 968px) {
    .carrito-header {
        display: none;
    }
    
    .item-carrito {
        grid-template-columns: 80px 1fr;
        grid-template-areas: 
            "imagen info"
            "precio precio"
            "cantidad cantidad"
            "subtotal eliminar";
        gap: 15px;
        padding: 15px;
        text-align: center;
    }
    
    .item-imagen { 
        grid-area: imagen; 
        justify-self: center;
    }
    
    .item-info { 
        grid-area: info; 
        text-align: left;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .item-precio { 
        grid-area: precio; 
        text-align: center;
        font-size: 1.2em;
    }
    
    .item-cantidad { 
        grid-area: cantidad; 
        justify-self: center;
    }
    
    .item-subtotal { 
        grid-area: subtotal; 
        text-align: center;
        font-size: 1.3em;
    }
    
    .item-eliminar { 
        grid-area: eliminar; 
        justify-self: center;
    }
    
    .cantidad-controls {
        justify-content: center;
    }
    
    .item-info h3 {
        font-size: 1em;
    }
    
    .item-descripcion {
        font-size: 0.8em;
    }
}

/* Garantías del carrito */
.garantias-carrito {
    margin-top: 25px;
    padding: 20px;
    background: var(--light-gray);
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
}

.garantias-carrito h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.garantias-carrito ul {
    list-style: none;
    padding: 0;
}

.garantias-carrito li {
    padding: 5px 0;
    position: relative;
    padding-left: 25px;
}

.garantias-carrito li:before {
    content: "✓";
    color: #27ae60;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Corrección para carrito flotante */
.carrito-flotante .item-carrito-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    gap: 10px;
}

.carrito-flotante .item-nombre {
    flex: 2;
    font-size: 0.85em;
    line-height: 1.3;
}

.carrito-flotante .item-cantidad, 
.carrito-flotante .item-precio {
    flex: 1;
    text-align: center;
    font-weight: bold;
    font-size: 0.9em;
}

/* Estilo para línea de descuento */
.resumen-linea.descuento {
    color: #27ae60;
    font-weight: bold;
}

.resumen-linea.descuento span:last-child {
    color: #27ae60;
}