/* Keep the buying controls in normal document flow, above tabs and related items. */
body.single-product.flop-store div.product.type-product {
  position: relative;
  isolation: isolate;
  grid-auto-flow: row;
}
body.single-product.flop-store div.product.type-product::before,
body.single-product.flop-store div.product.type-product::after { display: none !important; }
body.single-product.flop-store div.product.type-product > .summary {
  position: static !important;
  top: auto !important;
  min-width: 0;
  align-self: start;
}
body.single-product.flop-store div.product.type-product > .woocommerce-product-gallery {
  min-width: 0;
  align-self: start;
}
body.single-product.flop-store div.product.type-product > .woocommerce-tabs,
body.single-product.flop-store div.product.type-product > .related,
body.single-product.flop-store div.product.type-product > .upsells {
  grid-column: 1 / -1 !important;
  position: relative;
  float: none !important;
  width: 100% !important;
  min-width: 0;
  clear: both;
}
@media (min-width: 900px) {
  body.single-product.flop-store div.product.type-product > .woocommerce-product-gallery { grid-column: 1; grid-row: 1; }
  body.single-product.flop-store div.product.type-product > .summary { grid-column: 2; grid-row: 1; }
}
.flops-color-loading > .woocommerce-product-gallery { opacity: .6; transition: opacity .16s ease-out; }
.flops-color-loading .flops-color-link { cursor: progress; }
.flops-color-error { margin-top: .7rem; font-size: .9em; }
@media (prefers-reduced-motion: reduce) { .flops-color-loading > .woocommerce-product-gallery { transition: none; } }
/* Compact mobile purchase flow: identity, image, color, size. */
@media(max-width:899px){
 body.single-product.flop-store div.product.type-product{display:flex!important;flex-direction:column;gap:0!important}
 body.single-product.flop-store div.product.type-product>.summary{display:contents!important}
 body.single-product.flop-store .summary>.woocommerce-breadcrumb,
 body.single-product.flop-store .summary>.single-product-category{display:none!important}
 body.single-product.flop-store .summary>.product_title{order:1;font-size:clamp(25px,6vw,32px)!important;line-height:1.08!important;margin:4px 0 8px!important;padding:0!important}
 body.single-product.flop-store .summary>.price{order:2;margin:0 0 12px!important;font-size:25px!important}
 body.single-product.flop-store div.product.type-product>.woocommerce-product-gallery{order:3;width:100%!important;margin:0 0 12px!important}
 body.single-product.flop-store .woocommerce-product-gallery .flex-viewport{height:clamp(210px,60vw,280px)!important}
 body.single-product.flop-store .woocommerce-product-gallery__image img{height:clamp(210px,60vw,280px)!important;width:100%!important;object-fit:contain!important}
 body.single-product.flop-store .woocommerce-product-gallery .flex-control-thumbs{display:flex!important;flex-wrap:nowrap!important;gap:8px!important;overflow-x:auto!important;padding:8px 0 2px!important;margin:0!important;scrollbar-width:thin}
 body.single-product.flop-store .woocommerce-product-gallery .flex-control-thumbs li{float:none!important;flex:0 0 48px!important;width:48px!important;margin:0!important}
 body.single-product.flop-store .woocommerce-product-gallery .flex-control-thumbs img{width:48px!important;height:48px!important;object-fit:contain!important}
 body.single-product.flop-store .summary>.flops-linked-colors{order:4;margin:0 0 16px!important}
 body.single-product.flop-store .flops-linked-colors p{margin:0 0 8px!important;font-size:14px!important;line-height:1.3!important}
 body.single-product.flop-store .flops-linked-colors .f-swatches{gap:7px!important}
 body.single-product.flop-store .flops-linked-colors .f-sw{min-height:44px!important;padding:8px 11px!important;gap:7px!important;font-size:13px!important;line-height:1.2!important}
 body.single-product.flop-store .flops-linked-colors .f-sw-dot{width:17px!important;height:17px!important;flex:0 0 17px!important}
 body.single-product.flop-store .summary>.cart{order:5;margin:0!important}
 body.single-product.flop-store .summary>.woocommerce-product-details__short-description{order:6;font-size:14px!important;line-height:1.45!important;margin:12px 0 0!important}
 body.single-product.flop-store .summary>.woocommerce-product-details__short-description p{margin:0!important}
 body.single-product.flop-store .summary>.product_meta{order:7}
 body.single-product.flop-store .summary>.f-perks{order:8;margin:12px 0!important}
 body.single-product.flop-store div.product.type-product>.woocommerce-tabs{order:9;margin-top:20px!important}
 body.single-product.flop-store div.product.type-product>.related{order:10}
 body.single-product.flop-store div.product.type-product>.upsells{order:11}
}

@media(max-width:899px){body.single-product.flop-store div.product.type-product>.ast-onsale-card{display:none!important}}

/* A stable square stage for every product photo and viewport. */
body.single-product.flop-store .woocommerce-product-gallery .flex-viewport{width:100%;aspect-ratio:1 / 1;height:auto!important}
body.single-product.flop-store .woocommerce-product-gallery__image{aspect-ratio:1 / 1;height:auto!important}
body.single-product.flop-store .woocommerce-product-gallery__image>a{display:block;width:100%;aspect-ratio:1 / 1}
body.single-product.flop-store .woocommerce-product-gallery__image img:not(.zoomImg){display:block;width:100%!important;height:100%!important;aspect-ratio:1 / 1;object-fit:contain!important}

/* Mobile: photo, compact color rail, then purchase details. */
@media(max-width:899px){
 body.single-product.flop-store div.product.type-product>.woocommerce-product-gallery{order:1}
 body.single-product.flop-store .summary>.flops-linked-colors{order:2;margin-bottom:14px!important}
 body.single-product.flop-store .summary>.product_title{order:3;margin:0 0 8px!important}
 body.single-product.flop-store .summary>.price{order:4;margin-bottom:16px!important}
 body.single-product.flop-store .flops-linked-colors .f-swatches{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:7px!important;padding:3px 2px 6px;scrollbar-width:thin}
 body.single-product.flop-store .flops-linked-colors .f-sw{flex:0 0 44px!important;width:44px!important;height:44px!important;min-height:44px!important;padding:8px!important;gap:0!important;border:2px solid transparent!important;background:transparent!important;box-shadow:none!important}
 body.single-product.flop-store .flops-linked-colors .f-sw[aria-current="page"]{border-color:var(--tinta)!important;background:var(--lima)!important}
 body.single-product.flop-store .flops-linked-colors .f-sw>span:not(.f-sw-dot){position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip-path:inset(50%)!important;white-space:nowrap!important}
 body.single-product.flop-store .flops-linked-colors .f-sw-dot{width:26px!important;height:26px!important;flex:0 0 26px!important}
 body.single-product.flop-store .woocommerce-product-gallery .zoomImg{display:none!important}
}

@media(max-width:899px){body.single-product.flop-store .flops-linked-colors .f-sw{min-width:44px!important;max-width:44px!important;border-radius:50%!important}body.single-product.flop-store .flops-linked-colors .f-swatches{justify-content:flex-start!important}}
