/* Identity chips: in the body, under the title. Never overlay the photo. */
.gl-plp-list .gi-product-inner .gi-pro-badges {
    position: static;
    top: auto;
    left: auto;
    max-width: none;
    margin: 0;
    z-index: auto;
    pointer-events: auto;
    gap: 0;
}

.gl-plp-list .gi-product-inner .gi-pro-badges .gl-tag {
    height: auto;
    min-height: 0;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    color: #737373;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.35;
    overflow: visible;
    white-space: nowrap;
}

.gl-plp-list .gi-product-inner .gi-pro-badges .gl-tag:not(:last-child)::after {
    content: "·";
    margin: 0 6px;
    color: #d4d4d4;
    font-weight: 400;
    pointer-events: none;
}

@media (max-width: 767px) {
    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner:has(.gi-pro-badges),
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner:has(.gi-pro-badges) {
        grid-template-rows: auto;
    }

    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner:has(.gi-pro-badges) .gi-pro-image-link,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner:has(.gi-pro-badges) .gi-pro-image-link,
    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner:has(.gi-pro-badges) .gi-pro-body,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner:has(.gi-pro-badges) .gi-pro-body {
        grid-row: 1;
    }

    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner .gi-pro-badges,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner .gi-pro-badges {
        grid-column: auto;
        grid-row: auto;
        margin: 0;
        order: -1;
    }

    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner .gi-pro-title,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner .gi-pro-title {
        order: -2;
    }

    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner:has(.gi-pro-badge-row:not(:empty)) .gi-pro-image-link,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner:has(.gi-pro-badge-row:not(:empty)) .gi-pro-image-link {
        grid-row: 1;
        align-self: start;
    }

    .gl-plp-list .gi-shop .shop-pro-inner>ul.products .gi-product-inner:has(.gi-pro-badge-row:not(:empty)) .gi-pro-body,
    .gl-plp-list .gi-shop ul.products.gl-shop-empty__products .gi-product-inner:has(.gi-pro-badge-row:not(:empty)) .gi-pro-body {
        grid-row: 1;
        align-self: stretch;
    }
}

/* Scene / size shortcuts — capsule row above .gi-shop-toolbar */
.gl-plp-list .gl-plp-lead {
    padding-bottom: 12px;
}

.gl-plp-list .gl-plp-quick {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    margin: 0 0 16px;
}

.gl-plp-list .gl-plp-quick__title {
    margin: 0;
    color: #737373;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.gl-plp-list .gl-plp-quick__track {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.gl-plp-list .gl-plp-quick__chip {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin: 0;
    padding: 6px 13px;
    border: 1px solid #d6ddc8;
    border-radius: 999px;
    background-color: transparent;
    color: #525252;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.gl-plp-list .gl-plp-quick__chip:hover {
    background-color: #f6f8f1;
    border-color: #b7c4a0;
    color: #3d5a14;
}

@media (max-width: 991px) {
    .gl-plp-list .gl-plp-lead {
        padding-bottom: 16px;
    }

    .gl-plp-list .gi-shop {
        padding-top: 16px;
    }

    .gl-plp-list .gl-plp-quick {
        margin: 0 0 14px;
        gap: 6px;
    }

    .gl-plp-list .gl-plp-quick__track {
        flex-wrap: wrap;
        overflow: visible;
        gap: 6px;
    }

    .gl-plp-list .gl-plp-quick__chip {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Filter + Sort bar — no border, light gray fill, square. Never invert to black. */
.gl-plp-list .gi-shop.gl-filter-inline .gi-shop-toolbar {
    align-items: center;
    gap: 10px 16px;
    margin-bottom: 16px;
}

.gl-plp-list .gi-shop-toolbar .gl-filter-visibility,
.gl-plp-list .gi-shop-toolbar .gl-filter-visibility:has(.filter-badge-bar.flex),
.gl-plp-list .gi-shop-toolbar .gl-filter-visibility:has(.filter-badge-bar.flex):hover {
    border: 0;
    border-radius: 0;
    background-color: #f5f5f5;
    color: #262626;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
}

.gl-plp-list .gi-shop-toolbar .gl-filter-visibility:hover {
    background-color: #ebebeb;
    color: #171717;
}

.gl-plp-list .gi-shop-toolbar .gl-filter-visibility .fi-rr-filter {
    color: #5a8219;
}

.gl-plp-list .gi-shop-toolbar .gl-filter-visibility .filter-badge-bar.flex {
    display: inline-flex;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background-color: #5a8219;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.gl-plp-list .gi-shop-toolbar .woocommerce-result-count {
    color: #737373;
    font-size: 13px;
}

.gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 0 6px 0 14px;
    border: 0;
    border-radius: 0;
    background-color: #f5f5f5;
}

.gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering:hover {
    background-color: #ebebeb;
}

.gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering .orderby,
.gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering .orderby:hover,
.gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering .orderby:focus {
    padding: 8px 22px 8px 0;
    border: 0;
    background-color: transparent;
    color: #262626;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    box-shadow: none;
}

@media (max-width: 991px) {
    .gl-plp-list .gi-shop.gl-filter-inline .gi-shop-toolbar {
        margin-bottom: 12px;
    }

    .gl-plp-list .gi-shop.gl-filter-inline .gi-shop-toolbar .woocommerce-result-count {
        display: none;
    }

    .gl-plp-list .gi-shop-toolbar .gl-filter-visibility,
    .gl-plp-list .gi-shop-toolbar .gl-filter-visibility:has(.filter-badge-bar.flex) {
        padding: 8px 14px;
        font-size: 13px;
    }

    .gl-plp-list .gi-shop .gi-shop-toolbar .woocommerce-ordering .orderby {
        padding: 8px 20px 8px 0;
        font-size: 13px;
    }
}

/* ============================================================
   Quick View — mobile bottom sheet / desktop centered dialog
   ============================================================ */

body.gl-qv-open {
    overflow: hidden;
}

body.gl-qv-open .gi-back-to-top {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.gl-qv {
    position: fixed;
    inset: 0;
    z-index: 9995;
}

.gl-qv[hidden] {
    display: none;
}

.gl-qv__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.52);
    opacity: 0;
    transition: opacity 0.28s ease;
}

.gl-qv.is-open .gl-qv__overlay {
    opacity: 1;
}

.gl-qv__sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: min(88vh, 760px);
    background: #fff;
    border-radius: 12px 12px 0 0;
    transform: translateY(110%);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
}

.gl-qv.is-open .gl-qv__sheet {
    transform: translateY(0);
}

.gl-qv__handle {
    display: block;
    width: 36px;
    height: 4px;
    margin: 8px auto 0;
    background: #d4d4d4;
    border-radius: 2px;
    flex-shrink: 0;
}

.gl-qv__header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    height: 48px;
    padding: 0 48px;
    border-bottom: 1px solid #e5e5e7;
    flex-shrink: 0;
}

.gl-qv__heading {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #737373;
}

.gl-qv__close {
    position: absolute;
    top: 50%;
    right: 8px;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #525252;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-50%);
    cursor: pointer;
}

.gl-qv__close:hover,
.gl-qv__close:focus-visible {
    color: #262626;
    outline: none;
}

.gl-qv__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gl-qv__gallery-wrap {
    position: relative;
    background: #f5f5f5;
}

.gl-qv__gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.gl-qv__gallery::-webkit-scrollbar {
    display: none;
}

.gl-qv__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    max-height: 320px;
    margin: 0;
}

.gl-qv__slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gl-qv__badges {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    pointer-events: none;
}

.gl-qv__count {
    position: absolute;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.9);
    color: #525252;
    font-size: 11px;
    line-height: 1.3;
}

.gl-qv__thumbs {
    display: flex;
    gap: 8px;
    padding: 10px 16px 0;
    overflow-x: auto;
}

.gl-qv__thumb {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 1px solid #e5e5e7;
    background: #f5f5f5;
    cursor: pointer;
}

.gl-qv__thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.gl-qv__thumb.is-active {
    border-color: #262626;
}

.gl-qv__thumb[data-kind="video"] {
    position: relative;
}

.gl-qv__thumb[data-kind="video"]::after {
    content: "▶";
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    background: rgba(0, 0, 0, 0.28);
}

.gl-qv__info {
    padding: 16px 16px 8px;
}

.gl-qv__title {
    margin: 0 0 14px;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: #262626;
}

.gl-qv__block {
    margin: 0 0 14px;
}

.gl-qv__label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #737373;
}

.gl-qv__rating {
    margin: 0 0 10px;
}

.gl-qv__price-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 0 0 10px;
}

.gl-qv__price-row .price {
    min-height: 0;
}

.gl-qv__stock {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: #ea580c;
}

.gl-qv__stock:empty,
.gl-qv__stock.is-hidden {
    display: none;
}

.gl-qv__swatches {
    margin: 0 0 14px;
}

.gl-qv__color-name {
    margin: 0 0 8px;
    font-size: 14px;
    line-height: 1.3;
    color: #262626;
}

.gl-qv__specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.gl-qv__specs li {
    padding: 4px 8px;
    background: #f5f5f5;
    color: #525252;
    font-size: 12px;
    line-height: 1.3;
}

.gl-qv__idea {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #737373;
}

.gl-qv__idea:empty {
    display: none;
}

.gl-qv__footer {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #e5e5e7;
    background: #fff;
}

.gl-qv__footer .gl-qv__cart {
    flex: 1 1 0;
    display: flex;
    margin: 0;
    padding: 0;
    min-width: 0;
}

.gl-qv__details,
button.gl-qv__atc,
.gl-qv__atc {
    flex: 1 1 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 48px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 0;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.02em;
    line-height: 1;
    text-decoration: none;
    text-transform: uppercase;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

a.gl-qv__details,
.gl-qv__details {
    border: 1px solid #d4d4d4 !important;
    background: #fff !important;
    color: #262626 !important;
}

.gl-qv__details:hover {
    border-color: #262626 !important;
    color: #262626 !important;
}

/* Beat Tailwind button { background: transparent } the same way PDP sticky ATC does */
button.gl-qv__atc,
.gl-qv__atc {
    border: 0 !important;
    background: #262626 !important;
    background-image: none !important;
    color: #fff !important;
}

button.gl-qv__atc:hover,
.gl-qv__atc:hover {
    background: #525252 !important;
    color: #fff !important;
}

button.gl-qv__atc:disabled,
.gl-qv__atc:disabled {
    background: #a3a3a3 !important;
    color: #fff !important;
    cursor: wait;
}

@media (min-width: 768px) {
    .gl-qv__handle {
        display: none;
    }

    .gl-qv__sheet {
        left: 50%;
        right: auto;
        top: 50%;
        bottom: auto;
        width: min(560px, calc(100vw - 48px));
        height: min(86vh, 720px);
        border-radius: 0;
        transform: translate(-50%, calc(-50% + 16px)) scale(0.98);
        opacity: 0;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
        transition: transform 0.24s ease, opacity 0.24s ease;
    }

    .gl-qv.is-open .gl-qv__sheet {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }

    .gl-qv__slide {
        max-height: 360px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gl-qv__overlay,
    .gl-qv__sheet {
        transition: none;
    }
}
