/*
Theme Name: Ecomus Child
Theme URI: https://wpecomus.com/
Author: DrFuri
Author URI: http://drfuri.com/
Description: Multipurpose WooCommerce WordPress Theme
Version: 1.0.0
Requires at least: 5.0
Tested up to: 5.8
Requires PHP: 7.0
License: GNU General Public License v2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecomus
Domain Path: /lang/
Tags: one-column, two-columns, left-sidebar, right-sidebar, full-width-template, post-formats, theme-options, threaded-comments, translation-ready
Template: ecomus
*/

/* ==========================================================================
   Yleinen typografia
   ========================================================================== */
p {
    margin-bottom: 0.5em;
}

/* ==========================================================================
   Typografia: Red Hat Display -fontti kaikille headingeille
   ========================================================================== */

/* Yliaja CSS-muuttuja oikeaksi fontiksi */
:root {
    --em-heading-font: 'Red Hat Display', sans-serif !important;
}

/* Kaikki heading-elementit käyttävät Red Hat Display -fonttia */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.ecomus-products-carousel__title,
.woocommerce-loop-product__title,
.product_title,
.page-title,
.entry-title,
.widget-title,
.section-title,
.ecomus-heading,
.elementor-heading-title {
    font-family: 'Red Hat Display', sans-serif !important;
}

/* Varmista että heading-fontit latautuvat oikein kaikissa painoissa */
h1, .h1 {
    font-weight: 900;
}

h2, .h2 {
    font-weight: 700;
}

h3, .h3 {
    font-weight: 600;
}

h4, .h4, 
.ecomus-products-carousel__title {
    font-weight: 500;
}

h5, .h5 {
    font-weight: 500;
}

h6, .h6 {
    font-weight: 400;
}

/* ==========================================================================
   Brändisivut: piilotetaan kategoriagrid
   ========================================================================== */
.tax-product_brand .catalog-top-categories {
    display: none !important;
}

/* ==========================================================================
   Kategoriavalikko: viewport-korkeuden mukainen dynaaminen tiivistys
   Ei scrollbaria — itemit skaalautuvat mahtumaan ruudulle vh-yksiköillä.
   16 menu-itemiä, käytettävissä ~(100vh - 200px) tilaa.
   ========================================================================== */

@media (max-height: 899px) {
    .header-category__menu ul.menu {
        padding-top: clamp(6px, 1vh, 24px) !important;
        margin-bottom: clamp(2px, 0.5vh, 10px) !important;
    }
    .header-category__menu ul.menu > li > a {
        min-height: clamp(30px, calc((100vh - 200px) / 17), 50px) !important;
        padding-top: clamp(1px, 0.4vh, 7px) !important;
        padding-bottom: clamp(2px, 0.4vh, 8px) !important;
        font-size: clamp(12px, 1.5vh, 14px);
    }
    .header-category__menu ul.menu > li > a > .menu-item-icon:not(.menu-icon-item-position--right) {
        width: clamp(20px, 3vh, 34px) !important;
        height: clamp(20px, 3vh, 34px) !important;
        line-height: clamp(22px, 3vh, 37px) !important;
        margin-right: clamp(8px, 1.5vh, 18px) !important;
    }
}

/* ==========================================================================
   Tuotekaruselli: 15px väli tuotteiden välillä kaikilla näyttöko'oilla
   ========================================================================== */

/* Kaikille näyttöko'oille: 15px väli tuotteiden välillä */
.ecomus-products-carousel--relative.em-relative .swiper,
.ecomus-products-carousel--relative .swiper {
    --em-swiper-items-space: 15px !important;
}

.ecomus-products-carousel--relative.em-relative .swiper .swiper-slide,
.ecomus-products-carousel--relative .swiper .swiper-slide {
    margin-right: 15px !important;
}

.ecomus-products-carousel--relative.em-relative .swiper .swiper-wrapper,
.ecomus-products-carousel--relative .swiper .swiper-wrapper {
    margin-right: -15px;
}

/* ==========================================================================
   Mobiiliresponsiivisuus: Tuotekaruselli — 2 tuotetta vierekkäin
   Swiper slidesPerView: 2 (JS functions.php:ssä)
   ========================================================================== */

@media (max-width: 767px) {
    /* Slide-väli: vastaa JS:n spaceBetween: 10 */
    .ecomus-products-carousel--relative.em-relative .swiper .swiper-slide,
    .ecomus-products-carousel--relative .swiper .swiper-slide {
        margin-right: 10px !important;
    }
    .ecomus-products-carousel--relative.em-relative .swiper,
    .ecomus-products-carousel--relative .swiper {
        --em-swiper-items-space: 10px !important;
    }
    .ecomus-products-carousel--relative.em-relative .swiper .swiper-wrapper,
    .ecomus-products-carousel--relative .swiper .swiper-wrapper {
        margin-right: -10px;
    }

    /* Tuoteotsikko: kompakti, max 2 riviä */
    .ecomus-products-carousel--relative.em-relative .woocommerce-loop-product__title,
    .ecomus-products-carousel--relative .woocommerce-loop-product__title {
        font-size: 12px !important;
        line-height: 1.3;
        margin-bottom: 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Hinnat: kompakti */
    .ecomus-products-carousel--relative.em-relative .price,
    .ecomus-products-carousel--relative .price {
        font-size: 12px !important;
        margin-bottom: 4px;
    }

    /* Alennus-badge pienempi */
    .ecomus-products-carousel--relative .ecomus-discount-badge,
    .ecomus-products-carousel--relative .onsale {
        font-size: 10px !important;
    }

    /* Karusellin ATC-nappi: Ecomus-teeman oletustyylit */

    /* Tuotekortin sisäinen padding pienempi */
    .ecomus-products-carousel--relative ul.products li.product .product-summary {
        padding: 6px 4px !important;
    }
}

/* ==========================================================================
   Ostoskorin tuotekuvat - kaikille näyttöko'oille
   ========================================================================== */
/* Aseta max-korkeus tuotekuville ostoskorissa kaikilla näyttöko'oilla */
.woocommerce-cart table.woocommerce-cart-form__contents td.product-thumbnail img,
.woocommerce-cart table.woocommerce-cart-form__contents td.product-thumbnail a img {
    max-height: 100px !important;
    max-width: 100px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* ==========================================================================
   Ostoskori mobiili: Flexbox-pohjainen ulkoasu
   ========================================================================== */
@media (max-width: 767px) {
    /* Piilota taulukon otsikkorivi */
    body.woocommerce-cart table.woocommerce-cart-form__contents thead {
        display: none !important;
    }

    /* Taulukko ja tbody block-muotoon */
    body.woocommerce-cart table.woocommerce-cart-form__contents,
    body.woocommerce-cart table.woocommerce-cart-form__contents tbody {
        display: block !important;
        width: 100% !important;
    }

    /* Tuoterivi flexboxina - kaikki vierekkäin */
    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item {
        display: flex !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        width: 100% !important;
        padding: 12px 5px !important;
        border-bottom: 1px solid #eee !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    /* Piilota turhat sarakkeet */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-subtotal,
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-remove {
        display: none !important;
    }

    /* Poista ::before labelit */
    body.woocommerce-cart table.woocommerce-cart-form__contents td::before {
        display: none !important;
        content: none !important;
    }

    /* Kaikki solut block ilman borderia */
    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td {
        display: block !important;
        border: none !important;
        padding: 0 !important;
        height: auto !important;
        clip-path: none !important;
    }

    /* 1. Kuva-sarake - vasemmalla, kiinteä leveys */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-thumbnail {
        flex: 0 0 65px !important;
        width: 65px !important;
        min-width: 65px !important;
        max-width: 65px !important;
        order: 1 !important;
        overflow: hidden !important;
        position: relative !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-thumbnail a {
        display: block !important;
        width: 60px !important;
        height: 60px !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-thumbnail img {
        width: 60px !important;
        height: 60px !important;
        max-width: 60px !important;
        object-fit: cover !important;
        border-radius: 4px !important;
        display: block !important;
    }

    /* 2. Tuotenimi-sarake - joustava keskellä */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-name {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        order: 2 !important;
        font-size: 13px !important;
        line-height: 1.35 !important;
        padding-left: 5px !important;
        overflow: hidden !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-name a {
        font-size: 13px !important;
        line-height: 1.35 !important;
        color: #000 !important;
        display: block !important;
    }
    
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-name .remove-item,
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-name a.remove {
        font-size: 11px !important;
        color: #999 !important;
        display: block !important;
        margin-top: 4px !important;
    }

    /* 3. Hinta-sarake */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-price {
        flex: 0 0 75px !important;
        width: 75px !important;
        order: 3 !important;
        text-align: right !important;
        font-size: 12px !important;
        font-weight: 600 !important;
    }

    /* Vanha hinta (yliviivaus) */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-price del {
        display: block !important;
        font-size: 11px !important;
        color: #999 !important;
    }

    /* Uusi hinta (punainen) */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-price ins {
        display: block !important;
        color: #c00 !important;
        text-decoration: none !important;
        font-weight: 700 !important;
    }

    /* 4. Määrävalitsin-sarake - oikealla */
    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-quantity {
        flex: 0 0 75px !important;
        width: 75px !important;
        order: 4 !important;
        display: block !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-quantity .quantity {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-quantity .quantity input.qty {
        width: 32px !important;
        height: 28px !important;
        font-size: 13px !important;
        text-align: center !important;
        border: 1px solid #ddd !important;
        border-radius: 3px !important;
        padding: 2px !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents td.product-quantity .quantity .ecomus-qty-btn {
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        padding: 0 !important;
        font-size: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Muut rivit (coupon jne) - täysi leveys */
    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr:not(.cart_item) {
        display: block !important;
        width: 100% !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr:not(.cart_item) td {
        display: block !important;
        width: 100% !important;
        border: none !important;
    }

    /* ==========================================================================
       Alennuskoodi-osio mobiilissa: 100% leveys ja näkyvä label
       ========================================================================== */
    
    /* Coupon-container: täysi leveys */
    .woocommerce-cart .coupon,
    .woocommerce-cart table.woocommerce-cart-form__contents .coupon {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 10px !important;
        padding: 0 !important;
    }

    /* Näytä label mobiilissa */
    .woocommerce-cart .coupon label,
    .woocommerce-cart .coupon label.screen-reader-text {
        position: static !important;
        width: auto !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 0 5px 0 !important;
        overflow: visible !important;
        clip: auto !important;
        white-space: normal !important;
        border: 0 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        color: #333 !important;
        display: block !important;
    }

    /* Input-kenttä: täysi leveys */
    .woocommerce-cart .coupon input.input-text,
    .woocommerce-cart .coupon input#coupon_code {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 !important;
        padding: 12px 15px !important;
        font-size: 14px !important;
        border: 1px solid #ddd !important;
        border-radius: 4px !important;
        box-sizing: border-box !important;
    }

    /* Käytä-nappi: täysi leveys */
    .woocommerce-cart .coupon button,
    .woocommerce-cart .coupon button.button {
        width: 100% !important;
        padding: 12px 20px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 4px !important;
    }

    /* Coupon-rivin solu: täysi leveys */
    .woocommerce-cart table.woocommerce-cart-form__contents td.actions,
    .woocommerce-cart table.shop_table td.actions {
        padding: 15px !important;
    }

    /* Alennuskoodi-osio: estä overflowaus mobiilissa */
    .woocommerce-cart .cart-totals-extra-fields,
    .woocommerce-cart .cart-totals-extra-fields .coupon,
    .woocommerce-cart .cart-totals-extra-fields input,
    .woocommerce-cart .cart-totals-extra-fields button {
        max-width: 100% !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .woocommerce-cart .cart-totals-extra-fields .coupon {
        flex-direction: column !important;
    }
}

/* ==========================================================================
   Ostoskorin rivien dynaaminen korkeus - desktop (vain > 767px)
   ========================================================================== */
@media (min-width: 768px) {
    /* Rajoita tuoterivin korkeus maksimissaan 160px */
    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item,
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item {
        display: table-row !important;
        height: 160px !important;
        max-height: 160px !important;
        min-height: 160px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    body.woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td,
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td {
        height: 160px !important;
        max-height: 160px !important;
        min-height: 160px !important;
        vertical-align: top !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
        line-height: 1.4 !important;
    }

    /* Varmista että solut skaalautuvat sisällön mukaan */
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td.product-thumbnail {
        height: auto !important;
        min-height: auto !important;
        vertical-align: top;
        width: 120px !important;
        max-width: 120px !important;
        min-width: 120px !important;
        padding-right: 0 !important;
    }

    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td.product-name {
        height: auto !important;
        min-height: auto !important;
        vertical-align: top;
        padding-left: 10px !important;
    }

    /* Pienennä myös otsikkorivin tuotekuvan sarake */
    .woocommerce-cart table.woocommerce-cart-form__contents thead th.product-thumbnail,
    .woocommerce-cart table.woocommerce-cart-form__contents thead th:first-child {
        width: 120px !important;
        max-width: 120px !important;
        min-width: 120px !important;
    }
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td.product-price,
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td.product-quantity,
    .woocommerce-cart table.woocommerce-cart-form__contents tbody tr.cart_item td.product-subtotal {
        height: auto !important;
        min-height: auto !important;
        vertical-align: top;
    }
}

/* ==========================================================================
   Tuotehaku-sivun ulkoasuongelmat - korjaukset
   ========================================================================== */

/* Alasvetovalikot: Normalisoi koko ja tyyli - YLEISET SÄÄNNÖT */
.ecomus-parts-search-box-form select.select-year-parts,
.ecomus-parts-search-box-form select.select-make-parts,
.ecomus-parts-search-box-form select.select-model-parts,
.ecomus-parts-search-box-form select.select-engine-parts,
.ecomus-parts-search-box-form select.select-fueltype-parts,
.ecomus-parts-search-box-form select.ecomus-select-active,
#advanced-searchform select.select-year-parts,
#advanced-searchform select.select-make-parts,
#advanced-searchform select.select-model-parts,
#advanced-searchform select.select-engine-parts,
#advanced-searchform select.select-fueltype-parts,
#advanced-searchform select.ecomus-select-active,
/* RST ProSearch plugin - alasvetovalikot */
.rst-prosearch-input-group select,
#makeYear,
#makeBrand,
#makeModel,
#makeEngine {
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 10px 35px 10px 15px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    background-size: 12px 7px !important;
    background-position: calc(100% - 15px) center !important;
}

/* Ikonit alasvetovalikoissa: Normalisoi koko */
.ecomus-parts-search-box-form select + svg,
.ecomus-parts-search-box-form .select2-selection__arrow svg,
.ecomus-parts-search-box-form .select2-selection__arrow,
/* RST ProSearch plugin - ikonit */
.rst-prosearch-input-group svg,
.rst-prosearch-input-group img[src*="icon"],
.rst-prosearch-input-group .icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Osasto-puu: Korjaa musta tausta - YLEISET SÄÄNNÖT */
.ecomus-sidebar-area,
.ecomus-sidebar-area .widget,
.ecomus-sidebar-area .widget-title,
.ecomus-sidebar-area .widget ul,
.ecomus-sidebar-area .widget li,
.ecomus-sidebar-area .widget_product_categories,
.ecomus-sidebar-area .widget_product_categories ul,
.ecomus-sidebar-area .widget_product_categories ul li,
/* Brator sidebar (käytetään tuotehaku-sivulla) */
.brator-sidebar-single-item,
.brator-sidebar-single-item.widget_product_categories,
.brator-sidebar-single-item .widget-title,
.brator-sidebar-single-item ul,
.brator-sidebar-single-item ul li,
.brator-sidebar-single-item ul li a {
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #000000 !important;
}

.ecomus-sidebar-area .widget-title {
    background-color: transparent !important;
    color: #000000 !important;
    padding: 15px 0 !important;
    margin-bottom: 15px !important;
    border-bottom: 1px solid #ebebeb !important;
}

.ecomus-sidebar-area .widget ul li {
    background-color: transparent !important;
    padding: 8px 0 !important;
}

.ecomus-sidebar-area .widget ul li a,
.ecomus-sidebar-area .widget_product_categories ul li a,
.brator-sidebar-single-item ul li a {
    color: #000000 !important;
}

.ecomus-sidebar-area .widget ul li.current-cat,
.ecomus-sidebar-area .widget ul li.current-cat > a,
.ecomus-sidebar-area .widget_product_categories ul li.current-cat,
.ecomus-sidebar-area .widget_product_categories ul li.current-cat > a,
.brator-sidebar-single-item ul li.current-cat,
.brator-sidebar-single-item ul li.current-cat > a {
    background-color: transparent !important;
    background: transparent !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Varmista että sidebar-alue on valkoinen */
.ecomus-product-shop-page-area .ecomus-sidebar-area {
    background-color: #ffffff !important;
    padding: 20px !important;
    border-radius: 4px !important;
}

/* Fibo Filter dropdownit: Normalisoi koko */
.fibo-filter-select,
.fibo-filter-select select,
.fibo-filter-select .select2-container,
.fibo-filter-select .select2-selection--single {
    font-size: 14px !important;
    line-height: 1.5 !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
}

.fibo-filter-select .select2-selection__arrow,
.fibo-filter-select .select2-selection__arrow svg {
    width: 12px !important;
    height: 7px !important;
    max-width: 12px !important;
    max-height: 7px !important;
}

/* Ikonit yleisesti: Normalisoi koko */
.ecomus-parts-search-box-form svg,
.ecomus-parts-search-box-form img[src*="icon"],
.ecomus-parts-search-box-form .icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Tuotehaku-sivun erityiset korjaukset - Page ID: 60409 */
.page-id-60409 .ecomus-parts-search-box-form select,
body.page-id-60409 .ecomus-parts-search-box-form select,
body.page-tuotehaku .ecomus-parts-search-box-form select,
.page-id-tuotehaku .ecomus-parts-search-box-form select {
    font-size: 14px !important;
    padding: 10px 35px 10px 15px !important;
    height: 44px !important;
    line-height: 1.5 !important;
    background-size: 12px 7px !important;
    background-position: calc(100% - 15px) center !important;
}

.page-id-60409 .ecomus-sidebar-area,
body.page-id-60409 .ecomus-sidebar-area,
body.page-tuotehaku .ecomus-sidebar-area,
.page-id-tuotehaku .ecomus-sidebar-area {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

.page-id-60409 .ecomus-sidebar-area .widget,
body.page-id-60409 .ecomus-sidebar-area .widget,
body.page-tuotehaku .ecomus-sidebar-area .widget,
.page-id-tuotehaku .ecomus-sidebar-area .widget {
    background-color: transparent !important;
    background: transparent !important;
    color: #000000 !important;
}

/* Fibo Filter widget: Normalisoi dropdownien koko */
.products-filter-widget .dropdown .select2-container,
.products-filter-widget .dropdown .select2-selection--single,
.products-filter-widget--elementor .dropdown .select2-container,
.products-filter-widget--elementor .dropdown .select2-selection--single {
    font-size: 14px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
}

.products-filter-widget .dropdown .select2-selection__arrow,
.products-filter-widget--elementor .dropdown .select2-selection__arrow {
    width: 12px !important;
    height: 7px !important;
    max-width: 12px !important;
    max-height: 7px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 10px !important;
}

/* Ikonit Fibo Filter -widgeteissä: Normalisoi koko */
.products-filter-widget svg,
.products-filter-widget img[src*="icon"],
.products-filter-widget .icon,
.products-filter-widget--elementor svg,
.products-filter-widget--elementor img[src*="icon"],
.products-filter-widget--elementor .icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Tuotehaku-sivun Fibo Filter -dropdownit: Normalisoi koko - Page ID: 60409 */
body.page-id-60409 .products-filter-widget .dropdown .select2-container,
body.page-id-60409 .products-filter-widget .dropdown .select2-selection--single,
body.page-tuotehaku .products-filter-widget .dropdown .select2-container,
body.page-tuotehaku .products-filter-widget .dropdown .select2-selection--single,
.page-id-tuotehaku .products-filter-widget .dropdown .select2-container,
.page-id-tuotehaku .products-filter-widget .dropdown .select2-selection--single {
    font-size: 14px !important;
    height: 44px !important;
    line-height: 1.5 !important;
}

/* Tuotehaku-sivun ajoneuvohakulomakkeen dropdownit: Normalisoi koko ja ikonit - Page ID: 60409 */
body.page-id-60409 .ecomus-parts-search-box-form select,
body.page-tuotehaku .ecomus-parts-search-box-form select,
.page-id-tuotehaku .ecomus-parts-search-box-form select {
    font-size: 14px !important;
    padding: 10px 35px 10px 15px !important;
    height: 44px !important;
    line-height: 1.5 !important;
    background-size: 12px 7px !important;
    background-position: calc(100% - 15px) center !important;
}

/* Tuotehaku-sivun ajoneuvohakulomakkeen ikonit: Normalisoi koko - Page ID: 60409 */
body.page-id-60409 .ecomus-parts-search-box-form svg,
body.page-tuotehaku .ecomus-parts-search-box-form svg,
.page-id-tuotehaku .ecomus-parts-search-box-form svg {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* Tuotehaku-sivun osasto-puu: Korjaa musta tausta - Page ID: 60409 */
body.page-id-60409 .ecomus-sidebar-area,
body.page-tuotehaku .ecomus-sidebar-area,
.page-id-tuotehaku .ecomus-sidebar-area {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

body.page-id-60409 .ecomus-sidebar-area .widget,
body.page-id-60409 .ecomus-sidebar-area .widget-title,
body.page-id-60409 .ecomus-sidebar-area .widget ul,
body.page-id-60409 .ecomus-sidebar-area .widget li,
body.page-tuotehaku .ecomus-sidebar-area .widget,
body.page-tuotehaku .ecomus-sidebar-area .widget-title,
body.page-tuotehaku .ecomus-sidebar-area .widget ul,
body.page-tuotehaku .ecomus-sidebar-area .widget li,
.page-id-tuotehaku .ecomus-sidebar-area .widget,
.page-id-tuotehaku .ecomus-sidebar-area .widget-title,
.page-id-tuotehaku .ecomus-sidebar-area .widget ul,
.page-id-tuotehaku .ecomus-sidebar-area .widget li {
    background-color: transparent !important;
    background: transparent !important;
    color: #000000 !important;
}

/* Tuotehaku-sivun osasto-puu: Korjaa musta tausta - widget_product_categories - Page ID: 60409 */
body.page-id-60409 .widget_product_categories,
body.page-tuotehaku .widget_product_categories,
.page-id-tuotehaku .widget_product_categories,
/* Brator sidebar tuotehaku-sivulla */
body.page-id-60409 .brator-sidebar-single-item,
body.page-tuotehaku .brator-sidebar-single-item,
.page-id-tuotehaku .brator-sidebar-single-item {
    background-color: transparent !important;
    background: transparent !important;
}

body.page-id-60409 .widget_product_categories ul,
body.page-id-60409 .widget_product_categories ul li,
body.page-tuotehaku .widget_product_categories ul,
body.page-tuotehaku .widget_product_categories ul li,
.page-id-tuotehaku .widget_product_categories ul,
.page-id-tuotehaku .widget_product_categories ul li,
body.page-id-60409 .brator-sidebar-single-item ul,
body.page-id-60409 .brator-sidebar-single-item ul li,
body.page-tuotehaku .brator-sidebar-single-item ul,
body.page-tuotehaku .brator-sidebar-single-item ul li,
.page-id-tuotehaku .brator-sidebar-single-item ul,
.page-id-tuotehaku .brator-sidebar-single-item ul li {
    background-color: transparent !important;
    background: transparent !important;
    color: #000000 !important;
}

body.page-id-60409 .widget_product_categories ul li a,
body.page-tuotehaku .widget_product_categories ul li a,
.page-id-tuotehaku .widget_product_categories ul li a,
body.page-id-60409 .brator-sidebar-single-item ul li a,
body.page-tuotehaku .brator-sidebar-single-item ul li a,
.page-id-tuotehaku .brator-sidebar-single-item ul li a {
    color: #000000 !important;
}

body.page-id-60409 .widget_product_categories ul li.current-cat,
body.page-id-60409 .widget_product_categories ul li.current-cat > a,
body.page-tuotehaku .widget_product_categories ul li.current-cat,
body.page-tuotehaku .widget_product_categories ul li.current-cat > a,
.page-id-tuotehaku .widget_product_categories ul li.current-cat,
.page-id-tuotehaku .widget_product_categories ul li.current-cat > a,
body.page-id-60409 .brator-sidebar-single-item ul li.current-cat,
body.page-id-60409 .brator-sidebar-single-item ul li.current-cat > a,
body.page-tuotehaku .brator-sidebar-single-item ul li.current-cat,
body.page-tuotehaku .brator-sidebar-single-item ul li.current-cat > a,
.page-id-tuotehaku .brator-sidebar-single-item ul li.current-cat,
.page-id-tuotehaku .brator-sidebar-single-item ul li.current-cat > a {
    background-color: transparent !important;
    color: #000000 !important;
    font-weight: 600 !important;
}

/* Tuotehaku-sivun RST ProSearch -alasvetovalikot: Normalisoi koko - Page ID: 60409 */
body.page-id-60409 .rst-prosearch-input-group select,
body.page-tuotehaku .rst-prosearch-input-group select,
.page-id-tuotehaku .rst-prosearch-input-group select,
body.page-id-60409 #makeYear,
body.page-id-60409 #makeBrand,
body.page-id-60409 #makeModel,
body.page-id-60409 #makeEngine,
body.page-tuotehaku #makeYear,
body.page-tuotehaku #makeBrand,
body.page-tuotehaku #makeModel,
body.page-tuotehaku #makeEngine {
    font-size: 14px !important;
    padding: 10px 35px 10px 15px !important;
    height: 44px !important;
    line-height: 1.5 !important;
    background-size: 12px 7px !important;
    background-position: calc(100% - 15px) center !important;
}

/* Tuotehaku-sivun RST ProSearch -ikonit: Normalisoi koko - Page ID: 60409 */
body.page-id-60409 .rst-prosearch-input-group svg,
body.page-id-60409 .rst-prosearch-input-group img[src*="icon"],
body.page-tuotehaku .rst-prosearch-input-group svg,
body.page-tuotehaku .rst-prosearch-input-group img[src*="icon"] {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
}

/* ==========================================================================
   Checkout-sivun leveys: Aseta sama leveys kuin muilla sivuilla
   ========================================================================== */

/* Rajoita checkout- ja ostoskori-sivun site-content -elementin leveyttä */
body.woocommerce-checkout .site-content,
body.woocommerce-cart .site-content {
    max-width: 1540px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

@media (min-width: 768px) {
    body.woocommerce-checkout .site-content,
    body.woocommerce-cart .site-content {
        max-width: 1500px !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

@media (min-width: 1150px) {
    body.woocommerce-checkout .site-content,
    body.woocommerce-cart .site-content {
        max-width: 1540px !important;
        padding-left: 50px !important;
        padding-right: 50px !important;
    }
}

/* ==========================================================================
   Ostoskori-sivun otsikko: 30px margin ylös ja alas
   ========================================================================== */
body.woocommerce-cart .page-header__content,
body.woocommerce-checkout .page-header__content {
    width: 100% !important;
    text-align: center !important;
}

body.woocommerce-cart .page-header__title.em-font-h4,
body.woocommerce-checkout .page-header__title.em-font-h4 {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    width: 100% !important;
}

/* ==========================================================================
   Evästekäytännöt-sivu: sisältöalueen keskitys ja otsikko
   ========================================================================== */
body.page-id-42421 .site-content {
    max-width: 1540px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

body.page-id-42421 .page-header__content {
    width: 100% !important;
    text-align: center !important;
}

body.page-id-42421 .page-header__title.em-font-h4 {
    margin-top: 30px !important;
    margin-bottom: 30px !important;
    text-align: center !important;
    width: 100% !important;
}

/* Piilota vanha Elementor-otsikko ja duplikaatti WooCommerce-otsikko kassasivulta */
body.woocommerce-checkout h1.elementor-heading-title.elementor-size-xl,
body.woocommerce-checkout .elementor-heading-title.elementor-size-xl,
body.woocommerce-checkout .woocommerce > h1:first-child,
body.woocommerce-checkout form.woocommerce-checkout > h1,
body.woocommerce-checkout .woocommerce-checkout > h1 {
    display: none !important;
}

/* ==========================================================================
   Tuotehaku-sivu (page-id-60409): Kiinteä sisältöalueen leveys
   ========================================================================== */

/* Tuotehaku-sivun sisältöalue: rajoita leveys ja keskitä */
body.page-id-60409 .site-content,
body.page-tuotehaku .site-content {
    max-width: 1540px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Tuotehaku-sivun Elementor-osiot: käytä sivun leveyttä */
body.page-id-60409 .site-content > .elementor,
body.page-id-60409 .site-content .elementor-section,
body.page-tuotehaku .site-content > .elementor,
body.page-tuotehaku .site-content .elementor-section {
    max-width: 100% !important;
    width: 100% !important;
}

/* Tuotehaku-sivun sisältökontti */
body.page-id-60409 .site-content .elementor-container,
body.page-tuotehaku .site-content .elementor-container {
    max-width: 100% !important;
}

/* Responsiiviset säädöt - tablet */
@media (min-width: 768px) {
    body.page-id-60409 .site-content,
    body.page-tuotehaku .site-content {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

/* Responsiiviset säädöt - desktop */
@media (min-width: 1150px) {
    body.page-id-60409 .site-content,
    body.page-tuotehaku .site-content {
        padding-left: 50px !important;
        padding-right: 50px !important;
    }
}

/* ==========================================================================
   RST ProSearch: Alasvetovalikoiden reset-buttonit neliöksi
   ========================================================================== */

/* Reset-buttonit: neliökoko ikoneille */
.rst-prosearch-input-reset {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
}

/* Varmista että SVG-ikonit ovat oikean kokoisia ja mustia */
.rst-prosearch-input-reset svg {
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    max-width: 16px !important;
    max-height: 16px !important;
    flex-shrink: 0 !important;
    color: #000 !important;
    fill: #000 !important;
}

/* Disabled-tila: näytä hieman haaleampana */
.rst-prosearch-input-reset[disabled] {
    opacity: 0.4 !important;
    cursor: not-allowed !important;
}

/* Tuotehaku-sivu erityiset säännöt */
body.page-id-60409 .rst-prosearch-input-reset,
body.page-tuotehaku .rst-prosearch-input-reset {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;
}

/* ==========================================================================
   RST ProSearch: Osastot-alueen kategoriabuttttonit
   ========================================================================== */

#rst-prosearch-categories button {
    color: #666 !important;
    font-size: .875rem !important;
    font-weight: 600 !important;
    line-height: 2rem !important;
    padding: .25rem 0 !important;
    text-align: left !important;
    background-color: #fff !important;
    border: 0 !important;
    display: block !important;
    width: 100% !important;
    cursor: pointer !important;
}

#rst-prosearch-categories button:hover {
    color: #000 !important;
}

#rst-prosearch-categories button.active {
    color: #000 !important;
    font-weight: 700 !important;
    background-color: rgba(229, 229, 229, 0.5) !important;
}

/* ==========================================================================
   RST ProSearch: Input-group järjestys ja reset-buttonin sijainti
   ========================================================================== */

/* Input-group flexbox järjestys */
.rst-prosearch-input-group {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    position: relative !important;
}

/* Ikoni-button (vasemmalla) - 1px border ja kiinni selectissä */
.rst-prosearch-input-group > .rst-prosearch-input-reset:first-child {
    order: 1 !important;
    border: 1px solid #ddd !important;
    border-right: none !important;
    border-radius: 4px 0 0 4px !important;
    width: 44px !important;
    height: 44px !important;
    background-color: #fff !important;
    transition: background-color 0.2s ease !important;
    pointer-events: auto !important; /* Mahdollista hover myös disabled-tilassa */
    cursor: default !important;
}

.rst-prosearch-input-group > .rst-prosearch-input-reset:first-child:hover {
    background-color: #f5f5f5 !important;
}

/* Select on keskellä */
.rst-prosearch-input-group > select {
    order: 2 !important;
    flex: 1 !important;
    border-radius: 0 !important;
    border-left: none !important;
}

/* Nollaa-button (oikealla) - X-ikoni tyhjentämiseen */
.rst-prosearch-input-group > .rst-prosearch-input-reset:not(:first-child) {
    order: 3 !important;
    position: relative !important;
    right: auto !important;
    border: 1px solid #ddd !important;
    border-left: none !important;
    border-radius: 0 4px 4px 0 !important;
    width: 36px !important;
    height: 44px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    background-color: #f5f5f5 !important;
}

.rst-prosearch-input-group > .rst-prosearch-input-reset:not(:first-child):hover {
    background-color: #e5e5e5 !important;
}

/* Kun nollaa-button ei näy, pyöristä selectin oikea reuna */
.rst-prosearch-input-group > select:last-child,
.rst-prosearch-input-group > .rst-prosearch-input-reset:not(:first-child)[style*="display: none"] + select {
    border-radius: 0 4px 4px 0 !important;
    border-right: 1px solid #ddd !important;
}

/* ==========================================================================
   Tuotehaku-sivu: Piilota "Osastot" otsikko
   ========================================================================== */

body.page-id-60409 h2.shop-sidebar-title,
body.page-tuotehaku h2.shop-sidebar-title,
.page-id-60409 h2.shop-sidebar-title,
.page-tuotehaku h2.shop-sidebar-title {
    display: none !important;
}

/* ==========================================================================
   Cross-sells (Suosittelemme sinulle) karusellin nuolipainikkeet
   ========================================================================== */

/* Varmista container on position: relative ja overflow näkyy */
section.cross-sells {
    position: relative !important;
    overflow: visible !important;
}

section.cross-sells .products-carousel {
    position: relative !important;
    overflow: visible !important;
}

section.cross-sells .products-carousel .swiper-wrapper {
    overflow: visible !important;
}

/* Varmista että cross-sells nuolipainikkeet näkyvät ja käyttävät teeman tyyliä */
section.cross-sells .swiper-button-next,
section.cross-sells .swiper-button-prev,
section.cross-sells .ecomus-swiper-button.swiper-button {
    color: #000 !important;
    background-color: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    position: absolute !important;
    top: 180px !important; /* Keskellä tuotekuvan korkeutta */
    transform: translateY(-50%) !important;
    z-index: 100 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

section.cross-sells .swiper-button-next:hover,
section.cross-sells .swiper-button-prev:hover {
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
}

section.cross-sells .swiper-button-next {
    right: -20px !important;
}

section.cross-sells .swiper-button-prev {
    left: -20px !important;
}

section.cross-sells .swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

/* SVG ikoni väri */
section.cross-sells .ecomus-swiper-button svg,
section.cross-sells .swiper-button svg {
    width: 7px !important;
    height: 11px !important;
    fill: currentColor !important;
}

/* ==========================================================================
   Tuotelistaus mobiili: Tuotekorttien välit
   ========================================================================== */

@media (max-width: 767px) {
    /* Tuotekorttien (wpcbm-wrapper) 15px marginaali mobiilissa */
    .wpcbm-wrapper.wpcbm-wrapper-archive-image {
        margin-bottom: 15px !important;
    }
    
    /* Varmista että tuotegridi käyttää sopivaa väliä */
    ul.products li.product,
    .products .product {
        margin-bottom: 15px !important;
    }
}

/* ==========================================================================
   Cross-sells karusellin nuolipainikkeet
   ========================================================================== */

/* Cross-sells karusellin nuolipainikkeiden tyylit */
.cross-sells.products .swiper-button,
.cross-sells.products .ecomus-swiper-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff !important;
    border: 1px solid #e5e5e5 !important;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    color: #000 !important;
}

.cross-sells.products .swiper-button:hover,
.cross-sells.products .ecomus-swiper-button:hover {
    background-color: #f5f5f5 !important;
    border-color: #ccc !important;
}

.cross-sells.products .swiper-button-next {
    right: -20px;
}

.cross-sells.products .swiper-button-prev {
    left: -20px;
}

.cross-sells.products .swiper-button svg {
    width: 7px;
    height: 11px;
    fill: currentColor;
}

.cross-sells.products .swiper-button-disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Varmista että cross-sells container on relative */
.cross-sells.products .products-carousel {
    position: relative;
}

/* ==========================================================================
   Headerin puhelinnumero ja teksti: Pienennä asteittain ja piilota <= 1330px
   ========================================================================== */

/* Desktop (1331px+) - oletus: 28px (teeman oletus) */

/* Piilota puhelinnumero kun selaimen leveys on 1330px tai alle */
@media (max-width: 1330px) {
    .header-support-center,
    #site-header .header-support-center,
    .site-header .header-support-center,
    header .header-support-center,
    .header-support-center__phone,
    .header-support-center__text,
    .header-support-center__content {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        height: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
        margin: 0 !important;
        padding: 0 !important;
    }
}

/* ==========================================================================
   Tuotelistaus: product-featured-icons hover
   ========================================================================== */
/* (Ecomus-teeman oletustyylit käytössä) */

/* ==========================================================================
   Page Header: Sisältö ja kuvaus vasemmalle tasatuksi
   ========================================================================== */

/* Page header content: vasen tasaus keskityksen sijaan */
.page-header__content,
.page-header__content.text-center,
.page-header__content.em-flex-align-center {
    text-align: left !important;
    align-items: flex-start !important;
}

/* Page header kuvaus: vasen tasaus */
.page-header__description.shop-header__description,
.page-header__description.shop-header__description.text-center {
    text-align: left !important;
}

/* Varmista että sisältö on myös vasemmalla */
.page-header__description .shop-header__content,
.page-header__description .shop-header__content p,
.page-header__description .shop-header__content ul,
.page-header__description .shop-header__content ol {
    text-align: left !important;
}

/* Breadcrumb vasemmalle */
.page-header__content .site-breadcrumb {
    text-align: left !important;
}

/* ==========================================================================
   Checkout: Käyttöehdot-teksti lihavoitu
   ========================================================================== */

.woocommerce-terms-and-conditions-checkbox-text {
    font-weight: 700;
}

/* ==========================================================================
   FiboFilters: Tuoteryhmät-suodattimen alakategoriat oletuksena auki
   ========================================================================== */

/* Näytä kaikki piilotetut alakategoriat Tuoteryhmät-suodattimessa */
.fibofilters-block--url-slug--categories .fibofilters-block__items-list--hidden {
    display: block !important;
}

/* Käännä collapser-ikonit osoittamaan alas (expanded state) */
.fibofilters-block--url-slug--categories .fibofilters-collapser .fibofilters-button svg {
    transform: rotate(180deg);
}

/* ==========================================================================
   Tuoteryhmäkategoriat: Grid-layout kaikille näytöille
   ========================================================================== */

/* Yleiset säännöt kaikille näytöille */
.catalog-top-categories {
    padding: 0 15px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    overflow: hidden !important;
    margin-bottom: 30px !important;
}

/* Piilotetaan Swiper-navigaatio */
.catalog-top-categories .ecomus-swiper-button,
.catalog-top-categories .swiper-pagination {
    display: none !important;
}

/* Wrapper: Grid-pohjainen layout */
.catalog-top-categories__wrapper {
    display: grid !important;
    gap: 12px !important;
    transform: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Yksittäinen kategoria-kortti */
.catalog-top-categories__item {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #f9f9f9 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 10px !important;
    padding: 12px 14px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    transition: all 0.25s ease !important;
    box-sizing: border-box !important;
}

/* Hover-efekti */
.catalog-top-categories__item:hover {
    transform: scale(1.03) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12) !important;
    border-color: #ccc !important;
}

/* Sisäinen linkki: flexbox rivi */
.catalog-top-categories__inner {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    aspect-ratio: auto !important;
    padding: 0 !important;
}

/* Poista ratio-padding */
.catalog-top-categories__inner::before {
    display: none !important;
}

/* Otsikko/teksti vasemmalle */
.catalog-top-categories__title {
    display: flex !important;
    position: static !important;
    transform: none !important;
    background: transparent !important;
    padding: 0 !important;
    order: -1 !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    bottom: auto !important;
    left: auto !important;
    border: none !important;
    box-shadow: none !important;
    align-items: center !important;
}

.catalog-top-categories__title:hover {
    background: transparent !important;
}

/* Teksti-tyyli */
.catalog-top-categories__text {
    font-weight: 600 !important;
    color: #333 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    line-height: 1.4 !important;
    display: block !important;
}

/* Piilota nuoli-ikoni */
.catalog-top-categories__title .ecomus-svg-icon {
    display: none !important;
}

/* Kuva oikealle */
.catalog-top-categories__image {
    position: static !important;
    object-fit: contain !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
}

/* ==========================================================================
   Mobiili (< 768px): 2 saraketta
   ========================================================================== */
@media (max-width: 767px) {
    .catalog-top-categories__wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    
    .catalog-top-categories__item {
        padding: 10px 12px !important;
        min-height: 65px !important;
    }
    
    .catalog-top-categories__item:active {
        transform: scale(1.02) !important;
    }
    
    .catalog-top-categories__title {
        max-width: calc(100% - 55px) !important;
    }
    
    .catalog-top-categories__text {
        font-size: 11px !important;
        hyphens: auto !important;
    }
    
    .catalog-top-categories__image {
        width: 45px !important;
        height: 45px !important;
        min-width: 45px !important;
        min-height: 45px !important;
        max-width: 45px !important;
        max-height: 45px !important;
        margin-left: 8px !important;
    }
}

/* ==========================================================================
   Tabletti (768px - 1199px): 3-4 saraketta
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1199px) {
    .catalog-top-categories {
        padding: 0 20px !important;
    }
    
    .catalog-top-categories__wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 14px !important;
    }
    
    .catalog-top-categories__item {
        padding: 14px 16px !important;
        min-height: 75px !important;
    }
    
    .catalog-top-categories__title {
        max-width: calc(100% - 70px) !important;
    }
    
    .catalog-top-categories__text {
        font-size: 13px !important;
    }
    
    .catalog-top-categories__image {
        width: 55px !important;
        height: 55px !important;
        min-width: 55px !important;
        min-height: 55px !important;
        max-width: 55px !important;
        max-height: 55px !important;
        margin-left: 10px !important;
    }
}

/* Tabletti iso (1024px+): 4 saraketta */
@media (min-width: 1024px) and (max-width: 1199px) {
    .catalog-top-categories__wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ==========================================================================
   Desktop (1200px+): 4-5 saraketta
   ========================================================================== */
@media (min-width: 1200px) {
    .catalog-top-categories {
        padding: 0 0 !important;
        padding-top: 20px !important;
        padding-bottom: 20px !important;
        margin-bottom: 40px !important;
    }
    
    .catalog-top-categories__wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 16px !important;
    }
    
    .catalog-top-categories__item {
        padding: 16px 18px !important;
        min-height: 80px !important;
        border-radius: 12px !important;
    }
    
    .catalog-top-categories__title {
        max-width: calc(100% - 80px) !important;
    }
    
    .catalog-top-categories__text {
        font-size: 0.875rem !important;
    }
    
    .catalog-top-categories__image {
        width: 60px !important;
        height: 60px !important;
        min-width: 60px !important;
        min-height: 60px !important;
        max-width: 60px !important;
        max-height: 60px !important;
        margin-left: 12px !important;
        border-radius: 10px !important;
    }
}

/* Leveä desktop (1400px+): 5 saraketta */
@media (min-width: 1400px) {
    .catalog-top-categories__wrapper {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 18px !important;
    }
}

/* ==========================================================================
   Tuotelistaus: "Lisää ostoskoriin" -nappi aina näkyviin
   ========================================================================== */

/* Piilota hover-ikoni kuvan päältä */
ul.products li.product .product-featured-icons {
    display: none !important;
}

/* Näytä ATC-painike hinnan alla (Ecomus mobile-button) */
ul.products li.product .em-button-add-to-cart-mobile {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100%;
    margin-top: 10px;
    justify-content: center;
}

/* ==========================================================================
   Tuotekortin yläpalkki/otsake (Product Card Top Banner)
   ========================================================================== */

/* Yläpalkin container - taustaväri tässä kokoleveänä */
.product-card-top-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10;
    pointer-events: none;
    background-color: #202020 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Yläpalkin teksti */
.product-card-top-banner__text {
    background-color: transparent !important;
    color: #fff;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: block !important;
}

/* Varmista että product-inner on relative */
ul.products li.product .product-inner {
    position: relative;
}

/* Desktop: hieman isompi fontti */
@media (min-width: 768px) {
    .product-card-top-banner__text {
        font-size: 12px;
        padding: 8px 10px;
    }
}

/* Mobiili: pienempi fontti */
@media (max-width: 767px) {
    .product-card-top-banner__text {
        font-size: 10px;
        padding: 5px 6px;
    }
}

/* ==========================================================================
   Tuotesivun vinonauha/ribbon (Single Product Gallery Ribbon)
   ========================================================================== */

/* Gallerian kuvan container - overflow hidden piilottaa nauhan ylimenevät osat */
.woocommerce-product-gallery__image {
    overflow: hidden !important;
    position: relative !important;
}

/* Vinonauha */
.product-card-ribbon {
    position: absolute;
    left: -50px;
    top: 45px;
    width: 220px;
    transform: rotate(-45deg);
    z-index: 20;
    pointer-events: none;
}

.product-card-ribbon__text {
    display: block;
    background-color: inherit;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 12px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

/* Desktop: isompi */
@media (min-width: 992px) {
    .product-card-ribbon {
        left: -45px;
        top: 55px;
        width: 240px;
    }
    
    .product-card-ribbon__text {
        font-size: 14px;
        padding: 10px 15px;
    }
}

/* Tabletti */
@media (min-width: 768px) and (max-width: 991px) {
    .product-card-ribbon {
        left: -50px;
        top: 45px;
        width: 220px;
    }
    
    .product-card-ribbon__text {
        font-size: 12px;
        padding: 8px 12px;
    }
}

/* Mobiili */
@media (max-width: 767px) {
    .product-card-ribbon {
        left: -55px;
        top: 35px;
        width: 200px;
    }
    
    .product-card-ribbon__text {
        font-size: 11px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   Tuotekarusellien otsikot: Aina 3 rivin korkuinen
   ========================================================================== */

/* Tuotenimen kiinteä 3 rivin korkeus karuselleissa/liukureissa JA tuotelistauksissa */
.ecomus-products-carousel .woocommerce-loop-product__title,
.products-carousel .woocommerce-loop-product__title,
.swiper .woocommerce-loop-product__title,
.tax-product_cat ul.products .woocommerce-loop-product__title,
.post-type-archive-product ul.products .woocommerce-loop-product__title {
    min-height: 2.4em !important; /* 2 riviä line-height 1.2 */
    line-height: 1.2 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin-bottom: 8px !important;
}

/* Mobiilissa hieman pienempi korkeus */
@media (max-width: 767px) {
    .ecomus-products-carousel .woocommerce-loop-product__title,
    .products-carousel .woocommerce-loop-product__title,
    .swiper .woocommerce-loop-product__title,
    .tax-product_cat ul.products .woocommerce-loop-product__title,
    .post-type-archive-product ul.products .woocommerce-loop-product__title {
        min-height: 2.6em !important; /* 2 riviä pienemmällä fontilla */
        font-size: 14px !important;
    }
}

/* ==========================================================================
   Tuotesivun gallerian leveyden kasvatus (+15%)
   ========================================================================== */

/* Pakota gallerian kuvat täyttämään container */
.single-product .woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    max-width: none !important;
}

/* Desktop: Kasvata galleria 50% -> 57.5%, pienennä summary 50% -> 42.5% */
@media (min-width: 992px) {
    .single-product div.product .product-gallery-summary .woocommerce-product-gallery {
        width: calc(57.5% - 27px) !important;
    }
    
    .single-product div.product .product-gallery-summary .entry-summary {
        width: calc(42.5% - 27px) !important;
    }
}

/* Isompi desktop: vielä enemmän tilaa gallerialle */
@media (min-width: 1400px) {
    .single-product div.product .product-gallery-summary .woocommerce-product-gallery {
        width: calc(60% - 27px) !important;
    }
    
    .single-product div.product .product-gallery-summary .entry-summary {
        width: calc(40% - 27px) !important;
    }
}

/* ==========================================================================
   Mobiili-footer: Tyylikäs accordion-tyylinen mobiiliystävällinen footer
   ========================================================================== */

@media (max-width: 767px) {
    /* Footer-section perusasetukset */
    .elementor-element-7522c90 {
        padding: 0 !important;
    }
    
    .elementor-element-7522c90 > .elementor-container {
        flex-direction: column !important;
        gap: 0 !important;
    }
    
    /* Kaikki sarakkeet täysleveiksi */
    .elementor-element-7522c90 .elementor-column {
        width: 100% !important;
        padding: 0 !important;
    }
    
    /* === ENSIMMÄINEN SARAKE: Logo ja yhteystiedot === */
    .elementor-element-7522c90 .elementor-element-2223493 {
        order: 1;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 24px !important;
    }
    
    .elementor-element-7522c90 .elementor-element-2223493 .elementor-widget-wrap {
        padding: 24px 20px !important;
        text-align: center;
    }
    
    /* Logo keskitetty */
    .elementor-element-7522c90 .elementor-element-d88295a {
        margin-bottom: 20px !important;
    }
    
    .elementor-element-7522c90 .elementor-element-d88295a img {
        max-width: 200px !important;
        margin: 0 auto;
        display: block;
    }
    
    /* Yhteystiedot tyylikkäämmin */
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-items {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }
    
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item {
        text-align: center;
        font-size: 13px;
        opacity: 0.85;
        line-height: 1.6;
    }
    
    /* Puhelin korostettuna */
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(4) {
        font-size: 18px !important;
        font-weight: 600 !important;
        opacity: 1 !important;
        color: #ffffff !important;
        margin: 12px 0;
        background: rgba(255, 255, 255, 0.1);
        padding: 12px 24px;
        border-radius: 8px;
    }
    
    /* Piilota tyhjät rivit */
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(3),
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(5) {
        display: none !important;
    }
    
    /* Osoitteet pieninä pilleinä */
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(6),
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(7),
    .elementor-element-7522c90 .elementor-element-0ba9089 .elementor-icon-list-item:nth-child(8) {
        font-size: 11px !important;
        opacity: 0.7;
        padding: 4px 12px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 20px;
        margin: 2px 0;
    }
    
    /* === TOINEN JA KOLMAS SARAKE: Accordion-linkit === */
    .elementor-element-7522c90 .elementor-element-68239b0,
    .elementor-element-7522c90 .elementor-element-ceeb394 {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .elementor-element-7522c90 .elementor-element-68239b0 {
        order: 2;
    }
    
    .elementor-element-7522c90 .elementor-element-ceeb394 {
        order: 3;
    }
    
    .elementor-element-7522c90 .elementor-element-68239b0 .elementor-widget-wrap,
    .elementor-element-7522c90 .elementor-element-ceeb394 .elementor-widget-wrap {
        padding: 0 !important;
    }
    
    /* Otsikko accordion-triggerinä */
    .elementor-element-7522c90 .elementor-element-9e1b463,
    .elementor-element-7522c90 .elementor-element-f633df7 {
        margin: 0 !important;
    }
    
    .elementor-element-7522c90 .elementor-element-9e1b463 .elementor-heading-title,
    .elementor-element-7522c90 .elementor-element-f633df7 .elementor-heading-title {
        padding: 18px 20px !important;
        margin: 0 !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        cursor: pointer;
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        transition: background 0.2s ease;
    }
    
    .elementor-element-7522c90 .elementor-element-9e1b463 .elementor-heading-title:hover,
    .elementor-element-7522c90 .elementor-element-f633df7 .elementor-heading-title:hover {
        background: rgba(255, 255, 255, 0.05);
    }
    
    .elementor-element-7522c90 .elementor-element-9e1b463 .elementor-heading-title::after,
    .elementor-element-7522c90 .elementor-element-f633df7 .elementor-heading-title::after {
        content: '+';
        font-size: 20px;
        font-weight: 300;
        transition: transform 0.3s ease;
    }
    
    .elementor-element-7522c90 .elementor-element-9e1b463 .elementor-heading-title.footer-accordion-open::after,
    .elementor-element-7522c90 .elementor-element-f633df7 .elementor-heading-title.footer-accordion-open::after {
        content: '−';
    }
    
    /* Linkkilistat piilossa oletuksena */
    .elementor-element-7522c90 .elementor-element-62d911b,
    .elementor-element-7522c90 .elementor-element-3125971 {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0 20px !important;
    }
    
    .elementor-element-7522c90 .elementor-element-62d911b.footer-accordion-open,
    .elementor-element-7522c90 .elementor-element-3125971.footer-accordion-open {
        max-height: 500px;
        padding: 0 20px 20px 20px !important;
    }
    
    /* Linkkien tyyli */
    .elementor-element-7522c90 .elementor-element-62d911b .elementor-icon-list-items,
    .elementor-element-7522c90 .elementor-element-3125971 .elementor-icon-list-items {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .elementor-element-7522c90 .elementor-element-62d911b .elementor-icon-list-item,
    .elementor-element-7522c90 .elementor-element-3125971 .elementor-icon-list-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .elementor-element-7522c90 .elementor-element-62d911b .elementor-icon-list-item:last-child,
    .elementor-element-7522c90 .elementor-element-3125971 .elementor-icon-list-item:last-child {
        border-bottom: none;
    }
    
    .elementor-element-7522c90 .elementor-element-62d911b .elementor-icon-list-item a,
    .elementor-element-7522c90 .elementor-element-3125971 .elementor-icon-list-item a {
        display: block;
        padding: 14px 0;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.8) !important;
        transition: color 0.2s ease, padding-left 0.2s ease;
    }
    
    .elementor-element-7522c90 .elementor-element-62d911b .elementor-icon-list-item a:hover,
    .elementor-element-7522c90 .elementor-element-3125971 .elementor-icon-list-item a:hover {
        color: #fff !important;
        padding-left: 8px;
    }
    
    /* === NELJÄS SARAKE: Uutiskirje === */
    .elementor-element-7522c90 .elementor-element-d136401 {
        order: 4;
        background: linear-gradient(135deg, rgba(200, 30, 30, 0.2) 0%, rgba(150, 20, 20, 0.1) 100%);
        border-radius: 12px;
        margin: 20px 16px !important;
        width: calc(100% - 32px) !important;
    }
    
    .elementor-element-7522c90 .elementor-element-d136401 .elementor-widget-wrap {
        padding: 24px 20px !important;
        text-align: center;
    }
    
    .elementor-element-7522c90 .elementor-element-60085e9 .elementor-heading-title {
        font-size: 16px !important;
        font-weight: 700 !important;
        margin-bottom: 12px !important;
        text-transform: none !important;
    }
    
    .elementor-element-7522c90 .elementor-element-1965cfe .elementor-icon-list-text {
        font-size: 13px !important;
        line-height: 1.6 !important;
        opacity: 0.9;
    }
    
    /* Uutiskirje-nappi tyylikkäämmin */
    .elementor-element-7522c90 .elementor-element-f3b34af .ecomus-button {
        display: inline-block !important;
        padding: 14px 32px !important;
        font-size: 14px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        background: #c81e1e !important;
        color: #fff !important;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        transition: all 0.2s ease;
        margin-top: 16px;
    }
    
    .elementor-element-7522c90 .elementor-element-f3b34af .ecomus-button:hover {
        background: #a51919 !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(200, 30, 30, 0.3);
    }
    
    /* Piilota kaikki spacerit mobiilissa */
    .elementor-element-7522c90 .elementor-widget-spacer {
        display: none !important;
    }
}

/* ==========================================================================
   Tuotesivu: "Tutustu myös", "Suosittelemme sinulle" ja "Viimeksi katsotut" otsikot tuotenimen tyylillä
   ========================================================================== */

/* Tutustu myös (Related products) ja Suosittelemme sinulle (Upsells) -otsikot */
.single-product .related.products > h2,
.woocommerce .related.products > h2,
.single-product .up-sells.upsells.products > h2,
.woocommerce .up-sells.upsells.products > h2,
.single-product .upsells.products > h2,
.woocommerce .upsells.products > h2 {
    font-family: 'Red Hat Display', sans-serif !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: #000 !important;
    margin-bottom: 20px;
}

/* Viimeksi katsotut (Recently viewed) -otsikko */
.single-product .recently-viewed-products__title,
.woocommerce .recently-viewed-products__title {
    font-family: 'Red Hat Display', sans-serif !important;
    font-size: 28px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: #000 !important;
    margin-bottom: 20px;
}

/* Mobiiliresponsiivisuus otsikkokoon */
@media (max-width: 767px) {
    .single-product .related.products > h2,
    .woocommerce .related.products > h2,
    .single-product .up-sells.upsells.products > h2,
    .woocommerce .up-sells.upsells.products > h2,
    .single-product .upsells.products > h2,
    .woocommerce .upsells.products > h2,
    .single-product .recently-viewed-products__title,
    .woocommerce .recently-viewed-products__title {
        font-size: 22px !important;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .single-product .related.products > h2,
    .woocommerce .related.products > h2,
    .single-product .up-sells.upsells.products > h2,
    .woocommerce .up-sells.upsells.products > h2,
    .single-product .upsells.products > h2,
    .woocommerce .upsells.products > h2,
    .single-product .recently-viewed-products__title,
    .woocommerce .recently-viewed-products__title {
        font-size: 24px !important;
    }
}

/* ==========================================================================
   Tuotesivu: Piilota Product Navigation (edellinen/seuraava tuote -linkit)
   ========================================================================== */

.single-product .product-navigation {
    display: none !important;
}

/* ==========================================================================
   Piilota WooCommerce-oletuskategoriat tuotelistauksesta
   (Käytössä on catalog-top-categories karuselli-tyyli)
   ========================================================================== */

ul.products > li.product-category {
    display: none !important;
}

/* ==========================================================================
   Related Products & Recently Viewed: Tuotekorttien tasaus
   ========================================================================== */

/* Kaikille tuotekorteille sama topbar-alueen korkeus (banner tai tyhjä tila) */
.related.products li.product .product-inner::before,
.recently-viewed-products li.product .product-inner::before {
    content: "";
    display: block;
    min-height: 32px;
    width: 100%;
}

/* Tuotteilla joilla ON banner, piilotetaan pseudo-elementti (banner vie tilan) */
.related.products li.product .product-inner:has(.product-card-top-banner)::before,
.recently-viewed-products li.product .product-inner:has(.product-card-top-banner)::before {
    display: none;
}

/* Tuotekuvien kiinteä korkeus - varmistaa napit samalle tasolle */
ul.products li.product .product-thumbnail > a {
    display: block !important;
    height: 260px !important;
}

ul.products li.product .product-thumbnail img {
    width: 100% !important;
    height: 260px !important;
    object-fit: contain !important;
}

/* Related/recently-viewed: Ecomus-teeman oletustyylit käytössä */

/* Tuotekortin flexbox: nappi aina alaosassa */
.related.products ul.products,
.recently-viewed-products ul.products,
.ecomus-products-carousel ul.products {
    align-items: stretch !important;
}

.related.products ul.products li.product,
.recently-viewed-products ul.products li.product,
.ecomus-products-carousel ul.products li.product {
    height: auto !important;
}

.related.products li.product .product-inner,
.recently-viewed-products li.product .product-inner,
.ecomus-products-carousel li.product .product-inner {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.related.products li.product .product-summary,
.recently-viewed-products li.product .product-summary,
.ecomus-products-carousel li.product .product-summary {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}

.related.products li.product .product-summary > a.product-loop-button,
.recently-viewed-products li.product .product-summary > a.product-loop-button,
.ecomus-products-carousel li.product .product-summary > a.product-loop-button {
    margin-top: auto !important;
}

/* ==========================================================================
   Related Products & Recently Viewed: ATC-painike
   ========================================================================== */
/* (Ecomus-teeman oletustyylit käytössä) */

/* ==========================================================================
   TOIMIPISTEKOHTAISET VARASTOSALDOT - Minimalistinen tyyli
   ========================================================================== */

.rst-warehouse-stock {
    margin: 16px 0;
}

.rst-warehouse-stock__header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin-bottom: 10px;
}

.rst-warehouse-stock__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rst-warehouse-stock__item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
}

.rst-warehouse-stock__indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.rst-warehouse-stock__item.is-in-stock .rst-warehouse-stock__indicator {
    background-color: #28a745;
}

.rst-warehouse-stock__item.is-out-of-stock .rst-warehouse-stock__indicator {
    background-color: #dee2e6;
}

.rst-warehouse-stock__location {
    font-weight: 500;
    color: #212529;
    min-width: 70px;
}

.rst-warehouse-stock__qty {
    color: #6c757d;
    font-size: 13px;
}

.rst-warehouse-stock__item.is-in-stock .rst-warehouse-stock__qty {
    color: #28a745;
}

.rst-warehouse-stock__item.is-out-of-stock {
    opacity: 0.6;
}

.rst-warehouse-stock__item.is-out-of-stock .rst-warehouse-stock__location {
    color: #6c757d;
}

.rst-warehouse-stock__divider {
    margin: 16px 0 0 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

/* ==========================================================================
   Tuoteattribuuttien otsikot: ensimmäinen kirjain isolla, loput pienellä
   Korjaa Akeneosta tulevat virheelliset isot kirjaimet (esim. "Äärivalojen Lukumäärä" -> "Äärivalojen lukumäärä")
   ========================================================================== */

/* Muunna koko teksti ensin pieniksi kirjaimiksi */
.single-product div.product table.variations .label,
.single-product div.product table.variations .label label,
.single-product div.product .variations .label,
.single-product div.product .variations .label label,
.woocommerce-variation-add-to-cart-variation-item-label,
.wcboost-variation-swatches__label {
    text-transform: lowercase !important;
}

/* Isonna vain ensimmäinen kirjain */
.single-product div.product table.variations .label::first-letter,
.single-product div.product table.variations .label label::first-letter,
.single-product div.product .variations .label::first-letter,
.single-product div.product .variations .label label::first-letter {
    text-transform: uppercase !important;
}

/* ==========================================================================
   Etusivun "Valmistettu Suomessa" ja "Lazer-lisävalojen maahantuoja" -osiot
   Elementor section IDs: d4c7e6b, eda5760
   
   HUOM: Ei muuteta section-tason layoutia, vain sisäiset kontainerit tyylitellään
   korttimaisiksi. Näin säilytetään sivun normaali rakenne ja max-width.
   ========================================================================== */

/* Desktop: Korttityyli section-kontainereille */
@media (min-width: 1200px) {
    /* Säilytetään normaalit osiot, korttityyli vain sisäiselle kontainerille */
    .elementor-element-d4c7e6b > .elementor-container,
    .elementor-element-eda5760 > .elementor-container {
        background: #ffffff;
        border-radius: 16px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 20px auto;
        /* Käytetään samaa max-width kuin muut sectionit */
        max-width: 1440px !important;
    }
    
    .elementor-element-d4c7e6b > .elementor-container:hover,
    .elementor-element-eda5760 > .elementor-container:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
        border-color: rgba(196, 30, 58, 0.15);
    }
    
    /* Kuvasarake: max 50% leveys */
    .elementor-element-d4c7e6b .elementor-element-fec4723,
    .elementor-element-eda5760 .elementor-element-0e28396 {
        max-width: 55% !important;
    }
    
    /* Kuvat: täyskorkeus, object-fit */
    .elementor-element-d4c7e6b .elementor-element-fec4723 img,
    .elementor-element-eda5760 .elementor-element-0e28396 img {
        width: 100% !important;
        height: 100% !important;
        min-height: 350px;
        max-height: 450px;
        object-fit: cover;
        border-radius: 16px 0 0 16px !important;
    }
    
    /* Tekstisarake: padding ja flexbox */
    .elementor-element-d4c7e6b .elementor-element-26e92ed,
    .elementor-element-eda5760 .elementor-element-9acca0c {
        padding: 30px 35px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center;
    }
    
    /* Otsikot */
    .elementor-element-d4c7e6b .elementor-element-33817be .elementor-heading-title,
    .elementor-element-eda5760 .elementor-element-40d161c .elementor-heading-title {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
        margin-bottom: 16px !important;
        color: #1a1a1a;
        font-weight: 700 !important;
    }
    
    /* Kuvausteksti */
    .elementor-element-d4c7e6b .elementor-element-8a368fd,
    .elementor-element-eda5760 .elementor-element-0f3068c {
        font-size: 0.95rem !important;
        line-height: 1.65 !important;
        color: #555;
        margin-bottom: 20px !important;
    }
    
    /* Widget wrap flexbox */
    .elementor-element-d4c7e6b .elementor-element-26e92ed .elementor-widget-wrap,
    .elementor-element-eda5760 .elementor-element-9acca0c .elementor-widget-wrap {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center;
    }
    
    /* Napit alareunaan */
    .elementor-element-d4c7e6b .elementor-element-26e92ed .elementor-inner-section,
    .elementor-element-eda5760 .elementor-element-9acca0c .elementor-inner-section {
        margin-top: auto !important;
    }
    
    /* Nappityylit */
    .elementor-element-d4c7e6b .elementor-button,
    .elementor-element-eda5760 .elementor-button {
        font-size: 0.9rem !important;
        padding: 12px 24px !important;
    }
}

/* Tablet: Korttityyli */
@media (min-width: 768px) and (max-width: 1199px) {
    .elementor-element-d4c7e6b > .elementor-container,
    .elementor-element-eda5760 > .elementor-container {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        margin: 15px auto;
    }
    
    .elementor-element-d4c7e6b .elementor-element-fec4723 img,
    .elementor-element-eda5760 .elementor-element-0e28396 img {
        min-height: 300px;
        object-fit: cover;
    }
}

/* Mobile: Kompaktit kortit */
@media (max-width: 767px) {
    .elementor-element-d4c7e6b > .elementor-container,
    .elementor-element-eda5760 > .elementor-container {
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        margin: 10px 15px;
    }
    
    .elementor-element-d4c7e6b .elementor-element-fec4723 img,
    .elementor-element-eda5760 .elementor-element-0e28396 img {
        min-height: 200px;
        object-fit: cover;
    }
    
    .elementor-element-d4c7e6b .elementor-element-26e92ed,
    .elementor-element-eda5760 .elementor-element-9acca0c {
        padding: 20px !important;
    }
}

/* ==========================================================================
.ecomus-products-carousel .product-card-top-banner {
    min-height: 30px !important;
    padding: 6px 8px !important;
}

    top: 38px !important;
}

/* ==========================================================================

/* ==========================================================================

/* ==========================================================================
   Tuotekortin yläpalkki ja alennusbadge: Korjaa päällekkäisyys
   ========================================================================== */

/* Tuotekortin yläpalkki: kokoleveä, taustaväri containerissa */
.product-card-top-banner {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    min-height: 32px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    background-color: #202020 !important;
}

.product-card-top-banner__text {
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    text-align: center;
    width: 100% !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    background-color: transparent !important;
}

/* Kun tuotteella on yläpalkki, lisää tilaa kuvan yläpuolelle */
.product-inner:has(.product-card-top-banner) .product-thumbnail {
    padding-top: 36px !important;
}

/* Kuva näkyy kokonaan ilman rajausta */
.product-inner:has(.product-card-top-banner) .product-thumbnail img {
    object-fit: contain !important;
    object-position: center !important;
}

/* Badge-container siirretään yläpalkin korkeuden verran alas (+20px) */
.product-inner:has(.product-card-top-banner) .woocommerce-badges {
    top: 65px !important;
}

/* Tuotteilla joilla EI ole yläpalkkia, badge pysyy normaalissa paikassa */
.product-inner:not(:has(.product-card-top-banner)) .woocommerce-badges {
    top: 10px !important;
}

/* Karuselli-näkymässä erityiset säädöt */
.ecomus-products-carousel .product-inner:has(.product-card-top-banner) .product-thumbnail {
    padding-top: 34px !important;
}

.ecomus-products-carousel .product-inner:has(.product-card-top-banner) .woocommerce-badges {
    top: 62px !important;
}

/* ==========================================================================
   Alin hinta 30 pv -näyttö (Kuluttajansuojalaki)
   ========================================================================== */

/* Houkuttelevampi alennus-badge tuotekorteissa */
.ecomus-discount-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    margin-left: 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff5a5f, #ff3b3b);
    color: #fff;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 6px rgba(255, 59, 59, 0.25);
}

/* Kauppasivulla ja karusellissa */
.rst-lowest-price {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
    margin-bottom: 20px;
    line-height: 1.4;
}

.rst-lowest-price__label {
    color: #999;
}

.rst-lowest-price__value {
    color: #666;
    font-weight: 500;
}

/* Tuotesivulla - hieman isompi ja näkyvämpi */
.rst-lowest-price--single {
    font-size: 13px;
    margin-top: 8px;
    margin-bottom: 20px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 4px;
    border-left: 3px solid #ddd;
}

.rst-lowest-price--single .rst-lowest-price__label {
    color: #777;
}

.rst-lowest-price--single .rst-lowest-price__value {
    color: #333;
    font-weight: 600;
}

/* Responsiivinen mobiilille */
@media (max-width: 767px) {
    .rst-lowest-price {
        font-size: 10px;
    }
    
    .rst-lowest-price--single {
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* ==========================================================================
   Header navigaatio - Tuotevalikoima dropdown
   Piilota 2. tason kategorioiden ikonit
   ========================================================================== */

/* Piilota ikonit 2. tasolla (sub-menu sisällä) */
.sub-menu .menu-item-icon {
    display: none !important;
}

/* Varmista että 1. tason ikonit näkyvät */
.main-navigation > ul > li > .sub-menu > li > a > .menu-item-icon {
    display: inline-flex !important;
}

/* Piilota ikonit 2. tasolta alkaen (nested sub-menus) */
.sub-menu .sub-menu .menu-item-icon,
.main-navigation .sub-menu li .sub-menu .menu-item-icon {
    display: none !important;
}

/* ==========================================================================
   LCP-optimointi - Hero-bannerin ensimmäinen kuva
   ========================================================================== */

/* Varmista että hero-bannerin ensimmäinen kuva latautuu nopeasti */
.ecomus-slides-elementor .swiper-slide:first-child .ecomus-banner__image,
.ecomus-slides-elementor .swiper-slide:first-child .ecomus-banner__image img {
    content-visibility: auto;
    contain-intrinsic-size: 100vw 660px; /* Bannerin korkeus */
}

/* Optimoi hero-bannerin kuvan renderöinti */
.ecomus-slides-elementor .swiper-slide:first-child .ecomus-banner__image img {
    will-change: transform;
    transform: translateZ(0); /* Force GPU acceleration */
}

/* ==========================================================================
   Thank you -sivu (moderni layout)
   ========================================================================== */
.rst-thankyou {
    margin-top: 24px;
}

.rst-thankyou__hero {
    background: #0f172a;
    color: #fff;
    border-radius: 16px;
    padding: 24px 28px;
    margin-bottom: 20px;
}

.rst-thankyou__title {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 700;
}

.rst-thankyou__subtitle {
    margin: 0;
    color: #cbd5f5;
}

.rst-thankyou__overview {
    background: #fff;
    border-radius: 16px;
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rst-thankyou__overview li {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    margin: 0;
    background: #f8fafc;
}

.rst-thankyou__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 24px;
    margin-top: 24px;
}

.rst-thankyou__col {
    min-width: 0;
}

.rst-order-details__table {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.rst-order-details__table th,
.rst-order-details__table td {
    vertical-align: middle;
    padding: 20px;
}

.rst-order-details__table th:first-child,
.rst-order-details__table td:first-child {
    padding-left: 20px !important;
}

.rst-order-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.rst-order-item__thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
}

.rst-order-item__title {
    font-weight: 600;
    margin-bottom: 4px;
}

.rst-order-item__sku {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.rst-order-item__price del {
    color: #94a3b8;
    margin-right: 6px;
}

.rst-order-item__price ins {
    text-decoration: none;
    font-weight: 700;
    color: #0f172a;
}

.rst-order-item__badge {
    display: inline-block;
    margin-left: 8px;
    background: #c41e3a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
}

.rst-thankyou__map {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    margin-top: 20px;
}

.rst-thankyou__section-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
}

.rst-thankyou__map-frame {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.rst-thankyou__map-frame iframe {
    width: 100%;
    height: 220px;
    border: 0;
    display: block;
}

.rst-thankyou__map-link {
    display: inline-flex;
    margin-top: 10px;
    font-weight: 600;
    color: #1d4ed8;
}

.rst-thankyou .includes_tax {
    display: none;
}

@media (max-width: 960px) {
    .rst-thankyou__grid {
        grid-template-columns: 1fr;
    }
    .rst-thankyou__overview {
        grid-template-columns: 1fr;
    }
    .rst-order-details__table th,
    .rst-order-details__table td {
        padding: 14px;
    }
    .rst-order-details__table th:first-child,
    .rst-order-details__table td:first-child {
        padding-left: 14px !important;
    }
}

/* ==========================================================================
   Tuotesivu: määrävalitsin + lisää ostoskoriin (rst-lights.fi -tyyli)
   ========================================================================== */
form.cart .ecomus-product-atc-group {
    align-items: center;
    gap: 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    flex-wrap: nowrap;
    flex-direction: row;
    max-width: 100%;
    width: 100%;
}

/* Kun RAL-valitsin on näkyvissä, pakota se omalle rivilleen */
form.cart .rst-ral-picker {
    flex-basis: 100%;
    width: 100%;
    order: -1;
}

.ecomus-product-atc-group .em-product-quantity .quantity {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #fff;
}

.ecomus-product-atc-group .em-product-quantity .quantity .ecomus-qty-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.ecomus-product-atc-group .em-product-quantity .quantity .ecomus-qty-button:hover {
    background: #f8fafc;
    border-color: transparent;
}

.ecomus-product-atc-group .em-product-quantity .quantity input.qty {
    width: 48px;
    min-width: 48px;
    height: 28px;
    border: none;
    background: transparent;
    text-align: center;
    font-weight: 600;
    color: #0f172a;
    padding: 0;
}

.ecomus-product-atc-group .single_add_to_cart_button {
    height: 40px;
    border-radius: 999px;
    padding: 0 26px;
    background: #1f232a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
}

/* PBT: yhdenmukainen "Lisää valitut ostoskoriin" -painike */
.ecomus-product-pbt .ecomus-pbt-add-to-cart {
    height: 40px;
    border-radius: 999px;
    padding: 0 26px;
    background: #1f232a;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 700;
    border: 0;
}

.ecomus-product-pbt .ecomus-pbt-add-to-cart:hover {
    background: #111418;
}

/* Header category menu above listing banners */
.header-category-menu {
    position: relative;
    z-index: 1000;
}

.ecomus-product-atc-group .em-product-quantity .quantity__label {
    display: none;
}

.ecomus-product-atc-group .em-product-quantity {
    margin-right: 12px;
    padding-right: 0;
    border-right: 0;
}

.ecomus-product-atc-group .em-product-quantity .quantity::before,
.ecomus-product-atc-group .em-product-quantity .quantity::after {
    content: '';
    width: 1px;
    height: 20px;
    background: #e2e8f0;
}

.ecomus-product-atc-group .em-product-quantity .quantity::before {
    order: 2;
}

.ecomus-product-atc-group .em-product-quantity .quantity::after {
    order: 4;
}

.ecomus-product-atc-group .em-product-quantity .quantity .decrease {
    order: 1;
}

.ecomus-product-atc-group .em-product-quantity .quantity input.qty {
    order: 3;
}

.ecomus-product-atc-group .em-product-quantity .quantity .increase {
    order: 5;
}

@media (max-width: 767px) {
    .ecomus-product-atc-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        border-radius: 16px;
        gap: 8px !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }
    .ecomus-product-atc-group .em-product-quantity .quantity {
        width: auto;
        justify-content: center;
        flex-wrap: nowrap;
    }
    .ecomus-product-atc-group .single_add_to_cart_button {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        border-radius: 12px;
    }
    .ecomus-product-atc-group .em-product-quantity {
        margin-right: 0;
        padding-right: 0;
        border-right: 0;
        border-bottom: 0;
        padding-bottom: 0;
        margin-bottom: 0;
        flex: 0 0 auto !important;
    }
    /* Piilota hinta ja viiva "Lisää ostoskoriin" -painikkeen sisällä mobiilissa */
    .single_add_to_cart_button .divide,
    .single_add_to_cart_button .price,
    .single_add_to_cart_button .woocommerce-Price-amount {
        display: none !important;
    }
}

/* Määrävalitsin: korvaa SVG-ikonit miinus/plus-merkeillä */
.ecomus-qty-button {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Piilota SVG-ikonit */
.ecomus-qty-button svg {
    display: none !important;
}

/* Näytä - ja + merkit */
.ecomus-qty-button::before {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    color: #0f172a;
    width: 100%;
    height: 100%;
}

.ecomus-qty-button.decrease::before {
    content: '−' !important;
}

.ecomus-qty-button.increase::before {
    content: '+' !important;
}

/* ==========================================================================
   Hero-slider: pitkien otsikkojen ylivuodon esto mobiilissa
   ========================================================================== */
@media (max-width: 767px) {
    .ecomus-slides-elementor .ecomus-slide__content {
        padding-left: 15px !important;
        padding-right: 15px !important;
        box-sizing: border-box;
        max-width: 100vw;
    }

    .ecomus-slides-elementor .ecomus-slide__title {
        font-size: clamp(22px, 6vw, 32px) !important;
    }
}

/* ==========================================================================
   Yläpalkki: kielivalikon lippuikonit
   ========================================================================== */
#menu-header-kielipalkki .menu-item a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#menu-header-kielipalkki .menu-item a::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 16px;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.2);
}

/* Suomen lippu - rst-steel.fi */
#menu-item-172168 > a::before {
    background-image: url('assets/img/flag-fi.png');
}

/* UK lippu - rst-steel.com */
#menu-item-120503 > a::before {
    background-image: url('assets/img/flag-gb.png?v=2');
}

/* ==========================================================================
   Groweo launcher: nosta 10px ylemmäs
   ========================================================================== */
iframe[data-apptype="launcher"].groweoapp-68de79abc8a5c3961810803a {
    margin-top: -10px !important;
}

/* ==========================================================================
   Evästeasetukset-nappi: keskitys
   ========================================================================== */
#cmplz-manage-consent .cmplz-manage-consent {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

/* ==========================================================================
   Mobiilimenu: Ajoneuvohaku-painike
   ========================================================================== */
.ecomus-child-mobile-vehicle-search {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 15px 20px;
    padding: 12px 20px;
    background: #c40000;
    color: #fff !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none !important;
}

.ecomus-child-mobile-vehicle-search:hover,
.ecomus-child-mobile-vehicle-search:active {
    background: #a30000;
    color: #fff !important;
}

/* Variable-tuotteiden ostoskori-painike samaksi kuin simple-tuotteilla */
.product-loop-button-atc.em-button-outline-dark {
    --em-button-color: #000000 !important;
    --em-button-bg-color: #ffffff !important;
    --em-button-bg-color-hover: #000000 !important;
    --em-button-color-hover: #ffffff !important;
    --em-button-eff-bg-color: #000000 !important;
    --em-button-eff-bg-color-hover: #000000 !important;
}
.product-loop-button-atc.em-button-outline-dark:after {
    display: block !important;
}
