/* ─────────────────────────────────────────────────
   PICME — Custom Styles
   Complement to Tailwind CSS
───────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,wght@0,400;0,500;0,700;1,400&display=swap');

:root {
  --blue-corp:   #003771;
  --blue-bright: #0066CD;
  --blue-mid:    #023965;
  --blue-light:  #E3F1FF;
  --sweep:       #00BCF4;
  --bright:      #42B829;
  --esencial:    #006326;
  --procare:     #0062B1;
  --perfectwrap: #FFDB00;
  --otros:       #FF9100;
}

/* ── Skip-to-content (WCAG 2.4.1) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.625rem 1.25rem;
  background: var(--blue-corp);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-link:focus {
  top: 0;
}

/* ── Focus-visible ring (WCAG 2.4.7) ── */
:focus-visible {
  outline: 3px solid var(--blue-bright);
  outline-offset: 3px;
  border-radius: 4px;
}
/* Remove outline only for mouse users */
:focus:not(:focus-visible) { outline: none; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Selection color ── */
::selection {
  background-color: var(--blue-bright);
  color: #fff;
}

/* ── Hero entrance animations (only when motion is allowed) ── */
@media (prefers-reduced-motion: no-preference) {
  @keyframes hero-fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes hero-fade-right {
    from { opacity: 0; transform: translateX(32px); }
    to   { opacity: 1; transform: none; }
  }
  .hero-enter {
    animation: hero-fade-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-enter-right {
    animation: hero-fade-right 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .hero-d1 { animation-delay: 0.05s; }
  .hero-d2 { animation-delay: 0.18s; }
  .hero-d3 { animation-delay: 0.32s; }
  .hero-d4 { animation-delay: 0.46s; }
  .hero-d5 { animation-delay: 0.58s; }
}

/* ── Hero grid pattern ── */
.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* ── Navbar scroll behavior ── */
#navbar.scrolled {
  background-color: var(--blue-corp);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Default state: transparent on hero */
#navbar:not(.scrolled) #nav-links a.nav-link { color: rgba(255,255,255,0.9); }
#navbar:not(.scrolled) .nav-cta {
  color: #fff;
  border-color: rgba(255,255,255,0.5);
}
#navbar:not(.scrolled) .nav-cta:hover { background: rgba(255,255,255,0.1); }

/* Scrolled state */
#navbar.scrolled #nav-links a.nav-link { color: #fff; }
#navbar.scrolled .nav-cta { color: #fff; border-color: rgba(255,255,255,0.5); }

/* ── Category pills ── */
.category-pill {
  background: #fff;
  border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--blue-corp);
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.category-pill::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}

.category-pill:hover {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, white);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* ── Product sections wrapper ── */
.product-section {
  background: #fff;
  border-radius: 1.25rem;
  padding: 2rem;
  border: 1px solid #E3F1FF;
  transition: box-shadow 0.2s;
}
.product-section:hover { box-shadow: 0 4px 24px rgba(0,55,113,0.08); }

/* ── Filter tabs ── */
.filter-tab.active {
  background: #fff;
  color: var(--blue-corp);
  font-weight: 700;
}
.filter-tab[aria-selected="true"] {
  background: #fff;
  color: var(--blue-corp);
  font-weight: 700;
}

/* ── Form focus ring ── */
input:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(0, 102, 205, 0.2);
}

/* ── Scroll reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Stagger children ── */
.stagger > *:nth-child(1) { transition-delay: 0.05s; }
.stagger > *:nth-child(2) { transition-delay: 0.10s; }
.stagger > *:nth-child(3) { transition-delay: 0.15s; }
.stagger > *:nth-child(4) { transition-delay: 0.20s; }
.stagger > *:nth-child(5) { transition-delay: 0.25s; }
.stagger > *:nth-child(6) { transition-delay: 0.30s; }

/* ── Mobile menu transition ── */
#mobile-menu {
  transition: opacity 0.3s ease;
}

/* ── Anchor offset for fixed nav (altura navbar h-32 = 128px) ── */
[id] { scroll-margin-top: 128px; }

/* ── Reduce motion (WCAG 2.3.3) ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ── Scroll hint arrow (smooth float, no bounce) ── */
@keyframes scroll-float {
  0%, 100% { transform: translateY(0);    opacity: 0.5; }
  50%       { transform: translateY(8px); opacity: 1;   }
}
.scroll-hint {
  animation: scroll-float 2.4s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* ── Print: hide nav and float btn ── */
@media print {
  header, .fixed { display: none !important; }
}
