/* shared.css — Danichap Design System — Palette v4 Navy+Red */

/* ── Skip to main content (accesibilidad) ────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  z-index: 9999;
  background: #001e4b;
  color: #ffffff;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  transition: top 0.15s;
}
.skip-link:focus { top: 0; }

/* ── Logo SVG global ─────────────────────────────────────────────────────── */
.danichap-logo-icon { display:inline-block; vertical-align:middle; }


/* ── Navy glow (logo colores) ─────────────────────────────────────────────── */
.amber-glow {
  filter: drop-shadow(0 0 12px rgba(0,30,75,0.55));
}
.amber-glow-sm {
  filter: drop-shadow(0 0 6px rgba(0,30,75,0.40));
}
.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  vertical-align: middle;
}

.technical-grid {
  background-image: radial-gradient(rgba(0, 30, 75, 0.10) 1px, transparent 1px);
  background-size: 24px 24px;
}

.metallic-sheen {
  background: linear-gradient(135deg, #001e4b 0%, #0a3270 60%, #1a5aaa 100%);
}

.wpp-fab:hover .wpp-fab-label {
  max-width: 200px;
  margin-left: 0.75rem;
}

.wpp-fab-label {
  max-width: 0;
  overflow: hidden;
  transition: max-width 0.5s ease, margin-left 0.5s ease;
  white-space: nowrap;
}

/* Accordion subcats */
.subcat-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.subcat-panel.open {
  max-height: 600px;
}

/* Promo banner pulse */
@keyframes pulse-orange {
  0%, 100% { box-shadow: 0 0 0 0 rgba(225,0,15,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(225,0,15,0); }
}
.promo-pulse {
  animation: pulse-orange 2s infinite;
}

/* Ticker / marquee */
@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker-scroll 30s linear infinite;
}
.ticker-track:hover {
  animation-play-state: paused;
}

/* Timeline line */
.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 2.5rem;
  bottom: -1rem;
  width: 2px;
  background: linear-gradient(to bottom, #001e4b, transparent);
}
.timeline-item {
  position: relative;
}

/* ── Product image watermark ─────────────────────────────────────────────────── */
.product-img-wrap {
  position: relative;
  overflow: hidden;
}
.product-img-wrap::after {
  content: 'DANICHAP';
  position: absolute;
  bottom: 8px;
  right: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 900;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  background: rgba(0,30,75,0.60);
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
  backdrop-filter: blur(2px);
}

/* ── Apple-style scroll animations ─────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible {
  opacity: 1;
  transform: translate(0);
}
.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.20s; }
.reveal-delay-3 { transition-delay: 0.30s; }
.reveal-delay-4 { transition-delay: 0.40s; }
.reveal-delay-5 { transition-delay: 0.50s; }

/* ── Product card premium hover ──────────────────────────────────────────── */
.product-card {
  transition: transform 0.22s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.22s cubic-bezier(0.16,1,0.3,1),
              border-color 0.22s ease;
  will-change: transform;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,30,75,0.13), 0 2px 8px rgba(0,30,75,0.06);
  border-color: rgba(0,30,75,0.25);
}
.product-card:active {
  transform: translateY(-1px) scale(0.99);
}

/* ── Category card hover ─────────────────────────────────────────────────── */
.cat-card {
  transition: transform 0.2s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.2s ease,
              background-color 0.2s ease;
}
.cat-card:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0,30,75,0.10);
}

/* ── Nav active indicator ─────────────────────────────────────────────────── */
.nav-link-active {
  position: relative;
}
.nav-link-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: #001e4b;
  border-radius: 1px;
}

/* ── Focus ring accesible ──────────────────────────────────────────────────── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid #1a5aaa;
  outline-offset: 2px;
  border-radius: 6px;
}

/* ── Skeleton loading shimmer ──────────────────────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
.skeleton {
  background: linear-gradient(90deg, #E2DFD9 25%, #ECEAE5 50%, #E2DFD9 75%);
  background-size: 600px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

/* ── WhatsApp FAB pulse on mobile ────────────────────────────────────────── */
@keyframes fab-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 0 rgba(37,211,102,0.3); }
  50%       { box-shadow: 0 4px 20px rgba(37,211,102,0.4), 0 0 0 8px rgba(37,211,102,0); }
}
@media (max-width: 768px) {
  .wpp-fab {
    animation: fab-pulse 2.5s ease infinite;
  }
}

/* ── Badge tags premium ────────────────────────────────────────────────────── */
.badge-nuevo    { background: rgba(0,30,75,0.08); color: #001e4b; border: 1px solid rgba(0,30,75,0.2); }
.badge-oferta   { background: rgba(225,0,15,0.08); color: #c0000d; border: 1px solid rgba(225,0,15,0.25); }
.badge-stock    { background: rgba(26,152,80,0.08); color: #166534; border: 1px solid rgba(26,152,80,0.25); }
.badge-agotado  { background: rgba(100,100,100,0.08); color: #555; border: 1px solid rgba(0,0,0,0.12); }

/* ── Input search premium ──────────────────────────────────────────────────── */
#search-text:focus {
  border-color: #001e4b;
  box-shadow: 0 0 0 3px rgba(0,30,75,0.08);
}

/* ── Sidebar category active ───────────────────────────────────────────────── */
.cat-btn-active {
  background: rgba(0,30,75,0.08);
  color: #001e4b;
  font-weight: 700;
  border-left: 3px solid #001e4b;
}

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

/* ── Print optimizations (for PDF guide) ────────────────────────────────── */
@media print {
  .no-print { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
