/* CommercePro 4.2 — shared front-end page compatibility layer.
   Loaded after theme CSS so every theme keeps its palette/personality while
   all routed storefront pages retain a valid, responsive structural layout. */

body[class*="theme-"] main{display:block;min-width:0;min-height:46vh;overflow:clip}
body[class*="theme-"] main>*{box-sizing:border-box}
body[class*="theme-"] .container{width:min(calc(100% - 56px),1480px);max-width:1480px;margin-inline:auto;min-width:0}
body[class*="theme-"] .page-hero,
body[class*="theme-"] .section,
body[class*="theme-"] .catalog-layout,
body[class*="theme-"] .article-grid,
body[class*="theme-"] .article-layout,
body[class*="theme-"] .account-layout,
body[class*="theme-"] .checkout-layout,
body[class*="theme-"] .commerce-checkout,
body[class*="theme-"] .request-layout,
body[class*="theme-"] .support-layout,
body[class*="theme-"] .compare-page,
body[class*="theme-"] .narrow-page,
body[class*="theme-"] .narrow-commerce-page,
body[class*="theme-"] .center-message{box-sizing:border-box;min-width:0}

/* Catalog / search / managed product-category pages. */
body[class*="theme-"].page-view-catalog .cp-catalog-hero{width:min(100%,1480px);margin-inline:auto;min-width:0}
body[class*="theme-"].page-view-catalog .cp-catalog-layout{width:min(100%,1480px);margin-inline:auto;display:grid;grid-template-columns:210px minmax(0,1fr);align-items:start;min-width:0}
body[class*="theme-"].page-view-catalog .filters,
body[class*="theme-"].page-view-catalog .catalog-main,
body[class*="theme-"].page-view-catalog .catalog-grid,
body[class*="theme-"].page-view-catalog .product-card{min-width:0;max-width:100%}
body[class*="theme-"].page-view-catalog .filters a{overflow-wrap:anywhere}
body[class*="theme-"].page-view-catalog .catalog-tools{gap:14px;align-items:center;min-width:0}
body[class*="theme-"].page-view-catalog .catalog-tools>b{min-width:0}
body[class*="theme-"].page-view-catalog .catalog-tools select{max-width:100%}
body[class*="theme-"].page-view-catalog .pagination{flex-wrap:wrap}
body[class*="theme-"].page-view-catalog .cp-catalog-description{overflow-wrap:anywhere}

/* Journal, article category, static pages and topic collections. */
body[class*="theme-"] .catalog-hero{padding:clamp(28px,5vw,58px);background:var(--cream);border-bottom:1px solid var(--line)}
body[class*="theme-"] .article-category-page{min-width:0}
body[class*="theme-"] .article-category-page .article-grid{width:100%;max-width:none;padding-inline:0}
body[class*="theme-"] .article-card{min-width:0}
body[class*="theme-"] .article-card img{width:100%;height:auto}
body[class*="theme-"] .journal-hero{min-width:0}
body[class*="theme-"] .page-layout,
body[class*="theme-"] .article-main,
body[class*="theme-"] .article-sidebar{min-width:0}
body[class*="theme-"] .topic-hero,
body[class*="theme-"] .topic-products,
body[class*="theme-"] .topic-articles{min-width:0}
body[class*="theme-"] .topic-article-grid>*{min-width:0}
body[class*="theme-"] .empty-state{padding:28px;border:1px dashed var(--line);background:var(--cream);color:var(--muted);text-align:center}

/* Brand pages. */
body[class*="theme-"].page-view-brand .brand-page-enhanced{width:min(calc(100% - 56px),1480px);max-width:1480px;margin-inline:auto;min-width:0}
body[class*="theme-"].page-view-brand .brand-identity,
body[class*="theme-"].page-view-brand .brand-story-section,
body[class*="theme-"].page-view-brand .brand-products-section,
body[class*="theme-"].page-view-brand .brand-journal-section{min-width:0}
body[class*="theme-"].page-view-brand .brand-story,
body[class*="theme-"].page-view-brand .rich-content{overflow-wrap:anywhere}
body[class*="theme-"].page-view-brand .article-card{height:100%}

/* Account / order / authentication pages. */
body[class*="theme-"] .account-list-head{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:18px}
body[class*="theme-"] .account-list-head h2{margin:4px 0 0}
body[class*="theme-"] .account-order-hero{min-width:0}
body[class*="theme-"] .account-layout>section,
body[class*="theme-"] .account-layout>.form-card{min-width:0}
body[class*="theme-"] .auth-page{min-width:0}
body[class*="theme-"] .auth-page .social-row{min-width:0}
body[class*="theme-"] .table-scroll{max-width:100%;overflow:auto;-webkit-overflow-scrolling:touch}

/* Checkout, cart, inquiry, contact and price-match forms. */
body[class*="theme-"] .commerce-checkout,
body[class*="theme-"] .commerce-form-stack,
body[class*="theme-"] .commerce-panel,
body[class*="theme-"] .contact-form-panel,
body[class*="theme-"] .inquiry-form-panel,
body[class*="theme-"] .inquiry-summary{min-width:0;max-width:100%}
body[class*="theme-"] .commerce-fields>*{min-width:0}
body[class*="theme-"] .commerce-fields input,
body[class*="theme-"] .commerce-fields select,
body[class*="theme-"] .commerce-fields textarea{max-width:100%}
body[class*="theme-"] .country-picker-chevron{pointer-events:none;flex:0 0 auto}
body[class*="theme-"] .price-product{min-width:0}
body[class*="theme-"] .price-product>div{min-width:0}
body[class*="theme-"] .price-product b{overflow-wrap:anywhere}

/* Compare, status, success and generic message pages. */
body[class*="theme-"] .compare-grid,
body[class*="theme-"] .compare-grid-v2,
body[class*="theme-"] .tracking-card,
body[class*="theme-"] .tracking-result,
body[class*="theme-"] .receipt{min-width:0}
body[class*="theme-"] .center-message .success-actions{flex-wrap:wrap}
body[class*="theme-"] .center-message .success-actions .button{min-width:min(220px,100%)}

/* Product pages: keep theme styling but prevent width/overflow regressions. */
body[class*="theme-"].page-view-product .product-detail,
body[class*="theme-"].page-view-product .gallery,
body[class*="theme-"].page-view-product .product-buy,
body[class*="theme-"].page-view-product .buy-form,
body[class*="theme-"].page-view-product .variant-option{min-width:0;max-width:100%}
body[class*="theme-"].page-view-product .gallery-thumbs{min-width:0}
body[class*="theme-"].page-view-product .brand-kicker-link{display:inline-flex;max-width:100%;overflow-wrap:anywhere}
body[class*="theme-"].page-view-product .product-rating{min-width:0}

/* Affiliate and common data surfaces. */
body[class*="theme-"].page-view-affiliate .affiliate-kpis>*{min-width:0}
body[class*="theme-"] .data-table{max-width:100%}
body[class*="theme-"] .form-card,
body[class*="theme-"] .order-summary{min-width:0;max-width:100%}

@media(max-width:980px){
  body[class*="theme-"] .container,
  body[class*="theme-"].page-view-brand .brand-page-enhanced{width:min(calc(100% - 36px),1480px)}
  body[class*="theme-"].page-view-catalog .cp-catalog-layout{grid-template-columns:1fr}
  body[class*="theme-"].page-view-catalog .filters{position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}
  body[class*="theme-"].page-view-catalog .filters h3,
  body[class*="theme-"].page-view-catalog .filters hr,
  body[class*="theme-"].page-view-catalog .filters label,
  body[class*="theme-"].page-view-catalog .filters input{grid-column:1/-1}
  body[class*="theme-"] .account-list-head{align-items:start}
}

@media(max-width:640px){
  body[class*="theme-"] main{overflow:visible}
  body[class*="theme-"] .container,
  body[class*="theme-"].page-view-brand .brand-page-enhanced{width:calc(100% - 28px)}
  body[class*="theme-"].page-view-catalog .cp-catalog-layout{padding-left:14px;padding-right:14px;gap:24px}
  body[class*="theme-"].page-view-catalog .cp-catalog-hero{padding-left:18px;padding-right:18px}
  body[class*="theme-"].page-view-catalog .filters{grid-template-columns:1fr}
  body[class*="theme-"].page-view-catalog .filters h3,
  body[class*="theme-"].page-view-catalog .filters hr,
  body[class*="theme-"].page-view-catalog .filters label,
  body[class*="theme-"].page-view-catalog .filters input{grid-column:auto}
  body[class*="theme-"].page-view-catalog .catalog-tools{align-items:stretch;flex-direction:column}
  body[class*="theme-"].page-view-catalog .catalog-tools select{width:100%}
  body[class*="theme-"] .catalog-hero{padding:24px 18px}
  body[class*="theme-"] .account-list-head{display:block}
  body[class*="theme-"] .account-list-head .eyebrow{display:block}
  body[class*="theme-"] .success-actions{display:grid;grid-template-columns:1fr}
  body[class*="theme-"] .success-actions .button{width:100%}
}

/* CommercePro 4.4 post-theme guards: managed menus and media modules must stay usable in every theme. */
.cp-managed-navigation .cp-nav-item>a{color:inherit}
.cp-managed-navigation .cp-nav-submenu{color:var(--ink);text-transform:none;letter-spacing:normal;font-weight:500}
.cp-managed-navigation .cp-nav-submenu a{color:var(--ink)!important;background:transparent;text-transform:none;letter-spacing:normal;text-decoration:none!important}
.cp-managed-navigation .cp-nav-submenu a:hover,.cp-managed-navigation .cp-nav-submenu a:focus-visible{color:var(--ink)!important;background:var(--cream)!important}
.cp-slider-module .button.light{display:inline-flex!important;align-items:center!important;justify-content:center!important;min-height:48px!important;padding:0 22px!important;border:1px solid #fff!important;border-radius:var(--radius)!important;background:#fff!important;color:#17201c!important;text-decoration:none!important;box-shadow:none!important;font-weight:750!important}
.cp-slider-module .button.light:hover,.cp-slider-module .button.light:focus-visible{background:rgba(255,255,255,.88)!important;color:#111!important;border-color:#fff!important}
.cp-slider-control{padding:0!important;text-decoration:none!important}
@media(max-width:700px){.cp-managed-navigation .cp-nav-submenu{position:static}}


/* CommercePro 4.5 — cross-theme icon, control and responsive polish. */
.cp-action-icon,.cp-search-leading,.cp-icon-button svg,.contact-fab svg,.addon-slider-controls svg{display:block;width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.cp-icon-button{display:inline-grid!important;place-items:center!important;width:40px;height:40px;min-width:40px;min-height:40px;padding:0!important;border:1px solid var(--line)!important;border-radius:50%!important;background:var(--paper)!important;color:var(--ink)!important;box-shadow:0 4px 14px rgba(20,30,25,.06)!important;cursor:pointer;transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease}
.cp-icon-button:hover,.cp-icon-button:focus-visible{transform:translateY(-1px);border-color:color-mix(in srgb,var(--brand) 52%,var(--line))!important;background:var(--cream)!important;box-shadow:0 8px 20px rgba(20,30,25,.1)!important;outline:none}
.cp-site-search{position:relative;align-items:center;box-shadow:0 1px 2px rgba(20,30,25,.03);transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}
.cp-site-search:focus-within{border-color:color-mix(in srgb,var(--brand) 58%,var(--line))!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 11%,transparent),0 6px 20px rgba(20,30,25,.06)}
.cp-site-search .cp-search-leading{flex:0 0 auto;margin-left:15px;color:var(--muted)}
.cp-site-search input{font-size:16px;appearance:none;-webkit-appearance:none}
.cp-site-search input::-webkit-search-cancel-button{cursor:pointer}
.cp-site-search button{display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;font-weight:750;transition:background .16s ease,transform .16s ease}
.cp-site-search button:hover,.cp-site-search button:focus-visible{background:var(--brand2)!important;outline:none}
.cp-site-search button .cp-action-icon{width:17px;height:17px}
.head-action-link,.head-cart-toggle{display:inline-flex!important;align-items:center!important;gap:7px!important;min-height:40px!important;color:var(--ink)!important;text-decoration:none!important;white-space:nowrap}
.head-action-link:hover,.head-action-link:focus-visible{color:var(--brand)!important}
.head-cart-toggle{padding:8px 11px!important;border:1px solid var(--line)!important;background:var(--cream)!important;color:var(--ink)!important}
.head-cart-toggle:hover,.head-cart-toggle:focus-visible{border-color:color-mix(in srgb,var(--brand) 45%,var(--line))!important;background:var(--paper)!important}
.cart-close,.modal-close,.compare-remove,.addon-popup-close,.content-image-lightbox-close{font-size:0!important}
.cart-close svg,.modal-close svg,.compare-remove svg,.addon-popup-close svg,.content-image-lightbox-close svg{width:18px;height:18px}
.addon-slider-controls button{display:grid!important;place-items:center!important;width:38px!important;height:38px!important;padding:0!important;border:1px solid var(--line)!important;border-radius:50%!important;background:var(--paper)!important;color:var(--ink)!important;box-shadow:0 3px 12px rgba(20,30,25,.05)!important;transition:transform .16s ease,border-color .16s ease,background .16s ease}
.addon-slider-controls button:hover,.addon-slider-controls button:focus-visible{transform:translateY(-1px);border-color:var(--brand)!important;background:var(--cream)!important;outline:none}
.contact-fab{display:inline-flex!important;align-items:center!important;gap:8px!important;min-height:48px!important;padding:0 17px!important;border:1px solid color-mix(in srgb,var(--brand) 82%,#000)!important;border-radius:999px!important;background:var(--brand)!important;color:#fff!important;box-shadow:0 14px 34px rgba(20,30,25,.2)!important;font-weight:750!important;cursor:pointer;transition:transform .16s ease,background .16s ease,box-shadow .16s ease}
.contact-fab:hover,.contact-fab:focus-visible{transform:translateY(-2px);background:var(--brand2)!important;box-shadow:0 18px 38px rgba(20,30,25,.25)!important;outline:none}
.contact-fab svg{width:18px;height:18px}
.back-to-top{position:fixed!important;z-index:48!important;right:22px!important;bottom:82px!important;width:46px!important;height:46px!important;min-width:46px!important;min-height:46px!important;opacity:0;visibility:hidden;transform:translateY(10px);pointer-events:none;transition:opacity .18s ease,visibility .18s ease,transform .18s ease!important}
.back-to-top.is-visible{opacity:1;visibility:visible;transform:none;pointer-events:auto}
body:not(.has-contact-fab) .back-to-top{bottom:22px!important}
.back-to-top svg{width:20px;height:20px;stroke-width:2}
.button,button,input,select,textarea{accent-color:var(--brand)}
.button:focus-visible,button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:2px solid color-mix(in srgb,var(--brand) 70%,#fff);outline-offset:2px}
.button{transition:transform .14s ease,background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease}
.button:hover{transform:translateY(-1px)}
input,select,textarea{max-width:100%}

@media(max-width:1100px){
  .head-actions{gap:12px!important}.head-action-link{font-size:14px}.head-action-link .cp-action-icon{width:17px;height:17px}
}
@media(max-width:900px){
  body[class*="theme-"] .site-head{height:auto!important;min-height:0!important;align-items:center!important;padding-top:12px!important;padding-bottom:13px!important}
  body[class*="theme-"] .site-head .cp-site-search{grid-column:1/-1!important;grid-row:2!important;height:50px!important;margin-top:1px!important;border:1px solid color-mix(in srgb,var(--line) 86%,#9aa5a0)!important;border-radius:12px!important;background:color-mix(in srgb,var(--paper) 96%,var(--cream))!important;overflow:hidden!important;box-shadow:0 5px 18px rgba(20,30,25,.06)!important}
  body[class*="theme-"] .site-head .cp-site-search:focus-within{background:var(--paper)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 10%,transparent),0 7px 22px rgba(20,30,25,.08)!important}
  body[class*="theme-"] .site-head .cp-site-search .cp-search-leading{display:block!important;margin-left:14px!important;width:19px!important;height:19px!important;color:var(--muted)!important}
  body[class*="theme-"] .site-head .cp-site-search input{height:48px!important;padding:0 11px!important;border:0!important;background:transparent!important;font-size:16px!important;line-height:48px!important;box-shadow:none!important}
  body[class*="theme-"] .site-head .cp-site-search button{height:42px!important;min-height:42px!important;margin:3px!important;padding:0 16px!important;border:0!important;border-radius:9px!important;background:var(--brand)!important;color:#fff!important}
  .announce{padding:7px 14px!important;font-size:12px!important;line-height:1.35!important}
  .back-to-top{right:14px!important;bottom:calc(78px + env(safe-area-inset-bottom))!important}
  body:not(.has-contact-fab) .back-to-top{bottom:calc(16px + env(safe-area-inset-bottom))!important}
  .contact-fab{right:14px!important;bottom:calc(16px + env(safe-area-inset-bottom))!important;min-height:46px!important;padding:0 15px!important}
}
@media(max-width:560px){
  body[class*="theme-"] .site-head{grid-template-columns:minmax(0,1fr) 44px!important;gap:10px!important;padding-left:12px!important;padding-right:12px!important}
  body[class*="theme-"] .site-head .brand{font-size:21px!important;line-height:1.1!important}
  body[class*="theme-"] .site-head .cp-site-search{height:48px!important;border-radius:11px!important}
  body[class*="theme-"] .site-head .cp-site-search input{height:46px!important;line-height:46px!important;padding-left:9px!important;padding-right:6px!important}
  body[class*="theme-"] .site-head .cp-site-search button{width:44px!important;min-width:44px!important;height:40px!important;padding:0!important;border-radius:9px!important}
  body[class*="theme-"] .site-head .cp-site-search button span{display:none!important}
  body[class*="theme-"] .site-head .cp-site-search button .cp-action-icon{width:19px!important;height:19px!important}
  .contact-fab span{display:none}.contact-fab{width:46px!important;padding:0!important;justify-content:center!important}
  .back-to-top{bottom:calc(74px + env(safe-area-inset-bottom))!important}
  body:not(.has-contact-fab) .back-to-top{bottom:calc(14px + env(safe-area-inset-bottom))!important}
}

.mobile-nav-child-icon{display:grid!important;place-items:center!important}.mobile-nav-child-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.cp-compare-chip-remove{display:grid!important;place-items:center!important;width:22px!important;height:22px!important;padding:0!important;border:0!important;border-radius:50%!important;background:transparent!important;color:var(--muted)!important;cursor:pointer}.cp-compare-chip-remove:hover{background:color-mix(in srgb,var(--brand) 8%,transparent)!important;color:var(--ink)!important}.cp-compare-chip-remove svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}.gallery-lightbox-close,.content-image-lightbox-close{position:absolute!important;right:14px!important;top:14px!important;z-index:3!important}.commerce-modal .modal-close{z-index:3!important}


/* 4.5 coverage for previously unstyled semantic helper classes. */
.cp-button-leading-icon{display:block;width:19px;height:19px;flex:0 0 19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.add-cart,.inquiry-submit{gap:9px}.card-brand-link{display:inline-block;max-width:100%;color:var(--muted);text-decoration:none}.card-brand-link:hover,.card-brand-link:focus-visible{color:var(--brand);text-decoration:underline;text-underline-offset:3px}.card-quote-link{color:var(--brand)}.cp-article-placeholder{display:block;width:100%;height:100%;min-height:160px;background:linear-gradient(145deg,var(--cream),color-mix(in srgb,var(--paper) 78%,var(--line)));border:1px solid var(--line)}.cp-managed-mobile-navigation{min-width:0}.cp-product-detail-module{border-top:1px solid var(--line);padding:15px 0}.cp-product-detail-module summary{font-weight:750;cursor:pointer;list-style-position:inside}.cp-product-detail-module>div,.cp-product-detail-module>p{margin-top:12px}.de-campaign-primary,.hs-trending,.studio-products{min-width:0}
