/**
 * Forwix Special Products - Frontend Styles
 * Uses the same styles as product miniatures for consistency
 *
 * @author    Forwix
 * @copyright 2024 Forwix
 * @license   AFL-3.0
 */

.forwix-special-products {
    margin: 30px 0 0 0;
    padding: 20px 0 0 0;
}

/* Products container with row class - Bootstrap grid will handle the layout */
.forwix-special-products .products.row {
    margin-left: -15px;
    margin-right: -15px;
}

/* Ensure each product card uses flexbox for proper height */
.forwix-special-products .products .product {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding-left: 15px;
    padding-right: 15px;
    margin-bottom: 20px;
}

/* Ensure product-miniature fills the card with same styles as products */
.forwix-special-products .products .product .product-miniature {
    height: 100% !important;
    min-height: 400px !important; /* Minimum height to match products */
    display: flex !important;
    flex-direction: column !important;
    background-color: var(--forwix-white, #FFFFFF) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 16px !important;
    margin-bottom: 20px !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Ensure thumbnail-container has same styles */
.forwix-special-products .product-miniature .thumbnail-container {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    width: 100% !important;
    position: relative !important;
}

/* Ensure thumbnail-top has the same min-height and styles as products */
/* Match exact height: 326.92px for products */
.forwix-special-products .product-miniature .thumbnail-top {
    min-height: 326.92px !important;
    height: 326.92px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    margin-bottom: 12px !important;
    position: relative !important;
    padding: 0 !important;
    background-color: var(--forwix-white, #FFFFFF) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
}

@media (min-width: 768px) {
    .forwix-special-products .product-miniature .thumbnail-top {
        min-height: 326.92px !important;
        height: 326.92px !important;
    }
}

@media (min-width: 1200px) {
    .forwix-special-products .product-miniature .thumbnail-top {
        min-height: 326.92px !important;
        height: 326.92px !important;
    }
}

/* Ensure thumbnail links have same styles as products */
.forwix-special-products .product-miniature .product-thumbnail,
.forwix-special-products .product-miniature .thumbnail {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    background-color: var(--forwix-white, #FFFFFF) !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    position: relative !important;
}

/* Ensure picture element takes full width */
.forwix-special-products .product-miniature .product-thumbnail picture,
.forwix-special-products .product-miniature .thumbnail picture {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 auto !important;
}

/* Ensure images are displayed correctly with object-fit - same as products */
.forwix-special-products .product-miniature .product-thumbnail img,
.forwix-special-products .product-miniature .thumbnail img {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background-color: var(--forwix-white, #FFFFFF) !important;
    transition: transform 0.3s ease !important;
}

/* Ensure product-description has same styles */
.forwix-special-products .product-miniature .product-description {
    padding: 12px 0 0 0 !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: 60px !important; /* Minimum height to match products with price/reviews */
}

/* Ensure product-title has same styles as products */
.forwix-special-products .product-miniature .product-title {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    font-family: var(--forwix-font-primary, 'Inter', sans-serif) !important;
    font-size: 14px !important;
    font-weight: var(--forwix-weight-regular, 400) !important;
    line-height: 1.4 !important;
    color: var(--forwix-blue, #1F2A44) !important;
    min-height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.forwix-special-products .product-miniature .product-title a {
    color: var(--forwix-blue, #1F2A44) !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.forwix-special-products .product-miniature .product-title a:hover {
    color: var(--forwix-orange, #F36B21) !important;
    text-decoration: none !important;
}

/* Hover effects - same as products */
.forwix-special-products .product-miniature:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    transform: translateY(-2px) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

.forwix-special-products .product-miniature:hover .product-thumbnail img,
.forwix-special-products .product-miniature:hover .thumbnail img {
    transform: scale(1.05) !important;
}

/* Responsive styles - same as products */
@media (max-width: 767px) {
    .forwix-special-products .product-miniature {
        padding: 12px !important;
        margin-bottom: 16px !important;
    }
    
    .forwix-special-products .product-miniature .product-title {
        font-size: 13px !important;
        min-height: 36px !important;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .forwix-special-products .product-miniature {
        padding: 14px !important;
    }
}

@media (min-width: 1200px) {
    .forwix-special-products .product-miniature {
        padding: 16px !important;
    }
}


/* Espaciado entre elementos - same as products */
.forwix-special-products .product-miniature .product-description > * {
    margin-bottom: 4px !important;
}

.forwix-special-products .product-miniature .product-description > *:last-child {
    margin-bottom: 0 !important;
}

/* The products grid will use the same styles as regular product listings */
/* Bootstrap row class handles the horizontal grid layout automatically */

