/*
Theme Name: Unero Far Far 2
Theme URI: http://drfuri.com/unero
Author: DrFuri
Author URI: http://drfuri.com
Description: Unero Child Theme.
Version: 1.0
License: GNU General Public License v2+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unero
Domain Path: /lang/
Tags: one-column, two-columns, left-sidebar, right-sidebar, full-width-template, post-formats, theme-options, threaded-comments, translation-ready
Template: unero
*/
/* 🔄 VISUAL CLEANUP FOR WIDGETS & MOBILE CATEGORY TOGGLE */
/* 🔒 Hide all WooCommerce price formats and m² from Recently Viewed Products widget */
#woocommerce_recently_viewed_products-3 .price,
#woocommerce_recently_viewed_products-3 .price *,
#woocommerce_recently_viewed_products-3 .custom-price-fallback {
  display: none !important;
}


/* WooCommerce store notice styling */
.woocommerce-store-notice {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #f5f5f5;
  color: #000;
  padding: 10px;
  text-align: center;
  z-index: 9999;
}

/* Styling for "m²" suffix on prices */
.price .price-unit {
  font-size: 90%;
  color: #555;
  margin-left: 4px;
}

/* ---------------------- */
/* 📱 MOBILE CATEGORY TOGGLE */
/* ---------------------- */
@media only screen and (max-width: 768px) {
  .mobile-category-toggle {
    margin: 20px auto;
    padding: 0;
    border: none;
    max-width: 95%;
    background: none;
    font-family: inherit;
  }

  .category-toggle-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f2f2f2;
    padding: 12px 16px;
    font-size: 16px;
    font-weight: 600;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .category-toggle-btn:hover {
    background-color: #e9e9e9;
  }

  .category-toggle-btn::after {
    content: '+';
    font-size: 20px;
    font-weight: bold;
    transition: transform 0.2s ease;
  }

  .category-toggle-btn.open::after {
    content: '–';
  }

  .widget_product_categories {
    display: none;
    padding: 10px 16px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 6px 6px;
  }

  .widget_product_categories ul {
    list-style: none;
    margin: 0;
    padding-left: 0;
  }

  .widget_product_categories li {
    padding: 6px 0;
    font-size: 15px;
    border-bottom: 1px solid #eee;
  }

  .widget_product_categories li:last-child {
    border-bottom: none;
  }

  .widget_product_categories a {
    color: #333;
    text-decoration: none;
  }

  .widget_product_categories a:hover {
    text-decoration: underline;
  }

  /* Hide duplicated heading inside mobile version of "Kategorier" widget */
  #un_product_categories-2 .widget-title {
    display: none !important;
  }
}


/* 🔳 FIX FourByFour grid stacking on mobile */
.fourbyfour-image-wrapper {
  display: grid;
  grid-template-columns: repeat(2, auto);
  grid-template-rows: repeat(2, auto);
  justify-content: center;
  align-items: center;
  gap: 0px;
  width: auto;
  margin: 0 auto 30px auto;
}

.fourbyfour-image-wrapper img {
  max-width: 100px;
  max-height: 100px;
  border: none;
  transform-origin: center center;
}


@media only screen and (max-width: 768px) {
  #woocommerce_recently_viewed_products-3 .widget-title {
    display: none !important;
  }
}

#woocommerce_recently_viewed_products-3 .product-title {
  font-size: 12px;
  line-height: 1.2;
}

.woocommerce ul.products li.product img {
  max-width: 90%;
  margin: 0 auto;
  display: block;
}

/* 🎯 Hides the "Her ser du de siste 10 flisene du har sett på" headline on mobile screens */
@media only screen and (max-width: 768px) {
  #woocommerce_recently_viewed_products-3 .widget-title {
    display: none !important;
  }
}


/* Stop tile from clipping contents */
.woocommerce ul.products li.product,
.un-product-thumbnail { overflow: visible !important; }

/* Make images use natural ratio and center them — fixes "cropped left / skewed right" */
.un-product-thumbnail img,
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;           /* avoid cover-cropping */
  object-position: center center !important;/* was likely "right" */
  transform: none !important;               /* kill slide/zoom shifts */
  left: auto !important; right: auto !important;
  margin-left: 0 !important;                /* neutralize nudge */
}

/* Some Unero skins use a second hover image that shifts layout — disable if needed */
.un-product-thumbnail img.image-hover { display: none !important; }

/* If the theme used a square wrapper, neutralize it */
.un-product-thumbnail,
.woocommerce ul.products li.product .product-thumb,
.woocommerce .products .product .unero-thumb {
  height: auto !important;
  padding-top: 0 !important;
  aspect-ratio: auto !important;
}




