/* =========================================================
   INCOUNTRY DISTRIBUTION
   V4 FINAL BULK FIXES
   ========================================================= */

/* Editorial / page header duplication. */
body.ic-v4-final.ic-v4-editorial .page-header,
body.ic-v4-final.ic-v4-editorial .page-header-page,
body.ic-v4-final.ic-v4-editorial .page-header-catalog,
body.ic-v4-final.ic-v4-editorial .mf-page-header,
body.ic-v4-final.ic-v4-editorial .site-content > .page-header,
body.ic-v4-final.ic-v4-editorial .site-content > .page-header-page,
body.ic-v4-final.ic-v4-editorial .site-content > .page-header-catalog,
body.ic-v4-final.ic-v4-editorial .site-content > .container > .page-header,
body.ic-v4-final.ic-v4-editorial .site-content > .mf-container > .page-header {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

/* Numbered editorial visuals. */
.ic-journal-card__visual,
.ic-editorial-card__visual {
    position: relative;
}

.ic-journal-card__number,
.ic-editorial-card__number {
    position: absolute;
    top: 16px;
    left: 16px;
    z-index: 4;
    display: grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    color: #1b1e24;
    background: rgba(255,255,255,.94);
    border: 1px solid rgba(17,19,24,.09);
    border-radius: 13px;
    box-shadow: 0 10px 28px rgba(17,19,24,.10);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
    letter-spacing: .06em;
    backdrop-filter: blur(10px);
}

.ic-journal-card__placeholder--v4 {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    gap: 7px;
    width: 100%;
    height: 100%;
    padding: 26px;
    color: #fff !important;
    background:
        radial-gradient(circle at 82% 18%, rgba(79,124,255,.38), transparent 31%),
        radial-gradient(circle at 14% 88%, rgba(255,107,44,.30), transparent 36%),
        linear-gradient(145deg, #171a20, #2a303a) !important;
    letter-spacing: normal !important;
}

.ic-journal-card__fallback-line {
    width: 42px;
    height: 3px;
    margin-bottom: 5px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--ic-red), var(--ic-orange));
}

.ic-journal-card__placeholder--v4 strong {
    max-width: 250px;
    color: #fff;
    font-size: 22px;
    font-weight: 770;
    line-height: 1.08;
    letter-spacing: -.035em;
}

.ic-journal-card__placeholder--v4 small {
    color: rgba(255,255,255,.58);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

/* Mobile product name is primary information. */
@media (max-width: 640px) {

    body.ic-v4-final.ic-commerce-page ul.products li.product .mf-product-details,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-details,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-summary,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-content {
        display: block !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        transform: none !important;
    }

    body.ic-v4-final.ic-commerce-page ul.products li.product .woocommerce-loop-product__title,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-title,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-title a,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-name,
    body.ic-v4-final.ic-commerce-page ul.products li.product .product-name a,
    body.ic-v4-final.ic-commerce-page ul.products li.product .mf-product-details .name,
    body.ic-v4-final.ic-commerce-page ul.products li.product .mf-product-details .name a,
    body.ic-v4-final.ic-commerce-page ul.products li.product h2,
    body.ic-v4-final.ic-commerce-page ul.products li.product h3 {
        display: -webkit-box !important;
        position: relative !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: 36px !important;
        max-height: 3.25em !important;
        margin: 7px 2px 6px !important;
        padding: 0 !important;
        overflow: hidden !important;
        color: #1b1e24 !important;
        font-size: 12px !important;
        font-weight: 760 !important;
        line-height: 1.35 !important;
        letter-spacing: -.015em !important;
        text-decoration: none !important;
        white-space: normal !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
    }

    body.ic-v4-final.ic-commerce-page ul.products li.product .woocommerce-loop-product__link {
        color: #1b1e24 !important;
        text-decoration: none !important;
    }

    body.ic-v4-final.ic-commerce-page ul.products li.product .price {
        margin-top: 2px !important;
    }
}

/* Mobile: reduce long vertical card stacks. */
@media (max-width: 720px) {

    .ic-home-editorial .ic-editorial-grid {
        display: flex !important;
        gap: 12px;
        width: calc(100% + 14px);
        margin-right: -14px;
        padding: 2px 14px 18px 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ic-home-editorial .ic-editorial-grid::-webkit-scrollbar {
        display: none;
    }

    .ic-home-editorial .ic-editorial-card,
    .ic-home-editorial .ic-editorial-card--lead {
        display: flex !important;
        flex: 0 0 min(82vw, 330px);
        width: min(82vw, 330px);
        min-width: min(82vw, 330px);
        max-width: 330px;
        grid-column: auto !important;
        scroll-snap-align: start;
    }

    .ic-home-editorial .ic-editorial-card__visual,
    .ic-home-editorial .ic-editorial-card--lead .ic-editorial-card__visual {
        min-height: 0 !important;
        aspect-ratio: 16 / 10 !important;
    }

    .ic-home-editorial .ic-editorial-card__body,
    .ic-home-editorial .ic-editorial-card--lead .ic-editorial-card__body {
        padding: 18px !important;
    }

    .ic-home-editorial .ic-editorial-card h3,
    .ic-home-editorial .ic-editorial-card--lead h3 {
        font-size: 20px !important;
        line-height: 1.12 !important;
    }

    .ic-v4-editorial .ic-journal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .ic-v4-editorial .ic-journal-card {
        border-radius: 17px !important;
    }

    .ic-v4-editorial .ic-journal-card__visual {
        aspect-ratio: 4 / 3 !important;
    }

    .ic-v4-editorial .ic-journal-card__number {
        top: 10px;
        left: 10px;
        min-width: 34px;
        height: 34px;
        border-radius: 10px;
        font-size: 9px;
    }

    .ic-v4-editorial .ic-journal-card__body {
        padding: 14px !important;
    }

    .ic-v4-editorial .ic-journal-card__meta {
        gap: 5px 8px;
        margin-bottom: 8px;
        font-size: 8px;
        line-height: 1.3;
    }

    .ic-v4-editorial .ic-journal-card h2 {
        font-size: 15px !important;
        line-height: 1.2 !important;
    }

    .ic-v4-editorial .ic-journal-card p {
        display: none !important;
    }

    .ic-v4-editorial .ic-journal-card__link {
        margin-top: 12px;
        font-size: 10px;
    }

    .ic-about-values,
    .ic-contact-grid {
        display: flex !important;
        gap: 12px !important;
        width: calc(100% + 14px);
        margin-right: -14px !important;
        padding: 2px 14px 18px 0;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .ic-about-values::-webkit-scrollbar,
    .ic-contact-grid::-webkit-scrollbar {
        display: none;
    }

    .ic-about-values article,
    .ic-contact-card {
        flex: 0 0 min(78vw, 300px) !important;
        width: min(78vw, 300px) !important;
        min-width: min(78vw, 300px) !important;
        max-width: 300px !important;
        min-height: 240px !important;
        scroll-snap-align: start;
    }
}

/* Noticeable but restrained V4 beautification. */
body.home.ic-v4-final .ic-home-categories,
body.home.ic-v4-final .ic-home-products,
body.home.ic-v4-final .ic-home-brands,
body.home.ic-v4-final .ic-home-solutions,
body.home.ic-v4-final .ic-home-editorial {
    box-shadow:
        inset 0 1px 0 rgba(17,19,24,.035),
        inset 0 -1px 0 rgba(17,19,24,.035);
}

body.home.ic-v4-final .ic-home-categories {
    background:
        radial-gradient(circle at 6% 12%, rgba(79,124,255,.055), transparent 21%),
        linear-gradient(180deg, #ffffff, #f8f9fb) !important;
}

body.home.ic-v4-final .ic-home-products {
    background:
        radial-gradient(circle at 94% 12%, rgba(255,107,44,.060), transparent 21%),
        radial-gradient(circle at 8% 88%, rgba(108,99,255,.045), transparent 23%),
        linear-gradient(180deg, #f8f9fb, #ffffff) !important;
}

body.home.ic-v4-final .ic-home-brands {
    background:
        radial-gradient(circle at 10% 16%, rgba(214,0,0,.045), transparent 21%),
        linear-gradient(180deg, #ffffff, #f7f8fa) !important;
}

body.home.ic-v4-final .ic-home-solutions {
    background:
        radial-gradient(circle at 92% 10%, rgba(79,124,255,.055), transparent 22%),
        linear-gradient(180deg, #f7f8fa, #ffffff) !important;
}

body.home.ic-v4-final .ic-home-editorial {
    background:
        radial-gradient(circle at 10% 14%, rgba(108,99,255,.070), transparent 22%),
        radial-gradient(circle at 90% 12%, rgba(255,107,44,.060), transparent 20%),
        linear-gradient(180deg, #ffffff, #f7f8fa) !important;
}

body.ic-v4-final .ic-category-card,
body.ic-v4-final .ic-product-card,
body.ic-v4-final .ic-brand-card,
body.ic-v4-final .ic-editorial-card,
body.ic-v4-final .ic-journal-card,
body.ic-v4-final .ic-about-values article,
body.ic-v4-final .ic-contact-card {
    border-color: rgba(17,19,24,.085) !important;
    box-shadow:
        0 14px 38px rgba(17,19,24,.060),
        0 1px 0 rgba(255,255,255,.92) inset;
}

body.ic-v4-final .ic-brand-card,
body.ic-v4-final .ic-category-card,
body.ic-v4-final .ic-product-card {
    backdrop-filter: blur(5px);
}

body.ic-v4-final .ic-home-section-title,
body.ic-v4-final .ic-product-section-title,
body.ic-v4-final .ic-brand-title,
body.ic-v4-final .ic-editorial-heading h2 {
    text-wrap: balance;
}

@media (hover: hover) and (pointer: fine) {

    body.ic-v4-final .ic-category-card:hover,
    body.ic-v4-final .ic-product-card:hover,
    body.ic-v4-final .ic-brand-card:hover,
    body.ic-v4-final .ic-editorial-card:hover,
    body.ic-v4-final .ic-journal-card:hover,
    body.ic-v4-final .ic-about-values article:hover,
    body.ic-v4-final .ic-contact-card:hover {
        transform: translateY(-5px);
        box-shadow:
            0 25px 58px rgba(17,19,24,.105),
            0 1px 0 rgba(255,255,255,.95) inset;
    }
}

@media (max-width: 767px) {

    body.home.ic-v4-final .ic-home-categories,
    body.home.ic-v4-final .ic-home-products,
    body.home.ic-v4-final .ic-home-brands,
    body.home.ic-v4-final .ic-home-solutions,
    body.home.ic-v4-final .ic-home-editorial {
        padding-top: 60px !important;
        padding-bottom: 68px !important;
    }

    .ic-journal-hero {
        margin-bottom: 22px !important;
    }

    .ic-journal-hero > p,
    .ic-journal-hero__description {
        font-size: 14px !important;
        line-height: 1.62 !important;
    }
}

@media (max-width: 360px) {

    .ic-v4-editorial .ic-journal-grid {
        gap: 8px !important;
    }

    .ic-v4-editorial .ic-journal-card__body {
        padding: 12px !important;
    }

    .ic-v4-editorial .ic-journal-card h2 {
        font-size: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    body.ic-v4-final .ic-category-card,
    body.ic-v4-final .ic-product-card,
    body.ic-v4-final .ic-brand-card,
    body.ic-v4-final .ic-editorial-card,
    body.ic-v4-final .ic-journal-card,
    body.ic-v4-final .ic-about-values article,
    body.ic-v4-final .ic-contact-card {
        transition: none !important;
    }
}
