/*
Theme Name: automasa.fi Theme
Description: This is a custom child theme for automasa.fi
Theme URI:   https://sipila.dev
Author: Mika Sipilä
Author URI:  https://sipila.dev
Template: salient
Version: 1.0
*/

#logo {
    float: left;
}

#header-secondary-outer .menu-title-text {
    font-size: 20px!important;
}

.automasa_widget_product_categories .product-categories {
    border: 1px solid var(--porto-input-bc);
   
}

.automasa_widget_product_categories ul {
    padding-top: 0;
    font-size: 0.9rem;
}

.automasa_widget_product_categories .category-single .show-all-cat {
    display: none;
    padding: 0;
}

.automasa_widget_product_categories .category-single .show-all-cat .show-all-cat-dropdown, 
.automasa_widget_product_categories .product_cat>span {
    padding: 1em 2em;
}

.automasa_widget_product_categories .category-single>li>ul:last-child {
    padding: 0 .9em .9em .9em;
}

.automasa_widget_product_categories ul li.current > a, 
.automasa_widget_product_categories ul li.current > span {
    color: #333;
    padding: .5em 0 .6em 0;
    display: inline-block;
}

.automasa_widget_product_categories ul li.current > span {
    font-size: .857em;
}

.automasa_widget_product_categories ul li .children {
    padding: 0;
}

.automasa_widget_product_categories ul li .children li {
    border-top: none;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li>a {
    padding-left: 0.5em;
    padding-bottom: .7em;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li>a {
    font-weight: 500;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li.current-cat>a {
    font-weight: 700;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li .children li:first-child {
    border-top: 1px solid var(--porto-input-bc);
}

.automasa_widget_product_categories .category-single>li>ul:last-child li .children li {
    padding: 0;
    border: none;
}

.automasa_widget_product_categories .category-single>li>ul:last-child > li > a {
    padding-left: 0;
    font-size: 1rem;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li>.children>li:first-child>a {
    padding-top: 1em;
}

.automasa_widget_product_categories .category-single>li>ul:last-child li .children li .children li a {
    padding-left: 2em;
    line-height: 1.1em;
    padding-bottom: 1em;
}

.automasa_widget_product_categories ul li .count, 
.automasa_widget_product_categories ul li .count {
    font-size: .857em;
    color: #acacac;
}

.automasa_widget_product_categories .category-single > li > ul:last-child > li > .toggle {
    display: none;
}

.star-rating {
	color: #fed700!important
}

.woocommerce .products.related {
    display: none !important;
}

#tab-description {
	padding: 30px!important;
	border: 1px #f0f0f0 solid;
}

.woocommerce-product-details__short-description ul li::marker {
    content: none !important;
}

.woocommerce-product-details__short-description ul li {
    list-style: none !important;
    position: relative;
    padding-left: 1.5em;
}

.woocommerce-product-details__short-description ul li::before {
	font-size: 20px;
	font-weight: bold;
    content: "✓";
    color: #0d6efd;
    position: absolute;
    left: 0;
}

/* Add some spacing between the number and title */
.woocommerce-checkout h3 {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 18px;
}

.custom-tag-bubble {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #000;
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 50px;
    z-index: 10;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.woocommerce ul.products li.product .add_to_cart_button {
    background-color: #0b8e00!important; /* Light gray background color */
    border: 1px solid #e0e0e0; /* Optional border */
    padding: 15px; /* Adds some spacing inside the box */
    border-radius: 5px; /* Rounds the corners */
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1); /* Adds a subtle shadow */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out; /* Adds hover effect */
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    transition: none !important;
}

.products li.product.minimal .product-wrap .product-image-wrap .product-add-to-cart a {
    width: 50%;
    flex: 1;
    background-color: #0b8e00!important;
    padding: 10px 5px !important;
    color: #fff;
    border-radius: 0;
    text-align: center;
    line-height: 20px;
}

.products li.product.minimal .product-wrap .product-image-wrap .product-add-to-cart a:hover {
    transform: scale(1.02); /* Slightly enlarges the product box on hover */
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2); /* Increases shadow on hover */
    color: #000;
}

.products-per-page-form {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.products-per-page-form select {
    padding: 5px 10px;
    font-size: 14px;
}

.product-image-wrap {
	height: 70%!important;
}

.price-block {
    margin: 15px 0;
}

.price-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.regular-price {
    color: #999;
    text-decoration: line-through;
    font-size: 38px;
	font-weight: bold;
}

.current-price {
    color: #1b8d1b;
    font-size: 38px;
    font-weight: bold;
}

.savings-label {
    display: inline-block;
    background: #FFD700;
    padding: 3px 12px;
    font-weight: 500;
    border-radius: 2px;
    margin-top: 5px;
}

/* Fix spacing with description */
.woocommerce-product-details__short-description {
    margin-top: 15px;
}

.stock-delivery-info {
    margin: 15px 0;
	font-weight: bold;
}

.stock.in-stock {
    color: #009900;
    margin-bottom: 10px;
}

.delivery-details {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.delivery-time {
    color: #666;
}

.shipping-fee {
    color: #666;
}

.woocommerce-product-details__short-description {
    border-top: 1px solid #DDDDDD;
    border-bottom: 1px solid #DDDDDD;
    padding: 20px 0;
    margin: 20px 0;
}

.thwmscf-last-next {
	display: none!important;
}

/* Main container layout */
.bundled_product {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* Image container */
.bundled_product_images {
    flex: 0 0 80px;
}

.bundled_product_image img {
    width: 80px;
    height: auto;
    object-fit: contain;
}

/* Details section */
.details {
    flex: 1;
}

/* Product title */
.bundled_product_title {
    font-size: 16px;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.bundled_product_title_link {
    display: none;
}

/* Product description */
.bundled_product_excerpt p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Checkbox label */
.bundled_product_optional_checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

/* Price styling */
.price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price del {
    color: #999;
    font-size: 14px;
}

.price ins {
    text-decoration: none;
    color: #000;
    font-weight: 500;
}

/* Hide unnecessary elements */
.bundled_item_cart_content,
.screen-reader-text,
.item_qty,
.item_suffix {
    display: none;
}

/* Checkbox styling */
.bundled_product_checkbox {
    margin: 0;
}

/* Add text before checkbox */
.bundled_product_optional_checkbox::before {
    content: "Lisää hintaan";
    margin-right: 4px;
}

/* Product grid container */
.woocommerce ul.products {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
}

/* Base product container */
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column;
  margin-bottom: 4.5em !important;
  min-height: 520px;
  border: #f0f0f0 1px solid;
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  margin: 0.5em 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 2.2em; /* Space for up to 3 lines */
}

/* Image handling */
.woocommerce ul.products li.product img {
  width: 220px !important;
  height: auto !important;
  margin: 0 auto !important;
  display: block !important;
}

/* Content area */
.woocommerce ul.products li.product .product-info {
  flex: 1;
  position: relative;
  padding-bottom: 4em;
}

/* Price styling */
.woocommerce ul.products li.product .price {
  display: block;
  margin: 1em 0;
  clear: both;
}

/* Button wrapper */
.woocommerce ul.products li.product .product-add-to-cart {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
}

.archive.woocommerce .main-content > .row > .post-area{
	display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: flex-start;
    align-content: stretch;
}

/* category changes */
.woocommerce .products > li.product-category > a > img {
    /*display: none !important;*/
}

.woocommerce div .products > li.product-category {
    min-height: unset !important;
    text-align: center;
    margin-bottom: 1em !important;
	padding: 0 10px;
    word-break: break-word;
}

/* category hide */
.term-description {
  max-height: 9999px;
  overflow: hidden;
  position: relative;
  transition: max-height 0.3s ease-in-out;
  -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.show-more-checkbox[type=checkbox] {
  display: none;
}

.show-more-checkbox:checked + .term-description {
  max-height: none;
    -webkit-mask-image: none;
}

.show-more-label {
    display: block;
    cursor: pointer;
    text-align: left;
    margin-bottom: 15px;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    margin-top: 0;
    text-decoration: underline;
}

.show-more-checkbox:checked + .term-description + .show-more-label {
  display: none !important;
}

/* Hide category description on mobile */
@media screen and (max-width: 767px) {
  .term-description {
		max-height: 170px;
  	}
}

/* Mobile adjustments */
@media screen and (max-width: 767px) {
  .woocommerce ul.products[class*="columns-"] li.product {
    width: 46% !important;
    margin: 0 2% 2em !important;
    float: left !important;
    min-height: 400px; /* Ensure enough space for content */
  }

  .woocommerce ul.products li.product img {
    width: 100% !important;
    max-width: 220px !important;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.9em;
    -webkit-line-clamp: 2; /* Show only 2 lines on mobile */
    min-height: 2.8em; /* Space for 2 lines */
    margin-bottom: 0.8em;
  }

  .woocommerce ul.products li.product .price {
    margin: 0.5em 0 1em;
    font-size: 1em;
    position: relative;
    width: 100%;
  }

  .woocommerce ul.products li.product .product-info {
    padding-bottom: 3em;
  }
}

.kolme-pointtia {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 10px;
        margin-top: 35px;
        margin-bottom: 20px;
    }
    
    .kolme-pointtia .col {
        display: flex !important;
        flex: 0 1 33.333% !important;
        flex-direction: column !important;
        align-items: center !important;
        min-width: 0 !important;
        max-width: 33.333% !important;
        padding: 0 !important;
    }
    
    .kolme-pointtia i,
    .kolme-pointtia .finnish-flag {
        font-size: 20px;
        margin-bottom: 6px;
        color: #003580;
    }
    
    .kolme-pointtia div {
        font-size: 12px;
        line-height: 1.2;
        word-wrap: break-word;
        width: 100%;
        text-align: center;
    }

@media only screen and (max-width: 999px) {
    #automasa_product_categories_widget-4,
    .widget.woocommerce.widget_product_categories {
        display: none !important;
    }
}

/* Main container */
ul#shipping_method {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    background: #fff;
    border-radius: 4px;
}

/* Individual shipping method rows */
ul#shipping_method li {
    margin: 0;
    display: flex;
    align-items: center;
    border: 1px solid #eee;
    background: white;
}

ul#shipping_method li:not(:last-child) {
    border-bottom: none;
}

/* Radio button styling */
ul#shipping_method li input[type="radio"] {
    margin: 0 8px 0 12px;
}

/* Label container */
ul#shipping_method li label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px;
    margin: 0;
    cursor: pointer;
    font-size: 13px;
    line-height: 1.4;
    border: none;
    background: transparent;
}

/* Price styling */
ul#shipping_method li .woocommerce-Price-amount {
    margin-left: auto;
    padding-right: 10px;
    font-weight: 600;
    color: #333;
}

/* Logo/image container */
ul#shipping_method li .shipping-icon {
    display: flex;
    align-items: center;
    padding-right: 20px;
}

/* Logo/image sizing */
ul#shipping_method li img {
    height: 20px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
}

/* Hover state */
ul#shipping_method li:hover {
    background-color: #f8f8f8;
}

/* Selected state */
ul#shipping_method li input[type="radio"]:checked + label {
    background-color: #f9f9f9;
}

/* Shipping method text alignment */
ul#shipping_method li .shipping-method-name {
    flex: 1;
    padding-right: 10px;
}

/* Pickup location text styling */
.shipping-pickup-store {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    padding-left: 30px;
}

/* Noutopiste dropdown styling */
select[name="shipping_noutopiste"] {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.savings-label {
	font-weight: bold;
}

.woocommerce-tabs {
	margin-top: 0px!important
}

div.product .woocommerce-tabs .full-width-content[data-tab-style*=fullwidth] ul.tabs {
    text-align: center;
    margin: 0px 0 50px 0;
}

.savings-info {
	display: none!important
}

.woocommerce-cart .coupon .button {
    background-color: #f0f0f0 !important;
    color: #000000 !important;
}

body[data-header-color="custom"] #search-outer #search .span_12 span {
    display:none!important;
}

.summary.entry-summary .stock.in-stock {
    display: none;
}

.star-rating span::before {
   color: #FFD700 !important;  /* Gold/yellow color */
}

.woocommerce-review-link {
   color: #FFD700 !important;
}

label.bundled_product_optional_checkbox::before {
  display: none !important;
}

span.item_title, 
.bundled_product_title_inner .item_title {
  font-weight: bold !important;
}

/* Target the entire del element and all its children */
del[aria-hidden="true"],
del[aria-hidden="true"] *,
.bundled_product del,
.bundled_product del *,
.woocommerce-Price-amount.amount del,
.woocommerce-Price-amount.amount del * {
  color: #999999 !important;
  opacity: 1 !important;
  text-decoration-color: #999999 !important;
}

/* Target specifically the currency symbol within deleted prices */
del .woocommerce-Price-currencySymbol,
del[aria-hidden="true"] .woocommerce-Price-currencySymbol,
span.woocommerce-Price-currencySymbol:has(parent:del) {
  color: #999999 !important;
}

/* Target the screen reader text */
span.screen-reader-text:contains("Alkuperäinen") {
  color: #999999 !important;
}