/* PrestaShop Product Showcase - Estilos */

/* Grid de productos */
.ps-products-grid {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.ps-products-grid.ps-columns-2 {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.ps-products-grid.ps-columns-3 {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

.ps-products-grid.ps-columns-4 {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

/* Tarjeta de producto */
.ps-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ps-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Imagen del producto */
.ps-product-image {
    display: block;
    overflow: hidden;
    background: #f5f5f5;
    aspect-ratio: 1 / 1;
    position: relative;
}

.ps-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ps-product-card:hover .ps-product-image img {
    transform: scale(1.05);
}

/* Badges del producto */
.ps-product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}

.ps-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.ps-badge-new {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ps-badge-sale {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.ps-badge-discount {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

/* Información del producto */
.ps-product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ps-product-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
}

.ps-product-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ps-product-title a:hover {
    color: #007bff;
}

.ps-product-description {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    flex-grow: 1;
}

/* Footer del producto */
.ps-product-showcase .ps-product-card .ps-product-footer {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    gap: 15px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.ps-product-showcase .ps-product-card .ps-product-price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
}

.ps-product-showcase .ps-product-card .ps-product-price {
    font-size: 24px;
    font-weight: bold;
    color: #007bff;
}

.ps-product-showcase .ps-product-card .ps-product-price-original {
    font-size: 16px;
    color: #999;
    text-decoration: line-through;
}

.ps-product-showcase .ps-product-card .ps-product-price-discount {
    font-size: 24px;
    font-weight: bold;
    color: #e74c3c;
}

.ps-product-showcase .ps-product-card .ps-product-button {
    background: #007bff;
    color: #fff !important;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
    text-align: center !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.ps-product-button:hover {
    background: #0056b3;
    color: #fff;
}

/* Layout horizontal */
.ps-layout-horizontal .ps-product-card {
    flex-direction: row;
    max-width: 100%;
}

.ps-layout-horizontal .ps-product-image {
    width: 300px;
    flex-shrink: 0;
}

.ps-layout-horizontal .ps-product-info {
    flex-grow: 1;
}

/* Layout minimal */
.ps-layout-minimal .ps-product-card {
    border: none;
    box-shadow: none;
}

.ps-layout-minimal .ps-product-description {
    display: none;
}

.ps-layout-minimal .ps-product-info {
    padding: 15px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .ps-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .ps-layout-horizontal .ps-product-card {
        flex-direction: column;
    }
    
    .ps-layout-horizontal .ps-product-image {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ps-products-grid {
        grid-template-columns: 1fr;
    }
    
    .ps-product-title {
        font-size: 16px;
    }
    
    .ps-product-price {
        font-size: 20px;
    }
}

/* ============================================
   CARRUSEL DE PRODUCTOS
   ============================================ */

.ps-carousel {
    margin: 40px 0;
    position: relative;
}

.ps-carousel-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    color: #333;
}

.ps-carousel .swiper {
    padding: 10px 50px 50px 50px;
}

.ps-carousel .swiper-slide {
    height: auto;
}

.ps-carousel .swiper-slide .ps-product-showcase {
    margin: 0;
}

.ps-carousel .ps-product-title {
    font-size: 16px;
}

.ps-carousel .ps-product-description {
    font-size: 13px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ps-carousel .ps-product-price {
    font-size: 20px;
}

/* Botones de navegación */
.ps-carousel .swiper-button-next,
.ps-carousel .swiper-button-prev {
    color: #007bff;
    background: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.ps-carousel .swiper-button-next:after,
.ps-carousel .swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

.ps-carousel .swiper-button-next:hover,
.ps-carousel .swiper-button-prev:hover {
    background: #007bff;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

/* Paginación */
.ps-carousel .swiper-pagination {
    bottom: 10px;
}

.ps-carousel .swiper-pagination-bullet {
    background: #007bff;
    opacity: 0.3;
    width: 10px;
    height: 10px;
}

.ps-carousel .swiper-pagination-bullet-active {
    opacity: 1;
    background: #007bff;
}

/* Responsive para carrusel */
@media (max-width: 768px) {
    .ps-carousel .swiper {
        padding: 10px 40px 40px 40px;
    }
    
    .ps-carousel .swiper-button-next,
    .ps-carousel .swiper-button-prev {
        width: 35px;
        height: 35px;
    }
    
    .ps-carousel .swiper-button-next:after,
    .ps-carousel .swiper-button-prev:after {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .ps-carousel .swiper {
        padding: 10px 10px 40px 10px;
    }
    
    .ps-carousel-title {
        font-size: 22px;
    }
    
    .ps-carousel .swiper-button-next,
    .ps-carousel .swiper-button-prev {
        display: none;
    }
}
