/* LeeKraftz customer layout audit, 2026-11-07.
   Load after every other stylesheet. Presentation only: hidden, disabled,
   pricing, stock, membership and checkout state remain owned by site scripts. */

/* Constrain the actual overflow source rather than masking page content. */
html body.leekraftz-home .homepage-top-banner {
  left: 0 !important;
  right: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
}
@media (min-width: 701px) {
  /* The source banner has substantial blank canvas above and below the art.
     Keep its native proportions and crop only those observed blank margins. */
  html body.leekraftz-home .homepage-top-banner .home-banner-link {
    width: 100% !important;
    max-width: 1200px !important;
    height: auto !important;
    aspect-ratio: 4.25 / 1;
    margin: 0 auto !important;
    overflow: hidden;
  }
  html body.leekraftz-home .homepage-top-banner img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    transform: translateY(-15%) !important;
  }
}

/* Empty search announcements must not reserve an extra row. */
html body #site-search-status:empty,
html body #site-search-results:empty { display: none; }
html body .site-search-wrap { padding-block: 12px; }
html body .site-search-wrap label { margin-bottom: 6px; line-height: 1.3; }
html body .site-search-row { align-items: stretch; }
html body .site-search-row input { min-width: 0; max-width: 100%; }
html body .site-search-row input,
html body .site-search-row button {
  min-height: 44px;
  height: auto;
  box-sizing: border-box;
}

/* Prevent intrinsic text and form widths from pushing grid columns outward. */
html body .product-detail > *,
html body .shop-layout > *,
html body .product-grid > *,
html body .department-grid > *,
html body .welcome-hero > *,
html body footer > * { min-width: 0; }
html body .buy-panel,
html body .picker,
html body .picker fieldset { min-width: 0; max-width: 100%; }
html body .picker fieldset { margin-inline: 0; }
html body .picker select,
html body .picker input:not([type="radio"]):not([type="checkbox"]),
html body .buy-panel textarea { max-width: 100%; box-sizing: border-box; }
html body .buy-panel h1,
html body .product-card h3,
html body .contact-email { overflow-wrap: anywhere; }
html body .buy-panel .button,
html body .product-action { white-space: normal; line-height: 1.4; }
html body .lk-buyboxes-detail { width: 100%; max-width: 100%; }
html body .breadcrumbs { overflow-wrap: anywhere; }
html body .page-intro h1 { line-height: 1.12; }

@media (min-width: 1001px) {
  html body header { padding-top: 10px; gap: 4px 24px; }
  /* Desktop home link: use the existing tightly framed LeeKraftz wordmark. */
  html body header > .brand { width: 220px; height: 72px; }
  html body header > .brand picture {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
  }
  html body header > .brand img {
    display: block;
    width: 220px;
    max-width: 100%;
    max-height: none;
    height: auto;
    object-fit: contain;
  }
  html body header > nav[aria-label="Main navigation"] > a[href^="index.html"] {
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    padding-inline: 10px;
  }
  html body header > nav[aria-label="Main navigation"] {
    min-height: 46px;
    padding-block: 8px;
    gap: 4px clamp(12px, 1.3vw, 22px) !important;
  }
}
@media (min-width: 1081px) {
  html body .product-section .product-detail {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(28px, 4vw, 64px);
    max-width: 1440px;
    margin-inline: auto;
    align-items: start;
  }
  html body .gallery-main {
    height: clamp(360px, 36vw, 520px);
    object-fit: contain;
  }
}

/* The existing menu toggle works at any width; use it before the full
   desktop navigation becomes too wide for a tablet header. */
@media (min-width: 681px) and (max-width: 1000px) {
  html body header {
    display: flex !important;
    height: auto !important;
    min-height: 78px;
    gap: 14px !important;
    padding: 8px 4% !important;
  }
  html body header > .brand {
    width: 160px;
    height: 60px;
    min-width: 0;
    margin-right: auto;
  }
  html body header > .brand img { max-width: 100%; height: auto; }
  html body header > nav[aria-label="Main navigation"] { display: none !important; }
  html body header .menu-toggle { display: block !important; min-height: 44px; }
  html body header .cart-toggle { flex-shrink: 0; min-height: 44px; }
}

@media (max-width: 700px) {
  html body main .product-grid,
  html body .lk-compact-catalog .product-grid,
  html body .lk-unified-grid,
  html body .standing-options.lk-unified-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 26px 14px !important;
  }
  html body .product-card h3,
  html body .lk-unified-grid > .product-card > h3,
  html body .lk-unified-grid > .product-card > h2 {
    font-size: 14px !important;
    line-height: 1.4;
  }
  html body .product-card > .product-action { min-height: 44px; gap: 8px; }
  html body .buy-panel .button { min-height: 48px; gap: 12px; }
  html body .picker select,
  html body .picker input:not([type="radio"]):not([type="checkbox"]),
  html body .buy-panel textarea { font-size: 16px; min-height: 44px; }
  html body .buy-panel h1 { font-size: clamp(27px, 7vw, 34px); line-height: 1.15; }
  html body .page-intro h1 { font-size: clamp(34px, 8.8vw, 46px); }
  html body.leekraftz-home .welcome-copy h1 { font-size: clamp(36px, 9.5vw, 47px); }
  html body .section-heading .text-link { white-space: normal; }
  html body .contact-email { font-size: clamp(20px, 5.4vw, 28px); }
  html body footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body footer a { min-height: 36px; display: flex; align-items: center; overflow-wrap: anywhere; }
  html body footer p,
  html body footer a { font-size: 13px; }
}
@media (max-width: 359px) {
  html body main .product-grid,
  html body .lk-compact-catalog .product-grid,
  html body .lk-unified-grid,
  html body .standing-options.lk-unified-grid { grid-template-columns: minmax(0, 1fr) !important; }
  html body .site-search-row { gap: 6px; }
  html body .site-search-row button { padding-inline: 12px; }
}

/* Price and option sources stay in the DOM for the catalog bridge, while
   customers see the replacement purchase controls only once. Page-specific
   important grid rules must not restore these superseded panels. */
html body main .lk-buy-source,
html body #main .lk-buy-source { display: none !important; }

html body .lk-buybox .text-link {
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
}

@media (max-width: 1080px) {
  html body:has(#mini-purchase-layout) .loom-detail-photo {
    max-width: 360px;
  }
}

@media (min-width: 701px) and (max-width: 1080px) {
  html body #catalog-main-photo {
    height: clamp(300px, 45vw, 440px) !important;
    max-height: 440px !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }
}

/* Banner width correction, 2026-11-08 layout review. */
html body .homepage-top-banner {
  width: 100% !important;
  max-width: 100% !important;
}

/* Approved sitewide layout corrections, 2026-11-08.
   The homepage keeps its approved composition. Interior pages use the
   shared wordmark header so products and account forms begin sooner. */
html { scroll-padding-top: 112px; }
html body:not(.leekraftz-home) .homepage-top-banner { display: none !important; }
html body:not(.leekraftz-home) .page-intro { padding-block: 38px 24px; }
html body:not(.leekraftz-home) .page-intro h1 {
  font-size: clamp(36px, 4.25vw, 58px);
  line-height: 1.12;
  text-wrap: balance;
}
html body .member-layout,
html body .member-account { padding-top: 42px; padding-bottom: 56px; }
html body .member-layout h1,
html body .member-account h1,
html body main > .section:has(#password-recovery-form) h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.12;
  letter-spacing: -.035em;
  margin-bottom: 20px;
}
html body main > .section:has(#password-recovery-form) {
  max-width: 660px !important;
  margin: 0 auto !important;
  padding: 42px 24px 64px;
}
html body .member-signin-panel { min-width: 0; }
html body .member-signin-panel > .lk-tier-summary { margin-top: 0; }

/* Readable customer forms and comfortable controls on every screen. */
html body #contact-form label,
html body #quote-form label,
html body #password-recovery-form label { font-size: 14px; line-height: 1.4; }
html body #contact-form input,
html body #contact-form select,
html body #contact-form textarea,
html body #quote-form input,
html body #quote-form select,
html body #quote-form textarea,
html body #password-recovery-form input {
  font-size: 16px;
  line-height: 1.5;
  min-height: 48px;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 8px;
}
html body .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html body .cart-line .qty-controls {
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 16px;
}
html body .qty-controls button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  font-size: 16px;
  line-height: 1.4;
}
html body .qty-controls .remove { font-size: 14px; min-height: 44px; }

/* Keep source prices available to commerce scripts without presenting a
   default size as a customer selection. */
html body [data-requires-selection][data-selection-ready="false"] [data-dimension-dependent] {
  display: none !important;
}
html body [data-requires-selection][data-selection-ready="true"] [data-dimension-prompt] {
  display: none !important;
}
html body [data-dimension-prompt] { margin: 10px 0; font-size: 14px; }

/* Corresponding rows align in regular and LK Plus panels, including the
   action buttons. Stacked phone panels retain their existing flow. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 541px) {
    html body .lk-buyboxes-detail > .lk-buybox {
      display: grid !important;
      grid-template-rows: subgrid;
      grid-row: span 9;
      row-gap: 8px !important;
      align-items: start;
    }
    html body .lk-buyboxes-detail .lk-buybox-label { grid-row: 1; }
    html body .lk-buyboxes-detail .lk-buybox-plan-price { grid-row: 2; }
    html body .lk-buyboxes-detail .lk-buybox-price { grid-row: 3; }
    html body .lk-buyboxes-detail .lk-buybox-savings { grid-row: 4; }
    html body .lk-buyboxes-detail .lk-buybox-shipping { grid-row: 5; }
    html body .lk-buyboxes-detail .lk-buybox-button {
      grid-row: 6;
      margin: 0 !important;
      align-self: start;
    }
    html body .lk-buyboxes-detail .lk-buybox-caption { grid-row: 7; margin: 0 !important; }
    html body .lk-buyboxes-detail .lk-buybox-status { grid-row: 8; }
    html body .lk-buyboxes-detail .lk-buybox > .text-link { grid-row: 9; }
  }
}

/* The painting's existing display window removes the phone controls from
   the supplied photograph. Preserve it when rebuilding a gallery tile. */
html body .painting-feature .product-image .painting-photo-window {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 650 / 540;
  overflow: hidden;
}
html body .painting-feature.lk-feature-tile .product-image .painting-photo-window img {
  position: absolute !important;
  width: 109.076923% !important;
  max-width: none !important;
  max-height: none !important;
  height: auto !important;
  aspect-ratio: auto !important;
  object-fit: fill !important;
  left: -4.461538% !important;
  top: -80% !important;
  transform: none !important;
}

/* Standing looms: bring configuration beside the full product photograph. */
html body .lk-standing-detail { max-width: 1240px !important; margin-inline: auto; }
html body .lk-standing-purchase-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
html body .lk-standing-purchase-layout > * { min-width: 0; max-width: 100%; }
html body .lk-standing-main-figure,
html body .lk-standing-kit-figure { margin: 0; }
html body .lk-standing-main-image {
  display: block;
  width: 100% !important;
  height: 340px !important;
  object-fit: contain !important;
  background: #fff;
}
html body .lk-standing-kit-image {
  display: block;
  width: 100% !important;
  height: 300px !important;
  object-fit: contain !important;
  background: #fff;
}
html body .lk-standing-purchase-layout #adjustable-loom-size-selector {
  width: 100%;
  min-width: 0;
  margin: 0 !important;
  padding: 20px !important;
}
html body .lk-standing-package-photos {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: minmax(0, 1fr) !important;
  align-items: center;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1;
  gap: 8px;
  background: #fff;
}
html body .lk-standing-package-photos > img {
  position: static !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  object-fit: contain !important;
  transform: none !important;
}
html body .lk-kit-catalog-card { width: 100% !important; max-width: none !important; margin: 0 !important; }
html body .lk-kit-catalog-card .product-image { width: 100%; aspect-ratio: 1; height: auto !important; }
html body .lk-size-nowrap { white-space: nowrap; }

@media (min-width: 1001px) {
  html body .lk-standing-purchase-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
    gap: 24px 36px;
  }
  html body .lk-standing-main-figure { grid-column: 1; grid-row: 1; }
  html body .lk-standing-kit-figure { grid-column: 1; grid-row: 2; }
  html body .lk-standing-purchase-layout #adjustable-loom-size-selector { grid-column: 2; grid-row: 1 / span 2; }
  html body .lk-standing-main-image { height: 480px !important; }
  html body .lk-standing-kit-image { height: 320px !important; }
}

@media (max-width: 700px) {
  html body:not(.leekraftz-home) header {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-areas: 'logo cart menu' 'account account account';
    height: auto !important;
    min-height: 0;
    padding: 8px 16px !important;
    gap: 0 10px !important;
  }
  html body:not(.leekraftz-home) header > .brand {
    grid-area: logo;
    width: clamp(132px, 38vw, 160px);
    max-width: 100%;
    height: 50px;
    margin: 0;
  }
  html body:not(.leekraftz-home) header > .brand picture { display: flex; align-items: center; width: 100%; }
  html body:not(.leekraftz-home) header > .brand img { display: block; width: 100%; max-width: 100%; height: auto; }
  html body:not(.leekraftz-home) header > .cart-toggle { grid-area: cart; min-height: 48px; }
  html body:not(.leekraftz-home) header > .menu-toggle { grid-area: menu; display: inline-flex !important; }
  html body:not(.leekraftz-home) header > nav[aria-label="Main navigation"] { display: none !important; }
  html body:not(.leekraftz-home) header > .member-header { grid-area: account; justify-self: start; width: 100%; }
  html body:not(.leekraftz-home) header > .member-header a {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 4px 10px;
    min-height: 44px;
    padding: 4px 0;
    text-align: left;
  }
  html body:not(.leekraftz-home) header > .member-header strong { font-size: 14px; }
  html body:not(.leekraftz-home) header > .member-header small { font-size: 12px; }
  html body:not(.leekraftz-home) .page-intro { padding-block: 28px 20px; }
  html body:not(.leekraftz-home) .page-intro h1 { font-size: clamp(32px, 8.6vw, 43px); }
  html body .member-layout,
  html body .member-account { padding-top: 28px; padding-bottom: 40px; }
  html body .loom-types { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px 14px !important; }
  html body .loom-type h2,
  html body .loom-type h3 { font-size: 18px !important; line-height: 1.3; }
}
@media (max-width: 540px) {
  html body .field-row,
  html body .loom-types { grid-template-columns: minmax(0, 1fr) !important; }
  html body .loom-type img { width: 100%; height: 220px !important; object-fit: contain !important; }
  html body #contact-form .button,
  html body #quote-form .button { width: 100%; justify-content: center; }
  html body .lk-standing-purchase-layout #adjustable-loom-size-selector { padding: 16px !important; }
}
