/* ==========================================================================
   005 KaiLionCrafts — Essentials
   3D Isometric Container Studio + Aisle Matrix + Persistent Dispatch Desk
   ========================================================================== */

:root {
  --ess-orange: #c44b00;
  --ess-orange-hover: #963600;
  --ess-orange-light: #fff3e9;
  --ess-orange-pale: #fff9f4;
  --ess-orange-glow: rgba(196, 75, 0, 0.16);
  --ess-ink: #292621;
  --ess-muted: #6c6259;
  --ess-subtle: #8b7f75;
  --ess-line: #e7e0da;
  --ess-card: #ffffff;
  --ess-surface: #fdfaf7;
  --ess-shadow: 0 4px 18px rgba(41, 38, 33, 0.06);
}

.page-heading.wrap h1 {
  font-size: clamp(2rem, 4vw, 3.35rem);
  letter-spacing: -0.04em;
  color: var(--ess-ink);
}

/* Panoramic Cart Grid: Top Full-Width Studio + Lower 2 Columns */
.cart-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, 400px) !important;
  gap: 28px !important;
  align-items: start !important;
  margin-bottom: 5rem !important;
  width: min(1200px, 90%) !important;
}

/* --------------------------------------------------------------------------
   1. Top Panoramic 3D Isometric Container Stacker Studio
   -------------------------------------------------------------------------- */
.ess-studio-panel {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1px solid var(--ess-line);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 10px 34px -8px rgba(41, 38, 33, 0.08);
  min-width: 0;
}

.ess-studio-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ess-line);
}

.ess-studio-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ess-studio-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ess-orange);
}

.ess-studio-title-wrap h2 {
  font-size: 1.35rem;
  letter-spacing: -0.03em;
  color: var(--ess-ink);
  margin: 0;
}

.ess-mode-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--ess-surface);
  border: 1px solid var(--ess-line);
  padding: 4px;
  border-radius: 12px;
}

.ess-mode-pill {
  min-height: 40px;
  padding: 7px 14px;
  border-radius: 9px;
  border: 0;
  background: transparent;
  color: var(--ess-muted);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.ess-mode-pill:hover {
  color: var(--ess-ink);
}

.ess-mode-pill.is-active {
  background: var(--ess-orange);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(196, 75, 0, 0.24);
}

.ess-studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 0.95fr);
  gap: 24px;
  padding-top: 18px;
  align-items: center;
}

/* Left: Isometric SVG Viewport */
.ess-iso-stage {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.ess-iso-viewport {
  position: relative;
  background: radial-gradient(circle at 50% 42%, #ffffff 0%, #fff9f4 65%, #f9f2eb 100%);
  border: 1px solid var(--ess-line);
  border-radius: 14px;
  padding: 10px 12px;
  overflow: hidden;
}

.ess-iso-bay-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--ess-muted);
  margin-bottom: 4px;
}

.ess-iso-bay-header strong {
  color: var(--ess-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.ess-iso-svg {
  width: 100%;
  height: auto;
  display: block;
  max-height: 310px;
}

.ess-carton-box {
  opacity: 0;
  animation: essCartonDrop 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--drop-delay, 0ms);
  cursor: pointer;
}

.ess-carton-box:hover polygon {
  filter: brightness(1.09);
}

@keyframes essCartonDrop {
  0% {
    opacity: 0;
    transform: translateY(-22px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ess-iso-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ess-muted);
}

.ess-legend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.ess-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ess-ink);
}

.ess-legend-swatch {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  display: inline-block;
  flex-shrink: 0;
}

.ess-legend-swatch.is-knives { background: #c44b00; }
.ess-legend-swatch.is-sets { background: #e07828; }
.ess-legend-swatch.is-scissors { background: #292621; }
.ess-legend-swatch.is-utensils { background: #8b5a2b; }

/* Right: KPI Telemetry + Fill Meter + 85% Optimizer */
.ess-studio-telemetry {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--ess-surface);
  border: 1px solid var(--ess-line);
  border-radius: 14px;
  padding: 18px;
  min-width: 0;
}

.ess-telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.ess-planning-note {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ess-muted);
}

.ess-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 700;
}

.ess-status-pill.is-lcl {
  background: #fff3e9;
  color: #963600;
  border: 1px solid #efd2bc;
}

.ess-status-pill.is-optimal {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.ess-status-pill.is-exceeded {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.ess-status-pill.is-empty {
  background: #f3efeb;
  color: var(--ess-muted);
  border: 1px solid var(--ess-line);
}

.ess-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.ess-kpi-tile {
  background: #ffffff;
  border: 1px solid var(--ess-line);
  border-radius: 10px;
  padding: 10px 12px;
}

.ess-kpi-tile span {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ess-muted);
}

.ess-kpi-tile strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ess-ink);
  font-variant-numeric: tabular-nums;
}

.ess-fill-meter {
  background: #ffffff;
  border: 1px solid var(--ess-line);
  border-radius: 10px;
  padding: 12px;
}

.ess-fill-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ess-ink);
}

.ess-fill-head strong {
  color: var(--ess-orange);
  font-variant-numeric: tabular-nums;
}

.ess-fill-head strong.is-exceeded {
  color: #b91c1c;
}

.ess-fill-track {
  height: 10px;
  background: #ede6df;
  border-radius: 9999px;
  overflow: hidden;
}

.ess-fill-bar {
  height: 100%;
  background: linear-gradient(90deg, #c44b00, #ff7a29);
  border-radius: 9999px;
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.ess-fill-bar.is-exceeded {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.ess-fill-sub {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
  font-size: 10.5px;
  color: var(--ess-muted);
}

.ess-optimize-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.btn-auto-optimize {
  width: 100%;
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 0;
  background: var(--ess-ink);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.btn-auto-optimize:hover {
  background: var(--ess-orange);
  transform: translateY(-1px);
}

.btn-auto-optimize:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.ess-estimate-disclaimer {
  font-size: 10.5px;
  color: var(--ess-muted);
  line-height: 1.4;
  margin: 0;
  text-align: center;
}

/* --------------------------------------------------------------------------
   2. Lower Left: Aisle-Grouped Wholesale Matrix
   -------------------------------------------------------------------------- */
.cart-main-area {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.aisle-matrix-dock {
  background: var(--ess-surface);
  border: 1px solid var(--ess-line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aisle-dock-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.aisle-kpi-stack {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.aisle-kpi-item {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ess-muted);
}

.aisle-kpi-item strong {
  display: inline-block;
  background: var(--ess-orange-light);
  color: var(--ess-orange-hover);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 12px;
  margin-left: 4px;
  font-variant-numeric: tabular-nums;
}

.aisle-category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.btn-aisle-pill {
  min-height: 38px;
  padding: 6px 13px;
  border-radius: 9999px;
  border: 1px solid var(--ess-line);
  background: #ffffff;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ess-ink);
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-aisle-pill:hover,
.btn-aisle-pill.is-active {
  background: var(--ess-orange);
  border-color: var(--ess-orange);
  color: #ffffff;
}

#cart-lines {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.aisle-category-section {
  background: var(--ess-card);
  border: 1px solid var(--ess-line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--ess-shadow);
}

.aisle-section-header {
  background: var(--ess-surface);
  border-bottom: 1px solid var(--ess-line);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.aisle-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ess-orange);
  display: flex;
  align-items: center;
  gap: 8px;
}

.aisle-section-count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ess-muted);
}

.aisle-item-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #f2ece6;
  transition: background 0.18s ease;
}

.aisle-item-row:last-child {
  border-bottom: none;
}

.aisle-item-row:hover {
  background: var(--ess-orange-pale);
}

.aisle-thumb {
  width: 88px;
  height: 88px;
  background: #ffffff;
  border: 1px solid var(--ess-line);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.aisle-thumb img {
  width: 88%;
  height: 88%;
  object-fit: contain;
  transition: transform 0.22s ease;
}

.aisle-thumb:hover img {
  transform: scale(1.06);
}

.aisle-meta {
  min-width: 0;
}

.aisle-meta small {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--ess-orange);
  margin-bottom: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.aisle-meta h3 {
  font-size: 15.5px;
  margin: 0 0 4px;
  line-height: 1.3;
}

.aisle-meta h3 a:hover {
  color: var(--ess-orange);
}

.aisle-meta p {
  font-size: 11.5px;
  color: var(--ess-muted);
  margin: 0;
}

.aisle-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.essentials-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--ess-line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.essentials-stepper button {
  width: 38px;
  height: 40px;
  display: grid;
  place-items: center;
  font-size: 17px;
  background: var(--ess-surface);
  border: none;
  cursor: pointer;
  color: var(--ess-ink);
  transition: background 0.15s ease, color 0.15s ease;
}

.essentials-stepper button:hover {
  background: var(--ess-orange-light);
  color: var(--ess-orange);
}

.essentials-stepper input {
  width: 68px;
  height: 40px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  border: none;
  color: var(--ess-ink);
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.essentials-stepper input::-webkit-inner-spin-button,
.essentials-stepper input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.essentials-stepper input:focus-visible {
  outline: 2px solid var(--ess-orange);
  outline-offset: -2px;
}

.aisle-quick-batches {
  display: flex;
  gap: 5px;
}

.btn-batch-add {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 10.5px;
  border-radius: 7px;
  border: 1px solid #ebd9cb;
  background: #fff9f4;
  color: var(--ess-orange-hover);
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.btn-batch-add:hover {
  background: var(--ess-orange);
  border-color: var(--ess-orange);
  color: #ffffff;
}

.btn-aisle-remove {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ess-subtle);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-aisle-remove:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.ess-empty-card {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--ess-surface);
  border: 1px dashed var(--ess-line);
  border-radius: 14px;
}

.ess-empty-card h3 {
  font-size: 1.35rem;
  color: var(--ess-ink);
  margin-bottom: 0.5rem;
}

.ess-empty-card p {
  color: var(--ess-muted);
  max-width: 430px;
  margin: 0 auto 1.4rem;
  font-size: 13px;
}

.ess-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   3. Lower Right: Persistent B2B Logistics & Export Dispatch Desk
   -------------------------------------------------------------------------- */
.cart-summary,
aside.cart-summary {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  background: var(--ess-card) !important;
  border: 1px solid var(--ess-line) !important;
  border-radius: 16px !important;
  padding: 22px !important;
  box-shadow: var(--ess-shadow) !important;
  position: sticky !important;
  top: 94px !important;
  margin-top: 0 !important;
  min-width: 0 !important;
}

aside.cart-summary > * {
  grid-column: auto !important;
  grid-row: auto !important;
  margin: 0 !important;
  max-width: 100% !important;
}

.ess-desk-eyebrow {
  color: var(--ess-orange);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}

.cart-summary h2 {
  font-size: 1.5rem;
  letter-spacing: -0.035em;
  color: var(--ess-ink);
}

.logistics-spec-card {
  background: var(--ess-surface);
  border: 1px solid var(--ess-line);
  border-radius: 10px;
  padding: 10px 14px;
}

.logistics-spec-card div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 12.5px;
  border-bottom: 1px solid #f1e9e2;
  color: var(--ess-muted);
}

.logistics-spec-card div:last-child {
  border-bottom: none;
}

.logistics-spec-card strong {
  color: var(--ess-orange);
  font-weight: 700;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.checkout-form-section {
  display: flex;
  flex-direction: column;
  gap: 11px;
  background: var(--ess-surface);
  border: 1px solid var(--ess-line);
  border-radius: 12px;
  padding: 15px;
}

.checkout-form-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ess-orange);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.form-group label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ess-ink);
}

.form-group label span {
  color: var(--ess-subtle);
  font-weight: 400;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #d5cabf;
  border-radius: 8px;
  background: #ffffff;
  font-size: 13px;
  color: var(--ess-ink);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--ess-orange);
  box-shadow: 0 0 0 3px var(--ess-orange-glow);
}

.form-textarea {
  resize: vertical;
  min-height: 64px;
}

.ess-port-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 3px;
}

.ess-port-chip {
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 9999px;
  border: 1px solid var(--ess-line);
  background: #ffffff;
  color: var(--ess-muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}

.ess-port-chip:hover {
  border-color: var(--ess-orange);
  color: var(--ess-orange);
  background: var(--ess-orange-pale);
}

.ess-protocol-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ess-ink);
  margin-bottom: 2px;
}

.ess-protocol-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  color: var(--ess-ink);
}

.ess-protocol-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 500;
}

.ess-protocol-list input[type="checkbox"] {
  accent-color: var(--ess-orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.essentials-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.btn-ess {
  min-height: 46px;
  padding: 10px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
  text-decoration: none;
  box-sizing: border-box;
}

.btn-ess.primary {
  background: var(--ess-orange);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--ess-orange-glow);
}

.btn-ess.primary:hover {
  background: var(--ess-orange-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-ess.whatsapp {
  background: #128c7e;
  color: #ffffff;
}

.btn-ess.whatsapp:hover {
  background: #0d6e63;
  color: #ffffff;
}

.btn-ess.outline {
  background: #ffffff;
  border-color: var(--ess-line);
  color: var(--ess-orange-hover);
}

.btn-ess.outline:hover {
  border-color: var(--ess-orange);
  background: var(--ess-orange-light);
}

.essentials-toast {
  min-height: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ess-orange);
  text-align: center;
}

/* Confirmation Modal */
.order-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(25, 22, 19, 0.56);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.order-modal-card {
  background: #ffffff;
  border-radius: 16px;
  max-width: 540px;
  width: 100%;
  padding: 24px;
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: modalPop 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.96) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.order-modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.order-modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.order-modal-header h3 {
  font-size: 1.25rem;
  color: var(--ess-ink);
  margin: 0;
}

.order-modal-body {
  font-size: 13px;
  color: var(--ess-muted);
  line-height: 1.65;
}

.order-modal-body code {
  background: #f4efe9;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--ess-orange-hover);
  font-weight: 600;
}

.order-modal-summary-chip {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ess-orange-pale);
  border: 1px solid #efd3bc;
  font-size: 12px;
  color: var(--ess-ink);
}

.order-modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Responsive (Tablet & Mobile 375px) */
@media (max-width: 980px) {
  .cart-layout {
    grid-template-columns: 1fr !important;
  }
  .cart-summary,
  aside.cart-summary {
    position: static !important;
  }
  .ess-studio-body {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ess-studio-panel {
    padding: 16px;
  }
  .ess-mode-switcher {
    width: 100%;
  }
  .ess-mode-pill {
    flex: 1;
    font-size: 11px;
    padding: 7px 8px;
    text-align: center;
  }
  .aisle-item-row {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .aisle-thumb {
    width: 74px;
    height: 74px;
  }
  .aisle-actions {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
    border-top: 1px solid #f2ece6;
    padding-top: 10px;
    margin-top: 2px;
  }
  .aisle-quick-batches {
    flex: 1 1 auto;
  }
  .btn-batch-add {
    flex: 1;
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ess-carton-box,
  .order-modal-card {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .ess-fill-bar,
  .ess-mode-pill,
  .btn-auto-optimize,
  .btn-ess,
  .aisle-thumb img {
    transition: none !important;
  }
}
