/**
 * Products Widget Styles
 * Grid, Carousel, Masonry, Client Logos
 * Brand Colors: Primary #0A2E50, Secondary #1A4F8A, Accent #C89A3E
 */

/* ============================================
   CSS VARIABLES - Brand Colors
   ============================================ */
:root {
    --iab2b-brand-primary: #0A2E50;
    --iab2b-brand-secondary: #1A4F8A;
    --iab2b-brand-accent: #C89A3E;
    --iab2b-brand-gray: #6a6a78;
    --iab2b-brand-light: #cfd1d0;
}

/* ============================================
   BASE STYLES
   ============================================ */

/* Filter Tabs */
.iab2b-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    justify-content: center;
}

.iab2b-filter-tab {
    padding: 10px 24px;
    border: 2px solid var(--iab2b-brand-light);
    background: #fff;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--iab2b-brand-gray);
    cursor: pointer;
    transition: all 0.3s ease;
}

.iab2b-filter-tab:hover {
    border-color: var(--iab2b-brand-secondary);
    color: var(--iab2b-brand-secondary);
}

.iab2b-filter-tab--active {
    background: linear-gradient(135deg, var(--iab2b-brand-primary) 0%, var(--iab2b-brand-secondary) 100%);
    border-color: transparent;
    color: #fff;
}

/* ============================================
   PRODUCT CARD - Shared styles
   ============================================ */

.iab2b-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(10, 46, 80, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.iab2b-product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(10, 46, 80, 0.15);
}

.iab2b-product-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    aspect-ratio: 1;
    background: #ffffff;
}

.iab2b-product-card__image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    padding: 12px;
    transition: transform 0.5s ease;
}

.iab2b-product-card:hover .iab2b-product-card__image {
    transform: scale(1.08);
}

.iab2b-product-card__content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.iab2b-product-card__category {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--iab2b-brand-accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.iab2b-product-card__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--iab2b-brand-primary);
    margin: 0 0 10px;
    line-height: 1.4;
}

.iab2b-product-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.iab2b-product-card__title a:hover {
    color: var(--iab2b-brand-secondary);
}

.iab2b-product-card__description {
    font-size: 14px;
    color: var(--iab2b-brand-gray);
    line-height: 1.6;
    margin: 0 0 16px;
    flex-grow: 1;
}

.iab2b-product-card__actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.iab2b-product-card__btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.iab2b-product-card__btn--quote {
    background: linear-gradient(135deg, var(--iab2b-brand-primary) 0%, var(--iab2b-brand-secondary) 100%);
    color: #fff;
}

.iab2b-product-card__btn--quote:hover {
    background: linear-gradient(135deg, var(--iab2b-brand-secondary) 0%, var(--iab2b-brand-primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(10, 46, 80, 0.4);
}

/* ============================================
   GRID LAYOUT
   ============================================ */

.iab2b-products-grid {
    width: 100%;
}

.iab2b-grid-wrapper {
    display: grid;
    gap: 24px;
}

/* ============================================
   CAROUSEL LAYOUT
   ============================================ */

.iab2b-carousel-widget {
    position: relative;
    width: 100%;
    padding: 0 55px;
}

.iab2b-carousel-widget .iab2b-carousel-container {
    overflow: hidden;
    width: 100%;
}

.iab2b-carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.iab2b-carousel-slide {
    flex-shrink: 0;
    box-sizing: border-box;
}

.iab2b-carousel-slide .iab2b-product-card {
    height: 100%;
}

/* Carousel Arrows */
.iab2b-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(10, 46, 80, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--iab2b-brand-primary);
    transition: all 0.3s ease;
    z-index: 10;
}

.iab2b-carousel-arrow:hover {
    background: var(--iab2b-brand-primary);
    color: #fff;
}

.iab2b-carousel-arrow--prev {
    left: 0;
}

.iab2b-carousel-arrow--next {
    right: 0;
}

/* Carousel Dots */
.iab2b-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.iab2b-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--iab2b-brand-light);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.iab2b-carousel-dot--active {
    background: var(--iab2b-brand-primary);
    width: 24px;
    border-radius: 5px;
}

/* ============================================
   MASONRY LAYOUT
   ============================================ */

.iab2b-masonry-widget {
    width: 100%;
}

.iab2b-masonry-wrapper {
    column-gap: 24px;
}

.iab2b-masonry-card {
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

.iab2b-masonry-image {
    aspect-ratio: auto;
}

.iab2b-masonry-image .iab2b-product-card__image {
    height: auto;
}

/* ============================================
   CLIENT LOGOS CAROUSEL
   ============================================ */

.iab2b-logos-carousel {
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 20px 0;
}

.iab2b-logos-track {
    display: flex;
    align-items: center;
    gap: 60px;
    width: max-content;
}

.iab2b-logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.iab2b-logo-item a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.iab2b-logo-item img {
    max-height: 60px;
    max-width: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

.iab2b-logos--grayscale .iab2b-logo-item img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.iab2b-logos--grayscale .iab2b-logo-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Logo Carousel Animation */
@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

/* ============================================
   RESPONSIVE - TABLET
   ============================================ */

@media (max-width: 992px) {
    .iab2b-carousel-widget {
        padding: 0 45px;
    }

    .iab2b-carousel-arrow {
        width: 40px;
        height: 40px;
    }

    .iab2b-product-card__content {
        padding: 16px;
    }

    .iab2b-product-card__title {
        font-size: 16px;
    }

    .iab2b-filter-tab {
        padding: 8px 18px;
        font-size: 13px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */

@media (max-width: 767px) {
    .iab2b-carousel-widget {
        padding: 0 40px;
    }

    .iab2b-carousel-arrow {
        width: 36px;
        height: 36px;
    }

    .iab2b-carousel-arrow svg {
        width: 20px;
        height: 20px;
    }

    .iab2b-product-card__content {
        padding: 14px;
    }

    .iab2b-product-card__title {
        font-size: 15px;
    }

    .iab2b-product-card__description {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .iab2b-product-card__btn {
        padding: 10px 16px;
        font-size: 13px;
    }

    .iab2b-filter-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .iab2b-filter-tab {
        padding: 8px 14px;
        font-size: 12px;
    }

    .iab2b-carousel-dots {
        margin-top: 16px;
    }

    .iab2b-logo-item img {
        max-height: 40px;
        max-width: 100px;
    }

    .iab2b-logos-track {
        gap: 40px;
    }
}

@media (max-width: 480px) {
    .iab2b-carousel-widget {
        padding: 0 35px;
    }

    .iab2b-carousel-arrow {
        width: 32px;
        height: 32px;
    }

    .iab2b-carousel-arrow svg {
        width: 18px;
        height: 18px;
    }

    .iab2b-product-card__content {
        padding: 12px;
    }

    .iab2b-product-card__title {
        font-size: 14px;
    }

    .iab2b-product-card__btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .iab2b-logo-item img {
        max-height: 35px;
        max-width: 80px;
    }

    .iab2b-logos-track {
        gap: 30px;
    }
}