/* 1.22.0 — compact search and generous product photography in catalog lists.
   Scope to result panels so homepage rails and product detail photos keep their layout. */
body.family-site .search-intro { padding: 30px 24px 28px; }
body.family-site .search-intro-inner { display: grid; grid-template-columns: 1fr minmax(300px, 1fr); column-gap: 48px; align-items: center; }
body.family-site .search-intro .eyebrow { margin: 0 0 8px; }
body.family-site .search-intro h1 { margin: 0 0 10px; font-size: clamp(30px, 3vw, 42px); line-height: 1.2; }
body.family-site .search-intro-inner > p:last-of-type { font: inherit; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
body.family-site .search-intro .site-search-form { grid-column: 2; grid-row: 1 / 4; width: 100%; margin: 0; }
body.family-site .search-intro .site-search-form input { border-radius: 12px; }
body.family-site .search-products { padding-block: 28px 36px; }
body.family-site .search-section-heading { margin-bottom: 14px; gap: 24px; align-items: center; }
body.family-site .search-section-heading .eyebrow { display: none; }
body.family-site .search-section-heading h2 { margin: 0; font-size: clamp(24px, 2.4vw, 30px); line-height: 1.25; }
body.family-site .search-section-heading > p { max-width: 380px; margin: 0; font-size: 13px; line-height: 1.5; }
body.family-site :is(.search-products-status, .catalog-products-status) { margin-bottom: 14px; }
body.family-site .search-products-actions:not(:has(button:not([hidden]))) { display: none; }
body.family-site .search-contact-band { padding-block: 28px; }
body.family-site .search-contact-inner h2 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.3; color: var(--ink); }
body.family-site .search-contact-inner { background: transparent; color: var(--ink); }
body.family-site .search-contact-inner .eyebrow { color: var(--muted); }
body.family-site :is(.catalog-products-panel .catalog-product-label, .catalog-products-panel .catalog-product-summary) { display: none; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy h4, .search-product-copy h3) {
  display: block !important; overflow: visible !important; -webkit-line-clamp: unset !important; height: auto; max-height: none; font-weight: 500;
}
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy h4 a, .search-product-copy h3 a) { font-weight: inherit; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy footer strong, .search-product-footer strong) { font-size: 22px !important; }
body.family-site .catalog-products-panel .catalog-product-grid .catalog-product-copy > .ploc-add-button,
body.family-site .search-product-copy > .ploc-add-button { min-height: 40px !important; margin-top: 10px !important; border-radius: 8px; }
body.family-site .catalog-products-heading { grid-template-columns: minmax(0, 1fr) 210px; gap: 10px 32px; align-items: center; margin-bottom: 18px; }
body.family-site .catalog-products-heading > div { grid-column: 1; }
body.family-site .catalog-products-heading h3 { margin: 0; font-size: clamp(25px, 2.7vw, 34px); line-height: 1.2; }
body.family-site .catalog-products-heading > p { grid-column: 1; font-size: 14px; line-height: 1.5; max-width: 780px; }
body.family-site .catalog-products-heading .catalog-sort-form { grid-column: 2; grid-row: 1 / 3; }
/* The root already reserves the header height via scroll-padding-top. */
body.family-site .catalog-products-panel { scroll-margin-top: 16px; }
body.family-site.admin-bar .catalog-products-panel { scroll-margin-top: 48px; }
body.family-site :is(.catalog-products-panel .catalog-product-grid, .search-product-grid) { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 16px !important; border: 0; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item, .search-product-item) {
  display: grid !important; grid-template-columns: 140px minmax(0, 1fr) !important; gap: 16px !important;
  min-width: 0; min-height: 196px; padding: 16px !important; border: 1px solid var(--line); border-radius: 16px;
  box-shadow: 0 3px 14px rgba(50, 42, 36, .04); align-content: stretch;
}
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item .catalog-product-image, .search-product-image) {
  display: block; position: relative; width: 140px !important; height: 140px !important; aspect-ratio: 1;
  padding: 0 !important; overflow: hidden; border: 0; border-radius: 10px; background: #fff; align-self: start;
}
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item .catalog-product-image, .search-product-image) img {
  position: absolute; inset: 0; width: 100% !important; height: 100% !important; padding: 0 !important;
  object-fit: contain !important; object-position: center !important; transform: none !important;
}
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy, .search-product-copy) { display: flex; flex-direction: column; min-width: 0; padding: 0; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy h4, .search-product-copy h3) { margin: 0 0 8px !important; font-size: 15px !important; line-height: 1.4 !important; overflow-wrap: anywhere; }
body.family-site :is(.catalog-products-panel .catalog-product-code, .search-product-code) { margin: 0 0 10px; font-size: 11px; }
body.family-site .search-product-category { margin: 0 0 12px; font-size: 11px; line-height: 1.5; }
body.family-site.plf-theme-evening .search-product-category { color: #f7ba70; }
body.family-site .search-product-category:is(:hover, :focus-visible) { text-decoration: underline; text-underline-offset: 3px; }
body.family-site .search-product-item > .search-product-copy:first-child { grid-column: 1 / -1; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy footer, .search-product-footer) { margin-top: auto; padding-top: 8px; }
body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy footer strong, .search-product-footer strong) { font-size: 22px; line-height: 1.3; }
body.family-site :is(.catalog-products-panel, .search-products) .ploc-add-button { min-height: 40px; margin-top: 10px; border-radius: 8px; align-self: flex-start; }
body.family-site .search-product-grid:has(> :only-child) { grid-template-columns: minmax(0, 640px) !important; }
body.family-site .search-product-grid:has(> :only-child) .search-product-item { grid-template-columns: 176px minmax(0, 1fr) !important; }
body.family-site .search-products .search-product-grid:has(> :only-child) .search-product-item .search-product-image { width: 176px !important; height: 176px !important; }
/* Desktop: price and cart share one purchase row, including AJAX-added cards.
   Keep the existing button and its accessible text/data; only change layout. */
@media (min-width: 768px) {
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy, .search-product-copy) {
    display: grid; grid-template-columns: minmax(0, 1fr) 44px;
    grid-template-rows: auto auto auto auto 1fr auto; column-gap: 10px;
  }
  body.family-site :is(.catalog-products-panel .catalog-product-copy, .search-product-copy) > * { grid-column: 1 / -1; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy footer, .search-product-footer) {
    grid-column: 1; grid-row: 6; align-self: end; display: flex; align-items: center;
    min-height: 44px; margin: 8px 0 0; padding: 0;
  }
  body.family-site .catalog-products-panel .catalog-product-grid .catalog-product-copy > .ploc-add-button,
  body.family-site .search-product-copy > .ploc-add-button {
    grid-column: 2; grid-row: 6; align-self: end; justify-content: center;
    width: 44px !important; min-width: 44px !important; height: 44px !important;
    margin: 8px 0 0 !important; padding: 10px !important; position: relative;
  }
  body.family-site :is(.catalog-products-panel .catalog-product-copy, .search-product-copy) > .ploc-add-button span {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
  }
  body.family-site :is(.catalog-products-panel .catalog-product-copy, .search-product-copy) > .catalog-inquiry-link { grid-row: 7; }
  body.family-site .search-product-copy > .ploc-add-button b { display: none; }
  body.family-site .search-product-copy > .ploc-add-button::after {
    content: ""; display: block; flex: 0 0 21px; width: 21px; height: 21px; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h2l2.5 12h11l2-8H6M9 20h.01M18 20h.01' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat;
  }
}
@media (min-width: 768px) and (max-width: 1399px) {
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-copy footer strong, .search-product-footer strong) { font-size: 20px !important; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  body.family-site :is(.catalog-products-panel .catalog-product-grid, .search-product-grid) { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item, .search-product-item) { grid-template-columns: 124px minmax(0, 1fr) !important; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item .catalog-product-image, .search-product-image) { width: 124px !important; height: 124px !important; }
}
@media (max-width: 767px) {
  body.family-site .search-intro { padding: 88px 16px 22px !important; }
  body.family-site .search-intro-inner { display: block; }
  body.family-site .search-intro .site-search-form { margin-top: 16px; grid-template-columns: minmax(0, 1fr) auto; }
  body.family-site .search-intro .site-search-form button { padding-inline: 18px; }
  body.family-site .search-products { width: 100%; padding: 22px 16px 28px !important; box-sizing: border-box; }
  body.family-site .catalog-products-heading { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
  body.family-site .catalog-products-heading .catalog-sort-form { grid-column: 1; grid-row: auto; margin-top: 4px; }
  body.family-site .catalog-products-panel { scroll-margin-top: 80px; }
  body.family-site.admin-bar .catalog-products-panel { scroll-margin-top: 126px; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid, .search-product-grid) { grid-template-columns: minmax(0, 1fr) !important; gap: 12px; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item, .search-product-item),
  body.family-site .search-product-grid:has(> :only-child) .search-product-item { grid-template-columns: 112px minmax(0, 1fr) !important; padding: 12px !important; gap: 12px !important; min-height: 160px; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item .catalog-product-image, .search-product-image),
  body.family-site .search-products .search-product-grid:has(> :only-child) .search-product-item .search-product-image { width: 112px !important; height: 112px !important; }
  body.family-site .catalog-products-panel .catalog-product-grid .catalog-product-copy > .ploc-add-button,
  body.family-site .search-product-copy > .ploc-add-button { min-height: 44px !important; }
}
@media (max-width: 359px) {
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item, .search-product-item),
  body.family-site .search-product-grid:has(> :only-child) .search-product-item { grid-template-columns: 96px minmax(0, 1fr) !important; }
  body.family-site :is(.catalog-products-panel .catalog-product-grid .catalog-product-item .catalog-product-image, .search-product-image),
  body.family-site .search-products .search-product-grid:has(> :only-child) .search-product-item .search-product-image { width: 96px !important; height: 96px !important; }
}
