@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Figtree:ital,wght@0,300..900;1,300..900&family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Kumbh+Sans:wght@100..900&family=Lexend+Deca:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Young+Serif&display=swap");
@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Figtree:ital,wght@0,300..900;1,300..900&family=Fraunces:ital,opsz,wght@0,9..144,100..900;1,9..144,100..900&family=Hanken+Grotesk:ital,wght@0,100..900;1,100..900&family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Kumbh+Sans:wght@100..900&family=Lexend+Deca:wght@100..900&family=Montserrat:ital,wght@0,100..900;1,100..900&family=Outfit:wght@100..900&family=Red+Hat+Display:ital,wght@0,300..900;1,300..900&family=Young+Serif&display=swap");

:root {
  /* COLORES */

  /* ### Primary */

  --Green-500: hsl(158, 36%, 37%);
  --Green-700: hsl(158, 42%, 18%);

  /* ### Neutral */

  --Black: hsl(212, 21%, 14%);
  --Grey: hsl(228, 12%, 48%);
  --Cream: hsl(30, 38%, 92%);
  --White: hsl(0, 0%, 100%);

  /* FUENTES */

  --font-family: "Montserrat", sans-serif;
  --font-family2: "Fraunces", serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--Cream);
  font-family: var(--font-family);
}

.cart-add {
  position: fixed;
  top: 1%;
  right: 15%;
  background-color: white;
  padding: 1.5rem;
  max-width: 650px;
  text-align: center;
  border-radius: 10px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease, transform 0.5s ease;
  transform: translateY(0);

  p {
    color: var(--Dark-blue);
    font-size: 1rem;
    font-weight: 900;
  }
}

.cart-add--show {
  opacity: 1; /* Hacer visible */
  visibility: visible; /* Mostrar */
  transform: translateY(20px);
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;

  .card {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 1rem;
    background-color: var(--White);
    border-radius: 10px;
    overflow: hidden;
    width: 435px;
    height: auto;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);

    .card__image {
      width: 100%;
      height: 100%;
      .img__desktop {
        display: none;
      }
      img {
        width: 100%;
        height: 100%;
      }
    }

    .card__content {
      display: flex;
      justify-content: center;
      flex-direction: column;
      gap: 1rem;
      padding: 1.5rem;
      .card__category {
        font-size: 15px;
        letter-spacing: 0.3rem;
        color: var(--Grey);
        text-transform: uppercase;
      }

      .card__title {
        font-size: 2.3rem;
        font-weight: 700;
        color: var(--Black);
        font-family: var(--font-family2);
        line-height: 1;
      }
      .card__description {
        font-weight: 500;
        font-size: 1rem;
        color: var(--Grey);
        line-height: 1.6;
        width: 30ch;
      }

      .card__price {
        display: flex;
        align-items: center;
        gap: 1rem;
        .card__price--current {
          font-size: 2rem;
          font-weight: 700;
          color: var(--Green-500);
          font-family: var(--font-family2);
        }
        .card__price--old {
          font-size: 1rem;
          font-weight: 500;
          color: var(--Grey);
          text-decoration: line-through;
        }
      }

      .card__button {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1rem;
        background-color: var(--Green-500);
        border: none;
        border-radius: 10px;
        padding: 1rem;
        cursor: pointer;
        transition: all 0.3s ease;
        width: 100%;
        font-size: 1rem;
        font-weight: 500;
        color: var(--White);
        font-family: var(--font-family);
        letter-spacing: 0.1rem;
        &:hover {
          background-color: var(--Green-700);
        }
        img {
          width: 1.1rem;
        }
      }
    }
  }
}

footer {
  background-color: #333;
  width: 100%;
  margin-top: 20px;
  color: #fff;
  padding: 20px;
  text-align: center;
  border-top: 2px solid #555;

  p {
    margin: 10px 0;
  }

  a {
    color: #1e90ff;
    text-decoration: none;
    font-weight: bold;
    &:hover {
      color: #ff6347;
      text-decoration: underline;
    }
  }
}

@media (min-width: 1000px) {
  body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .cart-add {
    right: 35%;
  }

  .container {
    .card {
      flex-direction: row;
      width: 700px;
      height: 450px;

      .card__image {
        width: 100%;
        height: 100%;
        .img__desktop {
          display: block;
        }
        .img__mobile {
          display: none;
        }
      }

      .card__content {
        max-width: 50%;
        gap: 1.2rem;
        .card__title {
          width: 10ch;
        }
      }
    }
  }

  footer {
    width: 40%;
    margin-top: 3rem;
    border-radius: 20px;
    margin-bottom: 1rem;
  }
}
