@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600&display=swap");

:root {
  /* Brand Palette */
  --color-arena: #edece8;
  --color-greige: #b4ada4;
  --color-white: #f8f7f3; /* Blanco Roto */
  --color-white-pure: #ffffff;
  --color-accent: #dccebc;

  /* Text & Functional Colors */
  --text-primary: #333333; /* Dark Grey for readability */
  --text-secondary: #666666;
  --color-dark-bg: #4a4540; /* Approximate derived from "Versión Dark" box */

  /* Spacing */
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 32px;
  --spacing-xl: 64px;

  /* Typography */
  --font-main: "Montserrat", sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--color-white);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

img {
  max-width: 100%;
}

/* Utility Classes */
.text-center {
  text-align: center;
}
.uppercase {
  text-transform: uppercase;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-primary {
  position: relative;
  background-color: var(--color-dark-bg);
  color: var(--color-white);
  border: 1px solid var(--color-dark-bg);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid var(--color-greige);
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.btn-primary:hover::after {
  opacity: 1;
}

.show-more .btn-primary {
  margin-top: 5px;
  text-transform: capitalize;
  padding: 10px 20px;
  font-family: var(--font-main);
  font-size: 1rem;
  cursor: pointer;
}

.btn-secondary {
  background-color: transparent;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-dark-bg);
  border: 1px solid var(--color-dark-bg);
  transition: all 200ms ease;
}

.btn-outline:hover {
  background-color: var(--color-greige);
  color: var(--color-white);
}

/* Header */
.header {
  background-color: var(--color-white);
  padding: var(--spacing-md);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05); /* Subtle separation */

  @media (min-width: 700px) {
    padding: var(--spacing-md) var(--spacing-lg);
  }

  .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .logo {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
  }
  .logo img {
    width: 50px;
    height: auto;
    object-fit: contain;
  }
  .header-content h1 {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
    text-align: center;
  }
  .cta {
    padding: 5px 10px;
    background-color: var(--color-dark-bg);
    border: 1px solid var(--color-dark-bg);
    border-radius: 4px;
    color: var(--color-white-pure);
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-main);
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
  }
  .cta:hover {
    transform: scale(1.03);
  }
}

/* Hero Section */
.hero-section {
  background-image: url("../../assets/images/home/banner.png");
  background-size: 100% 100%;
  padding: 50px 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;

  .hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;

    h1 {
      font-size: 3.5rem;
      line-height: 1.1;
      margin-bottom: 0;
      font-weight: 500;
      color: #f5f5f5;
    }

    .yuka {
      margin: var(--spacing-xl) 0;
      color: #f5f5f5;
      font-size: 0.8rem;
      font-style: italic;
      font-family: serif;
      @media (min-width: 700px) {
        font-size: 1rem;
      }
    }

    p {
      font-size: 1rem;
      margin-bottom: 20px;
      color: #f5f5f5;
      max-width: 600px;
      margin-left: auto;
      margin-right: auto;
      padding: 10px 30px 0;

      @media (min-width: 700px) {
        margin-bottom: var(--spacing-xl);
        font-size: 1.2rem;
      }
    }

    .hero-actions {
      display: flex;
      gap: var(--spacing-md);
      justify-content: center;
    }
  }

  /* .eyebrow {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
  } */
}

.features {
  background: var(--color-white-pure);
  width: 100%;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 20px 10px;

  @media (min-width: 700px) {
    padding: 20px 100px;
  }

  .feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 0 5px;

    @media (min-width: 700px) {
      margin: 0 10px;
    }

    svg {
      margin-bottom: 10px;
      opacity: 50%;
      max-width: 30px;
      max-height: 30px;
      @media (min-width: 700px) {
        max-width: 40px;
        max-height: 40px;
        margin-bottom: 5px;
      }
    }

    h3 {
      font-size: 0.8rem;
      font-weight: 500;
      color: var(--text-primary);
      color: gray;
      @media (min-width: 700px) {
        font-size: 1.2rem;
      }
    }
  }
}

/* Products Section */
.products-section {
  background-color: var(--color-white-pure);
  padding: var(--spacing-lg) var(--spacing-md);

  @media (min-width: 700px) {
    padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
  }

  .section-header {
    margin-bottom: 0;
    @media (min-width: 700px) {
      margin-bottom: var(--spacing-xl);
    }
    .eyebrow {
      display: block;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--text-secondary);
    }
    h2 {
      font-size: 2.5rem;
      color: var(--color-dark-bg);
      margin-bottom: 4px;
      line-height: 2.5rem;
      margin-top: 5px;

      @media (min-width: 700px) {
        margin-bottom: var(--spacing-sm);
        line-height: auto;
        margin-top: unset;
      }
    }

    .section-desc {
      color: var(--text-secondary);
      max-width: 500px;
      margin: 0 auto;
      font-size: 1rem;
    }
  }
  .section-content {
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1200px;
    align-items: center;
    padding-top: 50px;
    gap: 40px;

    @media (min-width: 700px) {
      grid-template-columns: 1fr 1fr;
      gap: 0;
      padding-top: 0;
    }

    /* Estilos de Texto */
    .text-content {
      text-align: center;
      padding: 0 20px;
      @media (min-width: 700px) {
        padding: 20px 15px 20px 5px;
      }
    }

    .subtitle {
      font-size: 0.9rem;
      color: #555;
      font-weight: 300;
    }

    .title {
      font-size: 2.8rem;
      color: #333;
      margin-bottom: 5px;
      font-weight: 700;
      text-transform: capitalize;
      @media (min-width: 700px) {
        margin-bottom: 5px;
      }
    }

    .description {
      font-size: 1rem;
      line-height: 1.8;
      color: #444;
      max-width: 500px;
      margin: 0 auto 10px;

      @media (min-width: 700px) {
        margin: 0 auto 40px;
      }
    }

    /* imágenes */
    .image-gallery {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 15px;
    }

    .grid-left,
    .grid-right {
      display: flex;
      flex-direction: column;
      gap: 15px;
    }
    .grid-right {
      margin-top: 30px;
    }

    .img-box:hover {
      scale: 1.05;
      transition: all 400ms ease;
    }
    .img-box {
      width: 100%;
      overflow: hidden;
      background-color: #f4f4f4;
    }

    .img-box img:hover {
      scale: 1.1;
      transition: all 400ms ease;
      cursor: zoom-in;
    }
    .img-box img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* Ajustes de altura específicos para imitar el diseño */
    .top-left {
      height: 175px;
    }
    .bottom-left {
      height: 350px;
    }
    .top-right {
      height: 350px;
    }
    .bottom-right {
      height: 175px;
    }

    @media (max-width: 900px) {
      .hero-container {
        grid-template-columns: 1fr;
      }
      .title {
        font-size: 2rem;
      }
    }
  }
  .section-content + .section-content {
    padding-top: 20px;
    @media (min-width: 700px) {
      padding-top: 120px;
    }
  }
  .section-content:nth-child(3) {
    .image-gallery {
      order: 2;
    }
    .text-content {
      order: 1;
    }
    @media (min-width: 700px) {
      .image-gallery {
        order: 1;
      }
      .text-content {
        order: 2;
        padding: 20px 50px 0;
      }
    }
    @media (min-width: 1200px) {
      .image-gallery {
        min-width: 750px;
      }
    }
  }
}

.about-section {
  background-color: var(--color-arena);
  padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-md);
  display: flex;
  align-items: center;
  justify-content: center;

  @media (min-width: 700px) {
    padding: var(--spacing-xl) var(--spacing-lg);
  }

  .about-container {
    max-width: 900px;
    margin: 0 auto;
  }

  .about-content {
    text-align: center;

    .eyebrow {
      display: block;
      font-size: 0.75rem;
      text-transform: uppercase;
      letter-spacing: 0.2em;
      color: var(--text-secondary);
      margin-bottom: var(--spacing-md);
    }

    h2 {
      font-size: 2.5rem;
      margin-bottom: var(--spacing-xl);
      color: var(--color-dark-bg);
      font-weight: 500;
      line-height: 1.2;
    }

    .about-text {
      margin-bottom: var(--spacing-sm);

      p {
        font-size: 1.1rem;
        line-height: 1.8;
        color: var(--text-primary);
        margin-bottom: var(--spacing-md);
        max-width: 750px;
        margin-left: auto;
        margin-right: auto;
      }
      p:first-child {
        margin-bottom: 20px;
      }
      p:last-child {
        margin-bottom: 0;
      }

      .highlight {
        font-weight: 500;
        color: var(--text-primary);
      }

      .signature {
        font-size: 1.7rem;
        font-weight: 500;
        color: var(--color-dark-bg);
        margin-top: var(--spacing-lg);
        letter-spacing: 0.02em;
        margin-bottom: 0;
      }
      .yuka {
        margin-bottom: 10px;
        font-size: 0.8rem;
        font-style: italic;
        font-family: serif;
        @media (min-width: 700px) {
          font-size: 1rem;
        }
      }
      .yuka-logo {
        width: 120px;
        height: auto;
      }
    }
  }
}

/* Footer */
.site-footer {
  background-color: var(--color-arena);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: var(--spacing-lg) var(--spacing-lg) 10px;

  @media (min-width: 700px) {
    padding: var(--spacing-xl) var(--spacing-lg) 10px;
  }

  .footer-main {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);

    @media (min-width: 768px) {
      grid-template-columns: 0.8fr 1.2fr 1fr;
      gap: var(--spacing-lg);
      margin-bottom: var(--spacing-xl);
    }
  }

  .footer-column {
    display: flex;
    flex-direction: column;
    gap: 0;

    @media (min-width: 700px) {
      gap: var(--spacing-md);
    }
  }

  /* Columna 1: Logo y Contacto */
  .footer-brand {
    .footer-logo img {
      width: 80px;
      height: auto;
      margin-bottom: var(--spacing-md);
    }

    .footer-contact-info {
      display: flex;
      flex-direction: column;
      gap: var(--spacing-sm);
    }

    .contact-link {
      display: flex;
      align-items: center;
      gap: 10px;
      color: var(--text-primary);
      text-decoration: none;
      font-size: 0.95rem;
      transition: all 0.3s ease;

      svg {
        flex-shrink: 0;
      }

      &:hover {
        color: var(--color-dark-bg);
        transform: translateX(5px);
      }
    }
  }

  /* Columna 2: Mapa */
  .footer-map {
    .map-container {
      border-radius: 4px;
      overflow: hidden;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
      margin-bottom: var(--spacing-sm);
      max-width: unset;

      @media (min-width: 1000px) {
        max-width: 500px;
      }

      iframe {
        display: block;
        width: 100%;
        height: 300px;
      }
    }

    .map-address {
      display: flex;
      gap: 10px;
      align-items: flex-start;
      font-size: 0.9rem;
      margin-top: 5px;

      svg {
        flex-shrink: 0;
        color: var(--color-dark-bg);
        margin-top: 2px;
      }

      .address-title {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 2px;
      }

      .address-text {
        color: var(--text-secondary);
        margin-bottom: 4px;
      }

      .address-hours {
        color: var(--text-secondary);
        font-size: 0.85rem;
      }
    }
  }

  /* Columna 3: Formulario */
  .footer-form {
    h3 {
      font-size: 1.2rem;
      font-weight: 500;
      color: var(--color-dark-bg);
      margin-bottom: var(--spacing-sm);
    }

    .contact-form {
      display: flex;
      flex-direction: column;
      gap: var(--spacing-sm);
    }

    .form-group {
      display: flex;
      flex-direction: column;
    }

    input,
    textarea {
      padding: 12px 16px;
      font-family: var(--font-main);
      font-size: 0.95rem;
      border: 1px solid var(--color-greige);
      background-color: var(--color-white);
      border-radius: 4px;
      transition: all 0.3s ease;
      color: var(--text-primary);

      &::placeholder {
        color: var(--text-secondary);
        opacity: 0.7;
      }

      &:focus {
        outline: none;
        border-color: var(--color-dark-bg);
        box-shadow: 0 0 0 3px rgba(74, 69, 64, 0.1);
      }
    }

    textarea {
      resize: vertical;
      min-height: 80px;
    }

    button[type="submit"] {
      width: 100%;
      margin-top: var(--spacing-sm);
      font-family: var(--font-main);
    }
  }

  /* Footer Bottom */
  .footer-bottom {
    text-align: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(0, 0, 0, 0.1);

    p {
      font-size: 0.8rem;
      color: var(--text-secondary);
    }
  }
}

/* CAROUSEL */
.carousel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.carousel-container {
  position: relative;
  width: 90%;
  height: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Close Button */
.carousel-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: white;
  font-size: 48px;
  cursor: pointer;
  z-index: 10001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.carousel-close:hover {
  transform: scale(1.1);
}

/* Main Image */
.carousel-main-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  width: 100%;
  max-height: calc(100% - 150px);
}

.carousel-main-image img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Navigation Buttons */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  width: 50px;
  height: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.5);
}

.carousel-nav svg {
  width: 24px;
  height: 24px;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

/* Thumbnails */
.carousel-thumbnails {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0;
  max-width: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.carousel-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.carousel-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.carousel-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

/* Back to Top Button */
#backToTop {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 9999;
  background: var(--color-dark-bg);
  color: var(--color-white);
  border: none;
  border-radius: 50%;
  width: 38px;
  height: 38px;
  font-size: 1.2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
}
#backToTop.show {
  opacity: 1;
  pointer-events: auto;
}
#backToTop:hover {
  background: var(--color-greige);
  color: var(--color-dark-bg);
}

#wpp_button:hover {
  scale: 1.1;
  transform: rotate(5deg);
  transition: all 200ms ease;
}

#wpp_button {
  background-color: transparent;
  border: none;
  position: fixed;
  right: 10px;
  z-index: 9999;
  width: 50px;
  height: 50px;
  cursor: pointer;
  transition: bottom 0.3s ease;

  /* Posición por defecto: abajo del back to top */
  bottom: 16px;
  @media (min-width: 700px) {
    right: 26px;
  }
}

#wpp_button.top-position {
  bottom: 80px;
}

@media (max-width: 600px) {
  #backToTop {
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}

.carousel-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  cursor: pointer;
  border: 3px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.carousel-thumb:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.5);
}

.carousel-thumb.active {
  opacity: 1;
  border-color: white;
}

.carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-container {
    width: 95%;
    height: 95%;
  }

  .carousel-close {
    top: 10px;
    right: 10px;
    font-size: 36px;
    width: 40px;
    height: 40px;
  }

  .carousel-nav {
    width: 40px;
    height: 50%;
  }

  .carousel-nav svg {
    width: 20px;
    height: 20px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }

  .carousel-thumb {
    width: 60px;
    height: 60px;
  }

  .carousel-thumbnails {
    gap: 8px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .main-nav {
    display: none; /* Logic later for mobile menu */
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-actions {
    flex-direction: column;
    padding: 0 var(--spacing-lg);
  }
}
