/* Pulsante Add to Cart standard */
.single_add_to_cart_button.button,
#notify-me-sticky-button {
  background-color: #1e73be;!important; /* blu standard */
  color: #fff;
  font-weight: 700;
  font-size: 1em;
  padding: 1.036em 6em !important; /* più equilibrato */
  border-radius: 1.8em;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.single_add_to_cart_button.button:hover,
.single_add_to_cart_button.button:focus,
#notify-me-sticky-button:hover,
#notify-me-sticky-button:focus {
  background-color: #000000;!important;
  outline: none;
}

/* Su tablet e mobile (fino a 768px) */
@media (max-width: 768px) {
  .single-product .summary .cart {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5em; /* più respiro */
  }
  .single-product .summary .cart .quantity {
    flex: 0 0 70px;
    margin: 0;
  }
  .single-product .summary .cart p.price {
    flex: 2 1 auto;
    margin: 0;
  }
  .single_add_to_cart_button.button,
  #notify-me-sticky-button.button {
    flex: 5 1 auto;
    margin-left: 10px;
    min-width: 120px;
    padding: 1em 2em !important;
  }
}

/* Sticky Add to Cart Bar */
.sticky-add-to-cart {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
  z-index: 1050;
  padding: 0.8em clamp(1.5em, 12.24vw, 14em);
  gap: 2em;
  font-family: inherit;
  box-sizing: border-box;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.sticky-add-to-cart.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Info prodotto nella sticky bar */
.sticky-product-info {
  display: flex;
  flex-direction: row;
  gap: 1em;
  align-items: center;
  margin: 0;
}

.sticky-product-title {
  margin: 0;
}

.sticky-product-price {
  font-weight: 700;
  font-size: 1.1em;
  color: #000000;
  margin: 0;
}

.sticky-product-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

/* Pulsanti sticky */
.sticky-buttons {
  display: flex;
  align-items: center;
  gap: 1em;
}

.sticky-add-button,
.sticky-notify-button {
  background-color: #1e73be;
  color: #fff;
  padding: 1em 3em;
  border-radius: 1.8em;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sticky-add-button:hover,
.sticky-add-button:focus,
.sticky-notify-button:hover,
.sticky-notify-button:focus {
  background-color: #000000;
  outline: none;
}

/* Mobile (<480px) */
@media (max-width: 900px) {
  .sticky-add-to-cart {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6em;
    gap: 0.8em;
  }

  .sticky-product-info {
    width: 100%;
    display: flex;
    flex-direction: row;
    gap: 0.8em;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 0.3em;
  }

  .sticky-buttons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 0.8em;
    width: 100%;
  }

  .sticky-share-button,
  .sticky-add-button,
  .sticky-notify-button {
    flex: 1;
    min-width: 120px;
  }
}

/* Ingrandisce l'icona del wishlist */
.yith-wcwl-add-to-wishlist-button .yith-wcwl-icon-svg {
  width: 32px !important;
  height: 32px !important;
  display: inline-block;
}

/* Popup condivisione */
.share-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
}

.share-popup.show {
  display: flex;
}

.share-popup-content {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  width: 300px;
  max-width: 90%;
  position: relative;
}

.share-popup-content h3 {
  margin-top: 0;
}

.share-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
  text-decoration: none;
  color: #1e72be;
  font-size: 16px;
}

.share-links a svg {
  margin-right: 8px;
}

.share-popup-content .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 22px;
  cursor: pointer;
}

.wc-notify-overlay {
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.3);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
}

.wc-notify-overlay.active { display:flex; }
.wc-notify-popup {
  background:#fff;
  padding:25px 30px;
  border-radius:10px;
  max-width:400px;
  width:90%;
  text-align:center;
  position:relative;
}
