/* engishop — marca y modo oscuro */

:root {
  --fenix-orange: #1e6fd9;
  --fenix-orange-dark: #1557b0;
  --fenix-black: #0b1f3a;
  --fenix-glow: rgba(30, 111, 217, 0.28);
  --fenix-accent-glow: rgba(30, 111, 217, 0.16);
}

/* ── Logo claro / oscuro ── */
.fenix-brand-cluster {
  flex: 0 0 auto;
}

.fenix-brand-logo-link {
  display: inline-flex;
  align-items: center;
}

.fenix-brand-logo-img {
  width: auto;
  max-width: min(300px, 58vw);
  height: auto;
  max-height: 56px !important;
  object-fit: contain;
}

@media (min-width: 992px) {
  .fenix-brand-logo-img {
    max-width: min(320px, 30vw);
    max-height: 60px !important;
  }
}

[data-theme="dark"] .fenix-brand-logo-img {
  max-width: min(250px, 50vw);
  max-height: 50px !important;
}

@media (min-width: 992px) {
  [data-theme="dark"] .fenix-brand-logo-img {
    max-height: 54px !important;
  }
}

.fenix-footer-logo-wrap {
  line-height: 0;
  margin-bottom: 0.75rem;
  display: block;
}

.fenix-footer-logo-img {
  width: auto;
  height: auto;
  max-width: min(300px, 100%);
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.fenix-footer-logo-wrap .fenix-footer-logo-img--light,
.fenix-footer-logo-wrap .fenix-footer-logo-img--dark {
  display: none !important;
}

.fenix-footer-logo-wrap > .fenix-footer-logo-img:not(.fenix-footer-logo-img--light):not(.fenix-footer-logo-img--dark) {
  display: block !important;
}

@media (min-width: 992px) {
  .fenix-footer-logo-img {
    max-width: 320px;
    max-height: 64px;
  }
}

.fenix-brand-logo-img--dark,
.fenix-footer-logo-img--dark {
  display: none !important;
}

[data-theme="dark"] .fenix-brand-logo-img--light,
[data-theme="dark"] .fenix-footer-logo-img--light {
  display: none !important;
}

[data-theme="dark"] .fenix-brand-logo-img--dark,
[data-theme="dark"] .fenix-footer-logo-img--dark {
  display: block !important;
}

/* ── Toggle tema ── */
.fenix-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--fenix-border);
  border-radius: 8px;
  background: transparent;
  color: #334155;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.fenix-theme-toggle:hover {
  border-color: var(--fenix-orange);
  color: var(--fenix-orange);
  background: var(--fenix-accent-glow);
}

.fenix-theme-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.2s ease;
}

.fenix-theme-icon--sun {
  display: none;
}

[data-theme="dark"] .fenix-theme-icon--moon {
  display: none;
}

[data-theme="dark"] .fenix-theme-icon--sun {
  display: block;
}

/* ── Modo oscuro: variables ── */
[data-theme="dark"] {
  color-scheme: dark;
  --fenix-black: #000000;
  --fenix-white: #f1f5f9;
  --fenix-gray-bg: #070b12;
  --fenix-muted: #94a3b8;
  --fenix-surface: #0c1424;
  --fenix-surface-2: #000000;
  --fenix-border: #1e293b;
  --fenix-card-bg: #0f172a;
  --fenix-nav-bg: #000000;
  --fenix-hero-from: #000000;
  --fenix-hero-to: #0c1424;
}

[data-theme="dark"] body.fenix-store {
  background: var(--fenix-gray-bg);
  color: #e2e8f0;
}

[data-theme="dark"] .fenix-main-header,
[data-theme="dark"] .fenix-header-top {
  background: #000 !important;
  border-bottom-color: #1e293b !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

[data-theme="dark"] .fenix-header-search input,
[data-theme="dark"] .fenix-drawer-mobile .fenix-search-form input {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}

[data-theme="dark"] .fenix-header-account,
[data-theme="dark"] .fenix-header-cart-label {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .fenix-header-account-sub,
[data-theme="dark"] .fenix-header-cart-sub {
  color: #94a3b8 !important;
}

[data-theme="dark"] .fenix-cart-preview {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-mini-cart-head-title,
[data-theme="dark"] .fenix-mini-cart-name {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .fenix-mini-cart-prices {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fenix-cart-empty {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-theme-toggle {
  border-color: #334155;
  color: #cbd5e1;
}

[data-theme="dark"] .fenix-drawer-mobile {
  background: #0a0e14 !important;
  border-top-color: #1e293b !important;
}

[data-theme="dark"] .fenix-search-autocomplete--dark .fenix-search-ac-panel {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .fenix-search-ac-item {
  color: #e2e8f0 !important;
  border-bottom-color: #1e293b !important;
}

[data-theme="dark"] .fenix-search-ac-item:hover {
  background: #1e293b !important;
}

[data-theme="dark"] .fenix-megamenu.dropdown-menu {
  background: #111827 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-megamenu-link {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fenix-megamenu-intro-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .shop-header-row,
[data-theme="dark"] .shop-cat-sidebar,
[data-theme="dark"] .shop-card,
[data-theme="dark"] .shop-select,
[data-theme="dark"] .shop-cat-select,
[data-theme="dark"] .shop-cat-filter {
  background: var(--fenix-card-bg) !important;
  border-color: var(--fenix-border) !important;
  color: #e2e8f0;
}

[data-theme="dark"] .shop-header-title,
[data-theme="dark"] .shop-card-name a,
[data-theme="dark"] .shop-cat-sidebar-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .shop-cat-row {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .shop-cat-row:hover {
  background: #1e293b !important;
}

[data-theme="dark"] .shop-cat-row--on {
  background: rgba(30, 111, 217, 0.15) !important;
}

[data-theme="dark"] .shop-card-brand,
[data-theme="dark"] .shop-header-count,
[data-theme="dark"] .shop-card-old {
  color: #94a3b8 !important;
}

[data-theme="dark"] .shop-card-price,
[data-theme="dark"] .home-product-price-current,
[data-theme="dark"] .fenix-pdp-price-current {
  color: #f1f5f9 !important;
  font-size: 1.22rem;
}

[data-theme="dark"] .fenix-breadcrumb-nav .breadcrumb-item a {
  color: #7ec8f7 !important;
}

[data-theme="dark"] .fenix-breadcrumb-nav .breadcrumb-item.active {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .fenix-breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
  color: #64748b !important;
}

[data-theme="dark"] .fenix-pdp-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .fenix-pdp-brand,
[data-theme="dark"] .fenix-pdp-desc,
[data-theme="dark"] .fenix-pdp-picker__value {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fenix-pdp-kicker {
  color: #94a3b8 !important;
  background: #1e293b !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-price-was {
  color: #64748b !important;
}

[data-theme="dark"] .fenix-pdp-price-block {
  border-bottom-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-viewer-shell {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-viewer-shell .product-detail-img,
[data-theme="dark"] .fenix-gallery-thumb,
[data-theme="dark"] .fenix-gallery-thumb img {
  background: #fff !important;
}

[data-theme="dark"] .fenix-pdp-viewer-shell .viewer-badge {
  color: #cbd5e1 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-gallery-hint.viewer-hint {
  color: #94a3b8 !important;
}

[data-theme="dark"] .fenix-pdp-buy-box-inner {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-buy-heading,
[data-theme="dark"] .fenix-pdp-cart-heading,
[data-theme="dark"] .fenix-pdp-picker__title {
  color: #94a3b8 !important;
}

[data-theme="dark"] .fenix-pdp-size-btn {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .fenix-pdp-size-btn.is-selected {
  background: rgba(30, 111, 217, 0.2) !important;
  border-color: #1e6fd9 !important;
  color: #7ec8f7 !important;
}

[data-theme="dark"] .fenix-pdp-swatch {
  background: #fff !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-swatch.is-selected {
  border-color: #1e6fd9 !important;
  box-shadow: 0 0 0 1px #1e6fd9 !important;
}

[data-theme="dark"] .fenix-pdp-picker + .fenix-pdp-picker {
  border-top-color: #334155 !important;
}

[data-theme="dark"] .fenix-pdp-oos {
  color: #fcd34d !important;
  background: rgba(251, 191, 36, 0.12) !important;
  border-color: rgba(251, 191, 36, 0.25) !important;
}

[data-theme="dark"] .cp-pdp-brand {
  color: #7ec8f7 !important;
}

[data-theme="dark"] .cp-pdp-title.fenix-pdp-title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .cp-pdp-sku {
  color: #94a3b8 !important;
}

[data-theme="dark"] .cp-pdp-delivery {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .cp-pdp-delivery__line {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .cp-pdp-delivery__label {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .cp-pdp-delivery__eta {
  color: #4ade80 !important;
}

[data-theme="dark"] .cp-pdp-price-was {
  color: #64748b !important;
}

[data-theme="dark"] .cp-pdp-price-now .fenix-pdp-price-current {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .cp-pdp-stock {
  color: #4ade80 !important;
}

[data-theme="dark"] .cp-pdp-stock--oos {
  color: #f87171 !important;
}

[data-theme="dark"] .cp-pdp-viewer.fenix-pdp-viewer-shell {
  background: #0f172a !important;
}

[data-theme="dark"] .cp-pdp-buy-inner.fenix-pdp-buy-box-inner {
  box-shadow: none !important;
}

[data-theme="dark"] .cp-pdp-trust-strip {
  border-top-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .cp-pdp-trust-strip a {
  color: #7ec8f7 !important;
}

[data-theme="dark"] .cp-pdp-section {
  background: #0f172a !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .cp-pdp-section__title {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .cp-pdp-spec-list,
[data-theme="dark"] .cp-pdp-warranty,
[data-theme="dark"] .cp-pdp-details-body.fenix-pdp-desc {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .cp-pdp-warranty a {
  color: #7ec8f7 !important;
}

[data-theme="dark"] .cp-pdp-warranty__brand {
  border-top-color: #334155 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .shop-card-vars {
  background: #1e293b !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .shop-search-drop {
  background: #111827 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .shop-search-it {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .shop-search-it:hover {
  background: #1e293b !important;
}

[data-theme="dark"] .shop-chip {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

[data-theme="dark"] .shop-strip-box,
[data-theme="dark"] .shop-rvw-card {
  background: #0f172a !important;
  border-color: #1e293b !important;
  color: #e2e8f0;
}

[data-theme="dark"] .shop-trust-cell {
  background: #111827 !important;
  border-color: #334155 !important;
}

[data-theme="dark"] .shop-trust-cell strong {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .shop-trust-cell span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .shop-trust-badge {
  background: rgba(30, 111, 217, 0.18) !important;
  color: #7ec8f7 !important;
}

[data-theme="dark"] .fenix-alert-wrap .alert {
  border-color: #334155;
}

[data-theme="dark"] .fenix-site-footer {
  background: #000 !important;
  border-top-color: var(--fenix-orange) !important;
}

[data-theme="dark"] .fenix-footer-trust {
  border-color: #1e293b !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .fenix-footer-bottom {
  border-top-color: #1e293b !important;
}

[data-theme="dark"] .fenix-footer-reviews-link {
  color: rgba(255, 255, 255, 0.72) !important;
}

[data-theme="dark"] .fenix-footer-reviews-link:hover {
  color: #7ec8f7 !important;
}

[data-theme="dark"] .fenix-footer-seals-band {
  background: #0f172a !important;
  border-top-color: #334155 !important;
}

[data-theme="dark"] .fenix-help-panel {
  background: #1e293b !important;
}

[data-theme="dark"] .fenix-help-card {
  background: #0f172a !important;
  box-shadow: none !important;
  border: 1px solid #334155;
}

[data-theme="dark"] .fenix-help-card-title,
[data-theme="dark"] .fenix-help-msg-text strong,
[data-theme="dark"] .fenix-help-faq-text strong {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .fenix-help-card-desc,
[data-theme="dark"] .fenix-help-faq-text span {
  color: #94a3b8 !important;
}

[data-theme="dark"] .fenix-help-faq a {
  color: #cbd5e1 !important;
}

[data-theme="dark"] .fenix-help-faq li + li {
  border-top-color: #334155 !important;
}

[data-theme="dark"] .fenix-help-panel-logo--light {
  display: none !important;
}

[data-theme="dark"] .fenix-help-panel-logo--dark {
  display: block !important;
}

/* ── Transición modo claro / oscuro (efecto digital) ── */
.fenix-theme-fx {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;
}

html.fenix-theme-fx-active .fenix-theme-fx {
  opacity: 1;
  visibility: visible;
}

.fenix-theme-fx-grid {
  position: absolute;
  inset: -20% 0;
  background-image:
    linear-gradient(rgba(30, 111, 217, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 111, 217, 0.1) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0;
  animation: fenix-theme-grid-in 1.18s ease-out forwards;
}

.fenix-theme-fx-beam {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -30%;
  height: 38vh;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(56, 189, 248, 0.05) 25%,
    rgba(30, 111, 217, 0.55) 50%,
    rgba(56, 189, 248, 0.2) 75%,
    transparent 100%
  );
  box-shadow:
    0 0 60px rgba(30, 111, 217, 0.75),
    0 0 120px rgba(56, 189, 248, 0.35);
  opacity: 0;
  filter: blur(0.5px);
}

.fenix-theme-fx--replay .fenix-theme-fx-beam {
  animation: fenix-theme-beam-sweep 1.18s cubic-bezier(0.16, 0.84, 0.28, 1) forwards;
}

.fenix-theme-fx-noise {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255, 255, 255, 0.03) 0,
    rgba(255, 255, 255, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: overlay;
}

.fenix-theme-fx--replay .fenix-theme-fx-noise {
  animation: fenix-theme-noise-flicker 1.18s steps(8) forwards;
}

@keyframes fenix-theme-grid-in {
  0% { opacity: 0; transform: scale(1.04); }
  18% { opacity: 0.85; }
  100% { opacity: 0; transform: scale(1); }
}

@keyframes fenix-theme-beam-sweep {
  0% {
    top: -35%;
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  88% {
    opacity: 0.95;
  }
  100% {
    top: 110%;
    opacity: 0;
  }
}

@keyframes fenix-theme-noise-flicker {
  0%, 100% { opacity: 0; }
  15% { opacity: 0.35; }
  30% { opacity: 0.12; }
  45% { opacity: 0.4; }
  60% { opacity: 0.18; }
  75% { opacity: 0.3; }
}

.fenix-theme-toggle.is-switching {
  transform: scale(0.9);
  border-color: #38bdf8 !important;
  background: rgba(30, 111, 217, 0.25) !important;
  box-shadow:
    0 0 0 2px rgba(56, 189, 248, 0.35),
    0 0 18px rgba(30, 111, 217, 0.65);
}

.fenix-theme-toggle.is-switching .fenix-theme-icon {
  animation: fenix-theme-icon-digital 1.18s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.9));
}

@keyframes fenix-theme-icon-digital {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(90deg) scale(1.15); }
  50% { transform: rotate(180deg) scale(0.9); }
  75% { transform: rotate(270deg) scale(1.1); }
  100% { transform: rotate(360deg) scale(1); }
}

@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) {
    animation-duration: 1.18s;
    animation-timing-function: cubic-bezier(0.16, 0.84, 0.28, 1);
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation-duration: 1.18s;
    animation-timing-function: cubic-bezier(0.16, 0.84, 0.28, 1);
    mix-blend-mode: normal;
  }

  ::view-transition-old(root) {
    animation-name: fenix-theme-glitch-out;
    z-index: 1;
  }

  ::view-transition-new(root) {
    animation-name: fenix-theme-digital-in;
    z-index: 3;
  }

  @keyframes fenix-theme-glitch-out {
    0% {
      opacity: 1;
      transform: none;
      filter: none;
    }
    12% {
      transform: translate(-5px, 2px) skewX(-1deg);
      filter: hue-rotate(25deg) contrast(1.25) saturate(1.4);
    }
    24% {
      transform: translate(4px, -1px) skewX(1deg);
      opacity: 0.85;
      filter: hue-rotate(-15deg) brightness(1.3);
    }
    38% {
      transform: translate(-3px, 0);
      filter: contrast(1.5) brightness(1.15);
    }
    55% {
      opacity: 0.45;
      filter: blur(1px) saturate(0.6);
    }
    100% {
      opacity: 0;
      transform: translate(0);
      filter: blur(3px) brightness(0.7);
    }
  }

  @keyframes fenix-theme-digital-in {
    0% {
      clip-path: inset(0 100% 0 0);
      opacity: 0;
      filter: brightness(2.2) contrast(1.4) saturate(1.6);
      transform: translateX(8px);
    }
    18% {
      opacity: 1;
      filter: brightness(1.7) drop-shadow(0 0 28px rgba(30, 111, 217, 0.85));
    }
    35% {
      clip-path: inset(0 35% 0 0);
      transform: translateX(-4px);
      filter: brightness(1.35) hue-rotate(8deg);
    }
    52% {
      clip-path: inset(0 8% 0 0);
      transform: translateX(3px);
    }
    68% {
      clip-path: inset(0 0 0 0);
      filter: brightness(1.15) saturate(1.2);
    }
    82% {
      transform: translateX(-2px);
      filter: brightness(1.05);
    }
    100% {
      clip-path: inset(0 0 0 0);
      opacity: 1;
      transform: none;
      filter: none;
    }
  }

  html.fenix-theme-fallback body.fenix-store,
  html.fenix-theme-fallback .fenix-main-header,
  html.fenix-theme-fallback .fenix-header-top,
  html.fenix-theme-fallback .fenix-shop-nav-rail,
  html.fenix-theme-fallback .fenix-site-footer,
  html.fenix-theme-fallback .shop-header-row,
  html.fenix-theme-fallback .shop-card,
  html.fenix-theme-fallback .shop-cat-sidebar,
  html.fenix-theme-fallback .fenix-footer-seals-band,
  html.fenix-theme-fallback .shop-hero {
    transition:
      background-color 1.18s cubic-bezier(0.16, 0.84, 0.28, 1),
      color 1.18s cubic-bezier(0.16, 0.84, 0.28, 1),
      border-color 1.18s cubic-bezier(0.16, 0.84, 0.28, 1),
      box-shadow 1.18s cubic-bezier(0.16, 0.84, 0.28, 1),
      filter 1.18s cubic-bezier(0.16, 0.84, 0.28, 1);
  }

  html.fenix-theme-fallback body.fenix-store {
    filter: brightness(1.08) saturate(1.12);
  }

  html.fenix-theme-fallback .fenix-brand-logo-img,
  html.fenix-theme-fallback .fenix-footer-logo-img {
    transition: opacity 0.55s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fenix-theme-toggle.is-switching .fenix-theme-icon {
    animation: none;
  }

  .fenix-theme-fx {
    display: none !important;
  }
}
