.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
  grid-template-areas: "warehouse tools" "warehouse results";
  grid-template-rows: auto 1fr;
  align-items: start;
  column-gap: 18px;
  padding: 20px max(clamp(14px, 3vw, 38px), calc((100% - 1260px) / 2)) 26px;
  background: #f2f5ef;
}
.hero:has(.warehouse[hidden]) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "results"; }
.hero-search-tools, .hero-results {
  min-width: 0;
  padding-inline: 14px;
  border: 1px solid #dce5da;
  background: white;
}
.hero-search-tools { grid-area: tools; padding-top: 14px; border-bottom: 0; border-radius: 12px 12px 0 0; scroll-margin-block-start: 12px; }
.hero-results { grid-area: results; padding-bottom: 14px; border-top: 0; border-radius: 0 0 12px 12px; }
.hero-search-tools h1 { margin-bottom: 11px; color: var(--forest); font-size: 1.22rem; line-height: 1.2; }
.hero-search { display: flex; gap: 8px; }
.hero-search input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border: 1px solid #ccd9cc;
  border-radius: 7px;
  color: var(--ink);
  background: #fff;
  font-size: 1rem;
}
.hero-search input::placeholder { color: #596b60; }
.hero-search .button { min-width: 58px; }
.hero-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.hero-filters button {
  min-height: 36px;
  padding: 5px 10px;
  border: 1px solid #d9e4d8;
  border-radius: 999px;
  color: var(--forest);
  background: white;
  font-size: .79rem;
  font-weight: 600;
}
.hero-filters button:hover { background: #eaf3e7; }
.hero-filters button[aria-pressed="true"] { color: white; border-color: var(--forest); background: var(--forest); }
.hero-count { margin-block: 12px 9px; color: var(--muted); font-size: .79rem; scroll-margin-block-start: 14px; }
.hero-count:empty { display: none; }
.hero .hero-products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.hero .hero-products .product-photo { aspect-ratio: 1.75; padding: clamp(6px, 1vw, 15px); background: #edf2ec; }
.hero .hero-products .product-info { align-content: end; padding: 9px 9px 1px; }
.hero-products .product-meta { grid-row: 1; font-size: .72rem; }
.hero-products .product-link { font-size: .88rem; }
.hero .hero-products .product-access { padding: 4px 9px 9px; }
.hero-save[aria-pressed="true"] { color: var(--forest); border-color: #c4dbc3; background: #eaf3e8; }
.hero-products .hero-save { position: relative; z-index: 1; width: 100%; min-height: 37px; margin-top: 5px; padding-inline: 5px; font-size: .8rem; }
.hero-detail { display: grid; gap: 10px; padding-top: 10px; }
.hero-detail > .button { justify-self: start; }
.hero-detail-media { display: grid; place-items: center; min-height: 145px; max-height: 245px; padding: 12px; margin-bottom: 11px; background: #edf2ec; border-radius: 9px; }
.hero-detail-media img { width: 100%; max-height: 220px; object-fit: contain; mix-blend-mode: multiply; }
#hero-detail-content h2 { margin-block: 3px; color: var(--forest); font-size: 1.18rem; }
#hero-detail-content h2:focus { outline: none; }
.hero-detail-specs { display: inline-block; margin-top: 6px; color: var(--green); font-size: .85rem; }
.hero-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-stock-status { color: var(--muted); font-size: .84rem; }
.hero-stock-status:empty { display: none; }
.hero-shop-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hero-shop-actions a { text-decoration: none; }
.hero-empty { padding: 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: .9rem; }
.hero-empty .button { margin-top: 8px; }

.warehouse {
  grid-area: warehouse;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #cad9c9;
  border-radius: 12px;
  background: #fbfdf9;
}
.warehouse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
}
.warehouse-header h2 { color: var(--forest); font-size: 1.08rem; }
.warehouse-header p { margin-top: 2px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.warehouse-motion { flex-shrink: 0; padding-inline: 9px; font-size: .77rem; }
.warehouse-motion:not([data-stopped]) .warehouse-play,
.warehouse-motion[data-stopped] .warehouse-pause { display: none; }
.warehouse-scene {
  display: block;
  width: 100%;
  max-height: 460px;
  background: radial-gradient(ellipse at 48% 54%, #eef4e9, #d9e5d7);
}
.warehouse-scene text { pointer-events: none; user-select: none; }
.warehouse-scene [role="button"] { cursor: pointer; outline: none; }
.warehouse-scene .warehouse-halo { opacity: 0; }
.warehouse-scene [role="button"]:is(:hover, :focus-visible, [aria-pressed="true"]) .warehouse-halo { opacity: 1; }
.warehouse-scene [role="button"]:focus-visible .warehouse-halo { stroke-width: 4px; }
.warehouse-parcel { visibility: hidden; }
.warehouse-carrying .warehouse-parcel { visibility: visible; }
.warehouse-walking .warehouse-leg { animation: warehouse-step .26s ease-in-out infinite alternate; }
.warehouse-walking .warehouse-leg + .warehouse-leg { animation-direction: alternate-reverse; }
.warehouse[data-paused] .warehouse-leg { animation-play-state: paused; }
@keyframes warehouse-step { to { transform: translateY(-5px); } }
.warehouse-message { min-height: 100px; padding: 14px 16px; background: #f4f8f2; }
.warehouse-message [data-role] { color: var(--green); font-size: .7rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.warehouse-message h3 { margin-top: 4px; color: var(--forest); font-size: 1.05rem; }
.warehouse-message p { margin-top: 2px; color: var(--muted); font-size: .82rem; line-height: 1.4; }
.warehouse-activity { min-height: 125px; border-top: 1px solid var(--line); background: white; }
.warehouse-activity h3 { padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: .9rem; }
.warehouse-activity ul { margin: 0; padding: 0 16px; list-style: none; }
.warehouse-activity li { padding: 8px 0; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.warehouse-activity li + li { border-top: 1px solid var(--line); }
.warehouse-activity li::before, .warehouse-footer::before { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #548665; content: ""; }
.warehouse-footer { padding: 10px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .77rem; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "tools" "warehouse" "results"; grid-template-rows: auto; gap: 13px; padding-block-start: 14px; }
  .hero-search-tools, .hero-results { padding: 12px; border: 1px solid #dce5da; border-radius: 12px; }
  .warehouse-scene { max-height: 360px; }
  .warehouse-message, .warehouse-activity { min-height: 0; }
  .hero-filters button { min-height: 42px; }
  .hero-count { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .warehouse-walking .warehouse-leg { animation: none; }
}
