/* Original 4hifi layout integrated with Magento, without affecting native account/cart forms. */
body { overflow-x: clip; background: #fff; }
:is(#hifi-header,#hifi-content,#hifi-footer) { min-height: 0 !important; margin: 0 !important; overflow: visible !important; isolation: isolate; }
.hifi-header { height: 153px; position: relative; z-index: 30; background: #fff !important; }
.hifi-header #top { position: relative !important; left: auto !important; right: auto !important; margin: 0 auto !important; }
.hifi-footer { background: #000; position: relative; z-index: 1; }
.hifi-content { background: #fff !important; }
.hifi-content #content { padding-bottom: 35px; }
:is(#hifi-header,#hifi-content,#hifi-footer) img { max-width: 100%; height: auto; }
:is(#hifi-header,#hifi-content,#hifi-footer) [hidden] { display: none !important; }
:is(#hifi-header,#hifi-content,#hifi-footer) button { letter-spacing: normal; text-transform: none; min-height: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-credits { padding: 0 20px 28px; background: #000; color: #919191; font-size: 12px; text-align: center; }
body:has(.hifi-content) #maincontent,body:has(.hifi-content) #maincontent > .columns,body:has(.hifi-content) #maincontent .column.main { display: block; width: 100%; max-width: none; margin: 0; padding: 0; }
body:has(.hifi-content) #maincontent .page-title-wrapper,body:has(.hifi-content) #maincontent > .breadcrumbs { display: none; }
body:has(.hifi-content) #maincontent .sidebar { display: none; }
body:has(.hifi-content) .messages:not(:empty) { max-width: 1260px; margin: 0 auto; }
:is(#hifi-header,#hifi-content,#hifi-footer) .gallery-thumbs { display: flex; justify-content: center; gap: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .gallery-thumbs figure { flex: 0 1 113px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .gallery-thumbs figure a { display: flex; align-items: center; justify-content: center; }
:is(#hifi-header,#hifi-content,#hifi-footer) .module-gallery .main-pic figure img { max-width: 100%; max-height: 500px; object-fit: contain; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-stock { font-size: 12px; color: #6a6a6a; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-short-description { margin-bottom: 16px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 24px; margin-left: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a { width: auto; margin: 0; float: none; padding: 56px 19px 15px; display: flex; flex-direction: column; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a figure { margin: 0 0 25px; height: 228px; display: flex; align-items: center; justify-content: center; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a figure img { object-fit: contain; max-height: 228px; width: 100%; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a h2 { min-height: 38px; margin-bottom: 22px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-card-description { font-size: 14px; line-height: 1.45; margin-bottom: 20px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-card-description p { margin: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .price { margin-top: auto; margin-bottom: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-card-cart { position: absolute; top: 16px; right: 50px; z-index: 5; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-card-cart img { width: 32px; height: 24px; object-fit: contain; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; position: relative; z-index: 6; background: #efeff7; border-radius: 6px; padding: 20px; margin-bottom: 30px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters > span { margin-right: 15px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters details { position: relative; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters summary { cursor: pointer; padding: 8px 30px 8px 12px; background: #fff; border: 1px solid #e0e0e6; border-radius: 5px; color: #000; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters ul { position: absolute; min-width: 240px; max-height: 350px; overflow-y: auto; z-index: 20; padding: 12px; background: #fff; border: 1px solid #e0e0e6; box-shadow: 0 4px 8px #0001; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters li { margin: 0; padding: 6px 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filter-remove { padding: 5px 10px; background: white; border: 1px solid #e0e0e6; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-page-number { min-width: 48px; border: 1px solid #e0e0e6; border-radius: 5px; text-align: center; padding: 10px !important; color: #000; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-subcategories { display: flex; flex-wrap: wrap; gap: 10px 25px; margin-bottom: 30px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form { max-width: 600px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form p { display: grid; grid-template-columns: 140px minmax(0,1fr); align-items: center; gap: 12px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form input,:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form textarea { width: 100%; max-width: none; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form label { width: auto; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form .hifi-contact-submit { display: block; padding-left: 152px; }
:is(#hifi-header,#hifi-content,#hifi-footer) .module-description { overflow-wrap: anywhere; }
:is(#hifi-header,#hifi-content,#hifi-footer) .module-description table { max-width: 100%; }
:is(#hifi-header,#hifi-content,#hifi-footer) .module-description td { overflow-wrap: anywhere; }
.hifi-lightbox { position: fixed; inset: 0; margin: auto; padding: 40px; border: 0; border-radius: 0; background: white; max-width: 95vw; max-height: 95vh; }
.hifi-lightbox::backdrop { background: #000b; }
.hifi-lightbox img { display: block; max-width: 85vw; max-height: 80vh; object-fit: contain; }
.hifi-lightbox button { position: absolute; right: 5px; top: 0; background: white; color: #000; border: 0; font-size: 30px; width: 36px; height: 36px; }
@media(max-width:1300px) { :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid { gap: 18px; } :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a figure { height: 180px; } }
@media(max-width:1000px) { .hifi-header { height: 60px; } .hifi-footer { padding-bottom: 45px; } :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media(max-width:760px) {
 .hifi-header #top { margin-left: 20px !important; margin-right: 20px !important; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a { padding: 50px 12px 15px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a figure { height: 150px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .price { font-size: 19px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form p { display: block; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form label { display: block; margin-bottom: 6px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-contact-form .hifi-contact-submit { padding-left: 0; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters { padding: 12px; }
 :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-filters ul { left: 0; min-width: 210px; }
}
@media(max-width:460px) { :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid { grid-template-columns: 1fr; } :is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a figure { height: 250px; } }

/* Native gallery carousel positioning is replaced by the local thumbnail controller. */
:is(#hifi-header,#hifi-content,#hifi-footer) .module-gallery .gallery-thumbs figure { position: relative; inset: auto; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a { border-left: 0; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a .price { position: static; height: auto; min-height: 48px; margin-top: auto; }
:is(#hifi-header,#hifi-content,#hifi-footer) .hifi-product-grid .product-a .hifi-card-description p { height: auto; overflow: visible; }
body:has(.hifi-content) .breadcrumbs { display: none; }
#hifi-content .module-gallery .main-pic figure img { width: 500px; height: 500px; object-fit: contain; }
#hifi-content .product-page .list-attrs .promocja { padding: 0; border: 0; border-radius: 0; }
#hifi-content .hifi-cart-form #hifi-qty { height: 50px; width: 68px; max-width: 68px; padding: 0; font-size: 19px; font-weight: 500; }
#hifi-content .module-add .ip-qty-controls { display: none; }
@media(max-width:760px) { #hifi-content .module-gallery .main-pic figure,#hifi-content .module-gallery .main-pic figure img { height: 310px; max-height: 310px; } }

#hifi-content .module-add .ip-qty-control { height: 50px; width: 68px; margin-right: 22px; border-color: #e0e0e6; }
#hifi-content .module-add .ip-qty-control input { width: 100% !important; }
#hifi-content .module-add .ip-qty-control__buttons { display: none; }

/* CMS links inherit the original typography instead of the legacy Inter Projekt emphasis. */
body.cms-page-view #hifi-content a { font-weight: inherit; color: #6a6a6a !important; text-decoration-color: currentColor; text-underline-offset: auto; }
body.cms-page-view #hifi-content h2 a,body.cms-page-view #hifi-content h3 a { color: #000 !important; }
/* Keep Magento account and cart controls functional while matching the shared branding. */
body:has(#hifi-header) #maincontent { font-family: HifiRoboto, sans-serif; color: #6a6a6a; }
body:has(#hifi-header) #maincontent .btn-primary { background: #dd0b35; border-color: #dd0b35; color: #fff; }
body:has(#hifi-header) #maincontent .btn-primary:hover { background: #b6092b; }
body:has(#hifi-header) #maincontent .page-title { color: #000; font-size: 24px; }

/* Keep the complete 153px header visible while scrolling. */
@media(min-width:1001px) {
 body#html-body:has(#hifi-home,#hifi-header) { overflow-x:clip; overflow-y:visible; }
 #hifi-home #root:has(> #top) { overflow:clip; padding-top:0; }
 #hifi-home #root > #top { position:sticky; top:0; left:auto; right:auto; margin-inline:auto; z-index:30; }
 #hifi-home #root > #top::before { content:""; position:absolute; inset:0 -100vw; z-index:-1; background:#fff; }
 #hifi-header.hifi-header { position:sticky; top:0; }
 html:has(#hifi-home,#hifi-header) { scroll-padding-top:173px; }
}

/* Native configurable products inside the 4hifi card. */
.hifi-configurable { margin: 20px 0; color: #292929; }
.hifi-configurable h2 { margin: 0 0 14px; font-size: 18px; font-weight: 600; }
/* Keep native variant selects while overriding the legacy form and half-width utilities. */
#hifi-content .hifi-configurable #product_addtocart_form { margin-bottom: 16px; }
#hifi-content .hifi-configurable [data-attribute-id] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; width: 100%; margin: 0 0 16px; padding: 0; border: 0; }
#hifi-content .hifi-configurable [data-attribute-id] > label { display: block; width: 100%; margin: 0; padding: 0; color: #292929; font-size: 14px; font-weight: 600; line-height: 1.5; }
#hifi-content .hifi-configurable [data-attribute-id] > div { width: 100%; min-width: 0; margin: 0; }
#hifi-content .hifi-configurable .super-attribute-select {
 display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 52px; margin: 0; padding: 13px 48px 13px 16px;
 appearance: none; -webkit-appearance: none; border: 1px solid #bfc1c8; border-radius: 6px; box-shadow: none;
 background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%23dd0b35' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
 background-position: right 16px center; background-repeat: no-repeat; background-size: 20px 20px;
 color: #292929; font-family: inherit; font-size: 16px; font-weight: 400; line-height: 24px; cursor: pointer;
}
#hifi-content .hifi-configurable .super-attribute-select:invalid { color: #666; }
#hifi-content .hifi-configurable .super-attribute-select:hover:not(:disabled) { border-color: #777; }
#hifi-content .hifi-configurable .super-attribute-select:focus { border-color: #dd0b35; outline: 2px solid #dd0b35; outline-offset: 3px; box-shadow: none; }
#hifi-content .hifi-configurable .super-attribute-select:disabled { background-color: #f4f4f6; color: #777; cursor: not-allowed; }
#hifi-content .hifi-configurable .super-attribute-select option { background-color: #fff; color: #292929; font-weight: 400; }
#hifi-content .hifi-configurable .super-attribute-select option:disabled { color: #85858b; }
#hifi-content .hifi-configurable [data-hifi-variant-sku] { margin: 0 0 20px; color: #666; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
@media (forced-colors: active) {
 #hifi-content .hifi-configurable .super-attribute-select { appearance: auto; -webkit-appearance: auto; background-image: none; }
}
.hifi-configurable .hifi-variant-cart { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.hifi-configurable .btn-primary { min-height: 44px; background: #dd0b35; color: #fff; border: 1px solid #dd0b35; border-radius: 3px; box-shadow: none; }
.hifi-configurable .btn-primary:hover { background: #b5092c; border-color: #b5092c; }
.hifi-configurable .price { color: #dd0b35; font-size: 26px; font-weight: 600; }
.hifi-configurable .hifi-color-availability { padding: 0; margin: 0; list-style: none; }
.hifi-configurable .hifi-color-availability li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 0; border-bottom: 1px solid #e3e3e3; }
.hifi-configurable .hifi-color-availability li > span { color: #dd0b35; font-weight: 600; }
.hifi-configurable .hifi-color-availability small { grid-column: 1 / -1; color: #666; overflow-wrap: anywhere; }
.hifi-configurable .hifi-stock a { color: #b5092c; text-decoration: underline; }
#hifi-content .hifi-configurable .price-box .final-price { grid-area: 1 / 1; }
#hifi-content .hifi-configurable .price-box .old-price { grid-area: 1 / 2; }
#hifi-content .hifi-configurable .price-box .final-price-excl-tax,
#hifi-content .hifi-configurable .price-box .price-excl-tax { grid-area: 2 / 1; }
#hifi-content .hifi-configurable .price-box .old-price-excl-tax { grid-area: 2 / 2; }
#hifi-content .hifi-configurable .price-box .final-price .price { font-size: 28px; font-weight: 700; color: #dd0b35; }
#hifi-content .hifi-configurable .price-box .final-price-excl-tax .price,
#hifi-content .hifi-configurable .price-box .price-excl-tax .price { font-size: 16px; font-weight: 400; color: #666; }
#hifi-content .hifi-configurable #product-addtocart-button { display: inline-flex; align-items: center; gap: 9px; width: auto; min-height: 44px; padding: 10px 18px; background: #dd0b35; color: #fff; }
#hifi-content .hifi-configurable #product-addtocart-button > span { display: inline; color: inherit; font-size: 15px; }
#hifi-content .hifi-configurable #product-addtocart-button:focus-visible { outline: 2px solid #dd0b35; outline-offset: 3px; }
/* The legacy .hidden helper moves text off-screen; native Hyvä button labels use that class. */
#hifi-content .hifi-configurable #product-addtocart-button > span { position: static; inset: auto; width: auto; height: auto; }

/* Language and currency controls remain available inside the mobile menu. */
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences { padding:16px 20px; border-bottom:1px solid #e0e0e6; background:#fafafa; }
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences > div { display:flex; align-items:center; gap:16px; min-height:44px; }
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences strong { min-width:66px; font-size:13px; }
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences a { display:inline-flex; align-items:center; gap:5px; padding:10px 0; font-size:13px; text-decoration:none; }
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences a[aria-current="true"] { color:#bd1e2d; font-weight:700; }
:is(#hifi-home,#hifi-header) #mobile .hifi-mobile-preferences img { width:25px; height:18px; }
