/*
 Theme Name: Tolpanhattu
 Template: storefront
 Author: JP
 Description: A child theme for Storefront
 Version: 1.0
*/

/* Tuotegalleria */
.wc-block-product-template {
    align-items: stretch;
}

/* Jokainen tuotelaatikko täyttää grid-rivin korkeuden */
.wc-block-product-template > .wc-block-product {
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

/* ---------------------------------------------------------
   TUOTEKUVA
   --------------------------------------------------------- */

.wc-block-product-template > .wc-block-product
.wc-block-components-product-image {
    flex: 0 0 auto;
}

/* ---------------------------------------------------------
   TUOTENIMI
   Aina kahden rivin korkuinen alue
   --------------------------------------------------------- */

.wc-block-product-template > .wc-block-product .wp-block-post-title {
    height: calc(1.4em * 2);
    min-height: calc(1.4em * 2);
    max-height: calc(1.4em * 2);

    line-height: 1.4 !important;

    margin-top: 0 !important;
    margin-bottom: 0.75rem !important;

    overflow: hidden;
}

/* Itse linkki käyttäytyy samalla tavalla kaikissa korteissa */
.wc-block-product-template > .wc-block-product .wp-block-post-title > a {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;

    line-height: 1.4;
    max-height: calc(1.4em * 2);
}

/* ---------------------------------------------------------
   HINTA
   --------------------------------------------------------- */

.wc-block-product-template > .wc-block-product
.wp-block-woocommerce-product-price {
    flex: 0 0 auto;

    min-height: 1.4em;

    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* ---------------------------------------------------------
   PAINIKE
   Työnnetään aina kortin alareunaan
   --------------------------------------------------------- */

.wc-block-product-template > .wc-block-product
.wp-block-woocommerce-product-button {
    margin-top: auto;
    width: 100%;
}

/* Painike koko kortin levyiseksi */
.wc-block-product-template > .wc-block-product
.wp-block-woocommerce-product-button .wp-block-button__link {
    width: 100%;
    box-sizing: border-box;
}

/* Piilota WooCommercen tuotelajittelu */
.wp-block-woocommerce-catalog-sorting {
    display: none !important;
}

/* Piilota "Näytetään x tulosta" */
.wp-block-woocommerce-product-results-count {
    display: none !important;
}

.wp-block-woocommerce-product-collection .wc-block-product-template {
    margin-left: 0 !important;
}

.storefront-full-width-content.woocommerce-cart .entry-header, .storefront-full-width-content.woocommerce-checkout .entry-header, .storefront-full-width-content.woocommerce-account .entry-header, .storefront-full-width-content .woocommerce-products-header {
    padding-bottom: 0 !important;
}

.oma-tuotekuvaus {
    margin-top: 40px;
    margin-bottom: 40px;
}

.oma-tuotekuvaus h2 {
    margin-bottom: 20px;
}

.oma-tuotekuvaus__sisalto {
    line-height: 1.7;
}


/* =========================================
   OSTOSKORIN HOVER-VALIKKO / MINI-CART
   ========================================= */

/* Koko hover-valikon tausta */
.site-header-cart .widget_shopping_cart {
    background-color: #f7f5f0;
    color: #222222;
    border: 1px solid #dddddd;
}

/* Tuotteiden nimet */
.site-header-cart .widget_shopping_cart .woocommerce-mini-cart-item a {
    color: #222222;
}

/* Tuotteiden nimien hover */
.site-header-cart .widget_shopping_cart .woocommerce-mini-cart-item a:hover {
    color: #c45a3c;
}

/* Tuotteiden hinnat */
.site-header-cart .widget_shopping_cart .quantity {
    color: #666666;
}

/* Välisummaa ympäröivä alue */
.site-header-cart .widget_shopping_cart .total {
	background-color: #f0f0f0;
    color: #222222;
    border-top: 1px solid #dddddd;
}

/* "Välisummaa" korostava teksti */
.site-header-cart .widget_shopping_cart .total strong {
    color: #222222;
}


.site-header-cart .widget_shopping_cart .buttons {
	background-color: #f0f0f0;
}