/* =========================================================
   Storefront - CSS Principal Fusionado y Optimizado
   Fusiona indexJJ.css + indexGD-fixesJJG.css
   Compatible con Modo Claro y Modo Oscuro
   ========================================================= */

@keyframes pulseDotRing {
  0% {
    transform: scale(1);
    opacity: 0.65;
  }
  100% {
    transform: scale(2.4);
    opacity: 0;
  }
}

@keyframes eu-blink {
  50% {
    opacity: 0;
  }
}

@keyframes tickerScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes tool-strip-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes badgePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.88;
    transform: scale(1.04);
  }
}

/* ===== CONTENEDOR BASE ===== */
.modern-storefront,
.modern-storefront *,
.eu-embed,
.eu-embed * {
  box-sizing: border-box;
}

.modern-storefront {
  --primary: #7c3aed;
  --primary-dark: #6429ed;
  --crimson: #e11d48;
  --brand-grad: linear-gradient(135deg, #e11d48 0%, #7c3aed 100%);
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.13);
  --green-border: rgba(16, 185, 129, 0.34);
  --violet-soft: rgba(124, 58, 237, 0.10);
  --violet-border: rgba(124, 58, 237, 0.28);
  --primary-glow: rgba(124, 58, 237, 0.32);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  max-width: 100%;
  overflow-x: clip;
  font-family: 'jakarta-sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: inherit;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.modern-storefront a {
  text-decoration: none;
}

.modern-storefront .container-modern {
  width: min(100% - 32px, 1400px);
  margin-inline: auto;
}

/* Accesibilidad: foco visible y área táctil mínima */
.modern-storefront .btn-primarynew,
.modern-storefront .btn-secondarynew,
.modern-storefront .service-btn,
.modern-storefront .cta-btn {
  min-height: 44px;
}

.modern-storefront .btn-primarynew:focus-visible,
.modern-storefront .btn-secondarynew:focus-visible,
.modern-storefront .service-btn:focus-visible,
.modern-storefront .view-all-link:focus-visible,
.modern-storefront .tool-card-link:focus-visible,
.modern-storefront .cta-btn:focus-visible {
  outline: 3px solid #38bdf8;
  outline-offset: 3px;
}

/* ===== HERO SECTION ===== */
.modern-storefront .hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
  padding: 20px 0 42px;
}

.eu-embed {
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  position: relative;
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.eu-embed .hero.wrap {
  width: 100%;
  min-width: 0;
  margin: 0;
  position: relative;
  z-index: 6;
}

.eu-embed h1,
.eu-embed h2,
.eu-embed h3 {
  margin: 0;
  line-height: 1.12;
}

.modern-storefront .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green-soft);
  border: 1px solid var(--green-border);
  padding: 7px 18px;
  border-radius: 999px;
  font-family: 'jakarta-sans', var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--green);
  margin-bottom: 24px;
}

.modern-storefront .status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  display: inline-flex;
  flex-shrink: 0;
}

.modern-storefront .status-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--green);
  animation: pulseDotRing 1.6s ease-out infinite;
  pointer-events: none;
}

.eu-embed .hero h1 {
  font-family: var(--sans);
  font-size: clamp(30px, 3.8vw, 50px);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
  min-height: 2.35em;
  background-image: linear-gradient(90deg, #8957ff 0%, #6429ed 48%, #dd4040 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.eu-embed .hero h1 .grad {
  font-family: inherit;
  background: inherit;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.eu-embed .caret {
  display: inline-block;
  width: 3px;
  height: 0.88em;
  background: var(--primary, #7c3aed);
  margin-left: 4px;
  vertical-align: -2px;
  animation: eu-blink 1s steps(1) infinite;
  box-shadow: 0 0 8px var(--primary-glow, rgba(124, 58, 237, 0.32));
}

.modern-storefront .hero-subtitle {
  font-family: 'mona-sans', 'jakarta-sans', var(--sans);
  font-size: 15.5px;
  color: inherit;
  opacity: 0.80;
  margin: 0 0 26px;
  line-height: 1.6;
  min-height: 4.8em;
  max-width: 100%;
  transition: opacity 0.45s ease;
}

.modern-storefront .hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.modern-storefront .btn-primarynew {
  font-family: 'jakarta-sans', var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--brand-grad);
  color: #ffffff;
  padding: 13px 28px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.30);
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.modern-storefront .btn-primarynew:hover {
  color: #ffffff;
  opacity: 0.94;
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(225, 29, 72, 0.32);
}

.modern-storefront .btn-secondarynew {
  font-family: 'jakarta-sans', var(--sans);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--violet-soft);
  color: inherit;
  padding: 13px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 15px 0 rgba(124, 58, 237, 0.30);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.modern-storefront .btn-secondarynew:hover {
  background: var(--primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.modern-storefront .hero-meta {
  display: flex;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.modern-storefront .hero-meta .m {
  display: flex;
  flex-direction: column;
}

.modern-storefront .hero-meta .n {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: inherit;
}

.modern-storefront .hero-meta .l {
  font-size: 11px;
  font-weight: 600;
  color: inherit;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.10em;
}

/* ===== 3D CAROUSEL ===== */
.modern-storefront .carousel-3d {
  position: relative;
  width: 100%;
  min-width: 0;
  perspective: 1000px;
  isolation: isolate;
  overflow: hidden;
  padding: 44px 12px 78px;
  margin-top: -10px;
  margin-bottom: -38px;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000000 5%, #000000 95%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, #000000 5%, #000000 95%, transparent 100%);
}

.modern-storefront .carousel-track {
  position: relative;
  width: 240px;
  height: 320px;
  margin: 0 auto;
  transform-style: preserve-3d;
}

.modern-storefront .carousel-card {
  font-family: 'jakarta-sans', system-ui, sans-serif;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.modern-storefront .carousel-card.active {
  transform: translateX(0) scale(1) translateZ(70px);
  opacity: 1;
  z-index: 5;
  box-shadow: 0 18px 36px rgba(124, 58, 237, 0.34);
}

.modern-storefront .carousel-card.prev {
  transform: translateX(-58%) scale(0.84) translateZ(-45px) rotateY(15deg);
  opacity: 0.82;
  z-index: 4;
}

.modern-storefront .carousel-card.next {
  transform: translateX(58%) scale(0.84) translateZ(-45px) rotateY(-15deg);
  opacity: 0.82;
  z-index: 4;
}

.modern-storefront .carousel-card.prev-out {
  transform: translateX(-94%) scale(0.68) translateZ(-95px) rotateY(24deg);
  opacity: 0.32;
  z-index: 3;
}

.modern-storefront .carousel-card.next-out {
  transform: translateX(94%) scale(0.68) translateZ(-95px) rotateY(-24deg);
  opacity: 0.32;
  z-index: 3;
}

.modern-storefront .carousel-card .card-image {
  width: 100%;
  height: 70%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.modern-storefront .carousel-card .card-image-logo {
  background-size: contain;
  background-color: #ffffff;
}

.modern-storefront .carousel-card .card-footer {
  height: 30%;
  background: linear-gradient(135deg, #2d1b69, #150c33);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px 12px;
  border-top: 0;
}

.modern-storefront .carousel-card .card-footer h4 {
  font-size: 16px;
  font-weight: 800;
  color: #38e8ff;
  margin: 0 0 3px;
}

.modern-storefront .carousel-card .card-footer p {
  font-size: 12.5px;
  font-weight: 600;
  color: #e2e8f0;
  margin: 0;
}

/* ===== TICKER ===== */
.modern-storefront .ticker-wrap {
  background: linear-gradient(90deg, rgba(255, 0, 56, 0.21) 0%, rgba(94, 0, 255, 0.24) 100%);
  padding: 12px 0;
  margin-bottom: 42px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.modern-storefront .ticker {
  display: flex;
  width: max-content;
  animation: tickerScroll 32s linear infinite;
  white-space: nowrap;
  position: relative;
  will-change: transform;
}

.modern-storefront .ticker-item-premium {
  padding: 0 22px;
  font-size: 14.5px;
  font-weight: 600;
  color: inherit;
}

.modern-storefront .ticker-star {
  color: var(--crimson);
  margin-right: 6px;
}

.modern-storefront .ticker-highlight {
  color: #a855f7;
  font-weight: 800;
}

/* ===== SERVICE BANNERS ===== */
.modern-storefront .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 22px;
  margin-bottom: 46px;
}

.modern-storefront .service-card {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 16px;
  border: 1px solid var(--violet-border);
  padding: 28px 24px 24px;
  min-height: 220px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.modern-storefront .service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 12, 22, 0.92), rgba(10, 12, 22, 0.36));
  z-index: 1;
}

.modern-storefront .service-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 14px 30px rgba(124, 58, 237, 0.22);
}

.modern-storefront .hot-badge {
  position: absolute;
  top: 12px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #ffffff;
  z-index: 2;
  animation: badgePulse 2s ease-in-out infinite;
}

.modern-storefront .hot-badge-top {
  background: linear-gradient(135deg, #e11d48 0%, #f59e0b 100%);
}

.modern-storefront .hot-badge-hot {
  background: linear-gradient(135deg, #e11d48 0%, #7c3aed 100%);
}

.modern-storefront .hot-badge-rent {
  background: linear-gradient(135deg, #7c3aed 0%, #0ea5e9 100%);
}

.modern-storefront .service-info {
  position: relative;
  z-index: 2;
  flex: 1 1 185px;
}

.modern-storefront .service-title {
  font-size: 21px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #ffffff;
}

.modern-storefront .service-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.45;
}

.modern-storefront .service-btn {
  position: relative;
  z-index: 2;
  background: var(--brand-grad);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.modern-storefront .service-btn:hover {
  color: #ffffff;
  opacity: 0.92;
  transform: scale(1.04);
}

/* ===== SECTION HEADER ===== */
.modern-storefront .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 28px 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--violet-border);
}

.modern-storefront .section-title {
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: -0.02em;
  margin: 0;
}

.modern-storefront .view-all-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--violet-soft);
  color: inherit;
  font-size: 13px;
  font-weight: 700;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.modern-storefront .view-all-link:hover {
  background: var(--primary);
  color: #ffffff;
}

/* ===== TOOL STRIP ===== */
.modern-storefront .tool-strip-wrap {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
}

.modern-storefront .tool-strip-inner {
  display: flex;
  gap: 16px;
  width: max-content;
  padding: 8px 0 14px;
  animation: tool-strip-scroll 42s linear infinite;
  will-change: transform;
}

.modern-storefront .tool-card {
  flex-shrink: 0;
  width: 164px;
  padding: 20px 14px;
  background: rgba(124, 58, 237, 0.08);
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  box-shadow: 0 6px 10px 0 rgba(124, 58, 237, 0.30);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.modern-storefront .tool-card:hover {
  transform: translateY(-5px);
  background: rgba(124, 58, 237, 0.16);
  box-shadow: 0 12px 24px rgba(124, 58, 237, 0.18);
}

.modern-storefront .tool-card-icon {
  width: 108px;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.16);
  overflow: hidden;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.modern-storefront .tool-card-icon-alt {
  background: linear-gradient(135deg, rgba(225, 29, 72, 0.18) 0%, rgba(124, 58, 237, 0.24) 100%);
}

.modern-storefront .tool-card:hover .tool-card-icon {
  box-shadow: 0 0 18px var(--primary-glow);
  transform: scale(1.05);
}

.modern-storefront .tool-card-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modern-storefront .tool-card-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1.85rem;
  color: #a78bfa;
}

.modern-storefront .tool-card-fallback-show {
  display: inline-flex;
}

.modern-storefront .tool-card-link {
  color: inherit;
  width: 100%;
}

.modern-storefront .tool-card-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: inherit;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.modern-storefront .tool-verified {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-soft);
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--green-border);
}

/* ===== PAUSA DE ANIMACIONES (INTERACCIÓN Y PESTAÑA OCULTA) ===== */
.modern-storefront .ticker-wrap:hover .ticker,
.modern-storefront .ticker-wrap:focus-within .ticker,
.modern-storefront .tool-strip-wrap:hover .tool-strip-inner,
.modern-storefront .tool-strip-wrap:focus-within .tool-strip-inner {
  animation-play-state: paused;
}

html.page-hidden .modern-storefront *,
html.page-hidden .modern-storefront *::before,
html.page-hidden .modern-storefront *::after,
html.page-hidden .eu-embed * {
  animation-play-state: paused !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1280px) {
  .modern-storefront .hero-grid {
    gap: 28px;
  }

  .modern-storefront .carousel-card.prev {
    transform: translateX(-52%) scale(0.84) translateZ(-40px) rotateY(14deg);
  }

  .modern-storefront .carousel-card.next {
    transform: translateX(52%) scale(0.84) translateZ(-40px) rotateY(-14deg);
  }

  .modern-storefront .carousel-card.prev-out {
    transform: translateX(-84%) scale(0.68) translateZ(-85px) rotateY(22deg);
  }

  .modern-storefront .carousel-card.next-out {
    transform: translateX(84%) scale(0.68) translateZ(-85px) rotateY(-22deg);
  }
}

@media (max-width: 1120px) {
  .modern-storefront .carousel-card.prev {
    transform: translateX(-46%) scale(0.82) translateZ(-40px) rotateY(14deg);
  }

  .modern-storefront .carousel-card.next {
    transform: translateX(46%) scale(0.82) translateZ(-40px) rotateY(-14deg);
  }

  .modern-storefront .carousel-card.prev-out {
    transform: translateX(-72%) scale(0.66) translateZ(-85px) rotateY(20deg);
  }

  .modern-storefront .carousel-card.next-out {
    transform: translateX(72%) scale(0.66) translateZ(-85px) rotateY(-20deg);
  }
}

@media (max-width: 1024px) {
  .modern-storefront .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 24px;
  }

  .eu-embed .hero.wrap {
    max-width: 680px;
    margin-inline: auto;
  }

  .modern-storefront .hero-subtitle {
    margin-inline: auto;
    min-height: 3.6em;
  }

  .modern-storefront .hero-cta,
  .modern-storefront .hero-meta {
    justify-content: center;
  }

  .modern-storefront .carousel-track {
    width: 215px;
    height: 292px;
  }

  .modern-storefront .carousel-card.prev {
    transform: translateX(-56%) scale(0.84) translateZ(-40px) rotateY(14deg);
  }

  .modern-storefront .carousel-card.next {
    transform: translateX(56%) scale(0.84) translateZ(-40px) rotateY(-14deg);
  }

  .modern-storefront .carousel-card.prev-out {
    transform: translateX(-88%) scale(0.68) translateZ(-85px) rotateY(22deg);
  }

  .modern-storefront .carousel-card.next-out {
    transform: translateX(88%) scale(0.68) translateZ(-85px) rotateY(-22deg);
  }

  .modern-storefront .cta-section {
    flex-direction: column;
    text-align: center;
  }

  .modern-storefront .cta-buttons {
    justify-content: center;
  }
}

@media (max-width: 568px) {
  .modern-storefront .container-modern {
    width: min(100% - 24px, 1400px);
  }

  .modern-storefront .hero-grid {
    gap: 20px;
    padding: 16px 0 28px;
  }

  .modern-storefront .hero-badge {
    margin-bottom: 18px;
    padding: 6px 14px;
  }

  .modern-storefront .carousel-3d {
    padding: 36px 8px 70px;
    margin-top: -8px;
    margin-bottom: -32px;
  }

  .modern-storefront .carousel-track {
    width: min(210px, 68vw);
    height: 280px;
  }

  .modern-storefront .carousel-card.prev {
    transform: translateX(-34%) scale(0.82) translateZ(-45px) rotateY(10deg);
    opacity: 0.45;
  }

  .modern-storefront .carousel-card.next {
    transform: translateX(34%) scale(0.82) translateZ(-45px) rotateY(-10deg);
    opacity: 0.45;
  }

  .modern-storefront .carousel-card.prev-out,
  .modern-storefront .carousel-card.next-out {
    opacity: 0;
    pointer-events: none;
  }

  .modern-storefront .services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .modern-storefront .service-card {
    min-height: 195px;
    padding: 22px 20px;
  }

  .modern-storefront .section-title {
    font-size: 20px;
  }

  .modern-storefront .cta-section {
    padding: 26px 20px;
  }

  .modern-storefront .cta-content h2 {
    font-size: 23px;
  }

  .modern-storefront .cta-buttons {
    width: 100%;
    flex-direction: column;
  }

  .modern-storefront .cta-btn {
    width: 100%;
  }
}

/* ===== ACCESIBILIDAD: MOVIMIENTO REDUCIDO ===== */
@media (prefers-reduced-motion: reduce) {
  .modern-storefront *,
  .modern-storefront *::before,
  .modern-storefront *::after,
  .eu-embed * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .modern-storefront .ticker,
  .modern-storefront .tool-strip-inner {
    animation: none !important;
    transform: none !important;
  }
}