/* ==========================================================
   Petty – base: variables, reset, tipografía, botones,
   cabecera, pie de página y utilidades.
   Medidas tomadas del original a 1440 px de ancho.
   ========================================================== */
:root {
  --c-primary: #f89c1c;      /* naranja Mascota Planet (rellenos y acentos) */
  --c-yellow-2: #cfe6f8;     /* celeste de las ondas */
  --c-hero: #e2f1fc;         /* celeste suave del slider y banners */
  --c-topbar: #1b75bb;       /* azul Mascota Planet */
  --c-promo: #ffe3b8;        /* banner de descuento (naranja claro) */
  --c-secondary: #1b75bb;    /* azul de botones (texto blanco legible) */
  --c-tertiary: #f89c1c;     /* naranja (hover y detalles) */
  --c-dark: #17324d;         /* azul marino: títulos y pie */
  --c-text: #000;
  --c-white: #fff;
  --c-sale: #c93339;         /* rojo de ofertas y errores (contraste 5.2:1 con blanco, 4.7:1 sobre celeste) */
  --c-tint: #eaf4fc;         /* fondo claro de cajas (antes rosa) */
  --c-orange-text: #a35a00;  /* naranja oscuro para TEXTO sobre blanco (contraste 4.9:1); el naranja de marca queda para fondos */
  --c-wa-btn: #15803d;       /* verde WhatsApp para BOTONES con texto blanco (contraste 5:1); #1fa855 queda solo para iconos */
  --c-wa-btn-hover: #0f612f;
  --c-blue-text: #17669f;    /* azul para TEXTO pequeño sobre fondos celestes (contraste 5.3:1 sobre #e2f1fc) */

  --f-alt: "Fredoka One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --f-base: "Readex Pro", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fs-base: 18px;
  --fs-h-sec: 50px;
  --container: 1080px;
  --gutter: 30px;

  --t-base: all 0.3s linear 0s;
  --t-alt: all 0.35s ease-in-out 0s;
  --radius-pill: 2.5em;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-base);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-dark); text-decoration: none; transition: var(--t-base); }
a:hover { color: var(--c-tertiary); }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--f-alt); font-weight: 400; color: var(--c-dark); line-height: 1.35; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-secondary); outline-offset: 3px; }
svg { fill: currentColor; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Botón naranja tipo píldora ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.9em 2.5em;
  border-radius: 35px;
  background: var(--c-secondary);
  color: var(--c-white);
  font-family: var(--f-base); font-size: 14px; font-weight: 600; line-height: 1.3;
  letter-spacing: 1.4px; text-transform: uppercase;
  position: relative; overflow: hidden; isolation: isolate;
  transition: var(--t-base);
}
/* relleno que sube al pasar el ratón */
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--c-dark);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform 0.35s ease-in-out;
}
.btn:hover { color: var(--c-white); }
.btn:hover::before { transform: scaleY(1); }
.btn--sm { padding: 6px 14px; font-size: 12px; border-radius: 30px; }
.btn--lg { padding: 16px 52px; }

/* ---------- Título de sección con "rayitas" ---------- */
.h-sec {
  position: relative; display: inline-block;
  font-size: var(--fs-h-sec); line-height: 85px; text-transform: capitalize;
}
.h-sec__swoosh { position: absolute; width: 50px; height: 45px; left: -55px; top: -15px; color: var(--c-dark); }
.h-sec--center { display: block; width: fit-content; margin-inline: auto; }

/* ==========================================================
   CABECERA (va encima de la portada)
   ========================================================== */
.site-header { position: absolute; inset: 0 0 auto; z-index: 50; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 30px; background: var(--c-topbar); min-height: 55px;
}
.topbar__promo { font-family: var(--f-alt); font-size: 13px; line-height: 1.35; color: var(--c-white); }
.topbar__link { color: var(--c-white); }
.topbar__link:hover { color: var(--c-primary); }
.topbar .btn { background: var(--c-primary); color: var(--c-dark); }
.topbar .btn:hover { color: var(--c-white); }
.topbar__right { display: flex; align-items: center; gap: 33px; }
.topbar__link { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 14px; font-weight: 600; line-height: 25px; }
.topbar__link .ico { flex: none; }

.navbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 30px; min-height: 83px; }
.logo { flex: 0 0 207px; }
.logo img { width: 65px; height: auto; }
.menu { flex: 1; display: flex; justify-content: center; }
.menu > ul { display: flex; }
.menu li { position: relative; }
.menu > ul > li > a {
  display: inline-block; padding: 8px 30px;
  font-size: 14px; font-weight: 600; line-height: 25px; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--c-dark); position: relative;
}
.menu > ul > li > a::after {
  content: ""; position: absolute; left: 30px; right: 30px; bottom: 6px; height: 3px; border-radius: 3px;
  background: var(--c-dark); transform: scaleX(0); transform-origin: left; transition: transform 0.3s ease;
}
.menu > ul > li.is-current > a { color: var(--c-text); }
.menu > ul > li.is-current > a::after, .menu > ul > li:hover > a::after { transform: scaleX(1); }
.menu > ul > li:hover > a { color: var(--c-text); }

.sub {
  position: absolute; top: 100%; left: 0; z-index: 10; width: 180px; margin-top: -5px;
  background: var(--c-white); border-top: 3px solid var(--c-primary); border-radius: 0 0 10px 10px;
  box-shadow: 0 0 2px 3px rgba(23, 50, 77, 0.05);
  opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.2s ease-in;
  text-align: left;
}
.menu li:hover > .sub, .menu li:focus-within > .sub { opacity: 1; visibility: visible; transform: none; }
.sub a { display: block; padding: 10px 30px; font-size: 12px; font-weight: 600; line-height: 21.6px; letter-spacing: 1.4px; text-transform: uppercase; }
.sub li.is-current > a, .sub a:hover { color: var(--c-tertiary); }

.header-icons { flex: 0 0 207px; display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { width: 35px; height: 35px; display: inline-flex; align-items: center; justify-content: center; color: var(--c-dark); }
.icon-btn:hover { color: var(--c-secondary); }

.burger { display: none; width: 40px; height: 40px; flex-direction: column; justify-content: center; gap: 6px; padding: 8px; }
.burger span { display: block; height: 3px; border-radius: 2px; background: var(--c-dark); transition: var(--t-base); }

/* ==========================================================
   PIE DE PÁGINA
   ========================================================== */
.site-footer { position: relative; overflow: hidden; }
.partners {
  position: relative; padding: 140px 0 110px;
  background: var(--c-primary) url(../img/partners-bg-pattern.png) center / cover;
}
.partners__swiper { margin-top: 40px; padding-inline: 10px; }
.partners__swiper .swiper-slide { display: flex; justify-content: center; align-items: center; height: 125px; }
.partners__swiper img { max-height: 125px; width: auto; transition: transform 0.4s ease; }
.partners__swiper img:hover { transform: scale(1.06); }

.footer-main {
  position: relative; isolation: isolate; padding: 200px 0 60px;
  background: var(--c-primary) url(../img/Home-1-Blog-Bg-Mask.png) center / cover;
  color: var(--c-white);
}
/* la onda oscura se dibuja con la máscara del original */
.footer-main::after {
  content: ""; position: absolute; inset: 0 -12px 0 -2px; z-index: -1;
  background: var(--c-dark);
  -webkit-mask: url(../img/footer-wave-mask.png) no-repeat 0 0 / cover;
          mask: url(../img/footer-wave-mask.png) no-repeat 0 0 / cover;
}
.footer-top { display: grid; grid-template-columns: 352px 1fr; align-items: start; }
.footer-logo { position: relative; display: inline-block; width: 150px; }
.footer-logo::before {
  content: ""; position: absolute; width: 60px; height: 60px; left: -60px; top: -35px;
  background: var(--c-primary);
  -webkit-mask: url(../img/Pty-Common-Icon.svg) center / cover no-repeat;
          mask: url(../img/Pty-Common-Icon.svg) center / cover no-repeat;
}
.newsletter { padding-top: 20px; }
.newsletter__row { display: flex; align-items: stretch; }
.newsletter input {
  flex: 1; min-width: 0; height: 60px; padding: 12px 20px;
  font: 400 18px var(--f-base); color: var(--c-white);
  background: transparent; border: 0; border-bottom: 1px solid var(--c-white); border-radius: 0;
  transition: border-color 0.3s;
}
.newsletter input::placeholder { color: rgba(255, 255, 255, 0.6); }
.newsletter input:focus { outline: none; border-color: var(--c-secondary); }
.newsletter button { width: 72px; display: flex; align-items: center; justify-content: center; color: var(--c-primary); }
.newsletter button svg { width: 46px; height: 31px; transition: transform 0.3s ease; }
.newsletter button:hover svg { transform: rotate(45deg); }
.newsletter__note { margin-top: 20px; font-size: 16px; line-height: 1.7; }
.newsletter__msg { min-height: 1.7em; font-size: 15px; color: var(--c-primary); }

.footer-cols { display: grid; grid-template-columns: 279px 215px 252px 179px 1fr; margin-top: 40px; }
.footer-col p { max-width: 216px; line-height: 32.4px; }
.footer-col__gap { margin-top: 40px; }
.footer-col a { color: var(--c-white); }
.footer-col a:hover { color: var(--c-tertiary); }
.social { display: flex; gap: 20px; margin-top: 30px; }
.social a { display: inline-flex; width: 20px; height: 16px; color: var(--c-white); }
.social svg { width: 100%; height: 100%; }
.social a:hover { color: var(--c-primary); transform: translateY(-3px); }

.footer-list li { line-height: 37.4px; }
.footer-list a { position: relative; display: inline-block; color: var(--c-white); }
.footer-list a::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; margin: auto; width: 6px; height: 2px;
  background: var(--c-white); opacity: 0; transition: 0.5s;
}
.footer-list a:hover { color: var(--c-white); }
.footer-list a:hover::before { opacity: 1; background: var(--c-tertiary); }
.footer-list a span, .footer-list a { transition: transform 0.5s, color 0.3s; }
.footer-list a:hover { transform: translateX(12px); }

.footer-bottom { background: var(--c-dark); border-top: 1px solid #615f5f; color: var(--c-white); }
.footer-bottom__row { display: flex; align-items: center; justify-content: center; text-align: center; gap: 20px; min-height: 95px; flex-wrap: wrap; padding-block: 20px; }

/* ---------- Botón "volver arriba" ---------- */
.to-top {
  position: fixed; right: 30px; bottom: 30px; z-index: 60; width: 50px; height: 50px;
  background: var(--c-secondary);
  -webkit-mask: url(../img/To-Top.svg) center / contain no-repeat;
          mask: url(../img/To-Top.svg) center / contain no-repeat;
  opacity: 0; visibility: hidden; transform: translateY(20px); transition: var(--t-alt);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--c-dark); }

/* ---------- Pantalla de carga ---------- */
.loader {
  position: fixed; inset: 0; z-index: 999; display: flex; align-items: center; justify-content: center;
  background: var(--c-white); transition: opacity 0.6s ease, visibility 0.6s;
}
.loader img { width: 160px; }
.loader.is-done { opacity: 0; visibility: hidden; }

/* ==========================================================
   ADAPTABLE (tablet y móvil)
   ========================================================== */
@media (max-width: 1280px) {
  .menu > ul > li > a { padding-inline: 18px; }
  .menu > ul > li > a::after { left: 18px; right: 18px; }
  .logo, .header-icons { flex-basis: 140px; }
}
@media (max-width: 1024px) {
  :root { --fs-h-sec: 40px; }
  .h-sec { line-height: 1.4; }
  .burger { display: flex; order: 3; }
  .header-icons { flex: 1; order: 2; margin-right: 10px; }
  .menu {
    position: absolute; top: 100%; left: 0; right: 0; display: block;
    background: var(--c-white); box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    max-height: 0; overflow: hidden; transition: max-height 0.4s ease;
  }
  .menu.is-open { max-height: 80vh; overflow-y: auto; }
  .menu > ul { flex-direction: column; padding: 10px 0; }
  .menu > ul > li > a { display: block; padding: 12px 30px; }
  .menu > ul > li > a::after { display: none; }
  .sub { position: static; width: auto; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; margin: 0; padding-left: 20px; display: none; }
  .menu li.is-open > .sub { display: block; }
  .footer-top { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); row-gap: 40px; }
}
@media (max-width: 767px) {
  :root { --fs-h-sec: 32px; --gutter: 20px; }
  .h-sec__swoosh { width: 36px; height: 32px; left: -38px; top: -10px; }
  .topbar { justify-content: center; padding: 10px 16px; }
  .topbar__promo, .topbar .btn, .topbar__link:last-of-type { display: none; }
  .navbar { padding: 10px 16px; }
  .logo { flex-basis: auto; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .footer-col { grid-column: 1 / -1; }
  .partners { padding: 80px 0 70px; }
  .footer-main { padding-top: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
