:root {
    --afterbefore-offer-red: #ba261a;
}

.shop-item-image {
    position: relative;
}

@media (min-width: 1025px) {
    .shop-grid--center-visible {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        column-gap: 20px;
        row-gap: 60px;
    }

    .shop-grid--center-visible > .shop-item:not([hidden]) {
        flex: 0 0 calc((100% - 60px) / 4);
        max-width: calc((100% - 60px) / 4);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .shop-grid--center-visible {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        column-gap: 20px;
        row-gap: 60px;
    }

    .shop-grid--center-visible > .shop-item:not([hidden]) {
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}

.shop-discount-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border-radius: 50%;
    background: var(--afterbefore-offer-red);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    pointer-events: none;
}

.shop-item-price--discounted {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}

.shop-item-price {
    font-weight: 600;
}

.shop-item-price__original {
    color: #999;
    font-size: 0.72rem;
    font-weight: 400;
}

.shop-item-price__sale {
    color: #111;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-price-summary {
    display: grid;
    gap: 7px;
}

.product-price-line {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.product-price-line--original del {
    color: #999;
    font-size: 0.76rem;
}

.product-price-line--sale strong {
    color: #111;
    font-size: 1rem;
    font-weight: 600;
}

.product-discount-rate {
    color: var(--afterbefore-offer-red);
    font-size: 0.84rem;
    font-weight: 600;
}

.product-member-offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 20px;
    padding: 17px 18px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    background: #f7f7f7;
}

.product-member-offer > div {
    min-width: 0;
    text-align: left;
}

.product-member-offer__label,
.product-member-offer__price {
    display: block;
    font-family: var(--font-sans);
    letter-spacing: -0.02em;
}

.product-member-offer__label {
    margin-bottom: 7px;
    color: #333;
    font-size: 0.76rem;
}

.product-member-offer__price {
    color: #111;
    font-size: 0.96rem;
    font-weight: 600;
}

.product-member-offer__price-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
}

.product-member-offer__help {
    position: static;
    display: inline-flex;
    align-items: center;
}

.product-member-offer__help-button {
    display: inline-grid;
    width: 17px;
    height: 17px;
    padding: 0;
    place-items: center;
    border: 1px solid #9aa0a6;
    border-radius: 50%;
    background: #fff;
    color: #747b83;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1;
    cursor: help;
}

.product-member-offer__tooltip {
    position: absolute;
    top: calc(100% + 9px);
    left: -2px;
    z-index: 10;
    width: min(340px, calc(100vw - 56px));
    padding: 11px 13px;
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: 5px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    color: #666;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 400;
    line-height: 1.6;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-3px);
    transition: opacity 140ms ease, transform 140ms ease, visibility 140ms ease;
}

.product-member-offer__help:hover .product-member-offer__tooltip,
.product-member-offer__help:focus-within .product-member-offer__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.product-member-offer__price.is-conditional {
    font-size: 0.78rem;
    font-weight: 500;
}

.product-member-offer__link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 110px;
    padding: 8px 14px;
    border: 1px solid rgba(0, 0, 0, 0.45);
    border-radius: 999px;
    color: #111;
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
}

.product-member-offer__link svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.product-member-offer[hidden] {
    display: none;
}

.product-member-offer + .product-collection {
    margin-top: 28px;
}

@media (max-width: 768px) {
    .shop-discount-badge {
        top: 10px;
        right: 10px;
        width: 32px;
        height: 32px;
        font-size: 0.6rem;
    }

    .product-member-offer {
        gap: 12px;
        padding: 15px;
    }

    .product-member-offer__tooltip {
        left: 0;
        width: min(300px, calc(100vw - 50px));
    }

    .product-member-offer__link {
        min-width: 100px;
        padding: 7px 11px;
    }

    .product-member-offer + .product-collection {
        margin-top: 24px;
    }
}
