/* The classic WooCommerce gallery is rendered inside the catalog product block. */
.moe-catalog-product .woocommerce div.product:has(> .woocommerce-product-gallery) {
    display:grid;
    grid-template-columns:minmax(0, min(54%, 90vh)) minmax(0, 1fr);
    align-items:start;
    column-gap:clamp(24px, 4vw, 60px);
    row-gap:22px;
}
.moe-catalog-product .woocommerce div.product > * { grid-column:1 / -1; }
.moe-catalog-product .woocommerce div.product::after { display:none; }
.moe-catalog-product .woocommerce div.product > .woocommerce-product-gallery,
.moe-catalog-product .woocommerce div.product > .summary {
    float:none;
    width:100%;
    min-width:0;
    margin:0;
}
.moe-catalog-product .woocommerce div.product > .woocommerce-product-gallery {
    grid-column:1;
    grid-row:1;
    display:grid;
    grid-template-columns:minmax(0,1fr);
    background:transparent;
    border-radius:0;
    overflow:visible;
}
.moe-catalog-product .woocommerce div.product > .summary { grid-column:2; grid-row:1; }
.moe-product-description p:first-child {margin-block-start:0;}
.moe-catalog-product .woocommerce div.product > .product_meta {
    grid-column:1 / -1;
    margin:0;
    padding-top:14px;
    border-top:1px solid #e2dfda;
    font-size:14px;
    color:#52566b;
}
.moe-catalog-product .product_meta > span {display:block;}
.moe-catalog-product .summary .pb-favorite.button {
    color:#bd2342;
    background:#fff;
    border:1px solid #d9b1b9;
    border-radius:10px;
    padding:12px;
    display:inline-grid;
    place-items:center;
    justify-self:start;
}
.moe-catalog-product .pb-favorite.button:hover,
.moe-catalog-product .pb-favorite.button.is-active {color:#bb193b; background:#fff0f2;}
.moe-catalog-product .pb-favorite.button.is-active svg {fill:currentColor;}
.moe-catalog-product .summary .single_add_to_cart_button,
.moe-catalog-product .summary .pb-buy.has-quantity .pb-buy-stepper {
    box-sizing:border-box;
    width:min(264px,100%);
    min-height:56px;
    font-size:17px;
}
.moe-catalog-product .summary .pb-buy-stepper button {width:52px; min-height:56px;}
.moe-catalog-product .summary .pb-buy-stepper .pb-buy-in-cart {font-size:16px; min-height:56px;}
.moe-catalog-product .woocommerce-product-gallery > :is(.flex-viewport,.woocommerce-product-gallery__wrapper) {
    grid-area:1 / 1;
    overflow:hidden;
    border-radius:16px;
    background:#eeede9;
}
.moe-catalog-product .woocommerce-product-gallery__wrapper { margin:0; padding:0; }
.moe-catalog-product .woocommerce-product-gallery__image > a {
    display:flex;
    align-items:center;
    justify-content:center;
    aspect-ratio:5 / 4;
}
.moe-catalog-product .woocommerce-product-gallery__image > a > img {
    width:100%;
    height:100%;
    object-fit:contain;
}
/* Native swiping is also available before the WooCommerce carousel initializes. */
.moe-catalog-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper {
    display:flex;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
}
.moe-catalog-product .woocommerce-product-gallery > .woocommerce-product-gallery__wrapper > div {
    flex:0 0 100%;
    min-width:0;
    scroll-snap-align:start;
}
.moe-catalog-product .flex-control-thumbs {
    grid-area:2 / 1;
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    list-style:none;
    margin:10px 0 0;
    padding:0;
}
.moe-catalog-product .flex-control-thumbs li { margin:0; }
.moe-catalog-product .flex-control-thumbs img {
    display:block;
    width:52px;
    height:52px;
    padding:2px;
    box-sizing:border-box;
    border:2px solid transparent;
    border-radius:8px;
    object-fit:contain;
    background:#eeede9;
    cursor:pointer;
}
.moe-catalog-product .flex-control-thumbs .flex-active { border-color:#283fcb; }
.moe-catalog-product .flex-direction-nav {
    grid-area:1 / 1;
    align-self:center;
    display:flex;
    justify-content:space-between;
    z-index:1;
    list-style:none;
    padding:0 10px;
    margin:0;
    pointer-events:none;
}
.moe-catalog-product .flex-direction-nav li {margin:0;}
.moe-catalog-product .flex-direction-nav a {
    pointer-events:auto;
    display:block;
    position:relative;
    box-sizing:border-box;
    width:44px;
    height:44px;
    border:1px solid #d6d5d0;
    border-radius:50%;
    background:#fff;
    color:#202647;
    font-size:0;
    line-height:0;
    text-decoration:none;
}
.moe-catalog-product .flex-direction-nav a::before {content:none;}
.moe-catalog-product .flex-direction-nav a::after {
    content:"";
    position:absolute;
    inset:0;
    margin:auto;
    width:9px;
    height:16px;
    background:currentColor;
    clip-path:polygon(15% 0,100% 50%,15% 100%,0 90%,73% 50%,0 10%);
}
.moe-catalog-product .flex-prev::after {transform:rotate(180deg);}
.moe-catalog-product .flex-direction-nav .flex-disabled {visibility:hidden;}
.moe-catalog-product .flex-direction-nav a:focus-visible {outline:3px solid #283fcb;outline-offset:2px;}
@media (max-width:700px) {
    .moe-catalog-product .woocommerce div.product:has(> .woocommerce-product-gallery) {
        grid-template-columns:minmax(0,1fr);
        row-gap:16px;
    }
    .moe-catalog-product .woocommerce div.product > .summary { grid-area:auto; display:contents; }
    .moe-catalog-product .summary > .product_title {grid-column:1; grid-row:1; margin:0;}
    .moe-catalog-product .summary > .price {grid-column:1; grid-row:2; margin:0;}
    .moe-catalog-product .woocommerce div.product > .woocommerce-product-gallery {grid-column:1; grid-row:3;}
    .moe-catalog-product .summary > .moe-product-description {grid-column:1; grid-row:4;}
}
