body{
  font-family: 'Quicksand', sans-serif;
}

a{
    text-decoration: none;
    color: #333;
}

.product-details {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background-color: #f9f9f9;
    margin: 8rem 0;
}

.details-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1200px;
    width: 100%;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.image-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    width: 100%;
    max-width: 400px;
    border-radius: 10px;
}

.thumbnails {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.thumbnails img {
    width: 60px;
    height: 60px;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumbnails img:hover {
    border-color: #007bff;
}

.back-to-shop-container{
    align-items: start;
}

.back-to-shop-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 16px;
    color: #333;
    background: none;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.back-to-shop-btn:hover {
    background-color: #ddd;
    color: #000;
}

.product-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-category{
    color: #777;
}

.product-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.product-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 20px;
}

.product-price {
    font-size: 20px;
    font-weight: bold;
    color: #ff69b4;
    margin-bottom: 20px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.quantity-selector {
    display: flex;
    flex-direction: column;
}

.quantity-selector label {
    font-size: 14px;
    margin-bottom: 5px;
}

.quantity-selector input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 5px;
    text-align: center;
}

.wrap {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }
  
  .button {
    --primary: #ff69b4;
    --neutral-1: #FFDDD2;
    --neutral-2: #ff69b4 ;
    --radius: 10px;
  
    cursor: pointer;
    border-radius: var(--radius);
    color: #4a4a4a;
    border: none;
    box-shadow:
      0 0.5px 0.5px 1px rgba(255, 255, 255, 0.2),
      0 10px 20px rgba(0, 0, 0, 0.2),
      0 4px 5px 0px rgba(0, 0, 0, 0.05);
    position: relative;
    transition: all 0.3s ease;
    min-width: 150px;
    height: 50px;
    font-style: normal;
    font-size: 19px;
    font-weight: 500;
  }
  
  .bg {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background:
      linear-gradient(var(--neutral-1), var(--neutral-2)) padding-box,
      linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.45))
        border-box;
    z-index: 1;
    transition: all 0.4s ease;
  }
  .button:hover .bg {
    transform: scale(1.04, 1.1);
    box-shadow: inset 0 0 8px 3px rgba(0, 0, 0, 0.5);
  }
  
  .state p {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
  }
  .state .icon,
  .state .icon-cart {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
  }
  
  /* Cart */
  .state .icon-cart {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    transform: translate(-80px, 9px);
  }
  .button:focus .state .icon-cart {
    animation: cart 2s linear;
  }
  .button:focus .state .icon-cart svg path {
    animation: cartPath 2s linear;
  }
  .state .icon-cart svg {
    height: 30px;
    width: auto;
  }
  
  @keyframes cart {
    0% {
      transform: translate(-80px, 9px);
    }
    18% {
      transform: translate(-20px, 9px);
    }
    25% {
      transform: translate(0, 9px) rotate(4deg);
    }
    31% {
      transform: translate(10px, 9px) rotate(-25deg);
    }
    45% {
      transform: translate(30px, 9px) rotate(0deg);
    }
    60% {
      transform: translate(60px, 9px) rotate(0deg);
    }
    100% {
      transform: translate(240px, 9px) rotate(-40deg);
    }
  }
  
  @keyframes cartPath {
    0%,
    45% {
      fill: transparent;
    }
    55%,
    100% {
      fill: currentColor;
    }
  }
  
  /* Trace */
  .state--default .icon-cart:before,
  .state--default .icon-cart:after {
    content: "";
    position: absolute;
    height: 2px;
    top: 8px;
    right: 30px;
    opacity: 0.5;
    color: rgba(128, 255, 162, 0.8);
    background: linear-gradient(to right, transparent, currentColor);
    transform-origin: right;
  }
  .state--default .icon-cart:after {
    top: 15px;
    right: 28px;
    opacity: 0.3;
  }
  .button:focus .state--default .icon-cart:before,
  .button:focus .state--default .icon-cart:after {
    animation: trace 2s linear forwards;
  }
  .button:focus .state--default .icon-cart:after {
    color: rgba(255, 255, 255, 0.4);
  }
  
  @keyframes trace {
    0% {
      transform: rotate(0deg);
      width: 20px;
      opacity: 0.8;
      filter: blur(3px);
    }
    10% {
      transform: rotate(0deg);
      width: 20px;
    }
    25% {
      transform: rotate(-4deg);
      width: 30px;
      filter: blur(0);
      opacity: 0.2;
    }
    31% {
      transform: rotate(25deg);
      width: 5px;
      opacity: 0.2;
      filter: blur(2px);
    }
    45% {
      transform: rotate(0deg);
      width: 40px;
      filter: blur(0);
    }
    60% {
      transform: rotate(0deg);
      width: 50px;
      filter: blur(0);
    }
    100% {
      transform: rotate(40deg);
      width: 100px;
      filter: blur(3px);
    }
  }
  
  /* Plus */
  .state--default .icon svg {
    animation: plus 0.6s ease forwards;
  }
  .state--default .icon svg path {
    transform-origin: center;
  }
  .button:hover .icon svg path {
    stroke-width: 4px;
  }
  
  @keyframes plus {
    0% {
      transform: translateX(-60px) translateY(30px) rotate(-100deg) scale(2);
      opacity: 0;
      filter: blur(3px);
      color: lightgreen;
    }
    100% {
      transform: translateX(0) translateY(0) rotate(0);
      opacity: 1;
      filter: blur(0);
    }
  }
  
  .button:hover .state--default .icon svg path,
  .button:focus .state--default .icon svg path {
    animation: rotatePlus 0.6s cubic-bezier(0.5, 1, 0.3, 1.6) forwards;
  }
  
  .button:hover .state--default .icon svg {
    animation: scalePlus 0.6s cubic-bezier(0.5, 1, 0.3, 1.6) forwards;
  }
  .button:focus .state--default .icon svg {
    animation: movePlus 2s linear forwards;
  }
  
  @keyframes rotatePlus {
    30% {
      stroke: white;
    }
    100% {
      transform: rotate(90deg);
    }
  }
  
  @keyframes scalePlus {
    30% {
      transform: scale(1.3);
    }
    100% {
      transform: scale(1);
    }
  }
  
  @keyframes movePlus {
    10%,
    18% {
      transform: translate(0px, 0px);
      stroke: white;
    }
    25% {
      transform: translate(5px, 0px) rotate(-80deg);
      stroke: #00ff00;
      filter: blur(0);
    }
    40% {
      transform: translate(32px, -15px) rotate(-200deg);
      filter: blur(2px);
    }
    55% {
      transform: translate(55px, 10px) rotate(-360deg);
    }
    60%,
    100% {
      transform: translate(80px, 10px) rotate(-360deg) scale(0);
    }
  }
  
  /* Letters */
  .state p span {
    display: block;
    opacity: 0;
    animation: slideDown 0.8s ease forwards calc(var(--i) * 0.03s);
  }
  .button:hover p span {
    opacity: 1;
    animation: wave 0.5s ease forwards calc(var(--i) * 0.03s);
  }
  .button:focus p span {
    opacity: 1;
    animation: disappear 0.6s ease forwards calc(0.5s + var(--i) * 0.1s);
  }
  
  @keyframes wave {
    30% {
      opacity: 1;
      transform: translateY(4px) translateX(0) rotate(0);
    }
    50% {
      opacity: 1;
      transform: translateY(-3px) translateX(0) rotate(0);
      color: var(--primary);
    }
    100% {
      opacity: 1;
      transform: translateY(0) translateX(0) rotate(0);
    }
  }
  
  @keyframes slideDown {
    0% {
      opacity: 0;
      transform: translateY(20px) translateX(0px);
      color: var(--primary);
      filter: blur(5px);
    }
    20% {
      opacity: 1;
      transform: translateY(-4px) translateX(-2px) rotate(-10deg);
      filter: blur(0);
    }
    50% {
      opacity: 1;
      transform: translateY(3px) translateX(3px) rotate(0);
    }
    100% {
      opacity: 1;
      transform: translateY(0) translateX(0) rotate(0);
    }
  }
  
  @keyframes disappear {
    from {
      opacity: 1;
    }
    to {
      opacity: 0;
      transform: translateX(5px) translateY(-20px);
      color: var(--primary);
      filter: blur(5px);
    }
  }
  
  .button svg path {
    transition: all 0.5s ease;
  }
  
  .state {
    padding-left: 29px;
    display: flex;
    position: relative;
  }
  
  .state--added {
    display: none;
    color: white;
  }
  .state--added .icon svg {
    stroke-dasharray: 24 24;
    stroke-dashoffset: -24;
  }
  .button:focus .state--default {
    position: absolute;
  }
  .button:focus .state--added {
    display: flex;
    --primary: lightgreen;
  }
  .button:focus .state--added span {
    opacity: 0;
    animation: slideDown 1.2s ease forwards calc(1s + var(--i) * 0.1s);
  }
  .button:focus .state--added .icon svg {
    animation: check 1s cubic-bezier(0.5, -0.15, 0.3, 1.4) forwards 1s;
  }
  
  @keyframes check {
    0% {
      stroke-dashoffset: -24;
      transform: scale(4);
      filter: blur(3px);
    }
    50% {
      stroke-dashoffset: -7;
    }
    100% {
      transform: scale(1);
      stroke-dashoffset: 0;
    }
}

.sugestion{
  font-size: 2rem;
  text-align: center;
  align-items: center;
}

.carousel-container {
  position: relative;
  width: 80%; /* Puedes ajustar el ancho al porcentaje que prefieras */
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto; /* El margen automático centrará el carrusel en el contenedor padre */
}

.carousel-wrapper {
  display: flex;
  transition: transform 0.5s ease;
  display: flex;
  justify-content: center;
}

.carousel-item {
  width: calc(25% - 20px);
  box-sizing: border-box;

}

.product-card {
  padding: 20px;
  border: 1px solid #ccc;
  margin: 10px;
  background-color: #fff;
  text-align: center;
  border-radius: 5px;
}

.product-image {
  max-width: 100%;
  height: 200px;
  display: block;
  margin: 0 auto;
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: #000000a7;
  color: #FFF;
  border: none;
  padding: 10px;
  cursor: pointer;
  font-size: 2rem;
  z-index: 1000;
  border-radius: 5px;
}

.prev {
  left: 10px;
}

.next {
  right: 10px;
}

/* Estilos para el botón del carrito */
.cart-btn {
    position: fixed;
    bottom: 20px; /* Distancia desde la parte inferior */
    right: 20px; /* Distancia desde la parte derecha */
    background-color: #FFDDD2; /* Color de fondo azul */
    padding: 15px;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); /* Sombra sutil */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilo para el contador de productos */
.cart-count {
    background-color: #ff69b4; /* Fondo rojo para el contador */
    font-size: 1rem;
    padding: 5px;
    border-radius: 50%;
    position: absolute;
    top: -5px;
    right: -5px;
    font-weight: bold;
}

/* Estilo para el ícono del carrito */
.cart-btn i {
    font-size: 24px; /* Tamaño del ícono */
}

@media (max-width: 768px) {
  .product-details {
      padding: 10px;
  }

  .details-container {
      grid-template-columns: 1fr; /* Pasa a una sola columna */
      text-align: center;
      margin: 6rem 0;
  }

  .image-gallery {
      width: 100%;
  }

  .main-image {
      max-width: 100%;
  }

  .thumbnails {
      justify-content: center;
      flex-wrap: wrap;
  }

  .thumbnails img {
      width: 100px;
      height: 100px;
  }

  .product-info {
      align-items: center;
  }

  .product-title {
      font-size: 1.5rem;
  }

  .product-description {
      font-size: 14px;
      margin-bottom: 15px;
  }

  .product-price {
      font-size: 16px;
  }

  .actions {
      flex-direction: column;
  }

  .quantity-selector input {
      width: 50px;
      padding: 3px;
  }

  .button {
      min-width: 120px;
      height: 40px;
      font-size: 16px;
  }

  .back-to-shop-btn {
      font-size: 14px;
      margin-top: 15px;
  }
  .sugestion {
      font-size: 1.5rem;
  }

  .carousel-container {
      width: 95%; /* Se expande más en móviles */
  }

  .carousel-wrapper {
      flex-wrap: nowrap;
  }

  .carousel-item {
      width: calc(50% - 10px); /* Muestra 2 elementos por fila */
  }

  .product-image {
      height: 150px;
  }

  .carousel-button {
      font-size: 1.5rem;
      padding: 6px;
  }
}

/* Celulares pequeños (pantallas menores a 480px) */
@media (max-width: 480px) {
  .product-details {
      margin: 2rem 0;
  }

  .details-container {
      padding: 10px;
      gap: 10px;
  }

  .main-image {
      max-width: 250px;
  }

  .thumbnails img {
      width: 40px;
      height: 40px;
  }

  .product-title {
      font-size: 1.5rem;
  }

  .product-description {
      font-size: 13px;
  }

  .product-price {
      font-size: 16px;
  }

  .button {
      min-width: 120px;
      height: 40px;
      font-size: 14px;
  }
  .carousel-item {
      width: 100%; /* Muestra solo 1 elemento por fila */
  }

  .product-card {
      padding: 15px;
  }

  .product-image {
      height: 120px;
  }

  .carousel-button {
      font-size: 1.3rem;
      padding: 5px;
  }
}