/**
Theme Name: Astra-ibike
Author: ibike
Author URI: https://ibike.fi/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-ibike
Template: astra
*/

/* Etusivun kiinteä header */
body #masthead {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: background-color 0.3s ease;
}

/* Läpinäkyvä sivun yläreunassa */
.home #masthead,
.home #masthead .ast-primary-header-bar {
    background-color: transparent;
}

/* Tumma tausta vieritettäessä */
#masthead.is-scrolled,
#masthead.is-scrolled .ast-primary-header-bar {
    background-color: rgba(255,255,255, 0.95);
    border-bottom: 1px solid #d8d8d8;
}
/*
.home #masthead.is-scrolled .menu-item
{
    line-height: 65px !important;
}
    */

#masthead.is-scrolled .ast-mobile-header-wrap .ast-primary-header-bar, #masthead.is-scrolled .ast-primary-header-bar .site-primary-header-wrap {
    min-height: 65px;
}

/* Etusivulla ennen scrollausta valkoinen logo */
.home #masthead:not(.is-scrolled) img.custom-logo {
    content: url("/wp-content/uploads/2020/05/ibike_white.png");
}

/* Scrollauksen jälkeen normaali logo */
.home #masthead.is-scrolled img.custom-logo {
    content: normal;
}

#masthead.is-scrolled .ast-icon svg:not([fill]) {
    fill: #222222;
}

/* Astran pitkät pudotusvalikot */
@media (min-width: 922px) {
    .main-header-menu .sub-menu {
        max-height: calc(100dvh - 100px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    body.home #masthead .main-header-menu > li > a
    {
        color:#fff;
        opacity:0.9;
    }
}


#masthead.is-scrolled .custom-logo
{
    height:40px !important;
    width:auto !important;
}
#masthead.is-scrolled .ast-site-identity
{
    padding: 0 0 !important;
}

/* WP:n admin-palkki */
.admin-bar #masthead {
    top: 32px;
}

.site-header-section .ast-builder-menu-1.ast-builder-menu.ast-flex,
.site-header-section .ast-main-header-bar-alignment,
.site-header-section .main-header-menu
{
    height:100%;
}

.home .wp-block-cover h2 > a
{
    text-decoration:none !important;
}

@media (max-width: 782px) {
    .admin-bar #masthead {
        top: 46px;
    }
}

/* Alasivujen sisältö kiinteän headerin alapuolelle */
body:not(.home) #content {
    padding-top: 125px;
}

/* Pienemmillä näytöillä */
@media (max-width: 921px) {
    body:not(.home) #content {
        padding-top: 95px;
    }

    .ast-blog-single-style-1 #content
    {
        padding-top:0 !important;
    }

    .wp-block-cover__inner-container, .wp-block-eedee-gutenslider__content
    {
        padding:20px !important;
    }
    
    .category-ajankohtaista.ast-article-single
    {
        padding-left:0 !important;
        padding-right:0 !important;
    }

    .home #masthead:not(.is-scrolled) [data-section="section-header-mobile-trigger"] .ast-button-wrap .mobile-menu-toggle-icon .ast-mobile-svg {
        fill: #fff;
    }

    
    #primary {
        margin-top:3rem !important;
    }

   

}

select.orderby
{
    padding-right:1.5rem !important;
}

/* Alasivujen headerin tausta */
body:not(.home) #masthead,
body:not(.home) #masthead .ast-primary-header-bar {
    background-color: rgba(255,255,255,0.95);
}

/* Piilotetaan sliderin selausnuolet */
.eedee-gutenslider-nav
{
 display:none !important;
}



body.home #masthead.is-scrolled .main-header-menu > li > a
{
	color:#222222;
}

#masthead .main-header-menu > li > a:hover
{
	opacity:1;
}

.ast-site-title-wrap
{
	display:none !important;
}

.main-header-menu .sub-menu .menu-link
{
	padding: 0.5em 1em !important	
}

.home .entry-title {
    display: none;
}

.home .wc-block-product img
{
    object-fit: contain !important;
}

.page .entry-header
{
    margin-bottom:0 !important;
}

.home .eedee-swiper-outer
{
    height:600px;
}

/* korjataan Astran ja Guten epäyhteensopivuuksia */
.entry-content ul.wp-block-post-template {
    padding-left: 0;
    margin-left: 0;
    list-style: none;
}

body .wp-block-cover .has-text-color p:not(.has-text-color) {
    color: inherit;
}





.fa-facebook-f:before, .fa-facebook:before {
    content: "\f09a";
}

.fa-instagram:before {
    content: "\f16d";
}

.fa-phone:before {
    content: "\f095";
}

.fa-envelope:before {
    content: "\f0e0";
}

span.social a
{
    margin-left:10px;
    margin-right:10px;
    display:inline-block;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius:50%;
    width:46px;
    height:46px;
    line-height:42px;
    color:#fff;
}

span.social i:after {
    border-color: #808080;
}

    /*
span.social i:after {
    position: absolute;
    -webkit-transition: all .45s cubic-bezier(0.25, 1, 0.33, 1);
    transition: all .45s cubic-bezier(0.25, 1, 0.33, 1);
    pointer-events: none;
    display: block;
    content: '';
    top: 0;
    left: 0;
    opacity: 0.2;
    border-radius: 50%;
    border: 2px solid #808080;
    height: 46px;
    width: 46px;
}
    */

/*

[class^="icon-"], [class*=" icon-"], i[class*="fa-"], span[class*="fa-"] {
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    text-decoration: inherit;
    -webkit-font-smoothing: antialiased;
}

[class^="icon-"], [class*=" icon-"], i[class*="fa-"], span[class*="fa-"] {
    font-family: FontAwesome;
    font-weight: normal;
    font-style: normal;
    text-decoration: inherit;
    -webkit-font-smoothing: antialiased;
}
    */


    /* tuotesivu, valittu kategoria */
.current-cat > a > span
{
    color:#af1d1f !important;
}

.product-category.product
{
    display:none !important;
}


.woocommerce ul.products {
    row-gap: 40px;
}

/* Tuotekortit samankorkuisiksi */
.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Tuotekuvalle kiinteä tila */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap {
    height: 200px;
    flex-shrink: 0;
}

/* Kuva keskelle, kuvasuhde säilyttäen */
.woocommerce ul.products li.product .astra-shop-thumbnail-wrap
    > a.woocommerce-LoopProduct-link {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.woocommerce ul.products li.product .astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-height: 200px !important;
    object-fit: contain;
}

/* Tuotetiedot täyttävät jäljelle jäävän tilan */
.woocommerce ul.products li.product .astra-shop-summary-wrap {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.woocommerce ul.products li.product .ast-loop-product__link {
    margin-top: auto;
}

.woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
    margin-top: 10px;
    align-self: flex-start;
    width: fit-content;
}


/* Vain desktop */
@media (min-width: 922px) and (hover: hover) {

    /* Hinta ja painike samaan kohtaan */
    .woocommerce ul.products li.product .astra-shop-summary-wrap {
        display: grid;
        grid-template-columns: max-content;
    }

    /* Tuotenimi normaalisti */
    .woocommerce ul.products li.product .ast-loop-product__link {
        grid-column: 1;
    }

    /* Hinta ja painike päällekkäin */
    .woocommerce ul.products li.product .price,
    .woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
        grid-row: 2;
        grid-column: 1;
        align-self: center;
        justify-self: start;
        margin: 0;
        transition: opacity 0.2s ease;
    }

    /* Painike aluksi piilossa */
    .woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    /* Hoverilla hinta pois */
    .woocommerce ul.products li.product:hover .price {
        opacity: 0;
        visibility: hidden;
    }

    /* Hoverilla painike näkyviin */
    .woocommerce ul.products li.product:hover
    .astra-shop-summary-wrap > a.button {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
}

@media (min-width: 922px) and (hover: hover) {

    /* Yhteinen animaatio */
    .woocommerce ul.products li.product .price,
    .woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
        transition:
            opacity 0.25s ease,
            transform 0.3s ease,
            visibility 0.25s;
    }

    /* Hinta normaalitilassa */
    .woocommerce ul.products li.product .price {
        opacity: 1;
        transform: translateY(0);
    }

    /* Painike normaalitilassa */
    .woocommerce ul.products li.product .astra-shop-summary-wrap > a.button {
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px);
    }

    /* Hover: hinta häipyy hieman ylöspäin */
    .woocommerce ul.products li.product:hover .price {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
    }

    /* Hover: painike ilmestyy alhaalta */
    .woocommerce ul.products li.product:hover
    .astra-shop-summary-wrap > a.button {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.woocommerce ul.products li.product
.astra-shop-summary-wrap > a.button::before {
    content: "\f290"; /* shopping-bag */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: inline-block;
    margin-right: 8px;
}

ul.wc-block-product-categories-list--depth-0 > li > a
{
    font-weight:bold;
}


/* =============================================
   Etusivun WooCommerce-tuotekaruselli
   WooCommerce hallitsee itse vierityksen ja korttien leveydet.
   ============================================= */
.home ul.is-product-collection-layout-carousel > li.wc-block-product {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: 200px 2.8em auto auto;
    row-gap: 15px;
    height: auto;
    box-sizing: border-box;
}

/* Kuva-alue tasan 200 px, kuvasuhde sailyttaen */
.home .is-product-collection-layout-carousel .wp-block-woocommerce-product-image {
    grid-row: 1;
    grid-column: 1;
    width: 100%;
    height: 200px !important;
    min-height: 200px !important;
    max-height: 200px !important;
    aspect-ratio: auto !important;
    margin: 0 !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home .is-product-collection-layout-carousel .wp-block-woocommerce-product-image > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 200px !important;
    min-height: 200px;
    max-height: 200px;
}

.home .is-product-collection-layout-carousel .wp-block-woocommerce-product-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    max-height: 200px !important;
    object-fit: contain !important;
    aspect-ratio: auto !important;
}

/* Tuotenimelle aina kahden rivin tila, pitkät nimet katkaistaan */
.home .is-product-collection-layout-carousel > li.wc-block-product > h2.wp-block-post-title {
    grid-row: 2;
    grid-column: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.4 !important;
    height: 2.8em;
    min-height: 2.8em;
    margin: 0 !important;
}

.home .is-product-collection-layout-carousel > li.wc-block-product > .wp-block-woocommerce-product-price {
    grid-row: 3;
    grid-column: 1;
    align-self: center;
    justify-self: start;
    margin: 0;
}

.home .is-product-collection-layout-carousel > li.wc-block-product > a.button {
    grid-row: 4;
    grid-column: 1;
    justify-self: start;
    align-self: center;
    width: fit-content;
    white-space: nowrap;
    margin: 0;
}

.home .is-product-collection-layout-carousel > li.wc-block-product > a.button::before {
    content: "\f290";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    display: inline-block;
    margin-right: 8px;
}

/* Hinta vaihtuu painikkeeseen vain hoveria tukevalla desktopilla */
@media (min-width: 922px) and (hover: hover) {
    .home .is-product-collection-layout-carousel > li.wc-block-product {
        grid-template-rows: 200px 2.8em auto;
    }

    .home .is-product-collection-layout-carousel > li.wc-block-product > .wp-block-woocommerce-product-price,
    .home .is-product-collection-layout-carousel > li.wc-block-product > a.button {
        grid-row: 3;
        grid-column: 1;
        transition: opacity .25s ease, transform .3s ease, visibility .25s;
    }

    .home .is-product-collection-layout-carousel > li.wc-block-product > a.button {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(6px);
    }

    .home .is-product-collection-layout-carousel > li.wc-block-product:hover > .wp-block-woocommerce-product-price {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-6px);
    }

    .home .is-product-collection-layout-carousel > li.wc-block-product:hover > a.button {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home .is-product-collection-layout-carousel > li.wc-block-product > .wp-block-woocommerce-product-price,
    .home .is-product-collection-layout-carousel > li.wc-block-product > a.button {
        transition: none;
        transform: none !important;
    }
}

.home .is-product-collection-layout-carousel a
{
    text-decoration:none !important;
}

.home .is-product-collection-layout-carousel h2 > a{
    color:#222222;
    font-size:1rem;
}

.home .is-product-collection-layout-carousel h2 > a:hover {
    color:#af1d1f
}

.home .is-product-collection-layout-carousel .wc-block-components-product-price.has-small-font-size > span
{
    font-size:1rem !important;
    color:#af1d1f;
    font-weight:bold !important;
}
