/* ============================================================================
   Comfortrek V446 — Theme-Adaptive Luxury Glow, Micro-Animations & PDP Polish
   Works seamlessly across all 69 storefront themes in both Light & Dark modes.
   ============================================================================ */

@keyframes ct446-aura-breathe {
  0%, 100% { opacity: 0.72; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.03); }
}
@keyframes ct446-pulse-dot {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, #22c55e 55%, transparent); }
  60% { box-shadow: 0 0 0 7px transparent; }
}
@keyframes ct446-bar-glow {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ---------- A. GLOBAL THEME-ADAPTIVE GLOW & MICRO-ANIMATIONS ---------- */
html body#comfortrek-storefront[data-storefront-theme] {
  --ct446-glow: var(--ct-glow-accent, var(--ct340-action, var(--theme-editor-accent, #c59a5b)));
  --ct446-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Breathing subtle halo behind hero sections */
html body#comfortrek-storefront[data-storefront-theme] :is(.ck-featured-hero, .premium-hero) {
  position: relative;
  overflow: hidden;
}
html body#comfortrek-storefront[data-storefront-theme] .ck-featured-hero::before {
  content: "";
  position: absolute;
  inset: -25% -10% auto -10%;
  height: 75%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(ellipse at 72% 24%, color-mix(in srgb, var(--ct446-glow) 22%, transparent), transparent 62%);
  animation: ct446-aura-breathe 7s ease-in-out infinite;
}
html body#comfortrek-storefront[data-storefront-theme] .ck-featured-hero > * {
  position: relative;
  z-index: 1;
}

/* Smooth animated nav underline */
html body#comfortrek-storefront[data-storefront-theme] .site-header .main-nav > a,
html body#comfortrek-storefront[data-storefront-theme] .site-header .mega-menu-item > a {
  position: relative;
  transition: color 0.24s var(--ct446-ease);
}
html body#comfortrek-storefront[data-storefront-theme] .site-header .main-nav > a::after,
html body#comfortrek-storefront[data-storefront-theme] .site-header .mega-menu-item > a::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--ct446-glow);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.28s var(--ct446-ease);
}
@media (hover: hover) {
  html body#comfortrek-storefront[data-storefront-theme] .site-header .main-nav > a:hover::after,
  html body#comfortrek-storefront[data-storefront-theme] .site-header .mega-menu-item:hover > a::after {
    transform: scaleX(1);
  }
}

/* Specular sheen sweep & luminous hover halo on product & discovery cards */
html body#comfortrek-storefront[data-storefront-theme] :is(.tag-card.ct351-product-card, .ck-featured-card, .cr-discovery-card, .home-tile) {
  position: relative;
  overflow: hidden;
  transition: transform 0.34s var(--ct446-ease), box-shadow 0.34s var(--ct446-ease), border-color 0.28s ease !important;
}
html body#comfortrek-storefront[data-storefront-theme] :is(.tag-card.ct351-product-card, .ck-featured-card, .cr-discovery-card, .home-tile)::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.14) 48%, transparent 64%);
  transform: translateX(-125%);
  transition: transform 0.65s var(--ct446-ease);
}
@media (hover: hover) {
  html body#comfortrek-storefront[data-storefront-theme] :is(.tag-card.ct351-product-card, .ck-featured-card, .cr-discovery-card, .home-tile):hover {
    transform: translateY(-5px);
    box-shadow:
      0 20px 42px -16px rgba(0, 0, 0, 0.24),
      0 0 26px -8px color-mix(in srgb, var(--ct446-glow) 42%, transparent),
      0 0 0 1px color-mix(in srgb, var(--ct446-glow) 36%, transparent);
  }
  html body#comfortrek-storefront[data-storefront-theme] :is(.tag-card.ct351-product-card, .ck-featured-card, .cr-discovery-card, .home-tile):hover::after {
    transform: translateX(125%);
  }
}

/* Luminous glass shimmer on Primary CTAs */
html body#comfortrek-storefront[data-storefront-theme] :is(.btn-primary, .add-to-cart-btn, .hero-cta-primary, .header-luxe-cta) {
  position: relative;
  overflow: hidden;
  transition: transform 0.24s var(--ct446-ease), box-shadow 0.28s var(--ct446-ease), filter 0.22s ease !important;
}
html body#comfortrek-storefront[data-storefront-theme] :is(.btn-primary, .add-to-cart-btn, .hero-cta-primary, .header-luxe-cta)::before {
  content: "";
  position: absolute;
  top: 0;
  left: -90%;
  width: 65%;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s var(--ct446-ease);
}
@media (hover: hover) {
  html body#comfortrek-storefront[data-storefront-theme] :is(.btn-primary, .add-to-cart-btn, .hero-cta-primary, .header-luxe-cta):hover {
    transform: translateY(-2px);
    box-shadow:
      0 12px 28px -10px color-mix(in srgb, var(--ct446-glow) 60%, rgba(0, 0, 0, 0.35)),
      0 0 18px -4px color-mix(in srgb, var(--ct446-glow) 45%, transparent) !important;
  }
  html body#comfortrek-storefront[data-storefront-theme] :is(.btn-primary, .add-to-cart-btn, .hero-cta-primary, .header-luxe-cta):hover::before {
    left: 135%;
  }
}
html body#comfortrek-storefront[data-storefront-theme] :is(.btn-primary, .add-to-cart-btn, .hero-cta-primary):active {
  transform: translateY(1px) scale(0.99);
}

/* Fail-safe gentle scroll reveal (only animates elements tagged by JS when below viewport) */
html.ct446-anim-ready body#comfortrek-storefront .ct446-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ct446-ease), transform 0.55s var(--ct446-ease);
}
html.ct446-anim-ready body#comfortrek-storefront .ct446-reveal.ct446-in {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- B. PREMIUM PRODUCT DETAIL PAGE (PDP) OVERHAUL ---------- */
html body#comfortrek-storefront #ct-pdp349.luxury-product-page {
  color: var(--ct340-ink) !important;
}

/* Sticky gallery column on desktop for effortless reading while scrolling specs */
@media (min-width: 960px) {
  html body#comfortrek-storefront #ct-pdp349 .luxury-product-hero > div:first-child {
    position: sticky;
    top: 96px;
    align-self: start;
  }
}

/* Studio-lit gallery stage with subtle theme halo */
html body#comfortrek-storefront #ct-pdp349 .crp-gallery-stage {
  background:
    radial-gradient(circle at 50% 42%, color-mix(in srgb, var(--ct446-glow) 13%, var(--ct340-paper)), var(--ct340-soft)) !important;
  border: 1px solid color-mix(in srgb, var(--ct446-glow) 24%, var(--ct340-edge)) !important;
  box-shadow:
    0 24px 56px -24px rgba(0, 0, 0, 0.22),
    0 0 32px -14px color-mix(in srgb, var(--ct446-glow) 30%, transparent) !important;
  overflow: hidden;
  transition: box-shadow 0.35s var(--ct446-ease), border-color 0.3s ease;
}
html body#comfortrek-storefront #ct-pdp349 .crp-gallery-stage img {
  transition: transform 0.55s var(--ct446-ease);
}
@media (hover: hover) {
  html body#comfortrek-storefront #ct-pdp349 .crp-gallery-stage:hover img {
    transform: scale(1.045);
  }
}

/* Live stock pulse & clean gallery meta pill */
html body#comfortrek-storefront #ct-pdp349 .crp-gallery-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: color-mix(in srgb, #22c55e 14%, var(--ct340-paper));
  border: 1px solid color-mix(in srgb, #22c55e 36%, transparent);
  animation: ct446-pulse-dot 2.8s ease-in-out infinite;
}

/* Tactile thumbnail strip with glowing active ring */
html body#comfortrek-storefront #ct-pdp349 .thumbnail-btn {
  border-radius: 12px !important;
  border: 1.5px solid var(--ct340-edge) !important;
  background: var(--ct340-paper) !important;
  overflow: hidden;
  transition: transform 0.24s var(--ct446-ease), border-color 0.24s ease, box-shadow 0.24s ease !important;
}
html body#comfortrek-storefront #ct-pdp349 .thumbnail-btn:hover {
  transform: translateY(-2px);
}
html body#comfortrek-storefront #ct-pdp349 .thumbnail-btn.active {
  border-color: var(--ct446-glow) !important;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ct446-glow) 28%, transparent) !important;
}

/* Elevated product title, eyebrow & tabular price presentation */
html body#comfortrek-storefront #ct-pdp349 .ct349-eyebrow {
  display: inline-block;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.16em !important;
  color: var(--ct446-glow) !important;
  margin-bottom: 8px;
}
html body#comfortrek-storefront #ct-pdp349 .crp-product-title {
  font-size: clamp(1.65rem, 2.5vw, 2.35rem) !important;
  line-height: 1.16 !important;
  letter-spacing: -0.025em !important;
  color: var(--ct340-ink) !important;
  text-wrap: balance;
}
html body#comfortrek-storefront #ct-pdp349 .price.ct-top-price {
  font-size: clamp(1.55rem, 2.1vw, 2rem) !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--ct340-ink) !important;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
}
html body#comfortrek-storefront #ct-pdp349 .sale-price-tag {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  color: #ffffff !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 16px -6px rgba(22, 163, 74, 0.55);
}

/* Tactile color swatches with ring-offset glow */
html body#comfortrek-storefront #ct-pdp349 .ct-color-swatch {
  transition: transform 0.22s var(--ct446-ease), box-shadow 0.22s ease;
}
html body#comfortrek-storefront #ct-pdp349 .ct-color-swatch:hover {
  transform: scale(1.12);
}
html body#comfortrek-storefront #ct-pdp349 .ct-color-swatch.is-selected {
  box-shadow: 0 0 0 2px var(--ct340-paper), 0 0 0 4px var(--ct446-glow) !important;
}

/* "Why this bag?" Decision Guide — luxury glass-bordered Bento spec panel */
html body#comfortrek-storefront #ct-pdp349 .ct267-decision-panel {
  background: var(--ct340-paper) !important;
  border: 1px solid color-mix(in srgb, var(--ct446-glow) 22%, var(--ct340-edge)) !important;
  border-radius: 18px !important;
  padding: 20px 22px !important;
  box-shadow: 0 14px 36px -22px rgba(0, 0, 0, 0.18);
  margin-block: 18px 22px;
}
html body#comfortrek-storefront #ct-pdp349 .ct267-decision-panel :is(h3, strong) {
  color: var(--ct340-ink) !important;
}
html body#comfortrek-storefront #ct-pdp349 .ct267-decision-panel :is(small, span, p) {
  color: var(--ct340-muted) !important;
}
html body#comfortrek-storefront #ct-pdp349 .ct267-spec-grid > div {
  background: var(--ct340-soft) !important;
  border: 1px solid var(--ct340-edge) !important;
  border-radius: 12px !important;
  padding: 12px 14px !important;
}
html body#comfortrek-storefront #ct-pdp349 .ct267-usecases b {
  background: color-mix(in srgb, var(--ct446-glow) 14%, var(--ct340-soft)) !important;
  color: var(--ct340-ink) !important;
  border: 1px solid color-mix(in srgb, var(--ct446-glow) 32%, transparent) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  font-size: 12px !important;
}
html body#comfortrek-storefront #ct-pdp349 .ct267-capacity-track i {
  background: linear-gradient(90deg, var(--ct446-glow), color-mix(in srgb, var(--ct446-glow) 60%, #ffffff), var(--ct446-glow)) !important;
  background-size: 200% 100%;
  animation: ct446-bar-glow 4s linear infinite;
}

/* Readable, scannable Product Details, Drawers & Specification Tables */
html body#comfortrek-storefront #ct-pdp349 :is(.tag-card.ct355-detail-drawer, .tag-card.ai-review-card, .tag-card.ct-aeo-answer-card, .ct175-tool.ct189-tool) {
  background: var(--ct340-paper) !important;
  color: var(--ct340-ink) !important;
  border: 1px solid var(--ct340-edge) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 28px -20px rgba(0, 0, 0, 0.16);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
html body#comfortrek-storefront #ct-pdp349 .tag-card.ct355-detail-drawer:hover,
html body#comfortrek-storefront #ct-pdp349 .ct175-tool.ct189-tool:hover {
  border-color: color-mix(in srgb, var(--ct446-glow) 40%, var(--ct340-edge)) !important;
}
html body#comfortrek-storefront #ct-pdp349 .ct355-detail-body {
  font-size: 15.5px !important;
  line-height: 1.76 !important;
  color: var(--ct340-ink) !important;
  max-width: 72ch;
}
html body#comfortrek-storefront #ct-pdp349 .ct355-detail-body p,
html body#comfortrek-storefront #ct-pdp349 .ct355-detail-body li {
  color: var(--ct340-muted) !important;
  margin-bottom: 10px;
}
html body#comfortrek-storefront #ct-pdp349 .spec-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--ct340-edge);
  border-radius: 12px;
  overflow: hidden;
}
html body#comfortrek-storefront #ct-pdp349 .spec-table :is(th, td) {
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--ct340-edge) !important;
  font-size: 14px !important;
  line-height: 1.5;
}
html body#comfortrek-storefront #ct-pdp349 .spec-table th {
  color: var(--ct340-muted) !important;
  font-weight: 600 !important;
  background: var(--ct340-soft) !important;
  width: 38%;
}
html body#comfortrek-storefront #ct-pdp349 .spec-table td {
  color: var(--ct340-ink) !important;
  font-weight: 600 !important;
  background: var(--ct340-paper) !important;
}
html body#comfortrek-storefront #ct-pdp349 .spec-table tr:last-child :is(th, td) {
  border-bottom: none !important;
}

/* Sticky Add-to-Cart Bar — frosted glassmorphic polish */
html body#comfortrek-storefront #ct-pdp349 .sticky-add-bar {
  background: color-mix(in srgb, var(--ct340-paper) 90%, transparent) !important;
  backdrop-filter: blur(18px) saturate(155%) !important;
  -webkit-backdrop-filter: blur(18px) saturate(155%) !important;
  border-top: 1px solid color-mix(in srgb, var(--ct446-glow) 32%, var(--ct340-edge)) !important;
  box-shadow: 0 -12px 34px -16px rgba(0, 0, 0, 0.25) !important;
  color: var(--ct340-ink) !important;
}
html body#comfortrek-storefront #ct-pdp349 .sticky-add-bar :is(strong, h4, .price) {
  color: var(--ct340-ink) !important;
}

/* Respect Reduced Motion & Low-Data Mode */
@media (prefers-reduced-motion: reduce) {
  html body#comfortrek-storefront *::before,
  html body#comfortrek-storefront *::after {
    animation: none !important;
    transition: none !important;
  }
  html.ct446-anim-ready body#comfortrek-storefront .ct446-reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}
html body#comfortrek-storefront.ct426-low-data *::before,
html body#comfortrek-storefront.ct426-low-data *::after {
  animation: none !important;
}
