/**
 * Best Sellers by Format - Styles
 * Clean and modern design similar to your reference image
 */

/* Page specific styles */
.dvbestsellers-by-format-page {
    padding: 20px 0;
}

.dvbestsellers-by-format-page .page-intro {
    text-align: center;
    margin-bottom: 40px;
    color: #6c757d;
}

.dvbestsellers-by-format-page .page-intro p {
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
}

/* Menu link styles */
.dvbestsellers-menu-link {
    display: inline-block;
    margin: 0 10px;
}

.dvbestsellers-menu-link .bestsellers-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #2d9a8c;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.dvbestsellers-menu-link .bestsellers-link:hover {
    color: #238276;
}

.dvbestsellers-menu-link .material-icons {
    font-size: 20px;
}

.dvbestsellers-by-format {
    padding: 40px 0;
    background: #f8f9fa;
}

.dvbestsellers-by-format .container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Format Columns */
.format-column {
    padding: 0 15px;
}

.format-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d9a8c;
    text-align: center;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'Arial', sans-serif;
}

/* Products List */
.products-list {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 20px;
    position: relative;
    transition: all 0.3s ease;
}

.product-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.product-item:hover {
    transform: translateX(5px);
}

.product-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.product-link {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: inherit;
    flex: 1;
}

/* Product Image */
.product-image {
    flex-shrink: 0;
    width: 60px !important;
    height: 80px !important;
    min-width: 60px;
    min-height: 80px;
    max-width: 60px;
    max-height: 80px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
}

.product-image img {
    width: auto !important;
    height: 100% !important;
    max-width: 60px !important;
    max-height: 80px !important;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
}

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

/* Product Info */
.product-info {
    flex: 1;
    min-width: 0;
}

.product-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-format {
    font-size: 13px;
    color: #6c757d;
    display: inline-block;
}

/* Rank Number */
.product-rank {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #2c3e50;
    color: #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: 16px;
}

/* Rank colors based on position */
.product-item[data-rank="1"] .product-rank {
    background: #2c3e50;
}

.product-item[data-rank="2"] .product-rank {
    background: #5a6c7d;
}

.product-item[data-rank="3"] .product-rank {
    background: #7a8a9a;
}

.product-item[data-rank="4"] .product-rank,
.product-item[data-rank="5"] .product-rank,
.product-item[data-rank="6"] .product-rank,
.product-item[data-rank="7"] .product-rank,
.product-item[data-rank="8"] .product-rank,
.product-item[data-rank="9"] .product-rank,
.product-item[data-rank="10"] .product-rank {
    background: #95a5a6;
}

/* No products message */
.no-products {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
}

/* Responsive Design */
@media (max-width: 991px) {
    .format-column {
        margin-bottom: 40px;
    }
    
    .format-column:last-child {
        margin-bottom: 0;
    }
}

@media (max-width: 767px) {
    .dvbestsellers-by-format {
        padding: 20px 0;
    }
    
    .format-title {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .products-list {
        padding: 15px;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
    }
    
    .product-name {
        font-size: 14px;
    }
    
    .product-rank {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    .dvbestsellers-by-format-page .page-intro p {
        font-size: 14px;
    }
}

/* Hover effects */
.product-item:hover .product-name {
    color: #2d9a8c;
}

/* Loading animation (optional) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-item {
    animation: fadeIn 0.5s ease-in-out;
}

.product-item:nth-child(1) { animation-delay: 0.05s; }
.product-item:nth-child(2) { animation-delay: 0.1s; }
.product-item:nth-child(3) { animation-delay: 0.15s; }
.product-item:nth-child(4) { animation-delay: 0.2s; }
.product-item:nth-child(5) { animation-delay: 0.25s; }
.product-item:nth-child(6) { animation-delay: 0.3s; }
.product-item:nth-child(7) { animation-delay: 0.35s; }
.product-item:nth-child(8) { animation-delay: 0.4s; }
.product-item:nth-child(9) { animation-delay: 0.45s; }
.product-item:nth-child(10) { animation-delay: 0.5s; }
