/* B2B Products Frontend Styles */

.b2b-products-wrapper {
    width: 100%;
    margin: 20px 0;
}

/* Category Filters */
.b2b-products-filters {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.b2b-category-filters {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.b2b-filter-item {
    margin: 0;
}

.b2b-filter-link {
    display: inline-block;
    padding: 10px 20px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.b2b-filter-link:hover {
    background: #e8e8e8;
    color: #0073aa;
}

.b2b-filter-item.active .b2b-filter-link {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

@media (max-width: 768px) {
    .b2b-category-filters {
        gap: 8px;
    }
    
    .b2b-filter-link {
        padding: 8px 16px;
        font-size: 14px;
    }
}

.b2b-products-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.b2b-products-columns-1 .b2b-products-grid {
    grid-template-columns: 1fr;
}

.b2b-products-columns-2 .b2b-products-grid {
    grid-template-columns: repeat(2, 1fr);
}

.b2b-products-columns-3 .b2b-products-grid {
    grid-template-columns: repeat(3, 1fr);
}

.b2b-products-columns-4 .b2b-products-grid {
    grid-template-columns: repeat(4, 1fr);
}

.b2b-product-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.b2b-product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.b2b-product-images {
    position: relative;
    width: 100%;
    padding-top: 100%; /* 1:1 aspect ratio */
    background: #f5f5f5;
    overflow: hidden;
}

.b2b-product-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.b2b-product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.b2b-product-image.active {
    opacity: 1;
}

.b2b-product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.b2b-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b2b-product-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

.b2b-product-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.b2b-product-item:hover .b2b-product-slider-nav {
    opacity: 1;
}

.b2b-product-slider-nav button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.b2b-product-slider-nav button:hover {
    background: rgba(255, 255, 255, 1);
}

.b2b-product-slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.b2b-slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.b2b-slider-dot.active {
    background: rgba(255, 255, 255, 1);
}

.b2b-product-content {
    padding: 20px;
}

.b2b-product-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: #333;
}

.b2b-product-highlights {
    font-size: 14px;
    line-height: 1.6;
    color: #0073aa;
    font-weight: 500;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: #f0f8ff;
    border-left: 3px solid #0073aa;
    border-radius: 4px;
}

.b2b-product-description {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
    margin-bottom: 20px;
}

.b2b-product-description p {
    margin: 0 0 10px 0;
}

.b2b-product-description p:last-child {
    margin-bottom: 0;
}

.b2b-product-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.b2b-product-view-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #666;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
    text-align: center;
}

.b2b-product-view-btn:hover {
    background: #555;
    color: #fff;
}

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

.b2b-product-title a:hover {
    color: #0073aa;
}

.b2b-product-inquiry-btn {
    width: 100%;
    color: #222;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
    text-decoration: none;
    line-height: 36px;
    height: 38px;
    border-radius: 19px;
    border: 1px solid #222;
    background: #fff;
}

.b2b-product-inquiry-btn:hover {
    background: #005a87;
    color: #fff;
}

.b2b-products-empty {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* Pagination Styles */
.b2b-products-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 40px 0 20px 0;
    flex-wrap: wrap;
}

.b2b-pagination-numbers {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.b2b-pagination-link {
    display: inline-block;
    padding: 10px 16px;
    background: #f5f5f5;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid #ddd;
    min-width: 44px;
    text-align: center;
}

.b2b-pagination-link:hover {
    background: #e8e8e8;
    color: #0073aa;
    border-color: #0073aa;
}

.b2b-pagination-link.active {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
    cursor: default;
}

.b2b-pagination-link.active:hover {
    background: #0073aa;
    color: #fff;
}

.b2b-pagination-prev,
.b2b-pagination-next {
    padding: 10px 20px;
}

.b2b-pagination-dots {
    padding: 10px 8px;
    color: #999;
    font-weight: 500;
}

.b2b-products-pagination-info {
    text-align: center;
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.b2b-products-pagination-info p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .b2b-products-columns-3 .b2b-products-grid,
    .b2b-products-columns-4 .b2b-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .b2b-products-grid {
        grid-template-columns: 1fr !important;
    }
    
    .b2b-products-pagination {
        gap: 6px;
    }
    
    .b2b-pagination-link {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 36px;
    }
    
    .b2b-pagination-prev,
    .b2b-pagination-next {
        padding: 8px 16px;
        font-size: 14px;
    }
}

