/* =========================================================
   🌼 USE CASE — TOASTE PROJECT
   ESTRUCTURA HTML Y CSS
   Author: Alejandra
   ========================================================= */

/* =====================
    FONTS 
===================== */

/* BAGEL FAT ONE */
@import url("https://fonts.googleapis.com/css2?family=Bagel+Fat+One&display=swap");
/* INTER */
@import url("https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,100..900;1,100..900&display=swap");

/* =====================
|   VARIABLES GLOBALES  
===================== */

:root {
  /* Color Primario */
  --accent-color: #ffc300;

  /* Colores Neutrales */
  --color-100: #ffffff;
  --color-200: #fffcf1;
  --color-300: #fff7db;
  --color-400: #dcd4b8;
  --color-500: #aa9e78;
  --color-600: #918356;
  --color-700: #75642b;
  --color-800: #382b00;

  /* Font Families */
  --font-primary: "Bagel Fat One", cursive;
  --font-secondary: "Inter", sans-serif;

  /* Font weights */
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;

  /* Headings */
  --h1-size: 78px;
  --h1-line: 85px;

  --h2-size: 58px;
  --h2-line: 64px;

  --h3-size: 48px;
  --h3-line: 64px;

  --h4-size: 38px;
  --h4-line: 47px;

  --h5-size: 24px;
  --h5-line: 30px;

  --h6-size: 20px;
  --h6-line: 25px;

  /* Display */
  --display-2-size: 38px;
  --display-2-line: 47px;

  --diplay-1-size: 24px;
  --display-1-line: 28px;

  /* Parrafos */
  --body-large-size: 18px;
  --body-large-line: 160%;
  --body-default-size: 16px;
  --body-default-line: 160%;
}

/* ========================
|   BASE ESTRUCTURA
======================== */

* {
  margin: 0;
  padding: 0;
  border-radius: border-box;
}

body {
  font-family: var(--font-secondary);
  font-size: var(--body-default-size);
  line-height: var(--body-default-line);
  color: var(--color-500);
  background-color: var(--color-100);
}

/* ========================
|   HEADINGS / TITULOS (ETIQUETAS DEFINIDAS)
======================== */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  color: var(--color-800);
  margin: 0;
}

h1 {
  font-size: var(--h1-size);
  line-height: var(--h1-line);
}

h2 {
  font-size: var(--h2-size);
  line-height: var(--h2-line);
}

h3 {
  font-size: var(--h3-size);
  line-height: var(--h3-line);
}

h4 {
  font-size: var(--h4-size);
  line-height: var(--h4-line);
}

h5 {
  font-size: var(--h5-size);
  line-height: var(--h5-line);
}

h6 {
  font-size: var(--h6-size);
  line-height: var(--h6-line);
}

/* ========================
|   DISPLAY TEXT
======================== */

.display-2 {
  font-family: var(--font-secondary);
  font-style: italic;
  font-weight: var(--fw-regular);
  font-size: var(--display-2-size);
  line-height: var(--display-2-line);
  color: var(--color-700);
}

.display-1 {
  font-family: var(--font-secondary);
  font-style: italic;
  font-weight: var(--fw-regular);
  font-size: var(--display-1-size);
  line-height: var(--display-1-line);
  color: var(--color-700);
}

/* ========================
|   PARRAFOS
======================== */

.body-large {
  font-family: var(--font-secondary);
  font-size: var(--body-large-size);
  line-height: var(--body-large-line);
  color: var(--color-600);
  font-weight: var(--fw-regular);
}

.body-default {
  font-family: var(--font-secondary);
  font-size: var(--body-default-size);
  line-height: var(--body-default-line);
  color: var(--color-600);
  font-weight: var(--fw-regular);
}

/* ========================
|   BOTONES
======================== */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background-color: var(--color-800);
  color: var(--color-100);
  font-family: var(--font-secondary);
  font-size: var(--body-large-size);
  line-height: var(--body-large-line);
  font-weight: var(--fw-regular);
  cursor: pointer;
  transition: all 0.25s ease;
}

.btn-primary:hover {
  background-color: var(--color-700);
}

/* ==============================
   🧈 LOGO
   ============================== */
.logo {
  font-family: var(--font-primary);
  font-size: 32px;
  color: var(--color-accent);
  text-decoration: none;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
}

/* ==============================
   🍞 HEADER / NAVBAR STRUCTURE
   ============================== */

.header {
  width: 100%;
  height: 109px;
  background-color: var(--color-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 40px;
  box-sizing: border-box;
}

.container {
  width: 100%;
  max-width: 1440px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==============================
   🧭 NAVBAR
   ============================== */

.navbar {
  display: flex;
  align-items: center;
  gap: 32px;
}

/* 🧾 Nav List */
.nav-list {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 32px;
  margin: 0;
  padding: 0;
}

/* 🔗 Nav Links */
.nav-link {
  font-family: var(--font-secondary);
  font-size: var(--body-large-size);
  font-weight: var(--fw-regular);
  color: var(--color-800);
  text-decoration: none;
  transition: color 0.25s ease;
}

.nav-link:hover {
  color: var(--color-accent);
}

.menu-icon {
  display: none; /* Con esto se oculta el elemento en desktop */
  width: 32px;
  height: 32px;
  object-fit: contain;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.menu-icon:hover {
  opacity: 0.8;
}

/* ==============================
   🍯 HERO SECTION
   ============================== */

.hero-section {
  width: 100%;
  background-color: var(--color-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  box-sizing: border-box;
}

/* Contenedor principal */
.hero-section .container {
  max-width: 1440px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 40px;
}

/* Wrapper general (texto + imagen) */
.hero-section .wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  width: 100%;
  background-color: var(--color-100);
  border-radius: 24px;
  box-sizing: border-box;
}

.text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.hero-section h1 {
  line-height: 1.1;
  max-width: 640px;
  /* Uso de clamp() para hacer fluido y responsivo 👇
  Ex --> clamp( minimo, se adapta segun ventana, maximo)*/
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
}

/* Parrafo principal */
.hero-section .body-large {
  max-width: 580px;
}

/* Imagen de Hero */
.hero-section .image-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 520px;
  border-radius: 16px;
  object-fit: cover;
}

/* ==============================
   🧁 ABOUT SECTION
   ============================== */

.about-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 0;
  box-sizing: border-box;
  text-align: left;
}

.about-section .container {
  max-width: 1240px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 40px;
  text-align: center;
}

.about-section h4 {
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2.4rem);
  color: var(--accent-color);
}

.about-section .text-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-section .display-2 {
  font-size: clamp(1.1rem, 1.5vw + 0.5rem, 1.875rem);
  line-height: 1.6;
  max-width: 900px;
}

/* Palabras enfatizadas */
.about-section .display-2 span {
  color: var(--color-800);
  font-weight: var(--fw-semibold);
}

/* ==============================
   🍯 FAVORITES SECTION
   ============================== */

.favorites-section {
  width: 100%;
  background-color: var(--color-800);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 80px 40px;
  box-sizing: border-box;
}

.favorites-section .container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  box-sizing: border-box;
}

.favorites-section h4 {
  color: var(--accent-color);
  font-size: clamp(1.5rem, 2vw + 0.5rem, 2.4rem);
  text-align: center;
}

.favorites-section .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  width: 100%;
  justify-content: center;
  justify-items: center;
  box-sizing: border-box;
}

/* COMPONENT - PRODUCT CARD */
.product-card {
  background-color: var(--color-200);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 24px;
  width: 100%;
  max-width: 250px;
  margin: 0 auto;
  box-shadow: 0 4px 8px rgba(56, 43, 0, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 12px rgba(56, 43, 0, 0.25);
}

.product-name {
  color: var(--color-800);
  font-size: clamp(1.25rem, 1vw + 0.75rem, 1.75rem);
  margin-bottom: 16px;
  text-align: center;
}

.product-image {
  width: 100%;
  display: flex;
  justify-content: center;
}

.product-image img {
  width: 100%;
  max-width: 260px;
  border-radius: 12px;
  object-fit: cover;
  display: block;
}

/* ==============================
   🥯 CTA SECTION
   ============================== */

.cta-home {
  width: 100%;
  background-image: url("/components/assets/cta-bg.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 120px 40px;
  box-sizing: border-box;
}

.cta-home .container {
  width: 100%;
  max-width: 1440px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.cta-home .wrapper {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
}

.cta-home .display-1 {
  font-style: italic;
  font-size: clamp(1.125rem, 2vw + 0.5rem, 1.75rem);
  line-height: 1.4;
  color: var(--color-800);
  max-width: 520px;
}

/* ==============================
   🍞 FOOTER SECTION
   ============================== */

.footer {
  width: 100%;
  background-color: var(--color-100);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 0;
  box-sizing: border-box;
}

.footer .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer .wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.footer .logo img {
  height: 42px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer-text {
  text-align: center;
}

/* ==============================
   📱 RESPONSIV0
   ============================== */

@media (max-width: 490px) {
  /* =====  HEADER ====== */
  .header {
    height: auto;
    padding: 16px 24px;
  }

  .nav-list,
  .navbar .btn-primary {
    display: none;
  }

  /* Definiendo display se muestra el icono de menu */
  .menu-icon {
    display: block;
  }

  /* =====  HERO SECTION ====== */
  .hero-section {
    padding: 40px 20px;
  }

  .hero-section .wrapper {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 32px;
  }

  .text-wrapper {
    padding: 0;
    align-items: center;
  }

  .hero-section h1 {
    font-size: 42px;
  }

  .text-wrapper .body-large {
    font-size: 16px;
    max-width: 90%;
  }

  .hero-image {
    max-width: 320px;
    border-radius: 12px;
  }

  .btn-primary {
    padding: 10px 22px;
    font-size: 16px;
  }

  /* =====  ABOUT SECTION ====== */
  .about-section {
    padding: 48px 20px;
  }

  .about-section h4 {
    font-size: clamp(1.25rem, 5vw, 1.8rem);
  }

  .about-section .display-2 {
    font-size: clamp(1rem, 4vw, 1.4rem);
    max-width: 95%;
  }

  /* =====  FAVORITES SECTION ====== */

  .favorites-section {
    padding: 48px 20px;
  }

  .favorites-section .container {
    gap: 32px;
  }

  .favorites-section .grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .product-card {
    max-width: 250px;
    padding: 20px;
  }

  .product-name {
    font-size: clamp(1.1rem, 4vw, 1.5rem);
  }

  .product-image img {
    max-width: 240px;
  }

  /* =====  CTA SECTION ====== */
  .cta-home {
    padding: 80px 24px;
    background-image: linear-gradient(
        rgba(255, 187, 187, 0.8),
        rgba(223, 126, 126, 0.8)
      ),
      url("/dwr/components/assets/cta-bg.png");
    background-position: top center;
  }

  .cta-home .container {
    justify-content: center;
    text-align: center;
  }

  .cta-home .wrapper {
    max-width: 480px;
    align-items: center;
    gap: 20px;
  }

  .cta-home .display-1 {
    max-width: 100%;
    font-size: clamp(1rem, 4vw, 1.3rem);
  }

  .cta-home .btn-primary {
    padding: 12px 24px;
    font-size: 1rem;
  }
}
