.yd-shopify-display-grid {
    /* display: flex;
    flex-wrap: wrap;
    gap: 1.5rem; */
    display: grid;
    grid-template-columns: repeat(var(--shopify-columns, 3), 1fr);
    gap: 1.5rem;
}

.yd-shopify-display-grid .yd-shopify-product {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 7px;
    overflow: hidden;
    box-sizing: border-box;
    padding: 1rem;
    text-align: center;
}

.yd-shopify-display-grid img {
    max-width: 100%;
    height: auto;
    /* display: block; */
    /* margin: 0 auto 0.5em; */
}

.yd-shopify-display-grid h2 {
    font-size: 1.1em;
    margin: 0.5em 0;
}

.yd-shopify-price {
    color: #111;
    font-weight: bold;
    margin: 0.3em 0 0.2em;
}



.yd-shopify-gallery {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    /* min-height: 200px; */
    overflow: hidden;
}

/* active画像のみ高さを反映 */
.yd-shopify-gallery-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.5s;
    display: block;
}

.yd-shopify-gallery-img.active {
    display: block;
    position: relative;
    opacity: 1;
    z-index: 2;
}

.yd-shopify-gallery-prev,
.yd-shopify-gallery-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.7); 
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0; 
    /* 既存のスタイル ... */
    outline: none;
    box-shadow: none;
    border: none;
}
.yd-shopify-gallery-prev:focus,
.yd-shopify-gallery-next:focus {
    outline: none;
    box-shadow: none;
    border: none;
}

.yd-shopify-gallery-prev {
    left: 3px;
}

.yd-shopify-gallery-next {
    right: 3px;
}

/* ボーダーで三角矢印を作る */
.yd-shopify-gallery-prev::before,
.yd-shopify-gallery-next::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-style: solid;
}

.yd-shopify-gallery-prev::before {
    border-width: 10px 14px 10px 0;
    border-color: transparent #222 transparent transparent;
}

.yd-shopify-gallery-next::before {
    border-width: 10px 0 10px 14px;
    border-color: transparent transparent transparent #222;
}





.yd-shopify-list-mode {
    display: block !important;
}

.yd-shopify-product-list-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    border: 1px solid #eee;
    border-radius: 7px;
    background: #fff;
    margin-bottom: 2rem;
    padding: 1.2rem 1rem;
    box-sizing: border-box;
}

.yd-shopify-list-img {
    flex: 0 0 170px;
    max-width: 200px;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yd-shopify-list-details {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.yd-shopify-list-details h2 {
    margin: 0 0 0.6em 0;
    font-size: 1.15em;
    line-height: 1.3;
    font-weight: bold;
}

.yd-shopify-list-details .yd-shopify-price {
    margin-top: 0.7em;
    font-size: 1.13em;
    color: #75aecd;
    font-weight: bold;
}

.yd-shopify-list-details .yd-shopify-variant-selector {
    margin: 0.4em 0;
}



.yd-shopify-option-label {
    font-size: 0.9em;
}

.yd-shopify-radio-label {
    display: inline-block;
    cursor: pointer;
    margin: 0 0.4em 0.4em 0;
    padding: 0;
}

.yd-shopify-radio-label input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    display: none;
}

.yd-shopify-radio-label {
    position: relative;
}

.yd-shopify-radio-label input[type="radio"]+span {
    display: inline-block;
    min-width: 2.8em;
    padding: 0.2em 0.2em;
    /* border-radius: 6px; */
    /* border: 1.5px solid #ccc; */
    border: 2px solid #F2F2F2;
    background: #f5f5f5;
    color: #222;
    font-size: 0.8em;
    font-weight: 300;
    text-align: center;
    margin: 0;
    transition:
        background 0.25s,
        color 0.25s,
        border-color 0.25s;
}

.yd-shopify-radio-label input[type="radio"]:checked+span {
    border-color: #75aecd;
    /* background: #d4f0ff; */
    /* color: #2176b5; */
}

.yd-shopify-radio-label input[type="radio"]:focus+span {
    box-shadow: 0 0 0 2px #b1e4ff;
}




@media (max-width: 700px) {
    .yd-shopify-product-list-item {
        flex-direction: column;
    }

    .yd-shopify-list-img {
        max-width: 100%;
        min-width: 0;
    }
}



@media (max-width: 600px) {
    .yd-shopify-display-grid {
        grid-template-columns: repeat(1, 1fr);
        /* flex-direction: column; */
    }

    .yd-shopify-display-grid .yd-shopify-product {
        max-width: 100%;
    }
}