/* Supplier cards share the Electronic v7 palette across catalog and carousels. */
.gs-catalog-listing .products.grid-view > .row {
    --gs-columns: 4;
    display: grid;
    grid-template-columns: repeat(var(--gs-columns), minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.gs-catalog-listing .products.grid-view.columns-2 > .row { --gs-columns: 2; }
.gs-catalog-listing .products.grid-view.columns-3 > .row { --gs-columns: 3; }
.gs-catalog-listing .products.grid-view > .row::before,
.gs-catalog-listing .products.grid-view > .row::after { display: none; }

.gs-catalog-listing .products > .row > .gs-catalog-card {
    float: none;
    width: 100% !important; /* eGudgets sizes each product with a percentage of its old flex row. */
    max-width: none !important;
    min-width: 0;
    padding: 0;
    margin: 0;
    border: 0;
}

.product.gs-catalog-card .gs-catalog-card__inner {
    display: flex;
    flex-direction: column;
    position: relative;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 1px solid #cfdbed;
    border-radius: 10px;
    background: #fff;
}

.product.gs-catalog-card .gs-catalog-card__inner:is(:hover, :focus-within) { border-color: #8faad5; }

.product.gs-catalog-card .gs-catalog-card__media {
    position: relative;
    display: block;
    width: auto;
    min-width: 0;
    aspect-ratio: 1.27;
    margin: 0;
    border-bottom: 1px solid #e6edf7;
    border-radius: 10px 10px 0 0;
    background-color: #fff !important;
}

.product.gs-catalog-card .gs-catalog-card__media > a.thumbnail-img {
    float: none;
    display: block;
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: clamp(10px, 1vw, 16px);
    margin: 0;
    border-radius: inherit;
    filter: none;
    opacity: 1;
}

.product.gs-catalog-card .gs-catalog-card__media > a.thumbnail-img img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    object-fit: contain !important;
    object-position: center;
    transition: none;
}

.gs-catalog-card .gs-catalog-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 14px;
    color: #162b46;
}

.gs-catalog-card__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 2px 6px;
    color: #455a76;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.gs-catalog-card__sku {
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
    font-weight: 450;
}

.product.gs-catalog-card .gs-catalog-card__title {
    padding: 0;
    margin: 0;
    color: #162b46;
    font: inherit;
    font-size: clamp(14px, 1.1vw, 17px);
    font-weight: 700;
    line-height: 1.32;
    overflow-wrap: anywhere;
    text-transform: none;
    text-wrap: pretty;
}

.gs-catalog-card .gs-catalog-card__title a {
    display: inline;
    color: #162b46;
}

.gs-catalog-card .gs-catalog-card__title a:hover {
    color: #0737a7;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gs-catalog-card .gs-catalog-card__specs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gs-catalog-card .gs-catalog-card__specs li {
    min-width: 0;
    margin: 0;
    padding: 2px 6px;
    border-radius: 4px;
    background: #edf3fc;
    color: #254469;
    font-size: 11px;
    font-weight: 550;
    line-height: 1.35;
}

.gs-catalog-card__bottom {
    display: grid;
    gap: 6px;
    margin-top: auto;
}
.gs-catalog-card__price, .gs-catalog-card__price .gs-reference-price {
    color: #0737a7;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}
.product.gs-catalog-card .gs-catalog-card__stock {
    display: flex;
    align-items: baseline;
    gap: 6px;
    padding: 0;
    margin: 0;
    color: #455a76;
    font-size: 12px;
    line-height: 1.3;
}
.gs-catalog-card__stock::before {
    content: "";
    flex: 0 0 6px;
    height: 6px;
    border-radius: 50%;
    background: #6384ba;
}
.product.gs-catalog-card .gs-catalog-card__stock.is-out { color: #813749; }
.gs-catalog-card__stock.is-out::before { background: #a95462; }

.gs-catalog-card .gs-catalog-card__action .gs-card-link {
    display: flex;
    width: 100%;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid #0737a7;
    border-radius: 6px;
    color: #0737a7;
    background: #fff;
    font-size: 14px;
    line-height: 1.3;
}
.gs-catalog-card .gs-catalog-card__action .gs-card-link:is(:hover, :focus-visible) { background: #0737a7; color: #fff; }

.gs-catalog-card .product-button-wrap a:focus-visible,
.gs-catalog-card .gs-catalog-card__action a:focus-visible,
.gs-catalog-card .gs-catalog-card__title a:focus-visible {
    outline: 2px solid #0737a7 !important;
    outline-offset: 3px;
}

.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    transform: none;
    visibility: visible;
    opacity: 1;
}
.gs-catalog-card .gs-catalog-card__bottom .product-button-hv {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px;
}
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv {
    display: grid;
    place-items: center;
    position: relative;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 5px;
    background: #edf3fc !important;
    color: #0737a7;
}
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv::after { display: none; }
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv :is(.compare-button, .yith-wcwl-add-to-wishlist-button-block) {
    margin: 0;
    padding: 0;
    width: 100% !important;
    max-width: none;
}
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    background: transparent !important;
    color: #0737a7 !important;
}
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv a::before { color: #0737a7; }
.gs-catalog-card .gs-catalog-card__bottom .product-button-wrap .btn-hv:is(:hover, :focus-within) {
    background: #dbe8ff !important;
}

.gs-product-specs {
    width: min(100%, 720px);
    margin: 16px 0 0;
    border: 1px solid #d4e0f1;
    border-radius: 8px;
}
.gs-product-specs > div {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr);
    gap: 12px;
    padding: 10px 15px;
}
.gs-product-specs > div + div { border-top: 1px solid #d4e0f1; }
.gs-product-specs > div:nth-child(odd) { background-color: #f3f7fd; }
.gs-product-specs :is(dt, dd) { margin: 0; color: #162b46; overflow-wrap: anywhere; }

.gs-catalog-listing .products:is(.list-view, .short-view) .gs-catalog-card__inner {
    display: grid;
    grid-template-columns: minmax(100px, 24%) minmax(0, 1fr);
}
.gs-catalog-listing .products:is(.list-view, .short-view) .gs-catalog-card__action { width: min(100%, 180px); }
.gs-catalog-listing .products:is(.list-view, .short-view) .gs-catalog-card { margin-bottom: 10px; }

@media (max-width: 1199px) {
    .gs-catalog-listing .products.grid-view > .row { --gs-columns: 3; }
}
@media (max-width: 767px) {
    .gs-catalog-listing .products.grid-view > .row { --gs-columns: 2; gap: 8px; }
    .gs-catalog-card .gs-catalog-card__body { padding: 10px; }
    .gs-catalog-card__meta { font-size: 11px; }
    .gs-catalog-card .gs-catalog-card__title { font-size: 14px; }
    .gs-catalog-card__price, .gs-catalog-card__price .gs-reference-price { font-size: 15px; }
    .gs-catalog-card .gs-catalog-card__specs li { font-size: 10px; }
}


/* Product detail accents for the supplier catalogue. */
.gs-supplier-product .summary.entry-summary > .price:has(.gs-reference-price) {
    padding: 12px 16px;
    margin: 12px 0 0;
    border: 0;
    border-radius: 6px 6px 0 0;
    background: var(--gs-blue, #0638a7);
}

.gs-supplier-product .summary.entry-summary .price .gs-reference-price {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}

.gs-supplier-product .summary.entry-summary > .price:has(.gs-reference-price) + .gs-product-status {
    margin: 0 0 14px;
    padding: 10px 16px;
    border: 1px solid #cbdaf1;
    border-top: 0;
    border-radius: 0 0 6px 6px;
    background: var(--gs-soft, #edf3ff);
}

.gs-supplier-product .product_meta a {
    color: var(--gs-blue, #0638a7);
    font-weight: 600;
}

.gs-supplier-product .woocommerce-tabs.wc-tabs-wrapper > .wc-tabs > li.active > a {
    border-radius: 4px;
    color: #fff;
    background: var(--gs-blue, #0638a7);
}

.gs-supplier-product .woocommerce-tabs.wc-tabs-wrapper > .wc-tabs > li > a:focus-visible {
    outline: 2px solid var(--gs-blue, #0638a7);
    outline-offset: 3px;
}

.gs-supplier-product .gs-product-specs dt {
    color: var(--gs-blue, #0638a7);
}
