/*
Theme Name: Cortex
Theme URI:
Author: Skelte
Author URI: https://skelte.fi
Description: Cortex B2B WooCommerce – pakkaamisen, merkinnän ja elintarvikealan koneet ammattilaisille. Custom-teema: Lexend, navy/oranssi, glass-blur, pill UI.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.2
License: Proprietary
Text Domain: cortex
*/

/* =============================================
   DESIGN TOKENS
   ============================================= */

/* ── Fonts (Google Fonts CDN) ── */
@import url('https://fonts.googleapis.com/css2?family=Lexend:wght@400;500;600;700&display=swap');

:root {
    /* ── Brand ── */
    --navy: #1d5395;
    --navy-dark: #164078;
    --navy-deep: #0f2d55;
    --navy-light: #2a6ab8;
    --orange: #ff5e06;
    --orange-hover: #e55200;

    /* ── Neutrals ── */
    --white: #ffffff;
    --black: #000000;
    --gray-50: #F8F9FB;
    --gray-100: #F0F2F5;
    --gray-200: #E3E6EB;
    --gray-300: #CDD2D9;
    --gray-400: #9BA3AE;
    --gray-500: #6B7280;
    --gray-600: #555D68;
    --gray-800: #2D3239;
    --text: #1A1D21;

    /* ── Typography ── */
    --font: 'Lexend', sans-serif;

    /* ── Layout ── */
    --container: 1400px;
    --header-height: 46px;
    --nav-height: 42px;

    /* ── Shapes ── */
    --pill: 999px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* ── Glass ── */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-bg-dark: rgba(17, 57, 103, 0.45);
    --glass-border-dark: rgba(255, 255, 255, 0.08);

    /* ── Shadows ── */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.10);
    --shadow-glow: 0 0 30px rgba(255, 85, 0, 0.15);

    /* ── Transitions ── */
    --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; transition: color 0.15s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button, input, select, textarea { font-family: var(--font); }
input::placeholder, textarea::placeholder { font-weight: 400; }
button { cursor: pointer; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* Focus: esteettömyys */
:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =============================================
   PILL BUTTONS
   ============================================= */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600;
    padding: 10px 26px;
    border-radius: var(--pill); border: 2px solid transparent;
    transition: all 0.2s var(--ease); white-space: nowrap;
    line-height: 1.4;
}
.btn-orange { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-orange:hover { background: var(--orange-hover); border-color: var(--orange-hover); transform: translateY(-1px); box-shadow: var(--shadow-glow); color: var(--white); }
.btn-black { background: var(--text); color: var(--white); border-color: var(--text); }
.btn-black:hover { background: #000; transform: translateY(-1px); color: var(--white); }
.btn-white { background: var(--white); color: var(--text); border-color: var(--white); }
.btn-white:hover { background: #f5f5f5; transform: translateY(-1px); }
.btn-outline-white { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .25); }
.btn-outline-white:hover { border-color: var(--orange); color: var(--orange); }
.btn-outline-navy { background: transparent; color: var(--navy); border-color: var(--gray-200); }
.btn-outline-navy:hover { border-color: var(--navy); background: var(--gray-50); }
.btn-navy { background: var(--navy); color: var(--white); border-color: var(--navy); }
.btn-navy:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: var(--white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--gray-600); border: none; padding: 8px 0; }
.btn-ghost:hover { color: var(--orange); }
.btn-sm { font-size: 14px; padding: 7px 18px; }
/* btn-green poistettu – ei vihreää, käytetään btn-orange CTA:issa */

/* =============================================
   HEADER
   ============================================= */
.header-top {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 200;
    background: transparent;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.3s ease;
}
/* Scrollattu → semi-transparent navy */
.header-top.header--scrolled {
    background: rgba(17, 57, 103, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
/* Piilotettu (scroll alas) */
.header-top.header--hidden {
    transform: translateY(-100%);
}
.admin-bar .header-top { top: 32px; }
@media (max-width: 782px) {
    .admin-bar .header-top { top: 46px; }
}

/* Shared row layout */
.header-row-inner {
    display: flex; align-items: center;
    max-width: var(--container); margin: 0 auto;
    padding: 0 24px; gap: 24px;
}

/* ── Row 1: logo + nav + actions ── */
.header-row--main { padding: 12px 0; min-height: 68px; }
.header-row--main .header-row-inner { justify-content: space-between; }

/* Logo */
.logo { flex-shrink: 0; display: inline-flex; align-items: center; }
.logo-img { height: 28px; width: 153px; display: block; object-fit: contain; object-position: left; }
/* Logo: tumma versio */
.logo-img--dark { display: none; }
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .logo-img--light { display: none; }
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .logo-img--dark { display: block; }

/* Ylänavigaatio */
.header-nav {
    display: flex; align-items: center; gap: 28px;
    flex-wrap: wrap;
}
.header-nav a,
.header-nav .menu-item a {
    color: var(--white); font-size: 14px; font-weight: 500;
    opacity: 0.9; transition: opacity 0.15s;
    white-space: nowrap;
}
.header-nav a:hover,
.header-nav .menu-item a:hover { opacity: 1; color: var(--white); }

/* Puhelinnumerot */
.header-phones {
    display: flex; align-items: center; gap: 20px;
    margin-left: auto; margin-right: 20px;
}
.header-phone {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: rgba(255, 255, 255, 0.8);
    transition: color 0.15s; white-space: nowrap;
}
.header-phone:hover { color: var(--white); }
.header-phone__label {
    font-weight: 600; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.04em; opacity: 0.6;
}
.header-phone__num { font-weight: 500; }
/* Valkoinen header -variantti */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-phone {
    color: var(--gray-500);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-phone:hover {
    color: var(--text);
}

/* Actions (oikea puoli) */
.header-actions {
    display: flex; align-items: center; gap: 12px;
    flex-shrink: 0;
}

/* Pyydä tarjous – oranssi pill */
.btn-tarjous {
    background: var(--orange); color: var(--white);
    font-size: 13px; font-weight: 600;
    padding: 10px 24px; border-radius: var(--pill); border: none;
    transition: all 0.15s; letter-spacing: 0.01em;
    white-space: nowrap; display: inline-flex; align-items: center;
}
.btn-tarjous:hover {
    background: var(--orange-hover); transform: translateY(-1px);
    box-shadow: var(--shadow-glow); color: var(--white);
}

/* =============================================
   FIBOSEARCH – Glass header style
   ============================================= */
.dgwt-wcas-st-label-in {
    display: none;
}

/* Wrapper – kiinteä tila, estää layout shiftin */
.header-search-wrap {
    width: 332px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
/* Piilota FiboSearchin latausanimaatiot */
.header-search-wrap .dgwt-wcas-preloader,
.header-search-wrap .dgwt-wcas-ico-magnifier-handler { visibility: hidden; }
.header-search-wrap .dgwt-wcas-suggestions-wrapp-initialized .dgwt-wcas-ico-magnifier-handler { visibility: visible; }
.header-search-wrap > * {
    width: 100%;
}

/* Hakuboksi kiinni – glass pill */
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open) .dgwt-wcas-sf-wrapp {
    background: 0 0;
    padding: 2px;
    border-radius: var(--pill);
}
html:not(.dgwt-wcas-overlay-mobile-on)
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}
html:not(.dgwt-wcas-overlay-mobile-on)
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact.dgwt-wcas-search-focused:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    border-width: 2px;
    transition-duration: 200ms;
}
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    padding: 10px 16px 10px 48px;
    line-height: normal;
    font-size: 14px;
    color: var(--white);
    font-family: var(--font);
    height: 40px;
}
.dgwt-wcas-style-pirx.dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    padding-left: 16px !important;
}
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder {
    color: var(--white);
    opacity: 0.5;
    font-weight: 400;
}
/* Submit-nappi – glass circle, 32px */
.dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
}
.dgwt-wcas-style-pirx.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
    fill: var(--white);
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: 0 0 0 1px rgba(228, 228, 228, 0.37);
    border-radius: 100%;
    padding: 14px;
    transition-duration: 200ms;
}
.dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
    background: rgba(255, 255, 255, 0.28);
}
/* Close-ikoni */
.dgwt-wcas-preloader.dgwt-wcas-close svg path {
    fill: var(--white) !important;
}
/* Hakutulokset dropdown */
.dgwt-wcas-open-pirx .dgwt-wcas-open .dgwt-wcas-suggestions-wrapp,
.dgwt-wcas-open-pirx .dgwt-wcas-open.dgwt-wcas-nores .dgwt-wcas-suggestions-wrapp {
    border-radius: var(--radius);
    margin-top: 9px;
}

/* ── FiboSearch: Mobiili-kuvake – glass circle ── */
.header-search-wrap .dgwt-wcas-search-icon,
.header-search-wrap .js-dgwt-wcas-search-icon-handler {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.15s;
    cursor: pointer;
}
.header-search-wrap .dgwt-wcas-search-icon:hover,
.header-search-wrap .js-dgwt-wcas-search-icon-handler:hover {
    background: rgba(255, 255, 255, 0.14);
}
.header-search-wrap .dgwt-wcas-search-icon svg,
.header-search-wrap .js-dgwt-wcas-search-icon-handler svg {
    fill: var(--white);
    width: 18px;
    height: 18px;
    opacity: 0.8;
}

/* ── FiboSearch: Mobiili-overlay – musta input-teksti ── */
.dgwt-wcas-overlay-mobile-on .dgwt-wcas-search-input {
    color: var(--text) !important;
}
.dgwt-wcas-overlay-mobile-on .dgwt-wcas-search-input::placeholder {
    color: var(--gray-400) !important;
    font-weight: 400 !important;
}

/* Ostoskori – glass circle */
.header-cart-btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--white);
    transition: background 0.15s;
    flex-shrink: 0;
}
.header-cart-btn:hover { background: rgba(255, 255, 255, 0.14); }
.header-cart-btn svg { stroke: var(--white); width: 20px; height: 20px; }
.header-cart-count {
    position: absolute; top: -4px; right: -4px;
    background: var(--orange); color: var(--white);
    font-size: 9px; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.header-cart-count--pulse {
    animation: cartPulse .5s ease-out;
}
@keyframes cartPulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 85, 0, .55); }
    40%  { transform: scale(1.35); box-shadow: 0 0 0 8px rgba(255, 85, 0, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(255, 85, 0, 0); }
}

/* Oma tili -nappi */
.header-account-btn {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: var(--white);
    transition: background 0.15s;
    flex-shrink: 0;
}
.header-account-btn:hover { background: rgba(255, 255, 255, 0.14); }
.header-account-btn svg { stroke: var(--white); width: 20px; height: 20px; }

/* ── Row 2: category nav + Pro/Koti ── */
.header-row--nav {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 44px;
}
.header-row--nav .header-row-inner {
    padding-top: 0; padding-bottom: 0;
}

/* Category nav */
.nav-cats {
    display: flex; align-items: stretch;
    justify-content: space-between;
    flex-wrap: wrap; flex: 1;
    position: relative;
}
.nav-item { position: static; z-index: 1; }
.nav-item:hover { z-index: 10; }
.nav-item > a {
    display: flex; align-items: center; gap: 5px;
    padding: 12px 0; color: var(--white);
    font-size: 14px; font-weight: 500; white-space: nowrap;
    transition: opacity 0.15s;
}
.nav-item > a:hover { opacity: 0.7; color: var(--white); }
.nav-chevron {
    opacity: 0.4; margin-left: 2px; flex-shrink: 0;
    transition: transform 0.2s ease, opacity 0.2s;
}
.nav-item:hover .nav-chevron {
    opacity: 0.8; transform: rotate(180deg);
}

/* Dropdown */
.nav-item:hover .dropdown { display: block; animation: dropIn 0.22s var(--ease); }
@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    width: 100%;
    padding-top: 8px;
    z-index: 95;
}
.dropdown__inner {
    background: var(--white);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
    border-radius: var(--radius);
    padding: 0;
    position: relative;
    display: grid; grid-template-columns: 1fr 300px;
    overflow: hidden;
}
.dropdown__inner::before { display: none; }
/* Väkänen osoittaa aktiiviseen nav-itemiin */
.nav-item:hover > .dropdown::before {
    content: ''; position: absolute; top: 3px;
    left: var(--caret-left, 40px);
    width: 12px; height: 12px; background: var(--white);
    transform: rotate(45deg);
    border-radius: 2px; z-index: 96;
    box-shadow: -1px -1px 2px rgba(0, 0, 0, 0.04);
}
/* Vasen puoli: otsikko + kategorialinkit */
.dropdown__main {
    padding: 28px 32px 24px;
}
.dropdown__title {
    font-size: 22px; font-weight: 700; color: var(--navy);
    margin-bottom: 20px; line-height: 1.2;
}
.dropdown__cols {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px;
}
.dropdown a {
    display: block; padding: 7px 0; font-size: 14px;
    color: var(--gray-600); font-weight: 400;
    transition: color 0.12s;
    line-height: 1.4;
    opacity: 1;
    border-bottom: 1px solid var(--gray-100);
}
.dropdown a:last-child { border-bottom: none; }
.dropdown a:hover { color: var(--navy); }
.dropdown a:hover::before { content: ''; display: inline-block; width: 0; height: 0; }
.dropdown a + a { margin-top: 0; }

/* Oikea puoli: nostopalsta */
.dropdown__promo {
    background: var(--gray-50); border-left: 1px solid var(--gray-100);
    padding: 24px 20px;
    display: flex; flex-direction: column; gap: 16px;
}
.dropdown__promo-label {
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; color: var(--gray-400);
}
.dropdown__promo-item {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; transition: opacity 0.15s;
}
.dropdown__promo-item:hover { opacity: 0.75; }
.dropdown__promo-item img {
    width: 64px; height: 64px; object-fit: contain;
    background: var(--white); border-radius: 8px;
    border: 1px solid var(--gray-200); flex-shrink: 0;
}
.dropdown__promo-item span {
    font-size: 13px; font-weight: 500; color: var(--text);
    line-height: 1.35;
}

/* Outlet badge */
.nav-badge {
    display: inline-block;
    background: var(--orange); color: var(--white);
    font-size: 9px; font-weight: 700; letter-spacing: 0.03em;
    padding: 1px 5px; border-radius: var(--pill);
    margin-left: 4px; vertical-align: middle;
    line-height: 1.5; position: relative; top: -1px;
}
.nav-item--outlet > a { font-weight: 600; }


/* =============================================
   HEADER – VALKOINEN (tuotesivu)
   body.single-product scope
   ============================================= */
/* Tausta: valkoinen heti, scrollatessa varjo */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-top {
    background: var(--white);
    box-shadow: var(--shadow-sm);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-top.header--scrolled {
    background: var(--white);
    backdrop-filter: none; -webkit-backdrop-filter: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}
/* Nav-rivi: tumma border */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-row--nav {
    border-top-color: var(--gray-200);
}
/* Nav-linkit: tummat */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-nav a,
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-nav .menu-item a {
    color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-nav a:hover,
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-nav .menu-item a:hover {
    color: var(--navy);
}
/* Kategoria-nav: tummat */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .nav-item > a {
    color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .nav-item > a:hover {
    opacity: 0.7; color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .nav-chevron {
    stroke: var(--gray-400);
}
/* Ostoskori: tumma */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-cart-btn {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-cart-btn:hover {
    background: var(--gray-200);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-cart-btn svg {
    stroke: var(--text);
}
/* Oma tili: tumma */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-account-btn {
    background: var(--gray-100);
    border-color: var(--gray-200);
    color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-account-btn:hover {
    background: var(--gray-200);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-account-btn svg {
    stroke: var(--text);
}
/* Hamburger: tumma */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .mobile-menu-toggle {
    background: var(--gray-100);
    border-color: var(--gray-200);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .mobile-menu-toggle span {
    background: var(--text);
}
/* Haku: tumma glass */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-search-wrap .dgwt-wcas-search-icon,
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-search-wrap .js-dgwt-wcas-search-icon-handler {
    background: var(--gray-100);
    border-color: var(--gray-200);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-search-wrap .dgwt-wcas-search-icon svg,
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .header-search-wrap .js-dgwt-wcas-search-icon-handler svg {
    fill: var(--text);
}
/* FiboSearch desktop: tumma input */
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    background: var(--gray-100);
    box-shadow: 0 0 0 1px var(--gray-200);
    backdrop-filter: none;
    color: var(--text);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder {
    color: var(--gray-400);
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    background: var(--gray-200);
    box-shadow: none;
}
:is(.single-product, .woocommerce-cart, .woocommerce-checkout, .blog:not(.home), .error404) .dgwt-wcas-style-pirx.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
    fill: var(--text);
}

/* =============================================
   HERO
   ============================================= */
.hero {
    background: var(--navy); position: relative; overflow: hidden;
    padding: 200px 0 80px;
    min-height: 600px;
    display: flex; align-items: center;
}

/* ── Video hero ── */
.hero--video .hero-video {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
}
@media (prefers-reduced-motion: reduce) {
    .hero--video .hero-video { display: none; }
}
.hero-tag {
    display: inline-block;
    font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 12px;
}

/* ── Ken Burns slideshow ── */
.hero-slide {
    position: absolute; inset: 0; overflow: hidden;
}
.hero-slide img {
    display: block; width: 100%; height: 100%;
    object-fit: cover;
}

/*
   APPROACH:
   - Zoom lives on <img> — runs the FULL 24s cycle nonstop, even when hidden.
   - Fade lives on parent .hero-slide — controls visibility independently.
   - Two different DOM elements = no interference, zoom never pauses.

   Each img zooms scale(1) → scale(1.14) over its visible window,
   but the animation spans the full 24s so it's already mid-zoom
   when the fade brings it into view.

   Timeline:
   0–8s   = slide 0
   8–16s  = slide 1
   16–24s = slide 2
*/

/* Z-stacking: higher = renders on top */
.hero-slide--0 { z-index: 3; }
.hero-slide--1 { z-index: 2; }
.hero-slide--2 { z-index: 1; }

/* FADE on the wrapper div — only opacity */
.hero-slide--0 { animation: fade0 24s linear infinite; }
.hero-slide--1 { animation: fade1 24s linear infinite; }
.hero-slide--2 { animation: fade2 24s linear infinite; }

/* ZOOM on the img — runs full 24s, never stops */
.hero-slide--0 img { animation: zoom0 24s linear infinite; }
.hero-slide--1 img { animation: zoom1 24s linear infinite; }
.hero-slide--2 img { animation: zoom2 24s linear infinite; }

/* ── Fade keyframes (opacity only) ──
   CRITICAL: Next slide reaches opacity:1 BEFORE current starts fading.
   This eliminates the dark flash between slides.
   Overlap window: ~4% = ~1s where both are visible */

@keyframes fade0 {
    0%    { opacity: 1; }
    28%   { opacity: 1; }
    34%   { opacity: 0; }
    95%   { opacity: 0; }
    100%  { opacity: 1; }
}
@keyframes fade1 {
    0%    { opacity: 0; }
    28%   { opacity: 0; }
    32%   { opacity: 1; }
    61%   { opacity: 1; }
    67%   { opacity: 0; }
    100%  { opacity: 0; }
}
@keyframes fade2 {
    0%    { opacity: 0; }
    61%   { opacity: 0; }
    65%   { opacity: 1; }
    95%   { opacity: 1; }
    100%  { opacity: 0; }
}

/* ── Zoom keyframes (transform only, full 24s cycle) ──
   Zoom runs during visible window + a bit beyond for crossfade.
   Reset uses a 4% window (not 1%) while fully hidden. */

@keyframes zoom0 {
    0%    { transform: scale(1); }
    35%   { transform: scale(1.14); }
    40%   { transform: scale(1); }
    95%   { transform: scale(1); }
    100%  { transform: scale(1); }
}
@keyframes zoom1 {
    0%    { transform: scale(1); }
    27%   { transform: scale(1); }
    28%   { transform: scale(1); }
    68%   { transform: scale(1.14); }
    73%   { transform: scale(1); }
    100%  { transform: scale(1); }
}
@keyframes zoom2 {
    0%    { transform: scale(1); }
    60%   { transform: scale(1); }
    100%  { transform: scale(1.14); }
}

/* Dark overlay */
.hero-overlay {
    position: absolute; inset: 0; z-index: 4;
    background: linear-gradient(
        180deg,
        rgba(10, 24, 56, 0.55) 0%,
        rgba(10, 24, 56, 0.45) 50%,
        rgba(10, 24, 56, 0.6) 100%
    );
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide, .hero-slide img { animation: none !important; }
    .hero-slide--0 { opacity: 1; }
    .hero-slide--1, .hero-slide--2 { opacity: 0; }
}
.hero .container { position: relative; z-index: 5; text-align: center; }
.hero h1 {
    font-size: clamp(28px, 4vw, 48px); font-weight: 700; color: var(--white);
    line-height: 1.15; margin-bottom: 24px; letter-spacing: -0.3px;
}
.hero-divider {
    width: 40px; height: 4px; background: var(--white);
    margin: 0 auto 36px; border-radius: var(--pill);
}

/* ── Hero search – larger FiboSearch ── */
.hero-search {
    max-width: 560px;
    margin: 0 auto;
}
.hero-search .dgwt-wcas-search-wrapp {
    width: 100% !important;
    max-width: 100% !important;
}

/* Hero FiboSearch: bigger glass pill */
.hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open) .dgwt-wcas-sf-wrapp {
    background: 0 0;
    padding: 2px;
    border-radius: var(--pill);
}
.hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    padding: 14px 20px 14px 60px;
    line-height: normal;
    font-size: 16px;
    color: var(--white);
    font-family: var(--font);
    height: 56px;
    border-radius: var(--pill);
}
.hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input::placeholder {
    color: var(--white);
    opacity: 0.5;
    font-weight: 400;
}
.hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact.dgwt-wcas-search-focused:not(.dgwt-wcas-open)
.dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    border-width: 2px;
}
.hero-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
    opacity: 0.8;
    background: rgba(255, 255, 255, 0.17);
    box-shadow: 0 0 0 1px rgba(228, 228, 228, 0.37);
    border-radius: 100%;
    padding: 16px;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
}
.hero-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit:hover {
    background: rgba(255, 255, 255, 0.28);
}
.hero-search .dgwt-wcas-style-pirx.dgwt-wcas-has-submit .dgwt-wcas-search-submit svg path {
    fill: var(--white);
}
.hero-search .dgwt-wcas-search-filled .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
    padding-left: 20px !important;
}
.hero-search .dgwt-wcas-preloader,
.hero-search .dgwt-wcas-ico-magnifier-handler { visibility: hidden; }
.hero-search .dgwt-wcas-suggestions-wrapp-initialized .dgwt-wcas-ico-magnifier-handler { visibility: visible; }
.hero-search .dgwt-wcas-st-label-in { display: none; }

/* ── Hero search: mobiiliskaalaus ── */
@media (max-width: 768px) {
    .hero-search { max-width: 100%; }
    .hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
    .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
        height: 50px;
        font-size: 15px;
        padding: 12px 18px 12px 54px;
    }
    .hero-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
        width: 36px; height: 36px; padding: 14px; left: 7px;
    }
}
@media (max-width: 560px) {
    .hero-search .dgwt-wcas-style-pirx.dgwt-wcas-style-pirx-compact:not(.dgwt-wcas-open)
    .dgwt-wcas-sf-wrapp input[type=search].dgwt-wcas-search-input {
        height: 46px;
        font-size: 14px;
        padding: 10px 16px 10px 50px;
    }
    .hero-search .dgwt-wcas-style-pirx .dgwt-wcas-sf-wrapp button.dgwt-wcas-search-submit {
        width: 32px; height: 32px; padding: 12px; left: 7px;
    }
}

/* =============================================
   SEASON BANNER - nostokortti, FINNKONE watermark
   Menee heron paalle negatiivisella marginilla
   ============================================= */
/* ── Promo-banneri (kokoleveä kuva) ── */
.promo-banner {
    padding: 0;
    margin-top: -48px;
    position: relative;
    z-index: 6;
}
.promo-banner__link {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}
.promo-banner__link:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}
.promo-banner__link img {
    display: block; width: 100%; height: auto;
    object-fit: cover;
}

/* =============================================
   SESONKIBANNERI (legacy – säilytetään varalta)
   ============================================= */
.season-sec {
    padding: 0;
    margin-top: -48px;
    position: relative;
    z-index: 6;
}
.season-card {
    background: var(--navy-dark);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.3s;
    min-height: 240px;
}
.season-card:hover { box-shadow: var(--shadow-md); }

/* FINNKONE watermark taustalla */
.season-watermark {
    position: absolute;
    bottom: -0.15em;
    left: 40px;
    font-size: clamp(56px, 9vw, 110px);
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.04);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    text-transform: uppercase;
    line-height: 1;
}

.season-body {
    flex: 1;
    padding: 40px 56px;
    position: relative;
    z-index: 2;
}
.season-tag {
    display: inline-block;
    color: #7ab1ef;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.season-body h2 {
    font-size: clamp(18px, 2.5vw, 26px);
    font-weight: 700;
    color: var(--white);
    line-height: 1.25;
    margin-bottom: 20px;
}

.season-visual {
    flex: 0 0 380px;
    padding: 24px 48px;
    text-align: center;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.season-visual img {
    max-height: 260px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}
.season-visual p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 10px;
    letter-spacing: 0.02em;
}

/* =============================================
   SECTION HEADINGS
   ============================================= */
.sec-title {
    font-size: clamp(20px, 2.8vw, 28px); font-weight: 700;
    color: var(--text); margin-bottom: 22px;
}
.sec-title-white { color: var(--white); }
.sec-header {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 22px; gap: 16px;
}
.sec-header .sec-title { margin-bottom: 0; }
.sec-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--navy);
    text-decoration: none; white-space: nowrap; transition: opacity 0.2s;
}
.sec-link:hover { opacity: 0.7; }
.sec-link svg { flex-shrink: 0; transition: transform 0.2s; }
.sec-link:hover svg { transform: translateX(3px); }

/* =============================================
   PRODUCT CAROUSEL
   ============================================= */
.products-sec { padding: 36px 0 12px; }
.carousel-wrap { position: relative; }
.carousel-track {
    display: flex; gap: 16px; overflow-x: auto; overflow-y: hidden;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 0;
    margin: -4px 0;
}
.carousel-track::-webkit-scrollbar { display: none; }

/* 4 korttia containeriin – venyy jos vähemmän */
.carousel-track > .pc-card {
    flex: 1 0 calc((100% - 48px) / 4);
    max-width: calc((100% - 48px) / 4);
    scroll-snap-align: start;
    min-width: 0;
}
/* Alle 4 korttia: salli venyminen */
.carousel-track > .pc-card:first-child:nth-last-child(-n+4),
.carousel-track > .pc-card:first-child:nth-last-child(-n+4) ~ .pc-card {
    max-width: none;
}
.carousel-track > .pc-card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
}

.p-card {
    flex: 0 0 205px; scroll-snap-align: start;
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-100);
    overflow: hidden; transition: all 0.25s var(--ease);
}
.p-card:hover { box-shadow: var(--shadow-md); border-color: var(--gray-200); transform: translateY(-3px); }
.p-card-img {
    background: var(--white); height: 190px;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; position: relative; overflow: hidden;
}
.p-card-img img { max-height: 160px; object-fit: contain; transition: transform 0.3s; }
.p-card:hover .p-card-img img { transform: scale(1.04); }

/* Sale badge */
.p-card-badge {
    position: absolute; top: 10px; left: 10px;
    background: var(--orange); color: var(--white);
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: var(--pill); letter-spacing: 0.03em;
}

/* Quick-action button on card */
.p-card-action {
    position: absolute; bottom: 10px; right: 10px;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--orange); border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
    opacity: 0; transform: translateY(4px);
}
.p-card:hover .p-card-action { opacity: 1; transform: translateY(0); }
.p-card-action:hover { background: var(--orange-hover); transform: scale(1.1); }
.p-card-action svg { width: 14px; height: 14px; fill: var(--white); }

/* RFQ action (gray) */
.p-card-action--rfq { background: var(--gray-800); }
.p-card-action--rfq:hover { background: var(--navy); }

.p-card-body { padding: 12px 14px 16px; }
.p-card-brand { font-size: 14px; color: var(--gray-500); margin-bottom: 3px; font-weight: 400; }
.p-card-body h3 { font-size: 14px; font-weight: 600; line-height: 1.35; color: var(--text); margin-bottom: 6px; }

/* Hinta */
.p-card-price { font-size: 14px; font-weight: 700; color: var(--orange); }
.p-card-price-old { font-size: 14px; color: var(--gray-500); text-decoration: line-through; margin-left: 6px; font-weight: 400; }

/* Lue lisää / Pyydä tarjous link */
.p-card-link {
    font-size: 14px; font-weight: 500; color: var(--gray-500);
    display: inline-flex; align-items: center; gap: 4px;
}
.p-card-link:hover { color: var(--orange); }

/* Tarjouspyyntö-hinta (korvaa hinnan) */
.b2b-price-rfq {
    font-size: 14px; font-weight: 600; color: var(--navy);
}

/* =============================================
   CAROUSEL ARROWS & DOTS
   ============================================= */

/* Footer-rivi: pallot vasemmalla, nuolet oikealla */
.carousel-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 18px;
}
.c-arrows {
    display: flex; gap: 8px; flex-shrink: 0;
}

.c-arrow {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--text); border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s;
}
.c-arrow:hover { background: var(--gray-800); transform: scale(1.06); }
.c-arrow svg { width: 17px; height: 17px; fill: var(--white); }

.c-dots { display: flex; gap: 7px; align-items: center; }
.c-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--gray-200); border: none;
    transition: all 0.2s; cursor: pointer;
}
.c-dot.active { background: var(--text); width: 24px; border-radius: var(--pill); }

/* Carousel pc-card responsive */
@media (max-width: 1060px) {
    .carousel-track > .pc-card {
        flex: 1 0 calc((100% - 32px) / 3);
        max-width: calc((100% - 32px) / 3);
    }
    .carousel-track > .pc-card:first-child:nth-last-child(-n+3),
    .carousel-track > .pc-card:first-child:nth-last-child(-n+3) ~ .pc-card {
        max-width: none;
    }
}
@media (max-width: 768px) {
    .carousel-track > .pc-card {
        flex: 1 0 calc((100% - 10px) / 2);
        max-width: calc((100% - 10px) / 2);
    }
    .carousel-track > .pc-card:first-child:nth-last-child(-n+2),
    .carousel-track > .pc-card:first-child:nth-last-child(-n+2) ~ .pc-card {
        max-width: none;
    }
    .carousel-track { gap: 10px; }
    .c-arrow { width: 32px; height: 32px; }
    .c-arrow svg { width: 15px; height: 15px; }
    .c-arrows { gap: 6px; }
    .carousel-footer { padding-top: 14px; }
    .c-dot { width: 7px; height: 7px; }
    .c-dot.active { width: 20px; }
}
@media (max-width: 560px) {
    .carousel-track > .pc-card {
        flex: 1 0 calc((100% - 8px) / 2);
        max-width: calc((100% - 8px) / 2);
    }
    .carousel-track > .pc-card:first-child:nth-last-child(-n+2),
    .carousel-track > .pc-card:first-child:nth-last-child(-n+2) ~ .pc-card {
        max-width: none;
    }
    .carousel-track { gap: 8px; }
    .c-arrow { width: 30px; height: 30px; }
    .c-arrow svg { width: 14px; height: 14px; }
    .carousel-footer { padding-top: 12px; }
}

/* =============================================
   CTA SPLIT SECTION
   ============================================= */
.cta-sec { padding: 36px 0; }
.cta-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 20px; align-items: stretch; }

/* Left – dark navy panel */
.cta-left {
    background: var(--navy); border-radius: var(--radius-lg);
    padding: 34px 30px; color: var(--white);
    display: flex; flex-direction: column;
    position: relative; overflow: hidden;
}
.cta-left::before {
    content: ''; position: absolute; top: -40%; right: -30%;
    width: 260px; height: 260px; border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 85, 0, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.cta-left .tag { font-size: 14px; font-weight: 500; color: rgba(255, 255, 255, 0.7); margin-bottom: 14px; letter-spacing: 0.04em; text-transform: uppercase; }
.cta-left h3 { font-size: 19px; font-weight: 700; line-height: 1.3; margin-bottom: 14px; position: relative; }
.cta-left > p { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); line-height: 1.65; margin-bottom: 22px; flex: 1; position: relative; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 8px; position: relative; }

/* Right – services glass grid */
.cta-right { display: flex; flex-direction: column; gap: 6px; }
.cta-right-label { font-size: 14px; font-weight: 500; color: var(--gray-500); margin-bottom: 8px; letter-spacing: 0.02em; }
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; flex: 1; }
.svc-card {
    background: var(--gray-50); border-radius: var(--radius);
    padding: 22px 18px; display: flex; flex-direction: column;
    justify-content: space-between; min-height: 110px;
    border: 1px solid var(--gray-100);
    transition: all 0.2s; cursor: pointer; position: relative; overflow: hidden;
}
.svc-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255, 85, 0, 0.03) 0%, transparent 60%);
    opacity: 0; transition: opacity 0.25s; border-radius: var(--radius);
}
.svc-card:hover { border-color: var(--gray-200); box-shadow: var(--shadow-sm); transform: translateY(-2px); }
.svc-card:hover::after { opacity: 1; }
.svc-card h4 { font-size: 14px; font-weight: 600; color: var(--text); line-height: 1.35; position: relative; z-index: 1; }
.svc-desc { font-size: 13px; color: var(--gray-500); line-height: 1.4; margin-top: 4px; position: relative; z-index: 1; }
.svc-arrow { margin-top: auto; padding-top: 12px; position: relative; z-index: 1; }
.svc-arrow svg { width: 22px; height: 11px; transition: transform 0.2s; }
.svc-card:hover .svc-arrow svg { transform: translateX(4px); }

/* =============================================
   VALIKOITUJA TUOTTEITA (selected products)
   ============================================= */
.selected-sec { padding: 36px 0; }
.sp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.sp-card {
    border: 1px solid var(--gray-100); border-radius: var(--radius);
    overflow: hidden; transition: all 0.25s; background: var(--white);
}
.sp-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gray-200); }
.sp-card-img {
    height: 180px; background: var(--white);
    display: flex; align-items: center; justify-content: center;
    padding: 16px; overflow: hidden;
}
.sp-card-img img { max-height: 150px; object-fit: contain; transition: transform 0.3s; }
.sp-card:hover .sp-card-img img { transform: scale(1.04); }
.sp-card-body { padding: 14px 16px 18px; }
.sp-brand { font-size: 10px; color: var(--orange); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.sp-card-body h3 { font-size: 13.5px; font-weight: 600; line-height: 1.3; margin-bottom: 3px; color: var(--text); }
.sp-sku { font-size: 10.5px; color: var(--gray-400); margin-bottom: 6px; }
.sp-desc { font-size: 11px; color: var(--gray-500); line-height: 1.5; }

/* =============================================
   TOIMIALAT (industries)
   ============================================= */
.toimialat-sec {
    background: var(--navy); padding: 56px 0;
    position: relative; overflow: hidden;
}
.toimialat-sec::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(255, 85, 0, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
}
.toimialat-sec .container { position: relative; z-index: 2; }
.ta-grid { display: grid; grid-template-columns: repeat(3, 1fr) 1.3fr; gap: 14px; }
.ta-card {
    border-radius: var(--radius); overflow: hidden; position: relative;
    height: 210px; cursor: pointer;
}
.ta-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 60%);
    transition: opacity 0.25s;
}
.ta-card:hover::after { background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.1) 60%); }
.ta-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.ta-card:hover img { transform: scale(1.06); }
.ta-label {
    position: absolute; bottom: 14px; left: 14px; z-index: 2;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--white); font-size: 14px; font-weight: 500;
    padding: 5px 14px; border-radius: var(--pill);
    transition: all 0.2s;
}
.ta-card:hover .ta-label { background: rgba(255, 255, 255, 0.18); }

/* CTA card in toimialat */
.ta-cta {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius); padding: 28px;
    display: flex; flex-direction: column; justify-content: center;
}
.ta-cta h3 { font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.3; margin-bottom: 10px; }
.ta-cta p { font-size: 14px; color: rgba(255, 255, 255, 0.7); line-height: 1.55; margin-bottom: 18px; }

/* =============================================
   BLOGI
   ============================================= */
.blog-sec { padding: 56px 0; }
.blog-sec-header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.blog-sec-header .sec-title { margin-bottom: 0; }
.blog-archive-link {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 600; color: var(--navy);
    text-decoration: none; white-space: nowrap; transition: opacity 0.2s;
}
.blog-archive-link:hover { opacity: 0.7; }
.blog-archive-link svg { flex-shrink: 0; transition: transform 0.2s; }
.blog-archive-link:hover svg { transform: translateX(3px); }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.blog-card {
    border-radius: var(--radius); overflow: hidden;
    border: 1px solid var(--gray-100);
    transition: all 0.25s; background: var(--white);
}
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: var(--gray-200); }
.blog-card-img { height: 190px; overflow: hidden; }
.blog-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 18px 18px 22px; }
.blog-card-body h3 { font-size: 15px; font-weight: 600; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.blog-card-body p { font-size: 14px; color: var(--gray-500); line-height: 1.55; }

/* =============================================
   404 PAGE
   ============================================= */
.error-404 {
    padding: 220px 0 80px;
    text-align: center;
    min-height: 60vh;
    display: flex; align-items: center;
}
.error-404__inner { max-width: 540px; margin: 0 auto; }
.error-404__code {
    display: block;
    font-size: clamp(80px, 15vw, 160px);
    font-weight: 700;
    color: var(--navy);
    opacity: 0.08;
    line-height: 1;
    margin-bottom: -20px;
}
.error-404 h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.error-404 p {
    font-size: 16px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 28px;
}
.error-404__search {
    max-width: 400px;
    margin: 0 auto 24px;
}
.error-404__actions {
    display: flex; gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =============================================
   BLOG ARCHIVE (home.php)
   ============================================= */
.blog-archive { padding: 220px 0 60px; }
.blog-archive__header {
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--gray-100);
}
.blog-archive__header h1 {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}
.blog-archive__header p {
    font-size: 16px;
    color: var(--gray-500);
    line-height: 1.6;
}
.blog-grid--archive {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.blog-card-date {
    display: block;
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 6px;
}
.blog-grid--archive .blog-card-body h2 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text);
}
.blog-card-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: var(--gray-50);
    color: var(--gray-300);
}
.blog-card-readmore {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14px; font-weight: 600; color: var(--navy);
    margin-top: 8px;
    transition: gap 0.2s;
}
.blog-card:hover .blog-card-readmore { gap: 10px; }
.blog-archive__empty {
    text-align: center;
    padding: 60px 0;
    color: var(--gray-500);
    font-size: 16px;
}
.blog-archive__empty .btn { margin-top: 16px; }

/* Blog pagination */
.blog-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
}
.blog-pagination ul {
    display: flex;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}
.blog-pagination li a,
.blog-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
    transition: all 0.15s;
    text-decoration: none;
}
.blog-pagination li a:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--navy);
}
.blog-pagination li span.current {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}
.blog-pagination li .prev,
.blog-pagination li .next {
    border: none;
    padding: 0 8px;
}

/* =============================================
   REFERENSSIT
   ============================================= */
.ref-sec { padding: 36px 0 56px; }
.ref-wrap { position: relative; }
.ref-card {
    display: flex; gap: 24px; align-items: flex-start; max-width: 620px;
    background: var(--gray-50); border-radius: var(--radius-lg);
    padding: 20px; border: 1px solid var(--gray-100);
    transition: box-shadow 0.25s;
}
.ref-card:hover { box-shadow: var(--shadow-md); }
.ref-card-img { flex: 0 0 200px; border-radius: var(--radius); overflow: hidden; }
.ref-card-img img { width: 100%; height: 160px; object-fit: cover; }
.ref-card-body h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.ref-card-body p { font-size: 12px; color: var(--gray-500); line-height: 1.6; }

/* =============================================
   FOOTER
   ============================================= */
.footer {
    background: var(--navy-deep); color: var(--white);
    padding: 52px 0 32px; position: relative; overflow: hidden;
}
.footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px; margin-bottom: 36px;
}
.footer h4 {
    font-size: 14px; font-weight: 600; margin-bottom: 16px;
    color: var(--white); text-transform: uppercase; letter-spacing: 0.06em;
}
.footer-contact .fc-label {
    font-size: 14px; color: rgba(255, 255, 255, 0.7);
    display: block; margin-bottom: 1px;
    text-transform: uppercase; letter-spacing: 0.04em;
}
.footer-contact a {
    display: block; font-size: 14px; color: rgba(255, 255, 255, 0.85);
    margin-bottom: 14px; transition: color 0.12s;
}
.footer-contact a:hover { color: var(--orange); }
.footer-links a {
    display: block; font-size: 14px; color: rgba(255, 255, 255, 0.7);
    padding: 3px 0; transition: color 0.12s;
}
.footer-links a:hover { color: var(--orange); }

/* Trust badges – glass */
.trust-badges { display: flex; gap: 16px; margin-top: 8px; }
.trust-badge {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius); padding: 20px 24px;
    display: flex; align-items: center; justify-content: center;
    min-height: 100px; flex: 1;
}
.trust-badge img { max-width: 140px; height: auto; display: block; }
.trust-badge span { font-size: 14px; color: rgba(255, 255, 255, 0.7); text-align: center; line-height: 1.35; font-weight: 500; }

.footer-payment {
    text-align: center; padding: 24px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.footer-payment img { max-width: 460px; width: 100%; height: auto; opacity: 0.7; }

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 22px; display: flex; align-items: center;
    justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.social-icons { display: flex; gap: 10px; }
.social-icon {
    width: 34px; height: 34px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.social-icon:hover { background: var(--orange); border-color: var(--orange); }
.social-icon svg { width: 14px; height: 14px; fill: var(--white); }
.footer-bottom-links { display: flex; gap: 18px; }
.footer-bottom-links a { font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.footer-bottom-links a:hover { color: var(--orange); }
.footer-credit { font-size: 14px; color: rgba(255, 255, 255, 0.55); }
.footer-credit a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.12s; }
.footer-credit a:hover { color: var(--orange); }

/* =============================================
   WOOCOMMERCE OVERRIDES
   ============================================= */

/* Notification badges */
.woocommerce-message,
.woocommerce-info {
    background: var(--gray-50); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 14px 20px;
    font-size: 13px; color: var(--text);
    border-left: 3px solid var(--navy);
}
.woocommerce-error {
    background: #fef2f2; border: 1px solid #fecaca;
    border-radius: var(--radius); padding: 14px 20px;
    font-size: 13px; color: #991b1b;
    border-left: 3px solid #dc2626;
}
.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before { display: none; }

/* WC buttons → pill style */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce .button {
    background: var(--navy) !important;
    color: var(--white) !important;
    border-radius: var(--pill) !important;
    font-family: var(--font) !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    padding: 10px 26px !important;
    border: none !important;
    transition: all 0.2s !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
    background: var(--navy-dark) !important;
    transform: translateY(-1px);
}
.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: var(--orange) !important;
}
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
    background: var(--orange-hover) !important;
}

/* Mini cart type indicator */
.b2b-mini-cart__type {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 2px 8px;
    border-radius: var(--pill);
}
.b2b-mini-cart__type--normal { background: var(--navy); color: var(--white); }
.b2b-mini-cart__type--rfq { background: rgba(255, 255, 255, 0.15); color: var(--white); }

/* =============================================
   MODAL (cart conflict)
   ============================================= */
.b2b-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 500; display: none;
    align-items: center; justify-content: center;
    padding: 24px;
}
.b2b-modal-overlay--active { display: flex; }
.b2b-modal {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 32px; max-width: 440px; width: 100%;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s var(--ease);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.b2b-modal__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.b2b-modal__text { color: var(--gray-500); font-size: 13px; margin-bottom: 24px; line-height: 1.55; }
.b2b-modal__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* =============================================
   SINGLE PRODUCT PAGE
   ============================================= */
/* =============================================
   SINGLE PRODUCT PAGE
   ============================================= */
.sp-page {
    padding: 206px 0 60px;
    background: var(--white);
}

/* Topbar: takaisin-nappi + breadcrumb */
.sp-topbar {
    display: flex; align-items: center; gap: 24px;
    margin-bottom: 20px;
    justify-content: flex-start;
}
.sp-back {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 500; color: var(--gray-400);
    white-space: nowrap; flex-shrink: 0;
    transition: color 0.15s;
}
.sp-back:hover { color: var(--navy); }
.sp-back svg { transition: transform 0.15s; }
.sp-back:hover svg { transform: translateX(-2px); }

/* Breadcrumb: yksi rivi, scrollattava, fade-reunat */
.sp-breadcrumb {
    position: relative;
    overflow: hidden;
}
.sp-breadcrumb::after {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 48px; height: 100%;
    background: linear-gradient(to right, transparent, var(--white));
    pointer-events: none; z-index: 1;
}
.sp-breadcrumb__inner {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--gray-400);
    white-space: nowrap;
    overflow-x: auto; scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-right: 48px;
}
.sp-breadcrumb__inner::-webkit-scrollbar { display: none; }
.sp-breadcrumb__inner span { display: inline-flex; align-items: center; flex-shrink: 0; }
.sp-breadcrumb__inner a { color: var(--gray-400); transition: color 0.15s; }
.sp-breadcrumb__inner a:hover { color: var(--navy); }
.sp-breadcrumb__inner svg { opacity: 0.4; flex-shrink: 0; }

/* Layout: 2-kolumni */
.sp-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* ── Galleria ── */
.sp-gallery {
    position: sticky;
    top: 50px;
    align-self: start;
    max-height: calc(100vh - 100px);
    min-width: 0;
}
.admin-bar .sp-gallery {
    top: 82px;
}
.sp-gallery__main {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex; align-items: center; justify-content: center;
}
/* 3% dark overlay on product image */
.sp-gallery__main::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    z-index: 1;
    border-radius: var(--radius-lg);
}

/* ── Gallery arrows ── */
.sp-gallery__arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 3;
    width: 48px; height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--navy);
    color: var(--white);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.25s, transform 0.2s;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}
.sp-gallery__main:hover .sp-gallery__arrow { opacity: 0.85; }
.sp-gallery__arrow:hover { opacity: 1 !important; transform: translateY(-50%) scale(1.08); }
.sp-gallery__arrow:active { transform: translateY(-50%) scale(0.95); }
.sp-gallery__arrow--prev { left: 14px; }
.sp-gallery__arrow--next { right: 14px; }
.sp-gallery__arrow--hidden { opacity: 0 !important; pointer-events: none; }

/* ── Gallery crossfade + slide animations ── */
.sp-gallery__img--fade-out {
    opacity: 0;
    transition: opacity 0.15s ease-out;
}
.sp-gallery__img--slide-left {
    opacity: 0;
    transform: translateX(24px);
}
.sp-gallery__img--slide-right {
    opacity: 0;
    transform: translateX(-24px);
}
.sp-gallery__img--fade-in {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease-out, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.sp-gallery__video--fade-in {
    animation: spGalleryFadeIn 0.3s ease-out;
}
@keyframes spGalleryFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.sp-gallery__main--placeholder {
    color: var(--gray-300);
}
.sp-gallery__placeholder { color: var(--gray-300); }
.sp-gallery__img {
    width: 100%; height: 100%;
    object-fit: contain;
    object-position: left center;
    padding: 20px;
    transition: opacity 0.15s ease-out, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
/* Ei hover-efektiä – kuva ei ole klikattava */

/* Video container in gallery */
.sp-gallery__video {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: #000;
    border-radius: var(--radius-lg);
}
.sp-gallery__video iframe {
    width: 100%; height: 100%;
    border: none;
}

.sp-badge {
    position: absolute; top: 16px; left: 16px;
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 12px; border-radius: var(--pill);
    z-index: 2;
}
.sp-badge--sale { background: var(--orange); color: var(--white); }
.sp-badge--rfq { background: var(--navy); color: var(--white); }

.sp-gallery__thumbs-wrap {
    position: relative; display: flex; align-items: center;
    margin-top: 12px; gap: 0; min-width: 0; overflow: hidden;
}
.sp-gallery__thumbs-arrow {
    flex: 0 0 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 50%; cursor: pointer; color: var(--navy);
    transition: opacity 0.2s, background 0.15s;
    z-index: 2; padding: 0;
}
.sp-gallery__thumbs-arrow:hover { background: var(--gray-50); }
.sp-gallery__thumbs-arrow--hidden { opacity: 0; pointer-events: none; }
.sp-gallery__thumbs {
    display: flex; gap: 10px; flex: 1; min-width: 0;
    overflow-x: auto; scrollbar-width: none;
    padding: 0 8px 4px;
}
.sp-gallery__thumbs::-webkit-scrollbar { display: none; }
.sp-gallery__thumb {
    flex: 0 0 72px; height: 72px;
    border-radius: var(--radius);
    overflow: hidden; cursor: pointer;
    border: 2px solid transparent;
    background: var(--gray-50);
    transition: border-color 0.15s;
    padding: 0;
    position: relative;
}
.sp-gallery__thumb img {
    width: 100%; height: 100%; object-fit: contain; padding: 6px;
}
.sp-gallery__thumb:hover { border-color: var(--gray-300); }
.sp-gallery__thumb--active { border-color: var(--navy); }

/* Video thumbnail: play-ikoni */
.sp-gallery__thumb--video img { object-fit: cover; padding: 0; filter: brightness(0.7); }
.sp-gallery__thumb-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
}

/* ── Tuotetiedot ── */
.sp-info__cat {
    font-size: 13px; font-weight: 400; color: var(--gray-400);
    margin-bottom: 6px;
}
.sp-info__cat a { color: var(--gray-400); transition: color 0.15s; }
.sp-info__cat a:hover { color: var(--text); }

.sp-info__title {
    font-size: clamp(22px, 3vw, 32px);
    font-weight: 700; color: var(--text);
    line-height: 1.2; margin-bottom: 12px;
}

.sp-info__meta {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    margin-bottom: 20px;
    font-size: 13px;
}
.sp-info__sku { color: var(--gray-400); }
.sp-info__stock {
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 500;
}
.sp-info__stock--instock { color: #16a34a; }
.sp-info__stock--instock svg { stroke: #16a34a; }
.sp-info__stock--outofstock { color: #dc2626; }
.sp-info__stock--onbackorder { color: var(--orange); }
.sp-info__stock-qty { font-weight: 400; color: var(--gray-400); }

/* ── Hinta-blokki ── */
.sp-price-block {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}
.sp-price-block__top {
    display: flex; align-items: center;
    justify-content: space-between;
    gap: 16px; flex-wrap: nowrap;
}
.sp-price-block__prices {
    font-size: 28px; font-weight: 700; color: var(--text);
    line-height: 1.2;
    min-width: 0;
}
.sp-price-block__prices del {
    font-size: 18px; font-weight: 400; color: var(--gray-400);
    margin-right: 8px;
}
.sp-price-block__prices ins {
    text-decoration: none; color: var(--orange);
}
.sp-price-block__vat-label {
    font-size: 13px; font-weight: 400; color: var(--gray-400);
    margin-left: 4px;
}
.sp-price-block__vat-label--incl {
    color: var(--orange); font-weight: 500;
}
.sp-price-block__save {
    font-size: 13px; color: #16a34a; font-weight: 500;
    margin-top: 8px;
}
.sp-price-block__from {
    font-size: 14px; font-weight: 500;
    color: var(--gray-400);
    margin-right: 2px;
}

/* RFQ hintablokki */
.sp-price-block--rfq {
    background: var(--navy-deep);
    border-color: transparent;
}
.sp-price-block__prices--rfq {
    color: var(--white);
    font-size: 22px;
}
.sp-price-block--rfq .sp-price-block__rfq-sub {
    font-size: 12px; color: rgba(255,255,255,0.6);
    margin: 6px 0 0;
}

/* ALV-switcher (tuotesivu) */
.sp-vat-switcher {
    position: relative;
    display: flex; align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--pill); padding: 3px;
    flex-shrink: 0;
}
.sp-vat-switcher__slider {
    position: absolute; top: 3px;
    height: calc(100% - 6px);
    background: var(--navy);
    border-radius: var(--pill);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; z-index: 0;
}
.sp-vat-switcher__btn {
    position: relative; z-index: 1;
    padding: 5px 14px; border: none; border-radius: var(--pill);
    font-family: var(--font); font-size: 12px; font-weight: 600;
    cursor: pointer; transition: color 0.2s;
    background: transparent; color: var(--gray-400);
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.sp-vat-switcher__btn:hover { color: var(--gray-600); }
.sp-vat-switcher__btn--active { color: var(--white); }
.sp-vat-switcher__btn--active:hover { color: var(--white); }

/* Lyhytkuvaus (hinnan alla) */
.sp-info__short-desc {
    font-size: 14px; color: var(--gray-600);
    line-height: 1.6; margin-bottom: 24px;
}
.sp-info__short-desc p { margin-bottom: 8px; }
.sp-info__short-desc p:last-child { margin-bottom: 0; }

/* ── Tekniset tiedot (key specs) ── */
.sp-tech-specs {
    list-style: none; margin: 0; padding: 0 0 20px;
    display: flex; flex-direction: column; gap: 2px;
}
.sp-accordion__body > .sp-tech-specs { padding-top: 0; margin-top: -4px; }
.sp-tech-specs__item {
    font-size: 16px; line-height: 1.5;
    color: var(--gray-600);
    padding: 3px 0 3px 16px;
    position: relative;
    white-space: nowrap;
}
.sp-tech-specs__item::before {
    content: '';
    position: absolute; left: 0; top: 10px;
    width: 4px; height: 4px;
    background: var(--gray-300); border-radius: 50%;
}

/* ── Määrä + Lisää koriin ── */
.sp-add-to-cart { margin-bottom: 24px; }
.sp-add-to-cart__form {
    display: flex; gap: 12px; align-items: stretch;
}
.sp-qty-wrap {
    display: flex; align-items: stretch;
    border: 1px solid var(--gray-200);
    border-radius: var(--pill);
    overflow: hidden;
    background: var(--white);
}
.sp-qty-btn {
    width: 44px;
    display: flex; align-items: center; justify-content: center;
    background: transparent; border: none;
    color: var(--gray-400); cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.sp-qty-btn:hover { background: var(--gray-100); color: var(--text); }
.sp-qty-input {
    width: 48px; text-align: center;
    border: none; font-family: var(--font);
    font-size: 15px; font-weight: 600;
    color: var(--text); background: transparent;
    -moz-appearance: textfield;
}
.sp-qty-input::-webkit-inner-spin-button,
.sp-qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.sp-add-btn {
    flex: 1; justify-content: center;
    font-size: 15px; padding: 12px 32px;
    min-height: 48px;
}

/* ── Muunnelmavalinnat (radio chips) ── */
.sp-variations { margin-bottom: 20px; }
.sp-variation-row {
    border: none; padding: 0; margin: 0 0 16px;
}
.sp-variation-row__label {
    display: block;
    font-size: 14px; font-weight: 600;
    color: var(--navy);
    margin-bottom: 8px;
    padding: 0;
}
.sp-variation-row__options {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.sp-var-chip {
    position: relative;
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 48px;
    padding: 9px 18px;
    font-size: 14px; font-weight: 500; font-family: var(--font);
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
    user-select: none;
    -webkit-user-select: none;
}
.sp-var-chip:hover {
    border-color: var(--navy);
    background: rgba(0, 20, 50, 0.03);
}
.sp-var-chip--active {
    border-color: var(--navy);
    background: var(--navy);
    color: var(--white);
}
.sp-var-chip--active:hover {
    background: var(--navy);
    color: var(--white);
}
.sp-var-chip__input {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    border: 0;
}
.sp-var-chip__input:focus-visible + .sp-var-chip__text {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
    border-radius: 6px;
}
.sp-variation-reset { margin-top: 2px; }
.sp-variation-reset__btn {
    background: none; border: none;
    color: var(--gray-400);
    font-size: 13px; font-family: var(--font);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s;
}
.sp-variation-reset__btn:hover { color: var(--text); }

/* Disabled-tila: selkeä mutta pehmeä */
.sp-add-btn--variable:disabled {
    opacity: 1;
    cursor: not-allowed;
    background: var(--gray-100);
    color: var(--gray-400);
    border: 1.5px solid var(--gray-200);
    box-shadow: none;
}
.sp-add-btn--variable:not(:disabled) {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}
.sp-add-btn--variable:disabled:hover {
    background: var(--gray-100);
    transform: none;
    box-shadow: none;
}
.sp-add-btn--variable:disabled svg { stroke: var(--gray-300); }

/* ── Luottamus-nostot (matala hierarkia, inline) ── */
.sp-trust {
    display: flex; align-items: center; flex-wrap: wrap;
    gap: 0;
    margin-bottom: 28px;
    padding: 12px 0;
    border-top: 1px solid var(--gray-100);
    border-bottom: 1px solid var(--gray-100);
}
.sp-trust__item {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; color: var(--gray-500);
    padding: 2px 0;
}
.sp-trust__item svg {
    flex-shrink: 0;
    stroke: var(--gray-400);
}
.sp-trust__sep {
    width: 3px; height: 3px;
    border-radius: 50%;
    background: var(--gray-300);
    margin: 0 12px;
    flex-shrink: 0;
}

/* ── Accordion ── */
.sp-details {
    border-top: 1px solid var(--gray-200);
    margin-top: 8px;
}
.sp-accordion {
    border-bottom: 1px solid var(--gray-200);
}
.sp-accordion__head {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; padding: 16px 0;
    background: transparent; border: none;
    font-family: var(--font); font-size: 14px; font-weight: 600;
    color: var(--text); cursor: pointer;
    text-align: left;
}
.sp-accordion__head:hover { color: var(--navy); }
.sp-accordion__chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.4; flex-shrink: 0;
}
.sp-accordion__head[aria-expanded="true"] .sp-accordion__chevron {
    transform: rotate(180deg); opacity: 0.7;
}
.sp-accordion__body {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sp-accordion__body--open {
    max-height: 800px;
}
.sp-accordion__body > * {
    padding-bottom: 20px;
    font-size: 16px; color: var(--gray-600);
    line-height: 1.65;
}
.sp-accordion__body--open {
    max-height: 800px;
}
/* Tuotekuvaus-sisällön lista: margin-top */
.sp-accordion__body ul,
.sp-accordion__body ol {
    margin-top: 20px;
}
.sp-accordion__body p { margin-bottom: 8px; }

/* Tekniset tiedot taulukko */
.sp-specs {
    width: 100%; border-collapse: collapse;
}
.sp-specs th, .sp-specs td {
    padding: 10px 0;
    font-size: 16px;
    border-bottom: 1px solid var(--gray-100);
    text-align: left;
}
.sp-specs th {
    font-weight: 500; color: var(--gray-500);
    width: 40%;
}
.sp-specs td {
    font-weight: 500; color: var(--text);
}

/* ── Modal: ikoni ── */
.b2b-modal__icon {
    display: flex; align-items: center; justify-content: center;
    width: 48px; height: 48px;
    background: rgba(255, 85, 0, 0.08);
    border-radius: 12px;
    margin-bottom: 16px;
}

/* ── Lisää koriin -napin tilat ── */
.sp-add-btn { position: relative; overflow: hidden; }
.sp-add-btn__default,
.sp-add-btn__done {
    display: inline-flex; align-items: center; gap: 8px;
    transition: opacity 0.2s, transform 0.2s;
}
.sp-add-btn__spinner,
.sp-add-btn__done { display: none; }

/* Spinner */
.sp-add-btn__spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: sp-spin 0.6s linear infinite;
}
@keyframes sp-spin { to { transform: rotate(360deg); } }

/* Loading-tila */
.sp-add-btn--loading .sp-add-btn__default { display: none; }
.sp-add-btn--loading .sp-add-btn__spinner { display: inline-block; }
.sp-add-btn--loading { pointer-events: none; opacity: 0.85; }

/* Done-tila */
.sp-add-btn--done .sp-add-btn__default { display: none; }
.sp-add-btn--done .sp-add-btn__spinner { display: none; }
.sp-add-btn--done .sp-add-btn__done { display: inline-flex; }
.sp-add-btn--done {
    background: #16a34a; border-color: #16a34a;
    pointer-events: none;
}

/* Katso kori -linkki */
.sp-add-btn__cart-link {
    display: none; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--orange);
    margin-top: 8px;
    transition: color 0.15s;
    white-space: nowrap;
}
.sp-add-btn__cart-link:hover { color: var(--orange-hover); }
.sp-add-btn__cart-link svg { transition: transform 0.15s; }
.sp-add-btn__cart-link:hover svg { transform: translateX(2px); }
.sp-add-btn__cart-link--visible { display: inline-flex; }

/* ── Upsell & Cross-sell ── */
.sp-related {
    margin-top: 72px;
    padding-top: 48px;
    border-top: 1px solid var(--gray-200);
}
.sp-related--crosssell,
.sp-related--viewed {
    margin-top: 56px;
}
.sp-related__title {
    font-size: 20px; font-weight: 700; color: var(--text);
    margin-bottom: 20px;
}
/* Karuselli käyttää globaaleja .carousel-wrap, .carousel-track, .pc-card, .p-card-* tyylejä */

/* Tuotesivulla kortit eivät veny vaikka alle 4 kpl */
.sp-related .carousel-track > .pc-card:first-child:nth-last-child(-n+4),
.sp-related .carousel-track > .pc-card:first-child:nth-last-child(-n+4) ~ .pc-card {
    max-width: calc((100% - 48px) / 4);
}

/* ── Responsive – tuotesivu ── */
@media (max-width: 1060px) {
    .sp-layout { gap: 32px; }
}
@media (max-width: 768px) {
    .sp-page { padding: 160px 0 40px; }
    .sp-topbar { gap: 12px; margin-bottom: 20px; }
    .sp-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .sp-gallery { position: static; max-height: none; }
    .sp-gallery__main { aspect-ratio: 1 / 1; }
    .sp-gallery__img { padding: 16px; object-fit: contain; }
    .sp-price-block__top { gap: 10px; }
    .sp-price-block { padding: 14px 16px; }
    .sp-price-block__prices { font-size: 22px; }
    .sp-price-block__prices del { font-size: 15px; }
    .sp-price-block__vat-label { font-size: 12px; }
    .sp-vat-switcher__btn { font-size: 11px; padding: 4px 10px; }
    .sp-add-to-cart__form { flex-direction: row; }
    .sp-add-btn { flex: 1; min-width: 0; font-size: 14px; padding: 12px 16px; }
    .sp-trust { gap: 0; }
    .sp-trust__sep { margin: 0 8px; }
    .sp-related { margin-top: 40px; padding-top: 32px; }
    .sp-related .carousel-track > .pc-card:first-child:nth-last-child(-n+4),
    .sp-related .carousel-track > .pc-card:first-child:nth-last-child(-n+4) ~ .pc-card {
        max-width: calc((100% - 10px) / 2);
    }
    .sp-info__title { font-size: 22px; }
}
@media (max-width: 560px) {
    .sp-page { padding: 140px 0 32px; }
    .sp-trust { flex-direction: column; align-items: flex-start; gap: 4px; padding: 10px 0; }
    .sp-trust__sep { display: none; }
    .sp-gallery__thumbs { gap: 8px; padding: 0 0 4px; }
    .sp-gallery__thumb { flex: 0 0 60px; height: 60px; }
    .sp-gallery__thumbs-arrow { display: none; }
    .sp-gallery__arrow { width: 40px; height: 40px; opacity: 0.75; }
    .sp-gallery__arrow--prev { left: 8px; }
    .sp-gallery__arrow--next { right: 8px; }
    .sp-add-btn svg { display: none; }
    .sp-add-btn { font-size: 13px; padding: 12px 14px; }
    .sp-qty-wrap { flex-shrink: 0; }
    .sp-price-block__prices { font-size: 20px; }
    .sp-price-block__prices del { font-size: 14px; }
    .sp-vat-switcher__btn { font-size: 10px; padding: 3px 8px; }
    .sp-vat-switcher { padding: 2px; }
    .sp-topbar { gap: 16px; }
}


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1060px) {
    .cta-grid { grid-template-columns: 1fr; }
    .svc-grid { grid-template-columns: repeat(3, 1fr); }
    .ta-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .blog-grid--archive { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    /* Header: yksi rivi – piilota desktop-elementit */
    .header-nav { display: none; }
    .header-search-wrap { width: 44px; min-width: 44px; max-width: 44px; height: 44px; order: 1; flex-shrink: 0; }
    .header-search-wrap .dgwt-wcas-search-wrapp { width: 44px !important; min-width: 44px !important; max-width: 44px !important; height: 44px !important; }
    .header-search-wrap .dgwt-wcas-search-form { display: none !important; }
    .header-search-wrap .dgwt-wcas-search-icon-arrow { display: none !important; }
    .header-search-wrap > * { width: auto; max-width: 44px; }
    .header-cart-btn { order: 2; }
    .header-account-btn { order: 3; }
    .mobile-menu-toggle { order: 4; }
    .header-row--nav { display: none; }
    .header-phones { display: none; }
    .mobile-menu-toggle { display: flex !important; }

    /* Header rivi: logo + switcher + cart + burger */
    .header-row--main { padding: 10px 0; }
    .header-row--main .header-row-inner { gap: 12px; }
    .logo-img { height: 22px; width: 120px; }

    .season-card { flex-direction: column; min-height: auto; }
    .season-body { padding: 28px 28px 16px; text-align: center; }
    .season-visual { flex: none; width: 100%; padding: 0 28px 28px; }
    .season-watermark { font-size: 42px; left: 20px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-grid--archive { grid-template-columns: 1fr; }
    .error-404 { padding: 80px 0 60px; }
    .error-404__code { margin-bottom: -10px; }
    .ref-card { flex-direction: column; }
    .ref-card-img { flex: none; width: 100%; }
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }
    .ta-grid { grid-template-columns: 1fr 1fr; }
    .ta-cta { grid-column: span 2; }
    .svc-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
    .svc-grid { grid-template-columns: 1fr; }
    .ta-grid { grid-template-columns: 1fr; }
    .ta-cta { grid-column: span 1; }
    .p-card { flex: 0 0 170px; }
    .p-card-img { height: 150px; }
    .hero h1 { font-size: 24px; }
    .hero { min-height: 420px; padding: 160px 0 60px; }
    .trust-badges { flex-direction: column; }
    .b2b-modal { padding: 24px; }
    .b2b-modal__actions { flex-direction: column; }
    .b2b-modal__actions .btn { width: 100%; justify-content: center; }
}

@media (max-width: 342px) {
    .header-row--main .header-row-inner { padding: 0 12px; gap: 8px; }
    .header-actions { gap: 6px; }
    .header-cart-btn,
    .header-account-btn,
    .mobile-menu-toggle,
    .header-search-wrap,
    .header-search-wrap .dgwt-wcas-search-icon,
    .header-search-wrap .js-dgwt-wcas-search-icon-handler { width: 38px; height: 38px; min-width: 38px; max-width: 38px; }
    .header-search-wrap .dgwt-wcas-search-wrapp { width: 38px !important; min-width: 38px !important; max-width: 38px !important; height: 38px !important; }
    .mobile-menu-toggle span { width: 16px; left: 11px; }
    .mobile-menu-toggle span:nth-child(1) { top: 13px; }
    .mobile-menu-toggle span:nth-child(2) { top: 18px; }
    .mobile-menu-toggle span:nth-child(3) { top: 23px; }
    .logo-img { height: 16px; }
}

/* =============================================
   MOBILE MENU TOGGLE – HAMBURGER → X ANIMATION
   ============================================= */
.mobile-menu-toggle {
    display: none; background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 50%;
    width: 44px; height: 44px; padding: 0;
    align-items: center; justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 210;
    cursor: pointer;
    transition: background 0.15s;
}
.mobile-menu-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.mobile-menu-toggle:focus-visible { outline: 2px solid rgba(255, 255, 255, 0.3); outline-offset: 2px; }
.mobile-menu-toggle span {
    position: absolute; left: 12px;
    display: block; width: 20px; height: 2px;
    background: var(--white); border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}
.mobile-menu-toggle span:nth-child(1) { top: 15px; }
.mobile-menu-toggle span:nth-child(2) { top: 21px; }
.mobile-menu-toggle span:nth-child(3) { top: 27px; }
/* X-tila */
.mobile-menu-toggle--open span:nth-child(1) {
    top: 21px; transform: rotate(45deg);
}
.mobile-menu-toggle--open span:nth-child(2) {
    opacity: 0; transform: scaleX(0);
}
.mobile-menu-toggle--open span:nth-child(3) {
    top: 21px; transform: rotate(-45deg);
}

/* =============================================
   MOBILE FULL-PAGE MENU
   ============================================= */
.mobile-menu-body-lock { overflow: hidden; }

.mobile-menu {
    position: fixed; inset: 0;
    z-index: 150;
    background: var(--navy);
    display: flex; flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.35s;
}
.mobile-menu--open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__inner {
    flex: 1; display: flex; flex-direction: column;
    padding: 110px 28px 32px;
    overflow-y: auto; -webkit-overflow-scrolling: touch;
}

/* Sivulinkit (Palvelut, Yritys, Yhteystiedot) – kevyempi */
.mobile-menu__section {
    display: flex; flex-direction: column;
}
.mobile-menu__section a,
.mobile-menu__section .menu-item a,
.mobile-menu__link {
    display: block;
    color: rgba(255, 255, 255, 0.55); font-size: 14px; font-weight: 400;
    padding: 10px 0;
    border-bottom: none;
    transition: color 0.15s;
    letter-spacing: 0.01em;
}

/* Submenu parent (button) – pääkategoria */
.mobile-menu__link--parent {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; background: none; border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--white); font-family: var(--font);
    font-size: 18px; font-weight: 600;
    padding: 14px 0; cursor: pointer;
    text-align: left;
}
/* Tuotekategoriat (ensimmäinen section) – isompi paino */
.mobile-menu__nav > .mobile-menu__section:first-child > .mobile-menu__link {
    color: var(--white); font-size: 18px; font-weight: 600;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu__chevron {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.3; flex-shrink: 0;
}
.mobile-menu__group--open .mobile-menu__chevron {
    transform: rotate(180deg); opacity: 0.7;
}

/* Submenu (collapsed) */
.mobile-menu__sub {
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0;
    padding-left: 18px;
    border-left: 1px solid rgba(255, 255, 255, 0.10);
}
.mobile-menu__group--open .mobile-menu__sub {
    max-height: 500px;
}
.mobile-menu__sublink {
    display: block; color: rgba(255, 255, 255, 0.7);
    font-size: 14px; font-weight: 400;
    padding: 8px 0;
    transition: color 0.15s;
}
.mobile-menu__sublink:hover { color: var(--orange); }

.mobile-menu__section a:hover,
.mobile-menu__section .menu-item a:hover { color: var(--orange); }

/* Mobile menu switcher */
.mobile-menu__switcher {
    margin-top: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 8px;
}

/* Tuotteet-label */
.mobile-menu__label {
    font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 28px 0 8px;
}

/* Footer kontaktit */
.mobile-menu__footer {
    margin-top: auto; padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex; flex-direction: column; gap: 8px;
}
.mobile-menu__footer a {
    color: rgba(255, 255, 255, 0.5); font-size: 14px; font-weight: 500;
    transition: color 0.15s;
}
.mobile-menu__footer a:hover { color: var(--orange); }
.mobile-menu__account-link {
    display: flex; align-items: center; gap: 8px;
    color: var(--white) !important; font-weight: 600 !important;
    padding-bottom: 12px; margin-bottom: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.mobile-menu__account-link svg { stroke: currentColor; flex-shrink: 0; }














/* =============================================
   PRODUCT CARD – CATALOG DEFAULT (pc-card)
   Pystykuva, object-fit contain, overlay, tooltip
   ============================================= */
.pc-card {
    position: relative;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-100);
    transition: box-shadow 0.3s var(--ease),
                border-color 0.3s var(--ease),
                transform 0.3s var(--ease);
}
.pc-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--gray-200);
    transform: translateY(-3px);
    z-index: 10;
}

/* Koko kortti klikattava linkki */
.pc-card__link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

/* ── Kuva-alue ── */
.pc-card__media {
    position: relative;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--white);
    /* EI overflow: hidden – tooltip saa ylittää */
}
/* Clip-wrapper: klippaa kuvan hover-scalen, ei tooltip */
.pc-card__media-clip {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
}
.pc-card__img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 16px;
    transition: transform 0.4s var(--ease);
}

/* Tuotesivun related/upsell -kortit: kuva säilyttää mittasuhteet */
.sp-related .pc-card__media-clip {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: var(--white);
}
.sp-related .pc-card__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    padding: 0;
}
.pc-card:hover .pc-card__img {
    transform: scale(1.04);
}

/* 3 % musta overlay – koko kuvacontainerin päällä (yhtenäinen sävy korttien välillä) */
.pc-card__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.03);
    pointer-events: none;
    z-index: 2;
    border-radius: inherit;
}

/* ── Alennus-badge ── */
.pc-card__badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 3;
    background: var(--orange);
    color: var(--white);
    font-size: 14px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: var(--pill);
    letter-spacing: 0.03em;
    line-height: 1.4;
}

/* ── Toimintonappi (ostoskori / tarjouspyyntö) ── */
/* Nappi on pc-card:n lapsielementti (ei median), jotta tooltip ei leikkaannu */
.pc-card__action {
    position: absolute;
    bottom: 120px;
    left: 12px;
    z-index: 4;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--orange);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(255, 85, 0, 0.3);
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.pc-card__action svg {
    width: 16px;
    height: 16px;
    fill: var(--white);
    flex-shrink: 0;
}
.pc-card__action:hover {
    background: var(--orange-hover);
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(255, 85, 0, 0.4);
}
.pc-card__action:active {
    transform: scale(0.95);
}

/* RFQ-versio (tummempi) */
.pc-card__action--rfq {
    background: var(--gray-800);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}
.pc-card__action--rfq:hover {
    background: var(--navy);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* ── CSS Tooltip ── */
.pc-card__tooltip {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--gray-800);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 1.3;
    z-index: 10;
}
/* Tooltip nuoli – vasemmalle */
.pc-card__tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: var(--gray-800);
}
/* Hover: tooltip näkyviin */
.pc-card__action:hover .pc-card__tooltip,
.pc-card__action:focus-visible .pc-card__tooltip {
    opacity: 1;
}

/* ── Action icon centering ── */
.pc-card__action-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Add-to-cart states (spinner / done / cart-link) ── */
@keyframes pcCardSpin { to { transform: rotate(360deg); } }

.pc-card__action-spinner,
.pc-card__action-done { display: none; }

.pc-card__action-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: pcCardSpin 0.6s linear infinite;
}
.pc-card__action-done svg {
    width: 18px; height: 18px;
    stroke: var(--white);
    fill: none !important;
}

/* Loading */
.pc-card__action.loading .pc-card__action-icon,
.pc-card__action.is-loading .pc-card__action-icon { display: none; }
.pc-card__action.loading .pc-card__action-spinner,
.pc-card__action.is-loading .pc-card__action-spinner { display: block; }
.pc-card__action.loading,
.pc-card__action.is-loading { pointer-events: none; opacity: 0.85; }
.pc-card__action.loading .pc-card__tooltip,
.pc-card__action.added .pc-card__tooltip { display: none; }

/* Done */
.pc-card__action.added .pc-card__action-icon,
.pc-card__action.is-done .pc-card__action-icon { display: none; }
.pc-card__action.added .pc-card__action-spinner,
.pc-card__action.is-done .pc-card__action-spinner { display: none; }
.pc-card__action.added .pc-card__action-done,
.pc-card__action.is-done .pc-card__action-done {
    display: flex; align-items: center; justify-content: center;
}
.pc-card__action.added,
.pc-card__action.is-done {
    background: #16a34a;
    box-shadow: 0 3px 12px rgba(22, 163, 74, 0.3);
}
.pc-card__action.added:hover,
.pc-card__action.is-done:hover {
    background: #15803d;
    box-shadow: 0 4px 16px rgba(22, 163, 74, 0.4);
    transform: scale(1.1);
}

/* Cart-link ("Katso kori") */
.pc-card__cart-link {
    position: absolute;
    bottom: 120px; left: 50%;
    transform: translateX(-50%) translateY(4px);
    display: none; align-items: center; gap: 3px;
    font-size: 12px; font-weight: 600; color: var(--navy);
    background: var(--white); padding: 4px 10px;
    border-radius: var(--pill);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    white-space: nowrap; text-decoration: none; z-index: 10;
    opacity: 0; transition: opacity 0.2s, transform 0.2s;
}
.pc-card__cart-link:hover { color: var(--orange); }
.pc-card__cart-link svg { flex-shrink: 0; transition: transform 0.15s; }
.pc-card__cart-link:hover svg { transform: translateX(2px); }
.pc-card__action.added ~ .pc-card__cart-link {
    display: inline-flex; opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Piilota WC:n automaattinen "Näytä ostoskori" -linkki */
.pc-card .added_to_cart { display: none !important; }

/* ── Body (tekstitiedot) ── */
.pc-card__body {
    padding: 14px 16px 18px;
}

/* Brändi */
.pc-card__brand {
    display: block;
    font-size: 14px;
    color: var(--gray-400);
    font-weight: 400;
    margin-bottom: 3px;
    line-height: 1.3;
}

/* Tuotenimi */
.pc-card__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text);
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hinta-alue */
.pc-card__price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}
.pc-card__price-current {
    font-size: 16px;
    font-weight: 700;
    color: var(--orange);
    line-height: 1.2;
}
.pc-card__price-old {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-400);
    text-decoration: line-through;
    line-height: 1.2;
}

/* RFQ-label (korvaa hinnan) */
.pc-card__rfq-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
}
.pc-card__price-from,
.lc-card__price-from {
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-400);
    margin-right: 2px;
}
/* Varmista alk. + hinta samalle riville listanäkymässä */
.lc-card__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 4px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .pc-card__media-clip {
        aspect-ratio: 4 / 4.5;
    }
    .pc-card__img {
        padding: 10px;
    }
    .pc-card__body {
        padding: 10px 10px 12px;
    }
    .pc-card__brand {
        font-size: 11px;
        margin-bottom: 2px;
    }
    .pc-card__name {
        font-size: 13px;
        margin-bottom: 5px;
        line-height: 1.3;
    }
    .pc-card__price-current {
        font-size: 14px;
    }
    .pc-card__price-old {
        font-size: 11px;
    }
    .pc-card__rfq-label {
        font-size: 12px;
    }
    .pc-card__action {
        width: 30px;
        height: 30px;
        bottom: 90px;
        right: 8px;
    }
    .pc-card__action svg {
        width: 13px;
        height: 13px;
    }
    .pc-card__badge {
        font-size: 9px;
        padding: 2px 7px;
    }
}
@media (max-width: 560px) {
    .pc-card__media-clip {
        aspect-ratio: 4 / 4;
    }
    .pc-card__img {
        padding: 8px;
    }
    .pc-card__body {
        padding: 8px 8px 10px;
    }
    .pc-card__brand {
        font-size: 10px;
    }
    .pc-card__name {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .pc-card__price-current {
        font-size: 13px;
    }
    .pc-card__price-old {
        font-size: 10px;
    }
    .pc-card__rfq-label {
        font-size: 11px;
    }
    .pc-card__action {
        width: 28px;
        height: 28px;
        bottom: 90px;
        right: 6px;
    }
    .pc-card__action svg {
        width: 12px;
        height: 12px;
    }
}

/* =============================================
   PC-GRID – Tuotekortti-gridi (4 → 2 → 2)
   ============================================= */
.pc-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
@media (max-width: 1060px) {
    .pc-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    .pc-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 560px) {
    .pc-grid { gap: 10px; }
}


/* =========================================================================
   WC BLOCKS: OSTOSKORI & KASSA
   ========================================================================= */

body.woocommerce-cart,
body.woocommerce-checkout {
    padding-top: 200px;
}

body.woocommerce-cart .wp-block-post-title,
body.woocommerce-checkout .wp-block-post-title,
body.woocommerce-cart h1.wp-block-heading,
body.woocommerce-checkout h1.wp-block-heading {
    max-width: var(--max-width, 1300px);
    margin: 0 auto 0.5rem;
    padding: 0 1.5rem;
    font-family: var(--font-body);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}

.wc-block-cart,
.wc-block-checkout {
    --wc-block-components-product-name-color: var(--navy);
    font-family: var(--font-body);
    color: var(--navy);
}

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
    max-width: var(--max-width, 1300px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 3rem;
    box-sizing: border-box;
}

.wc-block-components-totals-wrapper,
.wc-block-components-panel,
.wc-block-components-totals-item {
    border: none !important;
}

/* Piilota lyhyt kuvaus */
.wc-block-cart .wc-block-components-product-metadata {
    display: none !important;
}

/* ── Taulukon header ── */
.wc-block-cart-items .wc-block-cart-items__header {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(0, 20, 50, .4);
    border: none;
    padding-bottom: 0.75rem;
}

/* ── Tuoterivit ── */
.wc-block-cart-items__row {
    border-bottom: 1px solid rgba(0, 20, 50, .04) !important;
    border-top: none !important;
    padding: 1.25rem 0;
    align-items: center;
}
.wc-block-cart-items__row:last-child { border-bottom: none !important; }
.wc-block-cart-items__row .wc-block-components-product-name {
    font-weight: 600; font-size: 0.92rem; color: var(--navy); text-decoration: none;
}
.wc-block-cart-items__row .wc-block-components-product-name:hover { color: var(--orange); }

/* Tuotekuva */
.wc-block-cart-item__image { width: 72px; min-width: 72px; }
.wc-block-cart-item__image img {
    border-radius: 12px; object-fit: contain;
    background: #ffffff; padding: 0; border: none;
}

/* Quantity — pill */
.wc-block-components-quantity-selector {
    border: none !important; border-radius: 22px !important;
    overflow: hidden; background: #f2f3f5;
}
.wc-block-components-quantity-selector:focus-within { box-shadow: 0 0 0 2px rgba(0, 20, 50, .12); }
.wc-block-components-quantity-selector input {
    font-weight: 700; font-size: 0.85rem; color: var(--navy);
    font-family: var(--font-body); background: transparent; border: none;
}
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button {
    color: var(--navy); background: transparent !important; border: none !important; transition: color .15s;
}
.wc-block-components-quantity-selector .wc-block-components-quantity-selector__button:hover { color: var(--orange); }

/* Rivin hinta */
.wc-block-cart-item__total-price-and-sale-badge-wrapper {
    font-weight: 700; font-size: 0.95rem; color: var(--navy); text-align: right; min-width: 110px;
}

/* Poista-linkki */
.wc-block-cart-item__remove-link { color: rgba(0, 20, 50, .35); font-size: 0.75rem; text-decoration: none; transition: color .15s; }
.wc-block-cart-item__remove-link:hover { color: #c00; }

/* ── Sidebar ── */

/* Piilota "OSTOSKORI YHTEENSÄ" ja "Arvioitu kokonaissumma" */
.wc-block-cart__totals-title { display: none !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label { display: none !important; }

/* Sidebar: piilota paneelin sisältö, näytä otsikko */
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block {
    background: none;
    padding: 0;
}
/* Piilota paneelin sisällä olevat summarivit */
.wc-block-cart__sidebar .wc-block-components-totals-wrapper,
.wc-block-cart__sidebar .wc-block-components-totals-item,
.wc-block-cart__sidebar .wc-block-components-totals-footer-item {
    display: none !important;
}

/* Otsikko normitilaus (oletus): "Tee tilaus" */
.wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block::before {
    content: 'Tee tilaus';
    display: block;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    text-align: center;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.wc-block-components-totals-wrapper { font-family: var(--font-body); border: none !important; }
.wc-block-components-totals-item__label { color: rgba(0, 20, 50, .55); font-size: 0.85rem; }
.wc-block-components-totals-item__value { font-weight: 600; color: var(--navy); font-size: 0.9rem; }

.wc-block-components-totals-footer-item {
    border: none !important; padding-top: 0; margin-top: 0;
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-weight: 700; font-size: 1.15rem; color: var(--navy);
}

/* ── CTA-nappi ── */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
    background: var(--orange) !important; color: var(--white) !important;
    border: none !important; border-radius: 50px !important;
    font-weight: 700 !important; font-size: 0.95rem !important;
    padding: 0.9rem 2rem !important;
    transition: background .2s, transform .15s, box-shadow .2s;
    font-family: var(--font-body) !important; width: 100%; cursor: pointer;
    margin-top: 0.75rem;
}
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
    background: var(--orange-hover, #e04d00) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 85, 0, .2);
}

/* ── Trust badges (sidebar, CTA-napin alla) ── */
.b2b-cart-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 1.25rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
}
.b2b-cart-trust-badges__item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(0, 20, 50, .4);
    white-space: nowrap;
}
.b2b-cart-trust-badges__item svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    stroke: rgba(0, 20, 50, .3);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Kuponki */
.wc-block-components-totals-coupon .wc-block-components-text-input input {
    border-radius: 50px; font-family: var(--font-body); border: 1px solid rgba(0, 20, 50, .1);
}

/* Cross-sells */
.wp-block-woocommerce-cart-cross-sells-block {
    max-width: var(--max-width, 1300px) !important;
    margin-left: auto !important; margin-right: auto !important;
    padding: 2rem 1.5rem 0;
}

/* Tyhjä kori */
.wc-block-cart--is-empty { text-align: center; padding: 4rem 1.5rem; }
.wc-block-cart--is-empty .wc-block-cart__empty-cart__title {
    font-family: var(--font-body); font-size: 1.2rem; font-weight: 700; color: var(--navy);
}

/* =========================================================================
   WC BLOCKS: TARJOUSPYYNTÖTILA (b2b-quote-mode)
   ========================================================================= */

.b2b-quote-mode .wc-block-components-product-price,
.b2b-quote-mode .wc-block-components-sale-badge,
.b2b-quote-mode .wc-block-components-product-badge,
.b2b-quote-mode .wc-block-components-totals-discount,
.b2b-quote-mode .wc-block-components-totals-coupon,
.b2b-quote-mode .wc-block-components-totals-shipping,
.b2b-quote-mode .wc-block-components-totals-taxes { display: none !important; }

/* Rivin hinta → "Tarjouspyyntö" */
.b2b-quote-mode .wc-block-cart-item__total-price-and-sale-badge-wrapper { font-size: 0; line-height: 0; }
.b2b-quote-mode .wc-block-cart-item__total-price-and-sale-badge-wrapper::after {
    content: 'Tarjouspyyntö'; font-size: 0.82rem; font-weight: 600;
    color: var(--navy); line-height: 1.4; white-space: nowrap; opacity: .55;
}

/* Piilota välisummarivit */
.b2b-quote-mode .wc-block-components-totals-item:not(.wc-block-components-totals-footer-item) {
    display: none !important;
}

/* Piilota loppusumma kokonaan */
.b2b-quote-mode .wc-block-components-totals-footer-item { display: none !important; }

/* Otsikko vaihtuu: "Tee tarjouspyyntö" */
.b2b-quote-mode .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block::before {
    content: 'Tee tarjouspyyntö';
}

.b2b-quote-mode .wc-block-components-product-metadata .wc-block-components-product-metadata__description {
    color: var(--orange); font-weight: 500; font-size: 0.75rem;
}

.b2b-quote-mode .wc-block-components-payment-method-icons,
.b2b-quote-mode .wc-block-checkout__payment-method { display: none !important; }

/* Checkout: piilota WC:n oma "Tilauksen yhteenveto" -otsikko */
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary__toggle,
.wp-block-woocommerce-checkout-order-summary-block .wc-block-components-order-summary__toggle-text,
.wp-block-woocommerce-checkout-order-summary-block h2 {
    display: none !important;
}

/* Korvaa otsikko ::before:lla — sama logiikka kuin korisivun sidebar */
.wp-block-woocommerce-checkout-order-summary-block::before {
    content: 'Tilauksen yhteenveto';
    display: block;
    font-family: var(--font-body);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.b2b-quote-mode .wp-block-woocommerce-checkout-order-summary-block::before {
    content: 'Tarjouspyynnön yhteenveto';
}

/* ── Responsive ── */
@media (max-width: 767px) {
    body.woocommerce-cart, body.woocommerce-checkout { padding-top: 160px; }
    .wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { padding-left: 1rem; padding-right: 1rem; }
    .wc-block-cart-item__image { width: 56px; min-width: 56px; }
    .wc-block-cart-item__total-price-and-sale-badge-wrapper { min-width: auto; }
    .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block { padding: 1.25rem; }
    .b2b-cart-trust-badges { gap: 0.4rem 0.75rem; }
}


.wc-block-checkout__payment-method .wc-block-components-radio-control-accordion-option {
    display: block !important;
}