/* ===========================
   BASE / VARIABLES / GLOBAL
   =========================== */
:root {
  --morado: #6f2c91;
  --morado-oscuro: #4b007d;
  --lila: #c96bf4;
  --drawer-pad: 18px;
  /* padding lateral del drawer */
}

* {
  box-sizing: border-box
}

body {
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: #f7f3fd;
  margin: 0;
}

/* ===========================
   NAVBAR
   =========================== */
.btn-custom {
  background: #d493f8;
  color: #fff;
  border-radius: 20px;
  padding: 6px 20px;
  font-weight: 600;
  border: none;
  transition: .25s ease;
}

.btn-custom:hover {
  background: #b364d8
}

.navbar-nav .nav-link {
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 600;
}

/* ===========================
   DRAWER (OFFCANVAS)
   =========================== */
.mobile-drawer {
  width: min(88vw, 420px);
  height: 100dvh;
  background: #fff;
  border-right: 1px solid #e9c5ff;
  display: flex;
  flex-direction: column;
}

.offcanvas-backdrop.show {
  background: rgba(0, 0, 0, .90)
}

.drawer-logo {
  height: 100px;
  width: auto
}

/* cuerpo */
.offcanvas-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: var(--drawer-pad);
  min-height: 0;
}

.drawer-content {
  flex: 1 1 auto;
  overflow: auto
}

/* navegación */
.drawer-nav .nav-link {
  display: block;
  padding: .95rem .25rem;
  text-align: center;
  font-weight: 700;
  color: #4b007d;
  letter-spacing: .6px;
  text-decoration: none;
}

.drawer-nav .nav-link.active {
  position: relative
}

.drawer-nav .nav-link.active::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  margin: .4rem auto 0;
  border-radius: 999px;
  background: #7b41e6;
}

/* toggle productos */
.drawer-toggle {
  background: transparent;
  border: 0;
  outline: none
}

.drawer-toggle .chev {
  margin-left: .35rem;
  transition: transform .2s ease
}

.drawer-toggle[aria-expanded="true"] .chev {
  transform: rotate(180deg)
}

/* submenú */
.drawer-sub {
  padding: .25rem 0
}

.drawer-sublink {
  display: block;
  text-align: center;
  background: #f2e6ff;
  color: #4b007d;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: .55rem .9rem;
  margin: .4rem auto;
  max-width: 260px;
}

.drawer-sublink:hover {
  filter: brightness(.98);
  text-decoration: none
}

/* tagline */
.drawer-tagline {
  color: #6b4a82;
  font-weight: 600;
  margin: .25rem 0 1rem;
  text-align: center;
  display: block;
}

/* buscador */
.drawer-search {
  display: flex;
  gap: .5rem;
  margin: .25rem 0 1rem
}

.drawer-search input {
  flex: 1 1 auto;
  border: 1px solid rgba(0, 0, 0, .08);
  background: #fff;
  border-radius: 12px;
  padding: .55rem .75rem;
  font-size: .95rem;
}

/* título pequeño */
.drawer-section-title {
  font-weight: 700;
  color: var(--morado-oscuro);
  margin: .5rem 0 .35rem;
  font-size: .9rem;
  opacity: .9;
}

/* chips */
.drawer-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem
}

.chip {
  display: inline-block;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: #d9b4f7;
  color: #4b007d;
  font-weight: 700;
  text-decoration: none;
  font-size: .9rem;
}

.chip:hover {
  filter: brightness(.97)
}

.chip-light {
  background: #ead9fb
}

/* footer fijo del drawer */
.drawer-footer {
  margin-top: auto;
  margin-left: calc(-1 * var(--drawer-pad));
  margin-right: calc(-1 * var(--drawer-pad));
  margin-bottom: calc(-1 * var(--drawer-pad));
  padding: 14px var(--drawer-pad) 18px;
  background: #d493f8;
  box-shadow: 0 -8px 20px rgba(0, 0, 0, .06);
}

.drawer-social {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px
}

.drawer-social a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .30);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s ease, filter .15s ease;
}

.drawer-social a:hover {
  transform: translateY(-1px);
  filter: brightness(1.05)
}

.drawer-social img {
  height: 22px;
  width: auto
}

.drawer-cta {
  display: block;
  width: 100%;
  text-align: center;
  background: #4b007da9;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
}

/* ===========================
   HERO / CAROUSEL
   =========================== */
.hero-section {
  background: transparent;
  position: relative
}

.hero-section .carousel-inner {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background-image: url('../assets/images/mariposas.png');
  background-size: cover;
  background-position: center;
  padding: clamp(8px, 1.2vw, 20px) clamp(10px, 2.2vw, 40px) clamp(42px, 4.5vw, 80px);
}

.hero-section h1 {
  color: #fff;
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 400;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, .3);
}

.hero-section .btn {
  padding: .6rem 1.5rem;
  font-weight: 700;
  border-radius: 20px;
  box-shadow: 0 3px 6px rgba(0, 0, 0, .15);
}

.hero-section .carousel-indicators {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(10px, 1.6vw, 26px);
  margin: 0 auto;
  width: 100%;
  justify-content: center;
  gap: clamp(6px, 1vw, 12px);
}

.hero-section .carousel-indicators button {
  height: 6px;
  width: clamp(70px, 24vw, 460px);
  max-width: 460px;
  border-radius: 999px;
  background: #fff;
  opacity: 1;
}

.hero-section .carousel-indicators .active {
  background: #692688
}

/* slides */
.carousel-item {
  position: relative;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  border-radius: 16px;
  aspect-ratio: 16 / 9;
  height: auto;
  min-height: clamp(420px, 46vh, 600px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.carousel-item.active {
  display: flex
}

@supports not (aspect-ratio:16 / 9) {
  .carousel-item::before {
    content: "";
    float: left;
    padding-top: 56.25%
  }

  .carousel-item::after {
    content: "";
    display: block;
    clear: both
  }
}

/* ===========================
   HISTORY
   =========================== */
.history-section {
  font-weight: 400;
  background: #edd1f5;
  padding: 12rem 2rem;
  overflow: hidden;
}

.history-section h2 {
  font-family: 'Croissant One', serif;
}

.Ovillo {
  position: absolute;
  background-repeat: no-repeat;
  background-size: contain;
  opacity: .3;
  z-index: 0;
  animation: spin 20s linear infinite;
  will-change: transform;
}

@keyframes spin {
  from {
    transform: rotate(0)
  }

  to {
    transform: rotate(360deg)
  }
}

.Ovillo-1 {
  width: 100px;
  height: 100px;
  top: 20%;
  left: 5%;
  background-image: url('../assets/logos/Ovillo1.svg')
}

.Ovillo-2 {
  width: 50px;
  height: 50px;
  bottom: 20%;
  right: 5%;
  background-image: url('../assets/logos/Ovillo4.svg')
}

.Ovillo-3 {
  width: 100px;
  height: 100px;
  top: 35%;
  left: 10%;
  transform: translateY(-50%);
  background-image: url('../assets/logos/Ovillo3.svg')
}

.Ovillo-4 {
  width: 50px;
  height: 50px;
  top: 35%;
  right: 10%;
  transform: translateY(-50%);
  background-image: url('../assets/logos/Ovillo4.svg')
}

.Ovillo-5 {
  width: 100px;
  height: 100px;
  top: 60%;
  left: 30%;
  background-image: url('../assets/logos/Ovillo1.svg')
}

.Ovillo-6 {
  width: 50px;
  height: 50px;
  bottom: 40%;
  right: 20%;
  background-image: url('../assets/logos/Ovillo4.svg')
}

.Ovillo-7 {
  width: 50px;
  height: 50px;
  top: 40%;
  left: 20%;
  transform: translateY(-50%);
  background-image: url('../assets/logos/Ovillo1.svg')
}

.Ovillo-8 {
  width: 100px;
  height: 100px;
  top: 60%;
  right: 30%;
  transform: translateY(-50%);
  background-image: url('../assets/logos/Ovillo4.svg')
}

.Ovillo-9 {
  width: 50px;
  height: 50px;
  top: 80%;
  right: 40%;
  transform: translateY(-50%);
  background-image: url('../assets/logos/Ovillo1.svg')
}

/* ===========================
   FOOTER
   =========================== */
.site-footer {
  background: #c96bf4;
  color: #fff;
  padding: 3.25rem 0 2.25rem;
  position: relative;
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 400;
}

.footer-sep {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 0 14px
}

.footer-sep__line {
  flex: 1 1 0;
  height: 1px;
  background: rgba(255, 255, 255, .85)
}

.footer-sep__logo {
  display: block;
  height: 100px;
  width: auto
}

.footer-logo {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -100%);
  width: 150px;
  height: auto;
  background: #c96bf4;
  padding: 6px 12px;
  border-radius: 8px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem
}

.footer-col {
  flex: 1 1 0
}

.footer-left {
  text-align: left
}

.footer-center {
  text-align: center
}

.footer-right {
  text-align: right
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: .35rem
}

.footer-contact i {
  margin-right: .5rem
}

.footer-ico {
  height: 22px;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
  display: inline-block
}

.footer-contact-link {
  color: #fff;
  text-decoration: none
}

.footer-contact-link:hover {
  text-decoration: underline
}

.footer-copy {
  opacity: .95;
  margin-bottom: .6rem
}

.footer-social {
  display: flex;
  gap: .5rem;
  justify-content: center
}

.btn-social {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .22);
  color: #fff;
  text-decoration: none;
  transition: filter .2s ease, transform .15s ease;
}

.btn-social:hover {
  filter: brightness(1.05);
  transform: translateY(-1px)
}

.footer-legal {
  list-style: none;
  margin: 0;
  padding: 0
}

.footer-legal li+li {
  margin-top: .25rem
}

.site-footer a {
  color: #fff;
  text-decoration: none
}

.site-footer a:hover {
  text-decoration: underline
}

/* ===========================
   TIPOGRAFÍA EXTRA
   =========================== */
.form-control,
textarea,
input,
select,
.input-group-text {
  font-family: 'Quicksand', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 300;
}

.fw-bold {
  font-weight: 600 !important
}

.u-title {
  font-family: 'Croissant One', serif;
  font-weight: 400
}

.u-sb {
  font-family: 'Quicksand', sans-serif;
  font-weight: 600
}

.u-light {
  font-family: 'Quicksand', sans-serif;
  font-weight: 300
}

/* =====================================
   RESPONSIVE
   ===================================== */

/* >= sm breakpoint tweaks */
@media (max-width:576px) {

  /* footer */
  .footer-sep {
    gap: 12px;
    padding: 6px 0 12px
  }

  .footer-ico {
    height: 16px
  }
}

/* < sm (575.98px) */
@media (max-width:575.98px) {

  /* footer */
  .footer-logo {
    width: 132px;
    padding: 5px 10px
  }

  .btn-social {
    width: 32px;
    height: 32px
  }
}

/* < md/lg (991.98px) */
@media (max-width:991.98px) {

  /* navbar */
  .navbar-mariposa {
    height: 56px
  }

  /* hero / slides */
  .carousel-item {
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 9;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
  }

  .hero-section .carousel-inner {
    padding: 60px 20px 100px;
    background-position: top center;
    border-radius: 12px;
  }

  .hero-section .carousel-indicators {
    bottom: 10%;
    gap: 6px
  }

  .hero-section .carousel-indicators button {
    width: 150px;
    height: 1px;
    border-radius: 999px
  }

  .hero-section .carousel-indicators .active {
    background: #692688
  }

  /* history */
  .history-section {
    padding: 6rem 3rem !important
  }

  /* footer layout */
  .footer-row {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem
  }

  .footer-left,
  .footer-right {
    text-align: center
  }

  .footer-legal {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap
  }

  .footer-legal li {
    margin: 0
  }

  .footer-logo {
    width: 140px
  }

  .btn-social {
    width: 34px;
    height: 34px
  }
}