@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: #e9f8f7;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 6%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 99;
}

.logo {
  font-size: 30px;
  text-decoration: none;
  font-weight: 600;
}
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px; 
}
#instagram-icon {
  position: relative;
  display: flex;
  height: 30px;
  cursor: pointer;
  opacity: 1;
}

#contact-icon {
  position: relative;
  display: flex;
  height: 30px;
  cursor: pointer;
  opacity: 0.4;
}

#contact-icon:hover {
  opacity: 1;
}

#instagram-icon:hover {
  opacity: 0.85;
}

.tooltiptext {
  visibility: hidden;
  width: 130px;
  background-color: black;
  color: #ffffff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 0;
  position: absolute;
  z-index: 1;
  top: 100%;
  left: 65%;
  margin-left: -65px;
}

#contact-icon:hover .tooltiptext {
  visibility: visible;
}
#instagram-icon:hover .tooltiptext {
  visibility: visible;
}
#instagram-icon img {
    filter: invert(24%) sepia(89%) saturate(4086%) hue-rotate(274deg) brightness(71%) contrast(100%);
}
#cart-icon {
  position: relative;
  display: flex;
  font-size: 35px;
  height: 35px;
  cursor: pointer;
}

#cart-icon .cart-item-count {
  position: absolute;
  top: 0;
  right: -0;
  width: 18px;
  height: 18px;
  background: #f7350a;
  border-radius: 50%;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  color: white;
  visibility: hidden;
  font-weight: 500;
}


#products-container {
    min-height: 800px; 
}
.product-content {
  display: grid;
  justify-items: center;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 15px;
}

.product-box {
  background-color: #EFFAF9;
  border-radius: 10px;
  max-height: 430px;
  max-width: 304px;
  padding: 2px;
  z-index: 10;
}

.product-box .img-box {
  display: flex;
  max-height: 300px;
  width: 300px;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
}

.img-box img {
  width: 300px;
  transition: 0.5s;
}

.img-box:hover img {
  transform: scale(1.55);
}

.product-box .product-name {
  font-size: 20px;
  margin-top: 10px;
}

.product-box .price-and-cart {
  display: flex;
  margin-right: 10px;
  align-items: center;
}

.price-and-cart .price {
  font-size: 18px;
  font-weight: 500;
  justify-content: left;
}

.price-and-cart .add-cart {
  padding: 2px;
  background: #1c44e6;
  border-radius: 6px;
  width: 65px;
  height: 30px;
  font-size: 20px;
  cursor: pointer;
  filter: invert(1);
}

.price-and-cart .add-cart:hover {
  opacity: 0.5;
  transition: opacity 0.3s ease;
  /* Effetto di transizione */
}

.cart {
  position: fixed;
  top: 0;
  right: -100%;
  width: 360px;
  height: 100%;
  background: #fff;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
  padding: 65px 20px 40px;
  z-index: 100;
  overflow: auto;
  transition: 0.5s;
}

.cart.active {
  right: 0;
}

.cart-title {
  text-align: center;
  font-size: 30px;
}

.cart-box {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.cart-box img {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  margin-right: 20px;
}

.cart-detail {
  display: grid;
  gap: 8px;
  margin-right: auto;
}

.cart-product-name {
  font-size: 16px;
  line-height: 1;
}

.cart-price {
  font-weight: 500;
}

.cart-quantity {
  display: flex;
  width: 100px;
  border: 1px solid #999;
  border-radius: 6px;
}

.cart-quantity button {
  background: transparent;
  width: 30px;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.cart-quantity #decrement {
  color: #999;
}

.cart-quantity .number {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  border-left: 1px solid #999;
  border-right: 1px solid #999;
  cursor: default;
}

.cart-remove {
  scale: 0.3;
  cursor: pointer;
}

.total {
  display: flex;
  justify-content: flex-end;
  align-items: center;

}

.total-price {
  margin-left: 10px;
  font-weight: 600;
}

.btn-buy {
  display: block;
  padding: 10px 30px;
  background: #ff7d03;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  color: #fff;
  margin: 20px auto 0;
  cursor: pointer;
  font-weight: 500;
}

#cart-close {
  position: absolute;
  top: 20px;
  right: 15px;
  font-size: 30px;
  cursor: pointer;
}

@media screen and (max-width:360px) {
  .product-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }

  .cart {
    width: 100%;
  }
}

.category {
  width: 98%;
  height: 120px;
  opacity: 0.3;
  object-fit: cover;
  border-radius: 30px;
  transition: opacity 0.3s ease;
}

.category:hover {
  opacity: 0.8;
}

.category.selected {
  opacity: 1;
}

#rainbow-text1 {
  background: linear-gradient(to right, red, purple, orange, green, red);
  font-weight: 900;
  font-style: normal;
  color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: gradient 2.5s linear infinite;
}

@keyframes gradient {
  0% {
    background-position: 200% 50%
  }

  100% {
    background-position: 0% 50%
  }
}



/* (overlay) */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: flex;

  justify-content: center;
  align-items: center;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out, visibility 0.3s;

}

.modal.show {
  visibility: visible;
  opacity: 1;
}

/* Stile per il contenuto */
.modal-content {
  background-color: #fefefe;
  margin: 0;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  text-align: center;

  /* Animazione aggiuntiva sul contenuto (es. slide-up) */
  transform: translateY(-30px);
  transition: transform 0.2s ease-out;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.img-box .overlay-image {
  position: absolute;
  opacity: 0.09;

}

.img-box:hover .overlay-image {
  transform: scale(1);
  opacity: 0.25;
}

.container {
  padding: 32px;
  max-width: 450px;
  margin: auto;
}

.products,
.address-form {
  margin-bottom: 30px;
}

.products table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.products th,
.products td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}

.products th {
  background: #f0f0f0;
}

.form-group {
  margin-bottom: 15px;
}

label {
  display: block;
  margin-bottom: 5px;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  padding: 5px;
  box-sizing: border-box;
}

#paypal-custom-btn:disabled, #card-custom-btn:disabled {
    background: #cccccc !important;
    cursor: not-allowed;
    opacity: 0.6;
    color: #666;
}

/* PayPal */
.pp-button {
  width: 100%;      
  max-width: 365px;
  height: 60px;
  display: flex;
  align-items: center;      /* Centra  */
  justify-content: center;   
  gap: 10px;              
  background-color: #FFC439;
  color: #142C65;
  font-family: Arial, sans-serif;
  font-size: 18px;         
  font-weight: bold;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  padding: 0;               
}

.pp-button:hover {
  background-color: #ffb800;
}


.desc-mail {
  font-size: 0.95em;
  color: #555;
  margin-bottom: 5px;
}

/* CAROSELLO */
.carousel-container {
    position: sticky; 
    top: 0;
    z-index: 1; 
    width: 100%;
    height: 400px; 
    overflow: hidden;
    margin-bottom: 0;
    padding-top: 65px;
}


.content-wrapper {
    position: relative;
    z-index: 10; 
    padding-top: 20px;
}

.carousel-track {
    display: flex;
    transition: transform 0.6s ease-in-out; 
}

.carousel-slide {
    min-width: 100%; 
    position: relative;
}

.carousel-slide img {
    width: 100%;
    height: 400px; 
    object-fit: cover;
    filter: brightness(0.7);
    display: block;
}

.carousel-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    pointer-events: none; 
}

/* Stile bottoni */
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
}
.carousel-prev { left: 15px; }
.carousel-next { right: 15px; }