/* R27: accessories-only overrides. Load after revision.css and refinement.css.
   No content, pricing, visibility or interaction changes. */
.catalog-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 26%);
  gap: 24px;
}
.catalog-grid,
.catalog-layout > *,
.product-card { min-width: 0; }
.catalog-grid { align-items: stretch; }

/* Source imagery is technical: preserve the whole frame, including panoramas.
   Important declarations supersede the existing R23 important image rules. */
.catalog-grid .product-card > img {
  aspect-ratio: 1 / 1 !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  background: #fff;
}
.product-body { padding: 18px; gap: 10px; }
.product-body h2 { line-height: 1.25; letter-spacing: -.025em; }
.product-body p {
  min-height: 0;
  line-height: 1.5;
}
.product-body .product-price {
  min-height: 0;
  margin: 0;
  line-height: 1.4;
}
.product-body .accessory-size {
  min-width: 0;
  margin: 0;
  gap: 5px;
}
.accessory-size select {
  min-height: 44px;
  font-size: 14px;
  padding: 10px;
}
/* Only the final action consumes remaining row height; descriptions and price
   lines no longer reserve empty 58px blocks of their own. */
.product-actions {
  grid-template-columns: minmax(0, 1fr) 64px;
  margin-top: auto;
  padding-top: 4px;
  align-items: stretch;
}
.product-actions input,
.product-actions .add-product {
  min-width: 0;
  min-height: 44px;
}
.product-actions input { padding: 9px 8px; font-size: 16px; }
.product-actions .add-product { line-height: 1.3; }

/* The complete product/BOM owns a full line, never a tiny leftover column. */
.cart-panel { min-width: 0; }
.cart-panel .sumo-cart-row,
.cart-panel .cart-row {
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 10px;
  padding: 14px 0;
  align-items: end;
}
.cart-panel .sumo-cart-row > div,
.cart-panel .cart-row > strong { grid-column: 1 / -1; min-width: 0; }
.cart-panel .sumo-cart-row strong { font-size: 14px; line-height: 1.4; }
.cart-panel .sumo-cart-row small {
  font-size: 12px;
  line-height: 1.55;
  margin-top: 4px;
}
.cart-panel .sumo-cart-row label { width: 80px; max-width: 100%; }
.cart-panel .sumo-cart-row input,
.cart-panel .cart-row input {
  min-height: 44px;
  width: 100%;
  max-width: 80px;
  font-size: 16px;
}
.cart-panel .sumo-cart-row button,
.cart-panel .trash,
.sumo-cart-dialog [data-sumo-remove] {
  min-width: 44px;
  min-height: 44px;
}
.sumo-cart-dialog [data-sumo-qty] { min-height: 44px; font-size: 16px; }
/* Accommodate the 44px remove action in the shared dialog on this page. */
.sumo-cart-dialog .sumo-cart-row {
  grid-template-columns: minmax(0, 1fr) 64px 44px;
}
.cart-panel .cart-list { min-height: 0; }
.cart-panel .cart-footer { flex-shrink: 0; }
.product-actions :focus-visible,
.accessory-size select:focus-visible,
.cart-panel input:focus-visible,
.cart-panel button:focus-visible {
  outline: 3px solid #0e6b4f;
  outline-offset: 3px;
}
@media (max-width: 1150px) {
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .catalog-layout { grid-template-columns: minmax(0, 1fr); }
  .cart-panel { position: static; max-height: none; }
  .cart-panel .cart-list { overflow: visible; }
}
@media (max-width: 600px) {
  .catalog-grid { grid-template-columns: minmax(0, 1fr); }
  .product-body { padding: 18px; }
  .sumo-cart-dialog .sumo-cart-row {
    grid-template-columns: minmax(0, 1fr) 44px;
  }
  .sumo-cart-dialog .sumo-cart-row > div { grid-column: 1 / -1; }
  .sumo-cart-dialog .sumo-cart-row label { width: 80px; }
}
