/**
 * SSTecnología - Estilos del frontend moderno
 * Respaldo para tarjetas de producto y secciones del catálogo
 */

/* Tarjetas de producto */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 1rem;
    overflow: hidden;
    transition: box-shadow 0.3s, border-color 0.3s;
}

.product-card:hover {
    border-color: #e5e7eb;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.product-image-container,
.product-card .relative.overflow-hidden.aspect-square {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: #f9fafb;
}

.product-image-container img,
.product-card .aspect-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-image-container a,
.product-card .aspect-square > a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Badge de stock bajo */
.stock-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    background: #f59e0b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
}

/* Botón agregar al carrito */
.add-to-cart-btn {
    width: 100%;
    background: #111827;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s;
}

.add-to-cart-btn:hover {
    background: #374151;
}

/* Categorías en home */
.product-card .line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Swiper slides */
.swiper-slide .product-card,
.swiper-slide > .group {
    height: 100%;
}

/* No aplicar reglas globales a img: rompe imágenes con position:absolute en tarjetas */
.product-card img,
.product-image-container img,
.aspect-square img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
