/*
Theme Name: Sensorprod Native
Description: Sensor Products Inc. homepage rebuilt with native WordPress blocks.
Version: 1.0.0
Text Domain: sensorprod-native
*/

:root {
    --spi-blue: #0090b6;
    --spi-gray: #f0f0f0;
    --spi-width: 1080px;
}

* { box-sizing: border-box; }
body { margin: 0; color: #000; background: #fff; font-family: Arial, Helvetica, sans-serif; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > *,
.spi-main .wp-block-post-content,
.spi-main .wp-block-post-content > *,
.spi-site-header > *,
.spi-site-footer > * { margin-block: 0; }
.spi-site-header p,
.spi-main p,
.spi-site-footer p,
.spi-site-header figure,
.spi-main figure,
.spi-site-footer figure,
.spi-main h1,
.spi-main h2,
.spi-main h3,
.spi-main h4,
.spi-site-footer h3 { margin: 0; }
.spi-container { width: 80%; max-width: var(--spi-width); margin-inline: auto; }
.spi-site-header a,
.spi-main a,
.spi-site-footer a { color: inherit; text-decoration: none; }
.spi-directory a:hover, .spi-footer a:hover { text-decoration: underline; }
.spi-site-header a:focus-visible, .spi-main a:focus-visible,
.spi-site-footer a:focus-visible, button:focus-visible { outline: 2px solid #005d76; outline-offset: 3px; }
.wp-block-image img { display: inline-block; height: auto; }
.spi-main .wp-block-button__link,
.spi-site-footer .wp-block-button__link {
    background: var(--spi-blue);
    color: #fff;
    border: 0;
    border-radius: 0;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    padding: 8px 16px;
    text-decoration: none;
}
.spi-main .wp-block-button__link:hover,
.spi-site-footer .wp-block-button__link:hover { background: #007b9b; }

.spi-site-header { position: relative; z-index: 5; }
.spi-header-inner {
    width: 80%; max-width: var(--spi-width); height: 109px; margin-inline: auto;
    display: grid; grid-template-columns: 26% 10% 18% 17% 15% 14%; align-items: center;
    padding-top: 25px;
}
.spi-brand { display: flex; align-items: center; gap: 10px; }
.spi-brand-image { flex: none; width: 81px; }
.spi-brand-image img { width: 100%; vertical-align: middle; }
.spi-wordmark { font-size: 11px; white-space: nowrap; line-height: 1.75; }
.spi-wordmark strong { font-size: 13px; }
.spi-seal img { width: 84px; display: block; }
.spi-chat { display: flex; align-items: center; gap: 10px; width: 157px; padding: 8px 11px; background: var(--spi-blue); color: #fff; }
.spi-chat-icon { width: 49px; flex: none; line-height: 0; }
.spi-chat-icon img { width: 100%; }
.spi-chat p { white-space: nowrap; font-size: 15px; }
.spi-contact { line-height: 1.14; font-size: 13px; }
.spi-header-sample, .spi-header-account { color: #f00; font-size: 15px; font-weight: 700; white-space: nowrap; }
.spi-header-account { justify-self: end; }
.spi-header-account a::before {
    content: ""; display: inline-block; background: currentColor; width: 14px; height: 14px;
    margin-inline-end: 6px; vertical-align: -2px;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a5.5 5.5 0 1 0 0-11 5.5 5.5 0 0 0 0 11Zm0 2c-5.4 0-9 3-9 6.1V23h18v-2.9C21 17 17.4 14 12 14Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.spi-menu-toggle { display: none; }
.spi-nav-wrap { height: 75px; }
.spi-nav { width: 92%; max-width: 1320px; margin: 0 auto; padding-top: 20px; font-size: 13px; font-weight: 700; }
.spi-nav > .wp-block-navigation__container { width: 100%; justify-content: space-between; column-gap: 16px; }
.spi-nav .wp-block-navigation-item__content { line-height: 1.25; }
.spi-nav .wp-block-navigation__submenu-container {
    padding: 11px 0; z-index: 20; border: 0; color: #000; background: #f7f7f7;
    box-shadow: 0 9px 26px #0002; max-height: min(66vh, 520px); overflow: auto;
}
.spi-nav .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 7px 14px; font-weight: 400; }
.spi-nav .spi-mobile-nav-only { display: none; }
.spi-nav [href="#product-directory"] + .wp-block-navigation__submenu-icon { visibility: hidden; }
.spi-nav .wp-block-navigation-item:hover > a { text-decoration: underline; }

.spi-slider { position: relative; }
.spi-hero { background: var(--spi-gray); }
.spi-slide:not(.is-current) { display: none; }
.spi-slide-inner {
    width: 80%; max-width: var(--spi-width); min-height: 359px; margin-inline: auto;
    display: grid; grid-template-columns: 47.25% 47.25%; justify-content: space-between; align-items: center;
}
.spi-slide-art { text-align: center; }
.spi-slide-image { line-height: 0; }
.spi-hero .spi-slide-image img { width: min(345px, 100%); aspect-ratio: 345 / 229; object-fit: contain; }
.spi-slide-caption { font-size: 16px; line-height: 1.2; font-weight: 700; padding-top: 18px; }
.spi-slide-copy { text-align: right; transform: translateY(-10px); }
.spi-slide-logo { line-height: 0; margin-bottom: 42px !important; }
.spi-slide-logo img { width: 184px; }
.spi-slide-title { font-size: 20px; line-height: 1.2; font-weight: 700; margin-bottom: 12px !important; }
.spi-slide-copy > p { font-size: 15px; line-height: 1.28; }
.spi-slide-copy > .wp-block-buttons { justify-content: flex-end; margin-top: 20px; }
.spi-slider-controls { opacity: 0; transition: opacity 120ms ease; }
.spi-slider:hover .spi-slider-controls, .spi-slider:focus-within .spi-slider-controls { opacity: 1; }
.spi-prev, .spi-next {
    position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px;
    padding: 0; border: 0; color: #000; background: transparent; cursor: pointer;
}
.spi-prev { left: 0; }
.spi-next { right: 0; }
.spi-prev::before, .spi-next::before {
    content: ""; display: block; width: 13px; height: 13px; margin: auto;
    border-top: 4px solid currentColor; border-right: 4px solid currentColor; border-radius: 1px;
}
.spi-prev::before { rotate: -135deg; }
.spi-next::before { rotate: 45deg; }
.spi-page-title { min-height: 154px; padding: 54px 18px 35px; text-align: center; }
.spi-page-title h1 { font-size: 30px; font-weight: 400; line-height: 1.2; }
.spi-welcome { text-align: center; min-height: 300px; padding: 64px 0 40px; }
.spi-welcome h2, .spi-directory-title h2 { font-size: 26px; line-height: 1.2; font-weight: 400; }
.spi-welcome p { margin-top: 14px; line-height: 1.16; }
.spi-directory-title { min-height: 61px; padding: 10px 18px 20px; text-align: center; }

.spi-directory { min-height: 399px; padding: 55px 0 73px; }
.spi-tab-buttons { display: grid; grid-template-columns: repeat(5, 1fr); margin-bottom: 23px; }
.spi-tab-buttons button, .spi-accordion-toggle {
    border: 0; padding: 0; color: #000; background: transparent; font: inherit; font-weight: 700; cursor: pointer;
}
.spi-tab-buttons button { justify-self: start; position: relative; padding-bottom: 7px; font-size: 13px; }
.spi-tab-buttons button[aria-selected="true"]::after {
    content: ""; position: absolute; height: 3px; left: 0; right: 0; bottom: 0; background: #f00;
}
.spi-directory.is-enhanced .spi-panel:not(.is-current) { display: none; }
.spi-accordion-toggle, .spi-directory-mobile { display: none; }
.spi-application-links {
    columns: 5; column-gap: 12px; list-style: none; margin: 0;
    padding: 0; font-size: 13px; line-height: 1.5;
}
.spi-application-links li { break-inside: avoid; padding: 0; }
.spi-application-links li:last-child { font-weight: 700; }
.spi-directory-desktop { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 30px; }
.spi-directory-selector { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.spi-directory-selector a { display: block; padding: 7px 10px; }
.spi-directory-selector a[aria-current="true"] { background: #eee; font-weight: 700; }
.spi-directory.is-enhanced .spi-directory-card:not(.is-current) { display: none; }
.spi-directory-card { display: flow-root; padding: 0 16px; }
.spi-directory-card > figure:first-child { width: min(34%, 230px); float: left; margin: 0 20px 10px 0; }
.spi-directory-card h4, .spi-directory-card p { margin-block: 8px; }
.spi-directory-card a { color: #c50000; }
.spi-directory-card img { max-height: 140px; object-fit: contain; }

.spi-store { background: #008fb7; color: #fff; }
.spi-store-inner {
    min-height: 249px; display: grid; align-items: center;
    grid-template-columns: 3fr 1fr; gap: 32px;
}
.spi-store-image img { max-width: 100%; vertical-align: middle; }
.spi-store-link { position: relative; font-size: 29px; line-height: 1.1; padding-inline-end: 56px; }
.spi-store-link span { font-size: 50px; }
.spi-store-link a::after, .spi-nav-cart a::before {
    content: ""; display: inline-block; background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 24'%3E%3Cpath d='M0 0h5l1.1 3H28l-3.1 12.2H9l-.6 2.2H24v2H6.1a1 1 0 0 1-1-1.2l1.4-5L3.2 2H0Zm10 20.1a2 2 0 1 0 0 3.9 2 2 0 0 0 0-3.9Zm12.7 0a2 2 0 1 0 0 3.9 2 2 0 0 0 0-3.9Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.spi-store-link a::after { position: absolute; right: 0; top: 9px; width: 85px; height: 76px; }
.spi-nav-cart a::before { width: 14px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.spi-body-slider { margin-block: 30px !important; background: linear-gradient(#84b36e, #6a965b); }
.spi-body-slider .spi-slide-inner { min-height: 287px; }
.spi-body-slider .spi-slide-image img { width: min(510px, 100%); aspect-ratio: 510 / 176; object-fit: contain; }
.spi-body-slider .spi-slide-logo { margin-bottom: 13px !important; }
.spi-body-slider .spi-slide-logo img { width: 115px; }

.spi-testimonials-title, .spi-testimonials { background: var(--spi-gray); }
.spi-testimonials-title { padding: 25px 0 16px; text-align: center; }
.spi-testimonials-title h2, .spi-papers > h2 { font-size: 22px; font-weight: 700; }
.spi-testimonials { position: relative; padding: 19px 0 30px; }
.spi-testimonial-track { display: flex; overflow: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.spi-testimonial-track::-webkit-scrollbar { display: none; }
.spi-testimonial { flex: 0 0 33.333%; min-width: 0; padding-inline-end: 24px; min-height: 399px; scroll-snap-align: start; }
.spi-testimonial-logo { width: 230px; max-width: 100%; aspect-ratio: 1; display: grid; place-items: center; }
.spi-testimonial-logo img { max-width: 100%; max-height: 230px; object-fit: contain; }
.spi-testimonial h3 { margin-top: 17px; font-size: 22px; font-weight: 400; }
.spi-testimonial p { margin-top: 10px; font-size: 14px; line-height: 1.3; }
.spi-testimonial-controls { opacity: 0; transition: opacity 120ms ease; }
.spi-testimonials:hover .spi-testimonial-controls, .spi-testimonials:focus-within .spi-testimonial-controls { opacity: 1; }
.spi-papers { padding: 51px 0 60px; text-align: center; }
.spi-paper-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 20px; padding-top: 66px; }
.spi-paper-image { width: 78px; margin-inline: auto !important; aspect-ratio: 1; display: grid; place-items: center; }
.spi-paper-image img { width: 100%; height: 100%; object-fit: contain; }
.spi-paper p { font-size: 13px; margin-top: 14px; line-height: 1.23; }

.spi-footer { background: var(--spi-gray); padding: 35px 0 28px; font-size: 13px; }
.spi-footer-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 35px; }
.spi-footer-col h3, .spi-footer-socials h3 { font-size: 13px; font-weight: 700; margin-bottom: 10px; }
.spi-footer-col ul { margin: 0; padding: 0; list-style: none; }
.spi-footer-col li { margin-bottom: 6px; line-height: 1.3; }
.spi-footer-bottom { margin-top: 33px; align-items: center; }
.spi-footer-bottom .spi-brand-image { width: 54px; }
.spi-footer-bottom .spi-wordmark { font-size: 9px; }
.spi-footer-bottom .spi-wordmark strong { font-size: 10px; }
.spi-social { display: flex; gap: 7px; flex-wrap: wrap; }
.spi-social a {
    min-width: 30px; height: 31px; padding: 2px 5px; display: inline-grid; place-items: center;
    color: #fff; background: #666; border-radius: 3px; font-size: 20px; font-weight: 700;
}
.spi-footer .wp-block-button__link { font-size: 13px; padding: 9px 12px; }
.spi-copyright { margin: 22px auto 0 !important; padding: 0 12px; text-align: center; font-size: 10px; line-height: 1.5; }
.spi-floating-chat {
    position: fixed; z-index: 7; right: 20px; bottom: 20px; width: 80px; height: 80px;
    display: grid; place-items: center; border-radius: 50%; background: #095b84; color: #fff;
    box-shadow: 0 1px 8px #0005;
}

@media (max-width: 980px) {
    .spi-header-inner { width: 100%; height: 128px; padding: 0; grid-template-columns: 1fr 1fr; grid-template-rows: 70px 58px; }
    .spi-header-inner .spi-brand {
        grid-column: 1 / -1; height: 70px; padding-inline: 17px 0;
        justify-content: center; background: #eee;
    }
    .spi-header-inner .spi-brand-image { width: 55px; }
    .spi-header-inner .spi-wordmark { font-size: 11px; line-height: 1.65; }
    .spi-header-inner .spi-wordmark strong { font-size: 14px; }
    .spi-seal, .spi-chat, .spi-header-inner .spi-contact { display: none; }
    .spi-header-sample { margin-left: 5vw !important; }
    .spi-header-account { margin-right: 5vw !important; }
    .spi-nav-wrap { height: 0; }
    .spi-menu-toggle {
        display: grid; position: absolute; top: 13px; left: 13px; height: 43px; width: 43px;
        background: transparent; color: #000; border: 0; place-items: center; cursor: pointer;
    }
    .spi-menu-toggle span, .spi-menu-toggle span::before, .spi-menu-toggle span::after {
        display: block; width: 30px; height: 3px; border-radius: 2px; background: currentColor;
    }
    .spi-menu-toggle span { position: relative; }
    .spi-menu-toggle span::before, .spi-menu-toggle span::after { content: ""; position: absolute; left: 0; }
    .spi-menu-toggle span::before { top: -8px; }
    .spi-menu-toggle span::after { top: 8px; }
    .spi-nav-wrap .spi-nav {
        display: none; position: absolute; top: 70px; width: 100%; max-width: none; margin: 0;
        background: #f4f4f4; box-shadow: 0 12px 22px #0003; padding: 11px 20px;
        max-height: min(72dvh, 600px); overflow-y: auto;
    }
    .spi-nav-wrap .spi-nav.is-open, .spi-nav .spi-mobile-nav-only { display: flex; }
    .spi-nav > .wp-block-navigation__container { flex-direction: column; align-items: stretch; gap: 0; }
    .spi-nav .wp-block-navigation-item__content { padding: 12px 0; }
    .spi-nav .wp-block-navigation__submenu-container { position: static; box-shadow: none; }
    .spi-nav .wp-block-navigation__submenu-icon { width: 25px; height: 25px; }
    .spi-slide-inner {
        width: 77.45%; min-height: auto; display: flex; flex-direction: column;
        justify-content: center; align-items: stretch; padding: 18px 0 30px;
    }
    .spi-hero .spi-slide-inner { min-height: 484px; justify-content: flex-start; }
    .spi-slide-art { padding: 0; }
    .spi-slide-caption { padding-top: 20px; font-size: 16px; }
    .spi-hero .spi-slide-image img { width: 100%; max-width: 345px; }
    .spi-slide-copy { text-align: center; transform: none; }
    .spi-slide-logo { margin-top: 17px !important; margin-bottom: 45px !important; }
    .spi-slide-logo img { width: 190px; }
    .spi-slide-title { font-size: 14px; margin-bottom: 5px !important; }
    .spi-slide-copy > p { font-size: 12px; line-height: 1.6; }
    .spi-slide-copy > .wp-block-buttons { justify-content: center; margin-top: 24px; }
    .spi-slide-copy .wp-block-button__link { padding: 6px 12px; font-size: 13px; }
    .spi-testimonial-controls { opacity: 1; }
    .spi-hero .spi-slider-controls button { top: 50%; }
    .spi-page-title { min-height: 168px; padding-top: 48px; }
    .spi-page-title h1 { font-size: 24px; }
    .spi-container { width: 90%; }
    .spi-welcome { min-height: 496px; padding: 55px 4px 45px; }
    .spi-welcome h2, .spi-directory-title h2 { font-size: 22px; }
    .spi-welcome p { font-size: 16px; line-height: 1.19; margin-top: 12px; }
    .spi-directory-title { min-height: 78px; padding: 10px 24px 15px; }
    .spi-directory { padding: 38px 0 40px; }
    .spi-tab-buttons, .spi-directory-desktop, .spi-applications-desktop { display: none; }
    .spi-directory-mobile { display: block; }
    .spi-directory.is-enhanced .spi-panel:not(.is-current) { display: block; }
    .spi-panel { background: #eee; border: 1px solid #d9d9d9; margin-bottom: 10px; }
    .spi-accordion-toggle {
        display: flex; align-items: center; justify-content: space-between; width: 100%;
        font-size: 13px; text-align: left; padding: 18px 18px; min-height: 52px;
    }
    .spi-accordion-toggle[aria-expanded="false"]::after { content: "+"; font-size: 16px; }
    .spi-panel-content { padding: 0 18px 17px; }
    .spi-directory.is-enhanced .spi-panel:not(.is-current) .spi-panel-content { display: none; }
    .spi-application-links { columns: 2; column-gap: 15px; font-size: 13px; line-height: 1.43; }
    .spi-mobile-links { margin: 0; padding: 0; list-style: none; columns: 2; font-size: 13px; line-height: 1.5; }
    .spi-store-inner { min-height: 212px; display: flex; flex-direction: column; justify-content: center; gap: 15px; padding: 19px 0; }
    .spi-store-link { font-size: 17px; padding-right: 54px; }
    .spi-store-link span { font-size: 32px; }
    .spi-store-link a::after { width: 48px; height: 48px; top: 0; }
    .spi-body-slider .spi-slide-inner { min-height: 292px; }
    .spi-body-slider .spi-slide-logo { margin-top: 19px !important; margin-bottom: 12px !important; }
    .spi-body-slider .spi-slide-logo img { width: 111px; }
    .spi-testimonials-title { padding: 21px 0 11px; }
    .spi-testimonials-title h2, .spi-papers > h2 { font-size: 19px; }
    .spi-testimonials { padding: 20px 0 30px; }
    .spi-testimonial-track { width: calc(100% - 80px); }
    .spi-testimonial { flex-basis: 100%; min-height: 378px; padding-inline-end: 0; }
    .spi-testimonial-logo { width: 195px; }
    .spi-testimonial-logo img { max-height: 195px; }
    .spi-testimonial h3 { font-size: 19px; }
    .spi-testimonial p { font-size: 14px; }
    .spi-papers { padding: 44px 0 50px; }
    .spi-paper-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 28px 16px; padding-top: 54px; }
    .spi-paper p { min-height: 53px; }
    .spi-footer { padding: 36px 0 24px; }
    .spi-footer-grid { width: 80%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
    .spi-footer-bottom { margin-top: 30px; }
    .spi-footer-bottom .spi-brand { gap: 5px; }
    .spi-footer-bottom .spi-brand-image { width: 42px; }
    .spi-footer-bottom .spi-wordmark { font-size: 7px; }
    .spi-footer-bottom .spi-wordmark strong { font-size: 8px; }
    .spi-social a { min-width: 22px; height: 23px; font-size: 15px; }
    .spi-floating-chat { width: 66px; height: 66px; right: 12px; bottom: 14px; }
}

@media (max-width: 375px) {
    .spi-header-inner .spi-wordmark strong { font-size: 12px; }
    .spi-header-inner .spi-wordmark { font-size: 10px; }
    .spi-header-inner .spi-brand { padding-left: 38px; }
    .spi-header-sample, .spi-header-account { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    .spi-slider-controls, .spi-testimonial-controls { transition: none; }
}
