/* Shared layout tokens. First adoption: public homepage only. */
:root {
  --bl-content-max: 1440px;
  --bl-page-gutter: 24px;
  --bl-space-1: 4px;
  --bl-space-2: 8px;
  --bl-space-3: 12px;
  --bl-space-4: 16px;
  --bl-space-6: 24px;
  --bl-space-8: 32px;
  --bl-control-height: 44px;
  --bl-font-body: 14px;
  --bl-font-small: 12px;
  --bl-radius: 16px;
}
@media (max-width: 850px) { :root { --bl-page-gutter: 16px; } }
@media (max-width: 360px) { :root { --bl-page-gutter: 12px; } }
@media screen {
  html body.public-home-page #viewport { width: 100%; height: auto !important; overflow: visible; }
  html body.public-home-page #viewport #page {
    position: relative !important; inset: auto !important; width: 100% !important;
    height: auto !important; transform: none !important; zoom: 1;
  }
  html body.public-home-page #viewport #page > .bloomly-public-header,
  html body.public-home-page #viewport #page .hero,
  html body.public-home-page #viewport #page .utility,
  html body.public-home-page #viewport #page .catalog,
  html body.public-home-page #viewport .mobile-home-location,
  html body.public-home-page #viewport .reference-footer-inner {
    box-sizing: border-box !important;
    width: calc(100% - 2 * var(--bl-page-gutter)) !important;
    max-width: var(--bl-content-max) !important;
    margin-inline: auto !important;
    min-width: 0;
  }
  html body.public-home-page #viewport #page .catalog { padding-top: 20px !important; }
  html body.public-home-page #viewport #page #homeMarketProducts {
    display: grid !important; grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    gap: 16px !important; align-items: stretch;
  }
  html body.public-home-page #viewport #page #homeMarketProducts > .catalog-message { grid-column: 1 / -1; }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-card { min-width: 0; width: auto !important; height: auto !important; }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-media {
    display: block !important; width: 100% !important; height: auto !important;
    aspect-ratio: 1 / 1; overflow: hidden;
  }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-media img {
    display: block; width: 100% !important; height: 100% !important;
    object-fit: cover !important;
  }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-copy h3 {
    font-size: 14px !important; line-height: 1.4 !important;
  }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-delivery { font-size: 12px !important; }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy {
    display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px !important;
  }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy strong { font-size: 16px !important; }
  html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-add {
    min-height: var(--bl-control-height) !important; height: auto !important;
    padding: 8px 10px !important; font-size: 12px !important; line-height: 1.4 !important;
    white-space: normal !important; min-width: 0;
  }
  html body.public-home-page #viewport .reference-footer-inner { padding-top: 32px !important; }
  html body.public-home-page #viewport .reference-footer nav a { font-size: 14px !important; line-height: 1.6 !important; }
}
@media screen and (min-width: 851px) {
  html body.public-home-page #viewport :is(.mobile-home-location,.mobile-category-open,.mobile-category-sheet,.mobile-location-label) { display: none !important; }
  html body.public-home-page #viewport #page > .bloomly-public-header {
    display: flex !important; position: relative !important; top: auto !important; left: auto !important;
    height: auto !important; min-height: 72px !important; padding: 12px 20px !important;
    gap: 20px !important; border-radius: 20px !important; margin-block: 12px 0 !important;
    flex-wrap: wrap !important;
  }
  html body.public-home-page #viewport #page .bloomly-public-header .original-logo { width: 160px !important; max-width: 160px !important; height: 44px !important; object-fit: contain; }
  html body.public-home-page #viewport #page .bloomly-public-header .mainnav { display: flex !important; flex-wrap: wrap; gap: 16px !important; }
  html body.public-home-page #viewport #page .bloomly-public-header .mainnav a { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px !important; }
  html body.public-home-page #viewport #page .bloomly-public-header .actions { margin-left: auto !important; gap: 10px !important; }
  html body.public-home-page #viewport #page .bloomly-public-header .actions a {
    display: inline-flex !important; align-items: center; justify-content: center;
    min-height: 44px !important; height: auto !important; padding: 10px 16px !important;
    font-size: 14px !important; line-height: 1.4; white-space: nowrap;
  }
  html body.public-home-page #viewport #page .hero {
    position: relative !important; inset: auto !important; height: auto !important;
    height: clamp(280px, calc((100vw - 48px) / 4.8), 300px) !important;
    min-height: 0 !important; aspect-ratio: auto; margin-block: 0 !important;
    padding: 0 !important; border-radius: 0; overflow: hidden;
  }
  html body.public-home-page #viewport #page .hero-copy {
    position: relative !important; width: 49% !important; min-height: 0;
    height: 100%; margin: 0 !important; padding: 18px 24px !important;
    display: flex !important; flex-direction: column; justify-content: center;
  }
  html body.public-home-page #viewport #page .hero h1 {
    font-size: clamp(28px, 2.6vw, 38px) !important; line-height: 1.06 !important;
    letter-spacing: -1px !important; margin: 0 0 10px !important;
  }
  html body.public-home-page #viewport #page .hero-copy > p {
    display: block !important; font-size: 12px !important; line-height: 1.5 !important;
    margin: 0 0 12px !important; max-width: 450px;
  }
  html body.public-home-page #viewport #page .hero-copy > p br { display: none; }
  html body.public-home-page #viewport #page .hero-art {
    position: absolute !important; inset: 0 0 0 auto !important;
    width: auto !important; height: 100% !important; aspect-ratio: 1855 / 848; max-width: none !important;
    background-size: contain !important; background-position: right center !important;
    background-repeat: no-repeat !important;
  }
  html body.public-home-page #viewport #page .hero-actions { display: flex !important; flex-wrap: wrap; gap: 10px !important; }
  html body.public-home-page #viewport #page .hero-actions a { min-height: 44px !important; padding: 8px 12px !important; }
  html body.public-home-page #viewport #page .hero-actions strong { font-size: 12px !important; line-height: 1.4 !important; }
  html body.public-home-page #viewport #page .hero-actions small { font-size: 10px !important; line-height: 1.4 !important; }
  html body.public-home-page #viewport #page .utility {
    display: flex !important; flex-wrap: wrap !important; height: auto !important;
    min-height: 64px !important; padding: 12px 16px !important;
    margin-top: 0 !important; gap: 12px !important; border-radius: 0 0 16px 16px !important;
  }
  html body.public-home-page #viewport #page .filters { display: flex; flex-wrap: wrap; gap: 6px !important; min-width: 0; }
  html body.public-home-page #viewport #page .filter { font-size: 13px !important; min-height: 40px !important; padding: 8px 12px !important; }
  html body.public-home-page #viewport #page .search-wrap { min-width: 180px; flex: 1 1 180px; height: 44px !important; }
  html body.public-home-page #viewport #page .search-wrap input { font-size: 14px !important; min-width: 0; }
  html body.public-home-page #viewport #page :is(.location,.cart-button) { min-height: 44px !important; font-size: 13px !important; }
  html body.public-home-page #viewport #page .utility .divider { display: none; }
}
@media screen and (min-width: 1101px) and (max-width: 1399px) {
  html body.public-home-page #viewport #page #homeMarketProducts { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
}
@media screen and (min-width: 851px) and (max-width: 1100px) {
  html body.public-home-page #viewport #page #homeMarketProducts { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
  html body.public-home-page #viewport #page .hero-copy { padding: 16px 20px !important; width: 52% !important; }
  html body.public-home-page #viewport #page .hero { height: 300px !important; }
  html body.public-home-page #viewport #page .hero-art { width: auto !important; }
  html body.public-home-page #viewport #page .hero h1 { font-size: 28px !important; }
}
@media screen and (max-width: 850px) {
  html body.public-home-page #viewport #page > .bloomly-public-header {
    min-height: 64px !important; height: auto !important; padding: 8px 0 !important;
  }
  html body.public-home-page #viewport #page .hero.b268-active {
    height: auto !important; min-height: 0 !important;
    aspect-ratio: 1677 / 938 !important; margin-bottom: 12px !important;
  }
  html body.public-home-page #viewport #page .b268-slide img {
    width: 100% !important; height: 100% !important; object-fit: contain !important;
  }
  html body.public-home-page #viewport #page .b268-actions a { min-height: 30px !important; }
  html body.public-home-page #viewport #page .catalog { padding-top: 16px !important; }
  html body.public-home-page #viewport .reference-footer-grid { gap: 24px !important; }
}
@media screen and (min-width: 601px) and (max-width: 850px) {
  html body.public-home-page #viewport #page #homeMarketProducts { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 14px !important; }
}
@media screen and (max-width: 600px) {
  html body.public-home-page #viewport #page #homeMarketProducts { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
}


/* V374: full desktop JPEGs at their native 1440:300 aspect ratio.
   One permanent CTA overlay; all five slides share identical geometry. */
.b374-fixed-actions { display:none; }
.b374-picture { position:absolute;inset:0;display:block; }
@media screen and (min-width:851px) {
 html body.public-home-page #viewport #page .hero.b268-active {
  height:auto!important;min-height:0!important;aspect-ratio:1440/300!important;
  margin-block:0!important;padding:0!important;overflow:hidden!important;border-radius:0;
 }
 html body.public-home-page #viewport #page .hero.b268-active > :not(.b268-slider),
 html body.public-home-page #viewport #page .hero.b268-active::before,
 html body.public-home-page #viewport #page .hero.b268-active::after { display:none!important; }
 html body.public-home-page #viewport #page .b268-slider {display:block!important;position:absolute;inset:0;overflow:hidden;}
 html body.public-home-page #viewport #page .b268-track {display:flex!important;width:100%;height:100%;direction:ltr;will-change:transform;}
 html body.public-home-page #viewport #page .b268-slide {position:relative;flex:0 0 100%;width:100%;height:100%;min-width:0;overflow:hidden;}
 html body.public-home-page #viewport #page .b268-slide img {position:absolute!important;inset:0!important;display:block!important;width:100%!important;height:100%!important;max-width:none!important;object-fit:contain!important;opacity:1!important;filter:none!important;}
 html body.public-home-page #viewport #page .b268-slide .b268-actions {display:none!important;}
 html body.public-home-page #viewport #page .b374-fixed-actions {display:flex;position:absolute;z-index:4;left:1.944444%;top:76.666667%;width:25%;height:14.666667%;gap:2.777778%;}
 html body.public-home-page #viewport #page .b374-fixed-actions a {display:flex;flex:1;align-items:center;justify-content:center;min-width:0;min-height:28px;height:100%;padding:0 4px;border-radius:8px;font:700 clamp(10px,.85vw,12px)/1.2 Arial,sans-serif;white-space:nowrap;letter-spacing:-.2px;text-decoration:none;}
 html body.public-home-page #viewport #page .b374-fixed-actions .b268-shop {background:#ff0080;color:#fff;}
 html body.public-home-page #viewport #page .b374-fixed-actions .b268-qr {background:#00875a;color:#fff;}
 html body.public-home-page #viewport #page .b374-fixed-actions a:focus-visible {outline:2px solid #005c42;outline-offset:2px;}
}

/* V375: match the existing 20px category-to-product spacing on desktop. */
@media screen and (min-width:851px) {
 html body.public-home-page { --bl-section-gap:20px; }
 html body.public-home-page #viewport #page > .bloomly-public-header {
  min-height:56px!important;height:auto!important;padding:6px 20px!important;
  margin-top:12px!important;margin-bottom:var(--bl-section-gap)!important;
 }
 html body.public-home-page #viewport #page .bloomly-public-header .original-logo {
  width:145px!important;max-width:145px!important;height:36px!important;
 }
 html body.public-home-page #viewport #page .bloomly-public-header .mainnav a {min-height:36px!important;}
 html body.public-home-page #viewport #page .bloomly-public-header .actions a {
  min-height:36px!important;height:auto!important;padding:8px 14px!important;
 }
 html body.public-home-page #viewport #page .hero.b268-active {margin-top:0!important;margin-bottom:0!important;}
 html body.public-home-page #viewport #page .utility {margin-top:var(--bl-section-gap)!important;}
 html body.public-home-page #viewport #page .catalog {padding-top:var(--bl-section-gap)!important;}
}

/* V376: compact first product row without cropping or stretching banners. */
@media screen {
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-delivery { color:#ed3d82!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy { align-items:stretch!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy strong { display:block!important;width:100%!important;text-align:left!important;align-self:flex-start!important; }
}
@media screen and (min-width:851px) {
 html body.public-home-page { --bl-section-gap:12px; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-card { padding:7px!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-copy { padding-top:5px!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-delivery { margin:2px 0 4px!important;line-height:15px!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy { flex-direction:column!important;gap:4px!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-buy strong { line-height:20px!important; }
 html body.public-home-page #viewport #page #homeMarketProducts .bloomly-product-add { min-height:36px!important;height:36px!important;padding:6px 8px!important;font-size:13px!important;line-height:20px!important;width:100%!important;max-width:100%!important; }
}

/* V377: center the desktop navigation between balanced side columns. */
@media screen and (min-width:1101px) {
 html body.public-home-page #viewport #page > .bloomly-public-header { display:grid!important;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)!important;gap:16px!important; }
 html body.public-home-page #viewport #page .bloomly-public-header .brand { justify-self:start!important; }
 html body.public-home-page #viewport #page .bloomly-public-header .mainnav { justify-content:center!important;justify-self:center!important; }
 html body.public-home-page #viewport #page .bloomly-public-header .actions { justify-self:end!important; }
}
@media screen and (min-width:851px) and (max-width:1100px) {
 html body.public-home-page #viewport #page .bloomly-public-header .mainnav { flex:1!important;justify-content:center!important; }
}

/* V378: shared screen layout. Screen only: physical print and card geometry remain independent. */
@media screen {
 :root { --bl-content-max:1440px;--bl-page-gutter:24px;--bl-section-gap:12px;--bl-control-height:44px; }
 html body.bl-site :is(main,section,form,.main,.panel-main,.quick-main,.content,.workspace) { min-width:0;box-sizing:border-box; }
 html body.bl-site :is(.table-wrap,.table-wrapper,.table-scroll) { max-width:100%;overflow-x:auto; }
 html body.bl-site :is(.bloomly-public-header,.reference-footer-inner) { max-width:var(--bl-content-max)!important; }
}
@media screen and (min-width:851px) {
 html body.bl-site { --desktop-gutter:24px; }
 html body.bl-site.bloomly-customer-ui :is(.dash,.quick-shell),
 html body.bl-site.bloomly-firm-ui :is(.panel-shell,.firm-cards-shell,.firm-wreath-shell,.firm-qr-shell),
 html body.bl-site[data-page="marketplace"] > .container,
 html body.bl-site :is(.how-main,.how-photo-content,.store-layout,.notes-public-main,.registration-layout) {
  width:calc(100% - 2 * var(--bl-page-gutter))!important;max-width:var(--bl-content-max)!important;margin-inline:auto!important;box-sizing:border-box!important;
 }
 html body.bl-site :is(.dash>.main,.panel-shell>.panel-main,.quick-shell>.quick-main) { min-width:0!important;max-width:100%!important; }
 html body.bl-site .bloomly-public-header,html body.bl-site .reference-footer-inner { width:calc(100% - 2 * var(--bl-page-gutter))!important;margin-inline:auto!important;box-sizing:border-box!important; }
 html body.bl-site.bl-admin > #app { width:calc(100% - 2 * var(--bl-page-gutter));max-width:var(--bl-content-max);margin-inline:auto; }
 html body.bl-site.bl-admin > #app > #sidebar { left:max(var(--bl-page-gutter),calc((100% - var(--bl-content-max))/2))!important; }
 html body.bl-site.bl-admin > #app > main { min-width:0;max-width:calc(100% - 240px);box-sizing:border-box; }
 /* Courier pages intentionally keep their narrow task-focused app width. */
}
@media screen and (max-width:850px) { :root { --bl-page-gutter:16px; } }
@media screen and (max-width:360px) { :root { --bl-page-gutter:12px; } }
