/*
Theme Name: Raft-Frutou
Theme URI: 
Author: 
Author URI: 
Description: Raft-Frutou
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 5.7
Version: 
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Template: raft
Text Domain: raft-frutou
Tags: 
*/

/* Main content alignment */

ul.products.columns-4::before,
ul.products.columns-4::after {
    display: none !important;
    content: none !important;
}

/* Product grid container */
ul.wc-block-product-template,
ul.products {
    display: grid !important;
    xgrid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    grid-template-columns: repeat(auto-fit, minmax(220px, 300px)) !important;
    justify-content: space-evenly !important;
    gap: 18px !important;
    padding: 0 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Individual product items */
.wc-block-grid__product,
.wc-block-product,
ul.products li.product {
    min-width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #e0d8c5 !important;
    border-radius: 10px !important;
    padding: 16px !important;
    background-color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
    margin: 0 auto !important; /* Center the product within its grid cell */
}

/* Hover effects */
.wc-block-product:hover,
ul.products li.product:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18) !important;
}

/* Button hover effects */
button.wc-block-components-product-button__button:hover,
ul.products li.product a.button:hover {
    background-color: #8e5e28 !important;
    color: #ffffff !important;
    transition: all 0.3s ease-in-out !important;
    border: none !important;
}



/* Center the "Add to Cart" button */
li.product a.button.add_to_cart_button {
    display: block !important;
    text-align: center !important;
    margin: 10px auto 0 !important;
    width: auto !important;
    max-width: 100% !important;
    font-size: 14px;
    font-weight: 600;
}

/* For better visual appearance */
li.product .button {
    padding: 10px 15px !important;
    transition: all 0.3s ease !important;
}

/* Product image */
ul.products li.product img {
    border-radius: 8px;
}

/* Product title */
ul.products li.product h2.woocommerce-loop-product__title {
    font-size: 0.9em !important;
}

/* Product price */
ul.products li.product .price {
    font-size: 0.8em !important;
}

/* Add to cart modifications */
/* === Product card container === */
.custom-product-card {
  text-align: center;
  padding: 15px;
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
}

/* === Product image === */
.product-thumb img {
  width: 100%;
  border-radius: 10px;
  object-fit: cover;
}

/* === Product title === */
.product-title {
  font-size: 16px;
  margin: 15px 0 10px;
  color: #333;
}

/* === Row: price + icon block === */
.price-cart-line {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

/* === Price aligned to bottom */
.price {
  margin: 0;
  line-height: 1.2;
  align-self: flex-end;
}

/* === Cart icon + "Ver carrinho" container === */
.custom-cart-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  position: relative;
}

/* === Circular Add to Cart button with custom SVG icon === */
.custom-cart-wrap .add_to_cart_button {
  width: 36px;
  height: 36px;
  min-width: 36px;
  max-width: 36px;
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 50%;
  background-color: #eee;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256' viewBox='0 0 256 256'%3E%3Cg transform='translate(1.41 1.41) scale(2.81 2.81)' fill='%23000000'%3E%3Cpath d='M72.975 58.994H31.855c-1.539 0-2.897-1.005-3.347-2.477L15.199 13.006H3.5c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5h14.289c1.539 0 2.897 1.005 3.347 2.476l13.309 43.512h36.204l10.585-25.191h-6.021c-1.933 0-3.5-1.567-3.5-3.5s1.567-3.5 3.5-3.5H86.5c1.172 0 2.267 0.587 2.915 1.563s0.766 2.212 0.312 3.293L76.201 56.85c-.546 1.299-1.817 2.144-3.226 2.144z'/%3E%3Ccircle cx='28.88' cy='74.33' r='6.16'/%3E%3Ccircle cx='74.59' cy='74.33' r='6.16'/%3E%3Cpath d='M62.278 19.546H52.237V9.506c0-1.933-1.567-3.5-3.5-3.5s-3.5 1.567-3.5 3.5v10.04h-10.04c-1.933 0-3.5 1.567-3.5 3.5s1.567 3.5 3.5 3.5h10.04v10.04c0 1.933 1.567 3.5 3.5 3.5s3.5-1.567 3.5-3.5v-10.04h10.041c1.933 0 3.5-1.567 3.5-3.5s-1.567-3.5-3.5-3.5z'/%3E%3C/g%3E%3C/svg%3E");
  display: inline-block;
  text-indent: -9999px;
  overflow: hidden;
  line-height: 1;
  box-sizing: border-box;
  vertical-align: middle;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* === Tooltip label */
.add-to-cart-label {
  position: absolute;
  top: 50%;
  left: 120%;
  transform: translateY(-50%);
  background: #333;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s ease;
  z-index: 10;
}

.custom-cart-wrap:hover .add-to-cart-label {
  opacity: 1;
}

/* === Show Cart link (styled beside icon) === */
.custom-cart-wrap .added_to_cart.wc-forward {
  font-size: 13px;
  color: #28a745;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.2s ease;
  margin: 0;
  padding: 0;
}

.custom-cart-wrap .added_to_cart.wc-forward:hover {
  text-decoration: underline;
  color: #1d7733;
}

/* === Hide WooCommerce "1 in cart" feedback if injected */
.add_to_cart_button span {
  display: none !important;
}

