/**
 * Category listing pages — same ethereal design language as Home + PDP.
 * Scope: body.page-category
 */

body.page-category {
  --cat-e-sky: var(--cg-mint, #7dd3c7);
  --cat-e-lavender: var(--cg-mint, #7dd3c7);
  --cat-e-blush: var(--cg-mint-soft, #d8f3ef);
  --cat-e-rose: var(--cg-teal, #26a69a);
  --cat-e-rose-deep: var(--cg-teal-deep, #1e8e84);
  --cat-e-ink: var(--cg-navy, #1a2b48);
  --cat-e-muted: rgba(26, 43, 72, 0.62);
  --cat-e-gold: var(--cg-gold, #d4af37);
  --cat-e-glass: rgba(255, 255, 255, 0.82);
  --cat-e-shadow: var(--cg-shadow, 0 18px 48px rgba(26, 43, 72, 0.12));
  --cat-e-grad-nav: var(--cg-grad-nav, linear-gradient(105deg, #1a2b48 0%, #243656 55%, #1a2b48 100%));
  background:
    radial-gradient(ellipse 80% 50% at 12% -5%, rgba(125, 211, 199, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 95% 15%, rgba(38, 166, 154, 0.12), transparent 52%),
    radial-gradient(ellipse 60% 40% at 50% 100%, rgba(216, 243, 239, 0.45), transparent 50%),
    #f4f9f7;
  color: var(--cat-e-ink);
}

body.page-category .mesh-gradient,
body.page-category .tone-shift {
  opacity: 0.12;
}

body.page-category .animated-backdrop .orb {
  opacity: 0.06;
  filter: hue-rotate(100deg) saturate(0.5);
}

body.page-category .nav-dock {
  background: var(--cat-e-grad-nav);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 10px 32px rgba(26, 43, 72, 0.28),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
}

body.page-category .nav-dock-link {
  color: rgba(255, 255, 255, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
  font-weight: 600;
}

body.page-category .nav-dock-link:hover,
body.page-category .nav-dock-link:focus-visible {
  background: rgba(125, 211, 199, 0.18);
  color: #fff;
}

body.page-category .nav-dock-link.is-active,
body.page-category .nav-dock-link.nav-dock-link--active {
  background: var(--cg-grad-active, linear-gradient(135deg, #7dd3c7 0%, #26a69a 55%, #1e8e84 100%));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(38, 166, 154, 0.45);
}

body.page-category .sub-main,
body.page-category .band-shop,
body.page-category .guest-main-with-rail-inner {
  position: relative;
  z-index: 1;
}

body.page-category .band-shop,
body.page-category .band-shop-inner {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

body.page-category .plp-header {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: clamp(16px, 2.2vw, 20px);
  box-shadow: var(--cat-e-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.page-category .section-head .band-title,
body.page-category h1,
body.page-category .category-hero-title,
body.page-category .cat-page-title {
  font-family: "Cormorant Garamond", "Syne", Georgia, serif;
  color: var(--cat-e-ink);
  letter-spacing: -0.02em;
}

body.page-category .band-sub,
body.page-category .category-lead,
body.page-category .cat-page-sub {
  color: var(--cat-e-muted);
}

body.page-category .cg-filter-panel,
body.page-category .cg-filter-panel--light,
body.page-category .category-toolbar {
  background: var(--cat-e-glass);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 22px;
  box-shadow: var(--cat-e-shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

body.page-category .product-card,
body.page-category .cat-product-card,
body.page-category .product-grid > a,
body.page-category .product-grid .product-card {
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: #ffffff;
  box-shadow: var(--cat-e-shadow);
  overflow: hidden;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.25s ease;
}

body.page-category .product-card__media,
body.page-category .product-card-image,
body.page-category .product-card-body {
  background: #ffffff;
}

/* Sub-category product grid — contain + minimal padding (avoid clock/object clipping) */
body.page-category .product-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(0.35rem, 1.8vw, 0.55rem);
  box-sizing: border-box;
  min-height: 0;
}

body.page-category .product-card__media img:not([data-image-fit="contain"]):not([data-image-fit="cover"]) {
  flex: 0 1 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

body.page-category .product-card__media img[data-image-fit="contain"] {
  flex: none !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
}

body.page-category .product-card__media:has(> img[data-image-fit="contain"]) {
  padding: 0;
}

body.page-category .product-card:hover,
body.page-category .cat-product-card:hover,
body.page-category .product-grid > a:hover,
body.page-category .product-grid .product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(38, 166, 154, 0.45);
  box-shadow: 0 22px 48px rgba(100, 120, 160, 0.16);
}

body.page-category .btn-primary,
body.page-category .btn-add,
body.page-category .category-toolbar__clear,
body.page-category button.btn-checkout {
  border-radius: 999px;
}

body.page-category .btn-primary,
body.page-category .btn-add {
  background: linear-gradient(135deg, #1a1a40 0%, #2a3a5c 55%, #3d4a72 100%);
  border: none;
  color: #fff;
  box-shadow: 0 12px 28px rgba(26, 26, 64, 0.28);
}

body.page-category .site-footer,
body.page-category footer.site-footer {
  background: linear-gradient(180deg, #f8f9fa 0%, #eef2f8 100%);
  color: var(--cat-e-ink);
}

/* Soft floating atmosphere orbs for category pages */
body.page-category::before {
  content: "";
  position: fixed;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  left: 4%;
  top: 28%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.7), rgba(125, 211, 199, 0.25) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: catEBubble 14s ease-in-out infinite alternate;
}

body.page-category::after {
  content: "";
  position: fixed;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  right: 6%;
  top: 42%;
  background: radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.75), rgba(216, 243, 239, 0.3) 55%, transparent 72%);
  pointer-events: none;
  z-index: 0;
  animation: catEBubble 11s ease-in-out infinite alternate-reverse;
}

@keyframes catEBubble {
  from {
    transform: translateY(0) scale(1);
    opacity: 0.45;
  }
  to {
    transform: translateY(-18px) scale(1.08);
    opacity: 0.85;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.page-category::before,
  body.page-category::after {
    animation: none;
  }
}
