/* Girl's Boutique — Layout
   Shared chrome: nav, marquee, footer. Reused on every page. */

/* ============ Nav ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--c-bg); /* solid — one shape with the wave, no opacity seam */
}

/* Wavy bottom edge — same travelling-wave technique as the marquee, but keeps
   the nav's blush color. A blush strip hangs below the bar; its bottom edge is
   a wave mask that scrolls horizontally. Lives on ::after (not .nav) so the
   category dropdowns aren't clipped by the mask. */
.nav::after {
  content: "";
  position: absolute;
  left: 0;
  top: calc(100% - 1px); /* 1px overlap kills the sticky sub-pixel seam */
  width: 100%;
  height: clamp(22px, 2.4vw, 34px);
  background: var(--c-bg);
  transform: translateZ(0); /* promote to own layer so the edge snaps to whole pixels */
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20H80%20V30%20Q60,60%2040,30%20Q20,0%200,30%20Z'%20fill='%23fff'/%3E%3C/svg%3E") 0 0 / 540px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,0%20H80%20V30%20Q60,60%2040,30%20Q20,0%200,30%20Z'%20fill='%23fff'/%3E%3C/svg%3E") 0 0 / 540px 100% repeat-x;
  animation: marquee-wave 7s linear infinite;
  z-index: 2;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .nav::after { animation: none; }
}

/* Header spreads wider than the 1280 content cap on ultrawide screens */
.nav .container { max-width: var(--container-wide); }

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* logo | centered nav | actions */
  align-items: center;
  gap: var(--space-4);
  min-height: 64px;
}

.nav__logo { justify-self: start; }
.nav__actions { justify-self: end; }

.nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--c-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.nav__logo {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: clamp(1.5rem, 1rem + 1.2vw, 2.125rem); /* anchors 34px at 2K */
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--c-ink);
  white-space: nowrap;
}

.nav__logo:hover { text-decoration: none; }
.nav__logo span { color: var(--c-pink); }

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-inline: auto;
}

.nav__links > a,
.nav__item > a {
  color: var(--c-ink);
  font-weight: var(--fw-black); /* +200 from --fw-semibold (600 → 800) */
  font-size: clamp(1rem, 0.9rem + 0.5vw, 1.375rem); /* anchors 22px at 2K */
  letter-spacing: 0.01em;
}

.nav__links > a:hover,
.nav__item > a:hover {
  color: var(--c-pink);
  text-decoration: none;
}

.nav__links a[aria-current="page"] {
  color: var(--c-pink);
}

/* ---- Category dropdowns (per shop) ---- */
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.nav__dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  z-index: 3; /* above the nav wave (.nav::after, z-index 2) so the top isn't clipped */
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-3);
  background: var(--c-bg);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}

.nav__item:hover .nav__dropdown,
.nav__item:focus-within .nav__dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav__dropdown a {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: var(--fw-semibold);
  color: var(--c-ink);
  white-space: nowrap;
  transition: color var(--transition); /* match the smooth color shift of the other hovers */
}

.nav__dropdown a:hover {
  color: var(--c-pink);
  text-decoration: underline;
  text-decoration-color: var(--c-pink);
  text-underline-offset: 4px;
}

.nav__actions {
  display: flex;
  gap: var(--space-1);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--c-ink);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn:hover {
  color: var(--c-pink); /* icon turns pink only — no filled circle */
}

.icon-btn svg { width: 30px; height: 30px; }

/* Wishlist item-count badge on the heart icon */
.nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  background: var(--c-pink);
  color: var(--c-ink);
  border: 2px solid var(--c-bg);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: var(--fw-black);
  line-height: 1;
  pointer-events: none;
}
.nav-badge[hidden] { display: none; }

@media (max-width: 767px) {
  .nav__toggle { display: inline-flex; width: 40px; height: 40px; }
  .nav__logo { margin-inline: auto; font-size: 1.25rem; }

  /* Shrink the row so logo + hamburger + 3 icons fit inside the edge-gap frame */
  .nav__inner { gap: var(--space-2); }
  .nav__actions { gap: 0; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn svg { width: 22px; height: 22px; }
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: var(--space-2) var(--gutter) var(--space-4);
    background: var(--c-bg);
    border-bottom: 1px solid var(--c-line);
    display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links > a { padding-block: var(--space-3); font-size: var(--fs-lg); }

  /* Dropdowns become indented static lists on mobile */
  .nav__item { display: block; }
  .nav__item > a { display: block; padding-block: var(--space-3); font-size: var(--fs-lg); }
  .nav__dropdown {
    position: static;
    transform: none;
    min-width: 0;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border: none;
    padding: 0 0 var(--space-2) var(--space-5);
    display: none;
  }
  .nav__item.is-open .nav__dropdown { display: flex; }
  .nav__dropdown a { font-size: var(--fs-base); }
}

/* ============ Marquee ============ */
.marquee {
  position: relative;
  z-index: 1; /* render above the decorative flower in the section below */
  margin-top: -1px;    /* overlap the hero 1px to kill the top clip-path seam */
  margin-bottom: -1px; /* and bleed 1px into the section below to kill the bottom seam */
  --mq-wave: clamp(13px, 1.55vw, 18px); /* wave depth (+10%) */
  background: var(--c-pink);
  color: var(--c-ink);
  overflow: hidden;
  transform: translateZ(0); /* own layer → edge snaps to whole pixels, no flicker seam */
  /* Wavy bottom via a repeating mask tile; the wave travels horizontally.
     Below the wave is transparent, so the flower behind shows through. */
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,82%20Q20,98%2040,82%20Q60,66%2080,82%20L80,0%20L0,0%20Z'%20fill='%23fff'/%3E%3C/svg%3E") 0 0 / 540px 100% repeat-x;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2080%20100'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0,82%20Q20,98%2040,82%20Q60,66%2080,82%20L80,0%20L0,0%20Z'%20fill='%23fff'/%3E%3C/svg%3E") 0 0 / 540px 100% repeat-x;
  animation: marquee-wave 7s linear infinite;
  /* extra bottom padding = wave depth, so the text centers in the visible pink */
  padding-top: clamp(0.55rem, 1vw, 0.7rem);
  padding-bottom: calc(clamp(0.55rem, 1vw, 0.7rem) + var(--mq-wave));
}

/* Wave travels one tile width, then loops seamlessly */
@keyframes marquee-wave {
  to { -webkit-mask-position: -540px 0; mask-position: -540px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee { animation: none; }
}

.marquee__track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  animation: marquee 120s linear infinite;
}

/* Each span is one identical, viewport-spanning copy; -50% loops seamlessly */
.marquee__track span { display: inline-block; flex: none; }

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* ============ Footer ============ */
.footer {
  background: var(--c-ink);
  color: var(--c-white);
  margin-top: var(--space-9);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1.2fr; /* brand | Info | Escríbenos (Navega removed) */
  gap: var(--space-7) var(--space-6);
  padding-block: var(--space-8);
}

.footer__logo {
  font-family: var(--font-display);
  font-weight: var(--fw-black);
  font-size: var(--fs-2xl);
  letter-spacing: -0.03em;
  color: var(--c-white);
  display: inline-block;
  margin-bottom: var(--space-3);
}

.footer__logo:hover { text-decoration: none; }
.footer__logo span { color: var(--c-pink); }

.footer__blurb {
  color: oklch(0.78 0.01 358);
  font-size: 16px;
  max-width: 34ch;
}

.footer__col h4 {
  font-family: var(--font-ui);
  font-size: 26px; /* +10px for clearer hierarchy over the link items */
  font-weight: var(--fw-black); /* +200 (600 → 800) */
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.70 0.02 358);
  margin-bottom: var(--space-4);
}

.footer__col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__col a {
  color: oklch(0.88 0.005 358);
  font-size: 16px;
}

/* Wordmark sizing (it's also a .footer__col a, so override here) */
.footer__brand .footer__logo {
  font-size: clamp(1.75rem, 1.2rem + 1vw, 2.125rem); /* anchors 34px at 2K */
}

.footer__col a:hover { color: var(--c-pink); text-decoration: none; }

.footer__socials {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.footer__social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid oklch(0.40 0.01 358);
  border-radius: var(--radius-pill);
  color: var(--c-white);
  transition: var(--transition);
}

.footer__social:hover {
  color: var(--c-pink); /* icon turns pink only — no pink fill; resting circular border kept */
}

.footer__social svg { width: 18px; height: 18px; }

.footer__copy {
  border-top: 1px solid oklch(0.35 0.01 358);
  padding-block: var(--space-5);
  text-align: center;
  font-size: 16px;
  color: oklch(0.66 0.01 358);
}

.footer__copy a {
  color: var(--c-pink);
  font-weight: var(--fw-semibold);
}

.footer__copy a:hover { color: var(--c-white); }

@media (max-width: 767px) {
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 460px) {
  .footer__inner { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ============ Dev: alignment guides (remove before production) ============
   Two 2px green lines fixed 100px in from each viewport edge.
   Toggle with body.guides-on (keyboard 'g'). */
.design-guides {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
}

.design-guides::before,
.design-guides::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--c-guide);
}

.design-guides::before { left: var(--edge-gap); }
.design-guides::after { right: var(--edge-gap); }

body:not(.guides-on) .design-guides { display: none; }

/* Desktop + ultrawide: hero, marquee, and the pink band stay full-bleed
   edge-to-edge at every width (the look the owner prefers). Content is held to
   the wide cap and centered so cards don't blow up on huge screens, while the
   fluid edge-gap keeps a breathing margin on smaller ones. */
@media (min-width: 1440px) {
  main .container {
    max-width: var(--container-wide);
  }
}
