/* 
Theme Name:		Hello Elementor Child
Theme URI:		https://elementor.com/
Description:	Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author:			Elementor Team
Author URI:		https://elementor.com/
Template:		hello-elementor
Version:		1.0.0
Text Domain:	hello-elementor-child
Tags:           flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/*
Tuotekuvan tausta tuoteryhmissä
*/
.woocommerce ul.products li.product a img {background-color:#f3f2f0;}

.boaz-oos-badge{
    position:absolute;
    top:0px;
    left:10px;
    z-index:20;

    background:#d60000;
    color:#fff;
    padding:8px 14px;
    border-radius:999px;

    font-weight:700;
    font-size:12px;
    letter-spacing:.5px;
    text-transform:uppercase;
}

/*
Arvostelu täbin muotoilu.
 */

#tab-title-reviews, h2.woocommerce-Reviews-title, .comment_container img {display:none!important;}
.comment-text {margin-left:0px!important;}
ol.commentlist {padding-left:0px!important;}

/*
Reviews shortcoden muotoilut.
*/

li.review img {display:none!important;}
#latestreviews ol.commentlist {list-style-type:none;}
div.comment-text {border:1px solid #000000;padding:10px;}
.woocommerce .star-rating span::before {color:#ffc107;}

/*
Saman korkuiset tuotekortit
*/
.woocommerce-loop-product__title {height: 80px;overflow: hidden;text-overflow: ellipsis;}

/*
Tuoteryhmien tuotemäärät piiloon
*/

h2.woocommerce-loop-category__title mark.count {display:none;}

/* Featured badge tuoteryhmissä */
.featured-badge {background-color:#CFB4AC;color:white;padding:10px;position:absolute;top:20px;left:10px;}

/* Featured badge tuotesivulla */
.featured1 {background-color:#CFB4AC;color:white;padding:10px;position:absolute;top:80px;left:10px;}

/* Featured badge tuotesivulla & tuoteryhmissä mobiili */
@media only screen and (max-width: 700px) {
.featured-badge img {height:40px!important;width:40px!important;}
.featured1 img {height:60px!important;width:60px!important;}
.featured1 {top:50px!important;}
}

/* Sale badge tuotesivulla */
.woocommerce span.onsale {background-color: #ba3d41!important;}

/* New badge tuotesivulla */
.woocommerce span.itsnewproductpage.onsale {position: absolute;bottom: 0px;background:linear-gradient(to right, #8bd957, #c8e265);top: 10px;left: 10px;padding: 0px 10px 10px 10px;font-size: 18px;max-height: 20px!important;}
.woocommerce span.itsnewproductpage.onsale.alennuksessa {position: absolute;bottom: 0px;background-color: #0483C6 !important;top: 30px;left: 10px;padding: 0px 10px 10px 10px;font-size: 18px;max-height: 20px!important;}
/* Sale badge tuoteryhmissä */
ul.products li.product span.onsale, .woocommerce-LoopProduct-link.woocommerce-loop-product__link span.onsale {display: block!important;color: #fff!important;background-color: #ba3d41!important;font-family: open sans,Sans-serif!important;    font-size: 16px!important;font-weight: 400!important;text-transform: uppercase!important;    min-width: 20px!important;font-weight:bold!important;padding: 5px!important;min-height: 20px!important;line-height:40px!important;}

/* New badge tuoteryhmissä */
ul.products li.product span.itsnew.onsale, .woocommerce-LoopProduct-link.woocommerce-loop-product__link span.itsnew.onsale, span.itsnew.onsale {font-weight: bold !important;font-size: 12px !important;padding: 5px !important;background:linear-gradient(to right, #8bd957, #c8e265)!important;}
ul.products li.product span.itsnew.onsale.alennuksessa, .woocommerce-LoopProduct-link.woocommerce-loop-product__link span.itsnew.onsale.alennuksessa, span.itsnew.onsale.alennuksessa {font-weight: bold !important;font-size: 12px !important;padding: 5px !important;top:50px;background:linear-gradient(to right, #8bd957, #c8e265);}

/* Kassa sivu */
.wp-block-woocommerce-checkout-order-summary-block {background-color:#ffffff!important;}
#woo-carrier-agents-search-button, .wc-block-components-button.wp-element-button.wc-block-components-checkout-place-order-button {border-color:rgb(207, 180, 172)!important;}
.wc-block-components-checkout-place-order-button__text {text-transform: uppercase;}

/* Mobiili */
@media only screen and (max-width: 700px) {
	
/* new badge tuotesivu mobiili */
span.itsnewproductpage.onsale {top:10px!important;left:5px!important;max-height:20px!important;font-size:10px!important;}
span.itsnewproductpage.onsale.alennuksessa {top:10px!important;left:5px!important;max-height:20px!important;font-size:10px!important;}

/* new badge tuoteryhmissä mobiili */
/* Varmistetaan että tuotekuva toimii positioning parenttina */
ul.products li.product {
    position: relative;
}

/* Mobiilissa keskelle yläreunaan */

    ul.products li.product span.itsnew.onsale, span.itsnewproductpage.onsale.alennuksessa {
        position: absolute !important;
        top: 10px; /* säädä tarvittaessa */
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        margin: 0 !important;
		padding: 0px !important;
		min-height: 10px !important;
        line-height: 30px !important;
		min-width: 10px !important;
    }

}

@media (max-width: 767px) {

  /* Uutuus-badge: ei rivinvaihtoja + siisti pill */
  span.itsnew.onsale {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;

    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;

    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;

    padding: 4px 10px !important;
    line-height: 1 !important;
    border-radius: 999px !important;

    font-size: 10px !important;
  }

  /* Keskelle kuvan yläreunaa (jos tätä jo käytät, pidä vain yksi versio) */
  ul.products li.product,
  .elementor-loop-container .product,
  .elementor-widget-loop-grid .product {
    position: relative;
  }

  ul.products li.product span.itsnew.onsale,
  .elementor-loop-container .product span.itsnew.onsale,
  .elementor-widget-loop-grid .product span.itsnew.onsale {
    position: absolute !important;
    top: 10px;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    z-index: 30;
    margin: 0 !important;
  }
}

@media (max-width: 767px) {
  ul.products li.product .woocommerce-LoopProduct-link,
  .elementor-loop-container .product .woocommerce-LoopProduct-link {
    position: relative;
  }

  /* LOPPU-badge: aina yhdelle riville */

  /* Make sure the image/link area is the positioning anchor */
  ul.products li.product .woocommerce-LoopProduct-link,
  .elementor-loop-container .product .woocommerce-LoopProduct-link,
  .elementor-widget-loop-grid .product .woocommerce-LoopProduct-link{
    position: relative !important;
  }

  /* Fix ONLY the LOPPU badge */
  span.boaz-oos-badge{
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    left: auto !important;

    /* IMPORTANT: kill any fixed sizing that clips the text */
    width: auto !important;
    height: auto !important;
    min-width: 0 !important;
    max-width: none !important;

    /* Make background fit text */
    display: inline-block !important;
    padding: 6px 12px !important;
    line-height: 1.1 !important;

    /* Keep in one line */
    white-space: nowrap !important;
    overflow: visible !important;
    word-break: normal !important;
    overflow-wrap: normal !important;

    /* Ensure horizontal text (in case some old rule rotated it) */
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;

    z-index: 60 !important;
  }

}