/* KSK Designer 0.9.11 - compact modules, wide stage, more useful purchase panel. */
@media (min-width: 1101px) {
  body.kskd-product .product.kskd-designer-active>.kskd-product-row.kskd-layout-right {
    grid-template-columns:minmax(0,1fr) clamp(340px,28vw,405px)!important;
    column-gap:12px!important;
  }
  body.kskd-product .product.kskd-fullpage-product>.kskd-fullpage-row {
    --kskd-panel-side:clamp(335px,27vw,405px);
    --kskd-panel-gap:12px;
    grid-template-columns:minmax(0,1fr) var(--kskd-panel-side)!important;
  }
  .kskd-lightbox .kskd-modal-layout {
    grid-template-columns:minmax(0,1fr) clamp(335px,27vw,405px)!important;
  }
}
@media (min-width: 851px) and (max-width:1100px) {
  body.kskd-product .product.kskd-designer-active>.kskd-product-row.kskd-layout-right {
    grid-template-columns:minmax(0,1fr) clamp(345px,35vw,375px)!important;
    column-gap:9px!important;
  }
}
/* The old desktop rule reserved ~185-240px for 68-84px of module buttons.
   Match the column to the REAL tools width, reclaiming the empty strip. */
@media(min-width:851px) {
  body.kskd-product .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="side"]>.kskd-workspace,
  .kskd-lightbox .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="side"]>.kskd-workspace {
    grid-template-columns:84px minmax(0,1fr)!important;
    column-gap:9px!important;
  }
  body.kskd-product .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="side"].kskd-drawer-open>.kskd-workspace,
  .kskd-lightbox .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="side"].kskd-drawer-open>.kskd-workspace {
    grid-template-columns:clamp(294px,31%,340px) minmax(0,1fr)!important;
  }
  body.kskd-product .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="overlay"]>.kskd-workspace,
  .kskd-lightbox .kskd-shell.kskd-floating-colors[data-desktop-modules-layout="overlay"]>.kskd-workspace {
    grid-template-columns:68px minmax(0,1fr)!important;
    column-gap:9px!important;
  }
  body.kskd-product .kskd-shell.kskd-floating-colors:not([data-desktop-modules-layout="side"]):not([data-desktop-modules-layout="overlay"])>.kskd-workspace,
  .kskd-lightbox .kskd-shell.kskd-floating-colors:not([data-desktop-modules-layout="side"]):not([data-desktop-modules-layout="overlay"])>.kskd-workspace {
    grid-template-columns:max-content minmax(0,1fr)!important;
    column-gap:9px!important;
  }
  .kskd-shell.kskd-floating-colors>.kskd-workspace>.kskd-stage-wrap{
    width:100%!important;min-width:0!important;max-width:none!important;
  }
}
/* Bulk purchase is now the only purchase mode when enabled in admin. */
.kskd-buy-card .kskd-order-modes{display:none!important}
.kskd-buy-card .kskd-bulk-size-panel{margin:0 0 10px!important;padding:10px 9px!important}
.kskd-buy-card .kskd-bulk-size-panel>strong{font-size:12px!important;margin-bottom:8px!important}
.kskd-buy-card .kskd-bulk-size-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(53px,1fr))!important;
  gap:6px!important;
}
.kskd-buy-card .kskd-bulk-size-row {
  display:flex!important;flex-direction:column!important;
  align-items:stretch!important;justify-content:flex-start!important;
  gap:5px!important;padding:7px 4px!important;min-width:0!important;
  text-align:center!important;
}
.kskd-buy-card .kskd-bulk-size-row .kskd-bulk-size-name{
  display:block!important;max-width:100%!important;
  overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;
  font-size:12px!important;line-height:1.2!important;
}
.kskd-buy-card .kskd-bulk-size-row input.kskd-bulk-qty {
  display:block!important;width:100%!important;max-width:100%!important;
  min-width:0!important;height:32px!important;margin:0!important;
  padding:3px 2px!important;text-align:center!important;font-size:12px!important;
}
.kskd-buy-card.kskd-bulk-active .kskd-buy-sizes,
.kskd-buy-card.kskd-bulk-active form.cart .quantity{display:none!important}
.kskd-buy-card.kskd-bulk-active form.cart .single_add_to_cart_button{
  width:100%!important;min-height:39px!important;font-size:13px!important;
}
@media(max-width:850px){
  .kskd-buy-card .kskd-bulk-size-grid{
    grid-template-columns:repeat(auto-fit,minmax(58px,1fr))!important;
  }
}

.kskd-buy-card.kskd-bulk-active form.cart table.variations tr.kskd-bulk-native-size {display:none!important;}
