/* Shops directory — Cosmic cinematic 3D store posters (html[data-shops-dir]) */

html[data-shops-dir] #stores-grid {
  padding-top: 28px !important;
  perspective: 1400px;
}

html[data-shops-dir] .store-row-scroll {
  padding-top: 14px !important;
  padding-bottom: 1.8rem !important;
  gap: 1.5rem !important;
  perspective: 1200px;
}

/* ── Poster shell ── */
html[data-shops-dir] .store-card.store-facade {
  --cine-teal: #4ecdc4;
  --cine-copper: #ff6b35;
  --cine-ink: #f1f5f9;
  --cine-muted: #94a3b8;
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
  padding: 0 !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background:
    linear-gradient(165deg, rgba(22, 24, 38, 0.96) 0%, rgba(8, 9, 16, 0.98) 55%, rgba(10, 12, 20, 0.99) 100%) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 -1px 0 rgba(78, 205, 196, 0.12) inset,
    0 18px 40px -20px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(0, 0, 0, 0.4) !important;
  transform: translateZ(0) rotateX(0deg) rotateY(0deg) !important;
  transform-style: preserve-3d !important;
  transition:
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.45s ease,
    border-color 0.35s ease !important;
  opacity: 1 !important;
  will-change: transform !important;
  isolation: isolate;
}

/* Gradient rim + depth plate */
html[data-shops-dir] .store-card.store-facade::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  inset: -1px !important;
  border-radius: 19px !important;
  padding: 1px !important;
  background: linear-gradient(
    135deg,
    rgba(78, 205, 196, 0.75) 0%,
    rgba(255, 255, 255, 0.08) 38%,
    rgba(255, 107, 53, 0.7) 100%
  ) !important;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0) !important;
  -webkit-mask-composite: xor !important;
  mask-composite: exclude !important;
  pointer-events: none !important;
  z-index: 6 !important;
  opacity: 0.85;
  transition: opacity 0.35s ease;
}

/* Soft floor shadow / glow under card */
html[data-shops-dir] .store-card.store-facade::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 12% !important;
  right: 12% !important;
  bottom: -18px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: radial-gradient(ellipse at center, rgba(78, 205, 196, 0.28), transparent 70%) !important;
  filter: blur(8px);
  z-index: -1 !important;
  pointer-events: none !important;
  opacity: 0.55;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

html[data-shops-dir] .store-card.store-facade:hover {
  border-color: rgba(78, 205, 196, 0.35) !important;
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg) scale(1.02) !important;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 28px 50px -18px rgba(0, 0, 0, 0.85),
    0 0 40px -12px rgba(78, 205, 196, 0.35),
    0 0 48px -18px rgba(255, 107, 53, 0.28) !important;
}

html[data-shops-dir] .store-card.store-facade:hover::before {
  opacity: 1;
}

html[data-shops-dir] .store-card.store-facade:hover::after {
  opacity: 0.9;
  transform: scaleX(1.08);
}

/* Hide old striped awning — replaced by cinematic top rail */
html[data-shops-dir] .store-facade .store-awning {
  position: relative;
  z-index: 4;
  height: 6px;
  margin: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, var(--cine-teal), var(--cine-copper)) !important;
  clip-path: none !important;
  box-shadow: 0 0 18px rgba(78, 205, 196, 0.35);
  pointer-events: none;
}

html[data-shops-dir] .store-facade .store-awning::after {
  display: none !important;
}

/* Title plaque */
html[data-shops-dir] .store-facade .store-fascia {
  margin: 12px 14px 0;
  padding: 11px 14px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow:
    0 8px 20px -14px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  text-align: center;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transform: translateZ(18px);
}

html[data-shops-dir] .store-facade .store-name,
html[data-shops-dir] .store-facade .store-card-body .store-name {
  min-height: 0 !important;
  margin: 0 !important;
  color: var(--cine-ink) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: var(--cine-ink) !important;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45) !important;
  filter: none !important;
  animation: none !important;
  font-size: 1.2rem !important;
  font-weight: 900 !important;
  letter-spacing: 0;
  line-height: 1.25 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Cinema screen / banner stage */
html[data-shops-dir] .store-facade .store-header-wrap {
  position: relative;
  margin: 12px 14px 30px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 14px 28px -16px rgba(0, 0, 0, 0.75);
  transform: translateZ(28px);
  background: #05060c;
}

html[data-shops-dir] .store-facade .store-card-banner,
html[data-shops-dir] .store-facade .store-card-banner-placeholder {
  height: 150px !important;
  border-radius: 14px !important;
  border: none !important;
  margin: 0 !important;
  overflow: hidden;
  object-fit: cover;
  width: 100%;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

/* Letterbox + vignette + specular */
html[data-shops-dir] .store-facade .store-header-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, transparent 22%, transparent 70%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.35) 100%);
  border-radius: 14px;
}

html[data-shops-dir] .store-facade .store-header-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(
    115deg,
    transparent 35%,
    rgba(255, 255, 255, 0.14) 48%,
    transparent 62%
  );
  background-size: 220% 100%;
  background-position: 120% 0;
  pointer-events: none;
  z-index: 3;
  transition: background-position 0.7s ease;
}

html[data-shops-dir] .store-facade:hover .store-header-wrap::after {
  background-position: -40% 0;
}

html[data-shops-dir] .store-facade:hover .store-card-banner {
  transform: scale(1.06) translateZ(8px) !important;
}

/* Floating logo badge */
html[data-shops-dir] .store-facade .store-logo.store-logo-float {
  position: absolute !important;
  top: auto !important;
  bottom: -22px !important;
  right: auto !important;
  left: auto !important;
  inset-inline-start: 14px !important;
  width: 56px !important;
  height: 56px !important;
  border-radius: 14px !important;
  border: 2px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(10, 12, 20, 0.95) !important;
  box-shadow:
    0 0 0 2px rgba(78, 205, 196, 0.45),
    0 10px 22px rgba(0, 0, 0, 0.55),
    0 0 24px rgba(255, 107, 53, 0.18) !important;
  z-index: 5 !important;
  transform: translateZ(40px);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

html[data-shops-dir] .store-facade .store-logo.store-logo-float img,
html[data-shops-dir] .store-facade .store-logo.store-logo-float {
  border-radius: 12px !important;
}

html[data-shops-dir] .store-facade:hover .store-logo {
  transform: translateZ(48px) translateY(-4px) rotate(-6deg) scale(1.05) !important;
}

/* Body */
html[data-shops-dir] .store-facade .store-card-body {
  padding: 10px 14px 14px !important;
  gap: 0.5rem !important;
  transform: translateZ(12px);
}

html[data-shops-dir] .store-facade .store-card-body > .store-sill,
html[data-shops-dir] .store-facade .store-card-body > div:first-child {
  min-height: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

html[data-shops-dir] .store-facade .store-sill span {
  border-radius: 999px !important;
  backdrop-filter: blur(8px);
}

html[data-shops-dir] .store-facade .store-desc {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  min-height: 42px !important;
  margin: 0 0 0.2rem !important;
  max-height: none !important;
  -webkit-line-clamp: 2 !important;
  color: var(--cine-muted) !important;
  padding: 0.55rem 0.7rem !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-shops-dir] .store-facade .store-card-footer {
  margin-top: 0.25rem !important;
  padding: 0 4px 2px;
}

html[data-shops-dir] .store-facade .store-card-footer .pearl-btn,
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-wrap {
  border-radius: 12px !important;
}
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn {
  display: block;
  width: 100% !important;
  max-width: none;
  margin: 0 auto !important;
  flex: none !important;
  background: linear-gradient(135deg, #4ecdc4 0%, #ff6b35 100%) !important;
  background-color: transparent !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow:
    0 10px 24px rgba(255, 107, 53, 0.28),
    0 0 0 1px rgba(0, 0, 0, 0.25) inset !important;
  overflow: hidden;
  transform: translateZ(20px);
  color: #0b1120 !important;
}

html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-wrap {
  padding: 11px 16px !important;
  background: transparent !important;
  box-shadow: none !important;
}
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-wrap::before,
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-wrap::after {
  display: none !important;
  content: none !important;
  opacity: 0 !important;
}

/* Dark ink on bright gradient — kill pearl mask / light fill that washes text out */
html[data-shops-dir] .store-facade .store-card-footer .pearl-p,
html[data-shops-dir] .store-facade .store-card-footer .pearl-p .s1,
html[data-shops-dir] .store-facade .store-card-footer .pearl-p .s2,
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-p,
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn .pearl-p * {
  color: #0b1120 !important;
  -webkit-text-fill-color: #0b1120 !important;
  text-shadow: none !important;
  filter: none !important;
  opacity: 1 !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  font-weight: 800 !important;
  letter-spacing: 0.01em;
}

html[data-shops-dir] .store-facade .store-card-footer .pearl-btn:hover {
  transform: translateY(-1px) translateZ(24px) !important;
  background: linear-gradient(135deg, #5eead4 0%, #ff7a45 100%) !important;
  box-shadow:
    0 14px 30px rgba(78, 205, 196, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.15) inset !important;
}
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn:hover .pearl-p,
html[data-shops-dir] .store-facade .store-card-footer .pearl-btn:hover .pearl-p * {
  color: #0b1120 !important;
  -webkit-text-fill-color: #0b1120 !important;
}

/* Kill competing anim-border blobs on facade cards */
html[data-shops-dir] .store-facade .store-card-anim-border {
  display: none !important;
}

/* Skeleton matches poster */
html[data-shops-dir] .skeleton-card {
  overflow: visible !important;
  border-radius: 18px !important;
  background: linear-gradient(165deg, rgba(22, 24, 38, 0.96), rgba(8, 9, 16, 0.98)) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7) !important;
}

html[data-shops-dir] .skeleton-card::before {
  content: '';
  display: block;
  height: 6px;
  margin: 0;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(90deg, #4ecdc4, #ff6b35);
  clip-path: none;
}

html[data-shops-dir] .skeleton-banner {
  height: 130px;
  margin: 12px 14px 0;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Beat anime/hover kills on shops dir */
html[data-shops-dir] body.asb-anime .store-card.store-facade:hover,
html[data-shops-dir].asb-anime .store-card.store-facade:hover {
  transform: translateY(-10px) rotateX(4deg) rotateY(-3deg) scale(1.02) !important;
}

@media (max-width: 600px) {
  html[data-shops-dir] .store-facade .store-awning {
    height: 5px;
  }
  html[data-shops-dir] .store-facade .store-card-banner,
  html[data-shops-dir] .store-facade .store-card-banner-placeholder {
    height: 128px !important;
  }
  html[data-shops-dir] .store-card.store-facade:hover {
    transform: translateY(-6px) scale(1.01) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-shops-dir] .store-card.store-facade,
  html[data-shops-dir] .store-facade .store-card-banner,
  html[data-shops-dir] .store-facade .store-logo.store-logo-float {
    transition: none !important;
  }
  html[data-shops-dir] .store-card.store-facade:hover {
    transform: none !important;
  }
  html[data-shops-dir] .store-facade:hover .store-header-wrap::after {
    background-position: 120% 0;
  }
}
