/* ========================================================
   VEGA BRAND ARCHIVE
   ======================================================== */


/*
 * Brand archive must use the available page width.
 */
body.vega-brand-archive
.vega-wc-page
.woocommerce {
    width: 100% !important;
    max-width: none !important;
}


/* ========================================================
   PRODUCT GRID — DESKTOP
   ======================================================== */

body.vega-brand-archive
.woocommerce
ul.products {

    display: grid !important;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        ) !important;

    gap:
        20px !important;

    width:
        100% !important;

    margin:
        0 !important;

    padding:
        0 !important;

    clear:
        both;
}


body.vega-brand-archive
.woocommerce
ul.products::before,

body.vega-brand-archive
.woocommerce
ul.products::after {
    display:
        none !important;
}


body.vega-brand-archive
.woocommerce
ul.products
li.product {

    float:
        none !important;

    clear:
        none !important;

    width:
        100% !important;

    max-width:
        none !important;

    min-width:
        0 !important;

    margin:
        0 !important;

    box-sizing:
        border-box;

    align-self:
        stretch;
}


/*
 * Stop tiny/shrunk images.
 */
body.vega-brand-archive
.woocommerce
ul.products
li.product
a
img {

    display:
        block !important;

    width:
        100% !important;

    max-width:
        100% !important;

    height:
        auto !important;

    aspect-ratio:
        1 / 1;

    margin:
        0 !important;

    padding:
        12px;

    box-sizing:
        border-box;

    object-fit:
        contain !important;

    background:
        #fff;
}


/*
 * Product title remains readable.
 */
body.vega-brand-archive
.woocommerce
ul.products
li.product
.woocommerce-loop-product__title {

    min-height:
        2.7em;

    padding-left:
        12px !important;

    padding-right:
        12px !important;

    font-size:
        14px !important;

    line-height:
        1.35 !important;
}


/* ========================================================
   YOU MAY ALSO TRY THESE BRANDS
   ======================================================== */

body.vega-brand-archive
.vega-brand-suggestions {

    width:
        100%;

    margin:
        4px 0 26px;

    padding:
        18px;

    border:
        1px solid
        var(
            --vega-line,
            #e4e8e1
        );

    border-radius:
        18px;

    background:
        linear-gradient(
            135deg,
            #ffffff,
            #f6f8f4
        );

    box-sizing:
        border-box;

    overflow:
        hidden;
}


.vega-brand-suggestions__head {

    display:
        flex;

    align-items:
        flex-end;

    justify-content:
        space-between;

    gap:
        20px;

    margin-bottom:
        15px;
}


.vega-brand-suggestions__eyebrow {

    display:
        block;

    margin-bottom:
        5px;

    color:
        #7d8879;

    font-size:
        8px;

    font-weight:
        900;

    letter-spacing:
        .12em;
}


.vega-brand-suggestions__head h2 {

    margin:
        0 !important;

    color:
        #172018;

    font-size:
        21px !important;

    line-height:
        1.1 !important;

    letter-spacing:
        -.035em;
}


.vega-brand-suggestions__head p {

    margin:
        5px 0 0;

    color:
        #7b8378;

    font-size:
        10px;

    line-height:
        1.5;
}


.vega-brand-suggestions__hint {

    flex:
        0 0 auto;

    padding:
        6px 10px;

    border:
        1px solid #e2e7df;

    border-radius:
        999px;

    background:
        #fff;

    color:
        #687266;

    font-size:
        8px;

    font-weight:
        800;
}


/* Horizontal premium brand shelf */

.vega-brand-suggestions__rail {

    display:
        flex;

    gap:
        10px;

    width:
        100%;

    padding:
        1px 1px 7px;

    overflow-x:
        auto;

    overscroll-behavior-inline:
        contain;

    scroll-snap-type:
        x proximity;

    scrollbar-width:
        none;

    -webkit-overflow-scrolling:
        touch;
}


.vega-brand-suggestions__rail::-webkit-scrollbar {
    display:
        none;
}


.vega-brand-suggestion {

    flex:
        0 0 128px;

    min-width:
        0;

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        flex-start;

    scroll-snap-align:
        start;

    padding:
        13px 10px 11px;

    border:
        1px solid #e4e8e1;

    border-radius:
        14px;

    background:
        #fff;

    color:
        #222b22 !important;

    text-align:
        center;

    text-decoration:
        none !important;

    box-sizing:
        border-box;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}


.vega-brand-suggestion:hover {

    transform:
        translateY(-2px);

    border-color:
        #ccd5c8;

    box-shadow:
        0 8px 20px
        rgba(
            25,
            35,
            25,
            .07
        );
}


.vega-brand-suggestion__media {

    display:
        grid;

    place-items:
        center;

    width:
        58px;

    height:
        58px;

    margin-bottom:
        9px;

    border:
        1px solid #edf0eb;

    border-radius:
        14px;

    background:
        #fafbf9;

    overflow:
        hidden;
}


.vega-brand-suggestion__media img {

    display:
        block;

    width:
        100% !important;

    height:
        100% !important;

    padding:
        6px;

    margin:
        0 !important;

    object-fit:
        contain !important;

    box-sizing:
        border-box;
}


.vega-brand-suggestion__media strong {

    color:
        #405040;

    font-size:
        22px;

    font-weight:
        900;
}


.vega-brand-suggestion__name {

    display:
        -webkit-box;

    width:
        100%;

    overflow:
        hidden;

    -webkit-box-orient:
        vertical;

    -webkit-line-clamp:
        2;

    color:
        #273127;

    font-size:
        11px;

    font-weight:
        850;

    line-height:
        1.25;
}


.vega-brand-suggestion small {

    display:
        block;

    margin-top:
        4px;

    color:
        #979e95;

    font-size:
        7px;

    font-weight:
        650;
}


/* ========================================================
   TABLET
   ======================================================== */

@media (
    min-width: 768px
)
and (
    max-width: 1099px
) {

    body.vega-brand-archive
    .woocommerce
    ul.products {

        grid-template-columns:
            repeat(
                3,
                minmax(0,1fr)
            ) !important;

        gap:
            16px !important;
    }
}


/* ========================================================
   MOBILE
   ======================================================== */

@media (
    max-width: 767px
) {

    body.vega-brand-archive
    .woocommerce
    ul.products {

        grid-template-columns:
            repeat(
                2,
                minmax(0,1fr)
            ) !important;

        gap:
            10px !important;
    }


    body.vega-brand-archive
    .woocommerce
    ul.products
    li.product {

        width:
            100% !important;

        max-width:
            none !important;
    }


    body.vega-brand-archive
    .woocommerce
    ul.products
    li.product
    a
    img {

        width:
            100% !important;

        padding:
            7px;
    }


    body.vega-brand-archive
    .woocommerce
    ul.products
    li.product
    .woocommerce-loop-product__title {

        min-height:
            2.7em;

        padding-left:
            9px !important;

        padding-right:
            9px !important;

        font-size:
            12.5px !important;
    }


    body.vega-brand-archive
    .vega-brand-suggestions {

        margin-bottom:
            18px;

        padding:
            14px 12px;

        border-radius:
            15px;
    }


    .vega-brand-suggestions__head {

        align-items:
            flex-start;

        margin-bottom:
            12px;
    }


    .vega-brand-suggestions__head h2 {

        font-size:
            18px !important;
    }


    .vega-brand-suggestions__head p {

        max-width:
            260px;

        font-size:
            9px;
    }


    .vega-brand-suggestions__hint {

        display:
            none;
    }


    .vega-brand-suggestions__rail {

        gap:
            8px;

        margin-right:
            -12px;

        padding-right:
            12px;
    }


    .vega-brand-suggestion {

        flex-basis:
            104px;

        padding:
            10px 7px;
    }


    .vega-brand-suggestion__media {

        width:
            48px;

        height:
            48px;

        margin-bottom:
            7px;

        border-radius:
            12px;
    }


    .vega-brand-suggestion__name {

        font-size:
            9.5px;
    }
}



/* ===== FINAL BRAND PRODUCT WIDTH FIX ===== */

/*
 * Brand archives don't always contain a descendant
 * .woocommerce wrapper, so target body directly.
 */

body.vega-brand-archive ul.products {
    display: grid !important;

    grid-template-columns:
        repeat(4, minmax(0, 1fr)) !important;

    gap: 18px !important;

    width: 100% !important;
    max-width: 100% !important;

    margin: 0 !important;
    padding: 0 !important;

    clear: both !important;

    align-items: stretch !important;
}


body.vega-brand-archive ul.products::before,
body.vega-brand-archive ul.products::after {
    display: none !important;
    content: none !important;
}


/* =====================================================
   PRODUCT CARD — IMPORTANT COLLAPSE FIX
   WooCommerce was using align-items:flex-start
   ===================================================== */

body.vega-brand-archive ul.products li.product,
body.vega-brand-archive ul.products[class*="columns-"] li.product,
body.vega-brand-archive.woocommerce ul.products li.product,
body.vega-brand-archive.woocommerce-page ul.products li.product {

    float: none !important;
    clear: none !important;

    display: flex !important;
    flex-direction: column !important;

    align-items: stretch !important;
    justify-content: flex-start !important;

    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;

    flex: none !important;
    flex-basis: auto !important;

    margin: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;

    box-sizing: border-box !important;
}


/*
 * THIS IS CRITICAL:
 * product link was shrink-to-content because
 * parent had align-items:flex-start.
 */

body.vega-brand-archive ul.products li.product
a.woocommerce-loop-product__link {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    align-self: stretch !important;

    box-sizing: border-box !important;
}


/* Product image area */

body.vega-brand-archive ul.products li.product
a.woocommerce-loop-product__link img {

    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;

    aspect-ratio: 1 / 1 !important;

    margin: 0 0 10px !important;
    padding: 10px !important;

    object-fit: contain !important;

    background: #fff !important;

    box-sizing: border-box !important;
}


/* Title */

body.vega-brand-archive ul.products li.product
.woocommerce-loop-product__title {

    display: -webkit-box !important;

    width: 100% !important;

    min-height: 38px !important;

    margin: 0 !important;

    padding: 2px 10px 0 !important;

    overflow: hidden !important;

    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;

    font-size: 14px !important;
    line-height: 1.35 !important;

    white-space: normal !important;
    word-break: normal !important;
}


/* Price */

body.vega-brand-archive ul.products li.product
.price {

    display: block !important;

    width: 100% !important;

    padding-left: 10px !important;
    padding-right: 10px !important;

    box-sizing: border-box !important;
}


/* Actions must also use full card width */

body.vega-brand-archive ul.products li.product
.vega-loop-actions {

    width: 100% !important;

    box-sizing: border-box !important;
}


/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 1024px) {

    body.vega-brand-archive ul.products {

        grid-template-columns:
            repeat(3, minmax(0, 1fr)) !important;

        gap: 14px !important;
    }
}


/* =====================================================
   MOBILE
   ===================================================== */

@media (max-width: 767px) {

    body.vega-brand-archive ul.products {

        grid-template-columns:
            repeat(2, minmax(0, 1fr)) !important;

        gap: 10px !important;
    }


    body.vega-brand-archive ul.products li.product
    a.woocommerce-loop-product__link img {

        padding: 7px !important;

        margin-bottom: 7px !important;
    }


    body.vega-brand-archive ul.products li.product
    .woocommerce-loop-product__title {

        min-height: 34px !important;

        padding-left: 8px !important;
        padding-right: 8px !important;

        font-size: 12px !important;

        -webkit-line-clamp: 2 !important;
    }


    body.vega-brand-archive ul.products li.product
    .price {

        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}


/* Very small phones still stay 2-column */

@media (max-width: 380px) {

    body.vega-brand-archive ul.products {

        gap: 8px !important;
    }
}

