.evvh {
    --evvh-border: #dedede;
    --evvh-muted: #666;
    --evvh-bg: #f7f7f7;
    --evvh-card-bg: #fff;
    --evvh-text: #171717;
    --evvh-accent: #171717;
    color: var(--evvh-text);
    width: 100%;
}

.evvh-form {
    background: var(--evvh-bg);
    border: 1px solid var(--evvh-border);
    border-radius: 14px;
    padding: 22px;
}

.evvh-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.evvh-title {
    margin: 0 0 4px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

.evvh-lead {
    color: var(--evvh-muted);
    margin: 0;
}

.evvh-fields {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.evvh-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.evvh-label {
    font-size: 13px;
    font-weight: 700;
}

.evvh select {
    background: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 9px;
    color: inherit;
    font: inherit;
    min-height: 46px;
    padding: 0 36px 0 12px;
    width: 100%;
}

.evvh-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.evvh-button,
.evvh-pages button,
.evvh-product-link {
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    line-height: 1;
    min-height: 44px;
    padding: 0 18px;
    text-decoration: none;
}

.evvh-button--primary,
.evvh-product-link {
    align-items: center;
    background: var(--evvh-accent);
    border: 1px solid var(--evvh-accent);
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.evvh-button--secondary,
.evvh-pages button {
    background: #fff;
    border: 1px solid #cfcfcf;
    color: var(--evvh-text);
}

.evvh button:disabled,
.evvh select:disabled {
    cursor: wait;
    opacity: .55;
}

.evvh-status {
    min-height: 24px;
    padding: 16px 2px 8px;
    font-weight: 600;
}

.evvh-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: 8px;
}

.evvh-card {
    background: var(--evvh-card-bg);
    border: 1px solid var(--evvh-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.evvh-card-image {
    aspect-ratio: 1 / 1;
    background: #fafafa;
    display: block;
    overflow: hidden;
}

.evvh-card-image img {
    height: 100%;
    object-fit: contain;
    width: 100%;
}

.evvh-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px;
}

.evvh-card-meta {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
    margin-bottom: 8px;
}

.evvh-type,
.evvh-stock {
    background: #f1f1f1;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 8px;
}

.evvh-stock.is-in-stock {
    background: #e8f5e9;
}

.evvh-stock.is-out-of-stock {
    background: #fbe9e7;
}

.evvh-card-title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 6px;
}

.evvh-card-title a {
    color: inherit;
    font-weight: 700;
    text-decoration: none;
}

.evvh-sku {
    color: var(--evvh-muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.evvh-specs {
    border-top: 1px solid #eee;
    margin: 13px 0;
    padding-top: 9px;
}

.evvh-specs > div {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 3px 0;
}

.evvh-specs dt {
    color: var(--evvh-muted);
    font-size: 12px;
}

.evvh-specs dd {
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    text-align: right;
}

.evvh-card-footer {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-top: auto;
}

.evvh-price {
    font-size: 17px;
    font-weight: 800;
}

.evvh-product-link {
    min-height: 38px;
    padding: 0 13px;
}

.evvh-empty {
    align-items: center;
    background: #fafafa;
    border: 1px dashed var(--evvh-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding: 32px 20px;
    text-align: center;
}

.evvh-empty span {
    color: var(--evvh-muted);
}

.evvh-pages {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: center;
    padding: 22px 0 4px;
}

.evvh-pages button:disabled {
    cursor: default;
}

.evvh-notice {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 14px;
}

.evvh-notice--error {
    background: #fff4f2;
}

@media (max-width: 1100px) {
    .evvh-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .evvh-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .evvh-form { padding: 16px; }
    .evvh-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .evvh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
    .evvh-fields,
    .evvh-grid { grid-template-columns: 1fr; }
    .evvh-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .evvh-card { flex-direction: row; }
    .evvh-card-image { flex: 0 0 38%; }
    .evvh-card-body { min-width: 0; }
}

/* Live/faceted search loading indicator. */
.evvh.is-loading .evvh-status::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    vertical-align: -1px;
    animation: evvh-spin .7s linear infinite;
}

@keyframes evvh-spin {
    to { transform: rotate(360deg); }
}

/* EVVH 0.4.2: the plugin owns its filter selects so AJAX facet changes are always visible. */
.evvh .select2-container,
.evvh .select2,
.evvh .selectWoo-container {
    display: none !important;
}
.evvh select[data-evvh-select] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
    height: auto;
}


/* EVVH 0.4.3: lock and dim filters while an AJAX refresh is in progress. */
.evvh.is-loading .evvh-fields,
.evvh.is-loading .evvh-actions {
    opacity: .58;
    transition: opacity .12s ease;
}

.evvh.is-loading .evvh-fields {
    cursor: wait;
}

.evvh.is-loading select[data-evvh-select],
.evvh.is-loading .evvh-button {
    pointer-events: none;
}

.evvh select[data-evvh-select]:disabled {
    background-color: #ececec !important;
    color: #777 !important;
    border-color: #d4d4d4 !important;
    cursor: wait !important;
    opacity: 1 !important;
}

/* EVVH 0.5.0: ET and center bore are numeric range facets. */
.evvh-field--range {
    min-width: 0;
}

.evvh-range-values {
    align-items: center;
    display: flex;
    gap: 6px;
    justify-content: space-between;
    min-height: 22px;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.evvh-range-values output {
    background: #fff;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    min-width: 0;
    padding: 4px 7px;
    text-align: center;
    white-space: nowrap;
}

.evvh-range-control {
    height: 32px;
    position: relative;
    width: 100%;
}

.evvh-range-track,
.evvh-range-fill {
    border-radius: 999px;
    height: 5px;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0;
    top: 14px;
}

.evvh-range-track {
    background: #d4d4d4;
}

.evvh-range-fill {
    background: var(--evvh-accent);
}

.evvh .evvh-range-control input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    height: 32px;
    left: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 100%;
}

.evvh .evvh-range-control input[type="range"]::-webkit-slider-runnable-track {
    background: transparent;
    border: 0;
    height: 5px;
}

.evvh .evvh-range-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid var(--evvh-accent);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    cursor: grab;
    height: 19px;
    margin-top: -7px;
    pointer-events: auto;
    width: 19px;
}

.evvh .evvh-range-control input[type="range"]::-moz-range-track {
    background: transparent;
    border: 0;
    height: 5px;
}

.evvh .evvh-range-control input[type="range"]::-moz-range-thumb {
    background: #fff;
    border: 2px solid var(--evvh-accent);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    cursor: grab;
    height: 17px;
    pointer-events: auto;
    width: 17px;
}

.evvh .evvh-range-control input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline: 3px solid rgba(23,23,23,.2);
    outline-offset: 2px;
}

.evvh .evvh-range-control input[type="range"]:focus-visible::-moz-range-thumb {
    outline: 3px solid rgba(23,23,23,.2);
    outline-offset: 2px;
}

.evvh .evvh-range-control input[type="range"]:disabled::-webkit-slider-thumb {
    cursor: wait;
    opacity: .55;
}

.evvh .evvh-range-control input[type="range"]:disabled::-moz-range-thumb {
    cursor: wait;
    opacity: .55;
}

.evvh.is-loading .evvh-range-control {
    cursor: wait;
}

@media (max-width: 760px) {
    .evvh-field--range {
        min-height: 82px;
    }
}

/* EVVH 0.7.2: Eurovanteen RENGASHAKU-komponentin mukainen hakulomake. */
.evvh {
    --evvh-border: #d9d9d9;
    --evvh-muted: #555;
    --evvh-bg: transparent;
    --evvh-card-bg: #fff;
    --evvh-text: #111;
    --evvh-accent: #111;
}

.evvh-form {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.evvh-heading {
    margin-bottom: 18px;
}

.evvh-title {
    font-size: clamp(24px, 2.4vw, 30px);
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1.15;
    margin: 0 0 7px;
    text-transform: uppercase;
}

.evvh-lead {
    color: #333;
    font-size: 14px;
    line-height: 1.55;
    margin: 0;
    max-width: 900px;
}

.evvh-fields {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px 14px;
}

.evvh-field {
    gap: 6px;
    min-width: 0;
}

.evvh-label {
    color: #222;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
}

.evvh select {
    background-color: #fff;
    border: 1px solid #d2d2d2;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .05);
    color: #222;
    font-size: 14px;
    min-height: 42px;
    padding: 0 34px 0 11px;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.evvh select:focus {
    border-color: #888;
    box-shadow: 0 0 0 1px #888;
    outline: 0;
}

/* Desktop: 4 kenttää ensimmäiselle riville ja ET + keskireikä + väri toiselle. */
.evvh-field--finish {
    grid-column: span 2;
}

.evvh-actions {
    gap: 9px;
    margin-top: 16px;
}

.evvh-button,
.evvh-pages button,
.evvh-product-link {
    border-radius: 2px;
}

.evvh-button {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .03em;
    min-height: 40px;
    padding: 0 19px;
    text-transform: uppercase;
}

.evvh-button--primary {
    background: #111;
    border-color: #111;
    color: #fff;
}

.evvh-button--primary:hover:not(:disabled),
.evvh-button--primary:focus-visible:not(:disabled) {
    background: #2c2c2c;
    border-color: #2c2c2c;
}

.evvh-button--secondary {
    background: #fff;
    border-color: #cfcfcf;
    color: #222;
}

.evvh-button--secondary:hover:not(:disabled),
.evvh-button--secondary:focus-visible:not(:disabled) {
    background: #f4f4f4;
    border-color: #aaa;
}

.evvh-range-values {
    min-height: 20px;
}

.evvh-range-values output {
    border-radius: 2px;
    font-size: 12px;
    padding: 3px 6px;
}

.evvh-range-control {
    height: 28px;
}

.evvh-range-track,
.evvh-range-fill {
    height: 4px;
    top: 12px;
}

.evvh .evvh-range-control input[type="range"] {
    height: 28px;
}

.evvh .evvh-range-control input[type="range"]::-webkit-slider-thumb {
    height: 17px;
    margin-top: -6.5px;
    width: 17px;
}

.evvh .evvh-range-control input[type="range"]::-moz-range-thumb {
    height: 15px;
    width: 15px;
}

@media (max-width: 900px) {
    .evvh-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evvh-field--finish {
        grid-column: span 2;
    }
}

@media (max-width: 520px) {
    .evvh-fields {
        grid-template-columns: 1fr;
    }

    .evvh-field--finish {
        grid-column: auto;
    }

    .evvh-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* EVVH 0.7.3: sininen hakupaneeli ja pyöristetyt kentät RENGASHAKU-tyyliin. */
.evvh {
    --evvh-search-blue: #075fae;
    --evvh-search-blue-dark: #064f91;
}

.evvh-form {
    background: var(--evvh-search-blue);
    border: 0;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 47, 91, .12);
    padding: 24px;
}

.evvh-title,
.evvh-lead,
.evvh-label {
    color: #fff;
}

.evvh-lead {
    opacity: .95;
}

.evvh select {
    background-color: #fff;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    color: #1b1b1b;
    min-height: 46px;
    padding-left: 14px;
    padding-right: 38px;
}

.evvh select:hover:not(:disabled) {
    border-color: #fff;
}

.evvh select:focus {
    border-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .30);
    outline: 0;
}

.evvh-range-values output {
    background: #fff;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 999px;
    color: var(--evvh-search-blue-dark);
    font-weight: 800;
    padding: 4px 9px;
}

.evvh-range-track {
    background: rgba(255, 255, 255, .35);
}

.evvh-range-fill {
    background: #fff;
}

.evvh .evvh-range-control input[type="range"]::-webkit-slider-thumb {
    background: #fff;
    border-color: var(--evvh-search-blue-dark);
}

.evvh .evvh-range-control input[type="range"]::-moz-range-thumb {
    background: #fff;
    border-color: var(--evvh-search-blue-dark);
}

.evvh .evvh-range-control input[type="range"]:focus-visible::-webkit-slider-thumb {
    outline-color: rgba(255, 255, 255, .5);
}

.evvh .evvh-range-control input[type="range"]:focus-visible::-moz-range-thumb {
    outline-color: rgba(255, 255, 255, .5);
}

.evvh-button {
    border-radius: 999px;
    min-height: 42px;
    padding-left: 22px;
    padding-right: 22px;
}

.evvh-button--primary {
    background: #fff;
    border-color: #fff;
    color: var(--evvh-search-blue-dark);
}

.evvh-button--primary:hover:not(:disabled),
.evvh-button--primary:focus-visible:not(:disabled) {
    background: #f2f7fc;
    border-color: #f2f7fc;
    color: var(--evvh-search-blue-dark);
}

.evvh-button--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, .78);
    color: #fff;
}

.evvh-button--secondary:hover:not(:disabled),
.evvh-button--secondary:focus-visible:not(:disabled) {
    background: rgba(255, 255, 255, .12);
    border-color: #fff;
    color: #fff;
}

/* Lataustilassa kentät pysyvät sinisen paneelin näköisinä. */
.evvh select[data-evvh-select]:disabled {
    background-color: rgba(255, 255, 255, .82) !important;
    border-color: rgba(255, 255, 255, .7) !important;
    color: #666 !important;
}

@media (max-width: 760px) {
    .evvh-form {
        border-radius: 14px;
        padding: 18px;
    }
}

@media (max-width: 520px) {
    .evvh-form {
        border-radius: 12px;
        padding: 16px;
    }
}

/* EVVH 0.7.4: vaalea RENGASHAKU-tyylinen hakupaneeli ja tulosten ohjaimet. */
.evvh {
    --evvh-search-blue: #4454f2;
    --evvh-search-blue-dark: #0b1b4a;
    --evvh-search-panel: #f0f3fe;
    --evvh-search-panel-border: #e3e6f1;
    --evvh-search-muted: #5d6f9b;
}

.evvh-form {
    background: linear-gradient(180deg, #f2f5fe 0%, #eef1ff 100%);
    border: 1px solid var(--evvh-search-panel-border);
    border-radius: 16px;
    box-shadow: none;
    padding: 20px 18px;
}

.evvh-title {
    color: #091a4a;
    font-size: clamp(25px, 2.6vw, 31px);
    font-weight: 900;
    letter-spacing: .015em;
}

.evvh-lead {
    color: var(--evvh-search-muted);
    font-size: 16px;
    line-height: 1.45;
    opacity: 1;
}

.evvh-label {
    color: #696d78;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .025em;
}

.evvh select {
    background-color: #fff;
    border: 1px solid #dedfe7;
    border-radius: 11px;
    box-shadow: 0 1px 3px rgba(18, 26, 56, .12);
    color: #14151a;
    min-height: 46px;
    padding-left: 13px;
    padding-right: 38px;
}

.evvh select:hover:not(:disabled) {
    border-color: #c8cad6;
}

.evvh select:focus {
    border-color: #9ca6f5;
    box-shadow: 0 0 0 3px rgba(68, 84, 242, .14);
    outline: 0;
}

.evvh-range-values output {
    background: #fff;
    border: 1px solid #dedfe7;
    border-radius: 999px;
    color: #12204f;
    box-shadow: 0 1px 2px rgba(18, 26, 56, .06);
}

.evvh-range-track {
    background: #cbd2e8;
}

.evvh-range-fill {
    background: #4454f2;
}

.evvh .evvh-range-control input[type="range"]::-webkit-slider-thumb {
    background: #fff;
    border-color: #4454f2;
}

.evvh .evvh-range-control input[type="range"]::-moz-range-thumb {
    background: #fff;
    border-color: #4454f2;
}

.evvh-button {
    border-radius: 11px;
    min-height: 42px;
    padding-left: 20px;
    padding-right: 20px;
}

.evvh-button--primary {
    background: #4454f2;
    border-color: #4454f2;
    color: #fff;
}

.evvh-button--primary:hover:not(:disabled),
.evvh-button--primary:focus-visible:not(:disabled) {
    background: #3646df;
    border-color: #3646df;
    color: #fff;
}

.evvh-button--secondary {
    background: #fff;
    border-color: #dedfe7;
    color: #14151a;
}

.evvh-button--secondary:hover:not(:disabled),
.evvh-button--secondary:focus-visible:not(:disabled) {
    background: #f8f8fb;
    border-color: #c8cad6;
    color: #14151a;
}

.evvh select[data-evvh-select]:disabled {
    background-color: #f4f5f8 !important;
    border-color: #e0e1e7 !important;
    color: #7a7d86 !important;
}

/* Teema/Select2 ei saa piilottaa tulosalueen omia selectejä. */
.evvh select[data-evvh-sort],
.evvh select[data-evvh-per-page] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    width: 100% !important;
}

.evvh-results-head {
    align-items: flex-end;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    padding: 16px 0 8px;
}

.evvh-results-head[hidden] {
    display: none !important;
}

.evvh-results-head .evvh-status {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0;
}

.evvh-result-controls {
    align-items: flex-end;
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    justify-content: flex-end;
    margin-left: auto;
}

.evvh-result-control {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 190px;
}

.evvh-result-control--per-page {
    min-width: 96px;
    width: 96px;
}

.evvh-result-control > span {
    color: #5d6070;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.evvh-result-control select {
    border-radius: 10px;
    font-size: 13px;
    min-height: 40px;
    padding-left: 11px;
    padding-right: 32px;
}

.evvh.is-loading .evvh-result-controls {
    opacity: .58;
}

.evvh.is-loading .evvh-result-control select {
    cursor: wait;
    pointer-events: none;
}

@media (max-width: 760px) {
    .evvh-form {
        border-radius: 15px;
        padding: 18px 16px;
    }

    .evvh-results-head {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .evvh-result-controls {
        margin-left: 0;
        width: 100%;
    }

    .evvh-result-control {
        flex: 1 1 auto;
        min-width: 0;
    }

    .evvh-result-control--per-page {
        flex: 0 0 100px;
        width: 100px;
    }
}

@media (max-width: 520px) {
    .evvh-form {
        border-radius: 14px;
        padding: 16px 14px;
    }

    .evvh-lead {
        font-size: 14px;
    }

    .evvh-result-controls {
        align-items: stretch;
        flex-direction: column;
    }

    .evvh-result-control,
    .evvh-result-control--per-page {
        width: 100%;
    }
}
