/* ==========================================================================
   ArchitecturalNumbers.com — Interactive Architectural Style Showroom (/styles)
   ========================================================================== */

:root {
  /* Disable full-page root snapshot so sticky controls stay interactive during card filter/sort transitions */
  view-transition-name: none;
}

::view-transition {
  pointer-events: none;
}

::view-transition-group(.style-card) {
  animation-duration: 0.32s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

::view-transition-new(.style-card):only-child {
  animation: an-card-enter 0.26s ease-out;
}

::view-transition-old(.style-card):only-child {
  animation: an-card-exit 0.2s ease-in;
}

@keyframes an-card-enter {
  from {
    opacity: 0;
    scale: 0.96;
  }
}

@keyframes an-card-exit {
  to {
    opacity: 0;
    scale: 0.96;
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Main Showroom Shell & Active Finish Metallic Tokens */
.styles-showroom {
  width: 100%;
  max-width: 1328px;
  margin: 0 auto;
  box-sizing: border-box;
  font-family: Arial, Helvetica, sans-serif;
  color: #0f172a;
  text-align: left;

  /* Default Finish: Black Anodized (8) for instant crisp contrast on Stucco */
  --metal-grad: linear-gradient(135deg, #3f444c 0%, #1d2024 38%, #4b525c 52%, #141619 78%, #2c3036 100%);
  --metal-side: #111317;
  --metal-rim: rgba(255, 255, 255, 0.22);
  --glyph-lift-x: 0px;
  --glyph-lift-y: 0px;
  --mount-shadow: 1px 2px 3px rgba(15, 23, 42, 0.28);
}

/* 1: Natural Satin Aluminum */
.styles-showroom[data-active-finish="1"] {
  --metal-grad: linear-gradient(135deg, #f8fafc 0%, #cbd5e1 28%, #ffffff 48%, #94a3b8 74%, #e2e8f0 100%);
  --metal-side: #64748b;
  --metal-rim: rgba(15, 23, 42, 0.25);
}

/* 3: Clear Anodized */
.styles-showroom[data-active-finish="3"] {
  --metal-grad: linear-gradient(135deg, #f1f5f9 0%, #d4dce4 32%, #ffffff 50%, #a8b3bf 78%, #e5eaf0 100%);
  --metal-side: #73808f;
  --metal-rim: rgba(15, 23, 42, 0.22);
}

/* 5: Gold Anodized / Satin Brass */
.styles-showroom[data-active-finish="5"] {
  --metal-grad: linear-gradient(135deg, #fef08a 0%, #d4af37 30%, #fffbeb 49%, #a17419 76%, #e6c453 100%);
  --metal-side: #7c5812;
  --metal-rim: rgba(120, 53, 15, 0.30);
}

/* 8: Black Anodized */
.styles-showroom[data-active-finish="8"] {
  --metal-grad: linear-gradient(135deg, #434952 0%, #1b1d21 36%, #525965 50%, #111316 76%, #2d3138 100%);
  --metal-side: #0b0d10;
  --metal-rim: rgba(255, 255, 255, 0.18);
}

/* 42: Light Bronze Anodized */
.styles-showroom[data-active-finish="42"] {
  --metal-grad: linear-gradient(135deg, #e7cba3 0%, #b89467 34%, #f5e1c3 50%, #85653f 78%, #cfa97b 100%);
  --metal-side: #62492c;
  --metal-rim: rgba(69, 26, 3, 0.25);
}

/* 6: Medium Bronze Anodized */
.styles-showroom[data-active-finish="6"] {
  --metal-grad: linear-gradient(135deg, #9c7250 0%, #6c4a30 35%, #b88b66 50%, #4b321f 78%, #7d573a 100%);
  --metal-side: #3b2617;
  --metal-rim: rgba(255, 255, 255, 0.16);
}

/* 7: Dark Bronze Anodized */
.styles-showroom[data-active-finish="7"] {
  --metal-grad: linear-gradient(135deg, #634c3b 0%, #3c2c20 36%, #7c614c 50%, #261b13 78%, #4d392b 100%);
  --metal-side: #1d140e;
  --metal-rim: rgba(255, 255, 255, 0.15);
}

/* 9: Natural Satin Bronze */
.styles-showroom[data-active-finish="9"] {
  --metal-grad: linear-gradient(135deg, #d8ad80 0%, #9e734c 34%, #eed0ad 50%, #734f2f 78%, #b9895e 100%);
  --metal-side: #593b21;
  --metal-rim: rgba(69, 26, 3, 0.25);
}

/* 21: Traditional Verde Patina */
.styles-showroom[data-active-finish="21"] {
  --metal-grad: linear-gradient(135deg, #6ee7b7 0%, #3b7a70 34%, #99f6e4 50%, #234e48 78%, #4d9488 100%);
  --metal-side: #1d3f3a;
  --metal-rim: rgba(15, 23, 42, 0.22);
}

/* Floating Standoff Mount Animated Shadow State */
.styles-showroom[data-mount="floating"] {
  --glyph-lift-x: -3px;
  --glyph-lift-y: -4px;
  --mount-shadow: 7px 10px 8px rgba(15, 23, 42, 0.36), 14px 20px 20px rgba(15, 23, 42, 0.20);
}

/* ==========================================================================
   1. Showroom Hero & Curb-Distance Visibility Matchmaker
   ========================================================================== */
.styles-hero {
  background: linear-gradient(135deg, #f0f6fa 0%, #e4eff8 100%);
  border: 1px solid #c4dcee;
  border-radius: 10px;
  padding: 22px 24px 20px 24px;
  margin-bottom: 18px;
  box-sizing: border-box;
}

.styles-hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.styles-hero-copy {
  max-width: 780px;
}

.styles-hero-title {
  margin: 0 0 6px 0;
  font-size: 26px;
  font-weight: 700;
  color: #095ba6;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.styles-hero-subtitle {
  margin: 0;
  font-size: 14.5px;
  color: #334155;
  line-height: 1.5;
}

.styles-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.styles-stat-pill {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: #1e293b;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.styles-stat-pill strong {
  color: #095ba6;
}

/* Curb Distance Matchmaker Bar */
.styles-distance-bar {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.styles-distance-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.styles-distance-pills {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 8px;
}

.an-distance-pill {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
  font-family: inherit;
}

.an-distance-pill:hover {
  border-color: #095ba6;
  background: #f8fafc;
}

.an-distance-pill.active {
  background: #095ba6;
  border-color: #095ba6;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(9, 91, 166, 0.25);
}

.an-distance-pill .dist-size-tag {
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
}

.an-distance-pill.active .dist-size-tag {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   2. Sticky Interactive Studio Control Deck
   ========================================================================== */
.styles-studio-bar {
  position: sticky;
  top: 8px;
  z-index: 35;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
  box-sizing: border-box;
}

.studio-row-primary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

/* Live Address Input Group */
.studio-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  min-width: 240px;
}

.studio-field-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #475569;
  white-space: nowrap;
}

.studio-live-input {
  flex: 1 1 130px;
  min-width: 110px;
  max-width: 200px;
  padding: 8px 11px;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  border: 1.5px solid #94a3b8;
  border-radius: 6px;
  background: #ffffff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-live-input:focus {
  outline: none;
  border-color: #095ba6;
  box-shadow: 0 0 0 3px rgba(9, 91, 166, 0.16);
}

.studio-specimen-modes {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.an-mode-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 11.5px;
  font-weight: 700;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.an-mode-btn.active {
  background: #ffffff;
  color: #095ba6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

/* Height Selector Pill in Studio Bar */
.studio-size-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.studio-size-select {
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

/* Finish Swatches Strip */
.studio-finishes-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-swatches-row {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.an-finish-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.an-finish-btn:hover {
  transform: scale(1.1);
  border-color: #095ba6;
}

.an-finish-btn.active {
  border-color: #095ba6;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #095ba6;
  transform: scale(1.08);
}

.studio-active-finish-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  min-width: 118px;
}

/* Wall Surface & Animated Variant Toggles */
.studio-variants-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-wrap: wrap;
}

.studio-wall-pills {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}

.an-wall-btn {
  appearance: none;
  border: none;
  background: transparent;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.an-wall-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

.an-anim-toggle {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  font-family: inherit;
}

.an-anim-toggle:hover {
  border-color: #095ba6;
}

.an-anim-toggle[aria-pressed="true"] {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.an-anim-toggle .toggle-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.an-anim-toggle[aria-pressed="true"] .toggle-dot {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

/* Row 2: Filters, Search, Sort & View Mode */
.studio-row-secondary {
  display: flex;
  flex-wrap: wrap;
  align-items: safe center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
}

.studio-cat-pills {
  display: flex;
  flex-wrap: wrap;
  flex-wrap: balance;
  gap: 6px;
  align-items: center;
}

.an-cat-pill {
  appearance: none;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.an-cat-pill:hover {
  border-color: #095ba6;
  color: #095ba6;
}

.an-cat-pill.active {
  background: #095ba6;
  border-color: #095ba6;
  color: #ffffff;
}

.studio-tools-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.studio-search-input {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 12.5px;
  width: 155px;
  box-sizing: border-box;
}

.studio-sort-select {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12.5px;
  color: #1e293b;
  font-weight: 600;
  cursor: pointer;
}

.studio-view-switch {
  display: inline-flex;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 2px;
}

.an-view-btn {
  appearance: none;
  border: none;
  background: transparent;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
}

.an-view-btn.active {
  background: #ffffff;
  color: #095ba6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

/* ==========================================================================
   3. Interactive Style Cards Grid & Animated Architectural Stages
   ========================================================================== */
.styles-results-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
  color: #475569;
}

.styles-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 32px;
}

.an-style-card {
  view-transition-class: style-card;
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.an-style-card[hidden] {
  display: none !important;
}

.an-style-card:hover {
  transform: translateY(-2px);
  border-color: #93c5fd;
  box-shadow: 0 10px 24px rgba(9, 91, 166, 0.10);
}

.an-card-header {
  padding: 12px 14px 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
}

.an-card-title-wrap {
  min-width: 0;
}

.an-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.an-card-sub {
  margin-top: 3px;
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.an-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.an-badge {
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.an-badge-best {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.an-badge-prismatic {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.an-badge-ribbon {
  background: #ede9fe;
  color: #5b21b6;
  border: 1px solid #ddd6fe;
}

.an-badge-case {
  background: #f1f5f9;
  color: #475569;
}

/* Architectural Wall Stage */
.an-specimen-stage {
  position: relative;
  min-height: 138px;
  padding: 20px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-sizing: border-box;
  /* Default Stucco Wall Texture */
  background-color: #f4f3ef;
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.04) 1px, transparent 0),
    radial-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 0),
    linear-gradient(180deg, #f8f7f4 0%, #eceae4 100%);
  background-size: 14px 14px, 22px 22px, 100% 100%;
  background-position: 0 0, 7px 7px, 0 0;
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.25s ease;
}

/* Charcoal Modern Siding Backdrop */
.styles-showroom[data-wall="charcoal"] .an-specimen-stage {
  background-color: #1e242b;
  background-image:
    repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 22px),
    linear-gradient(180deg, #262e37 0%, #181d23 100%);
  background-size: 100% 22px, 100% 100%;
}

/* Warm Architectural Cedar Backdrop */
.styles-showroom[data-wall="cedar"] .an-specimen-stage {
  background-color: #8c5835;
  background-image:
    repeating-linear-gradient(180deg, rgba(43, 21, 7, 0.16) 0px, rgba(43, 21, 7, 0.16) 2px, transparent 2px, transparent 26px),
    linear-gradient(135deg, #a46b43 0%, #7c4a29 55%, #8f5934 100%);
  background-size: 100% 26px, 100% 100%;
}

/* Classic Brick Backdrop */
.styles-showroom[data-wall="brick"] .an-specimen-stage {
  background-color: #7f372d;
  background-image:
    linear-gradient(180deg, rgba(226, 218, 208, 0.28) 2px, transparent 2px),
    linear-gradient(90deg, rgba(226, 218, 208, 0.22) 2px, transparent 2px),
    linear-gradient(135deg, #8c3f34 0%, #6d2c23 100%);
  background-size: 100% 24px, 56px 24px, 100% 100%;
}

/* Auto-contrast safeguard: if user hasn't forced stucco and selects bright silver finishes, subtle cool shadow rim keeps silver legible on light stucco */
.styles-showroom[data-wall="stucco"][data-active-finish="1"] .an-specimen-stage,
.styles-showroom[data-wall="stucco"][data-active-finish="3"] .an-specimen-stage {
  background-image:
    radial-gradient(rgba(15, 23, 42, 0.05) 1px, transparent 0),
    linear-gradient(180deg, #dce5ee 0%, #cbd7e4 100%);
}

/* Dual-Layer 3D Cast Metal Extrusion + Floating Wall Shadow */
.an-specimen-glyphs-wrap {
  position: relative;
  display: inline-block;
  max-width: 100%;
  text-align: center;
  line-height: 1.08;
  letter-spacing: 2px;
  font-size: calc(54px * var(--optical-scale, 1));
  transform: translate(var(--glyph-lift-x), var(--glyph-lift-y));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  word-break: break-word;
}

/* Rear layer: Solid Cast Return Side Extrusion + Wall Mount Shadow */
.an-specimen-glyphs-wrap::before {
  content: attr(data-glyphs);
  position: absolute;
  inset: 0;
  z-index: 1;
  color: var(--metal-side);
  text-shadow:
    0.8px 0.8px 0 var(--metal-side),
    1.6px 1.6px 0 var(--metal-side),
    2.4px 2.4px 0 var(--metal-side),
    var(--mount-shadow);
  transition: text-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease;
  pointer-events: none;
  user-select: none;
}

/* Front layer: Brushed Metallic Face + Specular Light Sweep */
.an-specimen-glyphs {
  position: relative;
  z-index: 2;
  display: inline-block;
  background-image: var(--metal-grad);
  background-size: 200% 100%;
  background-position: 0% 50%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-stroke: 0.4px var(--metal-rim);
  transition: background-position 0.65s ease;
}

.an-style-card:hover .an-specimen-glyphs,
.styles-showroom[data-shimmer="on"] .an-specimen-glyphs {
  background-position: 100% 50%;
}

@keyframes an-sheen-loop {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.styles-showroom[data-shimmer="on"] .an-specimen-glyphs {
  animation: an-sheen-loop 3.2s ease-in-out infinite;
}

@keyframes an-floating-sun-drift {
  0%, 100% {
    text-shadow:
      0.8px 0.8px 0 var(--metal-side),
      1.6px 1.6px 0 var(--metal-side),
      2.4px 2.4px 0 var(--metal-side),
      6px 10px 8px rgba(15, 23, 42, 0.36),
      12px 18px 20px rgba(15, 23, 42, 0.20);
  }
  50% {
    text-shadow:
      0.8px 0.8px 0 var(--metal-side),
      1.6px 1.6px 0 var(--metal-side),
      2.4px 2.4px 0 var(--metal-side),
      -5px 11px 9px rgba(15, 23, 42, 0.34),
      -10px 19px 22px rgba(15, 23, 42, 0.19);
  }
}

.styles-showroom[data-mount="floating"] .an-style-card:hover .an-specimen-glyphs-wrap::before {
  animation: an-floating-sun-drift 3.4s ease-in-out infinite;
}

/* Prismatic Chiseled Center Ridge Overlay Hint */
.an-style-card[data-prismatic="1"] .an-specimen-glyphs {
  -webkit-text-stroke: 0.7px rgba(255, 255, 255, 0.45);
}

/* Stage Corner Pill: Mount & Profile Readout */
.an-stage-pill {
  position: absolute;
  bottom: 7px;
  right: 9px;
  background: rgba(15, 23, 42, 0.68);
  color: #f8fafc;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  backdrop-filter: blur(4px);
}

/* Card Body: Specs, Pricing & Size Strip */
.an-card-body {
  padding: 12px 14px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 1 auto;
}

.an-spec-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 8px 10px;
}

.an-dim-readout {
  font-size: 12px;
  color: #334155;
  line-height: 1.35;
}

.an-dim-readout strong {
  color: #0f172a;
  font-size: 13px;
}

.an-price-readout {
  text-align: right;
  line-height: 1.3;
}

.an-price-unit {
  font-size: 14px;
  font-weight: 700;
  color: #095ba6;
}

.an-price-set {
  font-size: 11px;
  color: #475569;
  font-weight: 600;
}

/* Mini Visual Depth Bar */
.an-depth-meter {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #64748b;
}

.an-depth-track {
  flex: 1;
  height: 5px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.an-depth-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #095ba6);
  border-radius: 999px;
  transition: width 0.28s ease;
}

.an-sizes-summary {
  font-size: 11.5px;
  color: #475569;
  line-height: 1.4;
}

.an-sizes-summary strong {
  color: #1e293b;
}

.an-prismatic-note {
  font-size: 11px;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 5px;
  padding: 5px 8px;
  line-height: 1.35;
}

/* Card Footer Actions */
.an-card-actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
}

.an-btn-compare,
.an-btn-specs,
.an-btn-3d {
  appearance: none;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 9px;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: border-color 0.15s ease, color 0.15s ease, background-color 0.15s ease;
  font-family: inherit;
  white-space: nowrap;
}

.an-btn-compare:hover,
.an-btn-specs:hover,
.an-btn-3d:hover {
  border-color: #095ba6;
  color: #095ba6;
  background: #f8fafc;
}

.an-btn-compare[aria-pressed="true"] {
  background: #eff6ff;
  border-color: #095ba6;
  color: #095ba6;
}

.an-btn-order {
  margin-left: auto;
  background: #095ba6;
  border: 1px solid #095ba6;
  color: #ffffff !important;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 13px;
  border-radius: 6px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.an-btn-order:hover {
  background: #074785;
  box-shadow: 0 3px 8px rgba(9, 91, 166, 0.25);
}

/* ==========================================================================
   4. Compact Engineering Spec Table View
   ========================================================================== */
.styles-table-wrapper {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  overflow-x: auto;
  margin-bottom: 32px;
}

.styles-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.styles-spec-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  padding: 11px 14px;
  border-bottom: 2px solid #cbd5e1;
  white-space: nowrap;
}

.styles-spec-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.styles-spec-table tr:hover td {
  background: #f8fafc;
}

.table-specimen-preview {
  font-size: 28px;
  color: #0f172a;
  letter-spacing: 1.5px;
  line-height: 1.1;
}

.table-size-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.table-size-chip {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 3px 7px;
  font-size: 11.5px;
  color: #1e293b;
  text-decoration: none !important;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.table-size-chip:hover {
  border-color: #095ba6;
  background: #eff6ff;
  color: #095ba6;
}

/* ==========================================================================
   5. Custom Architectural & Commercial Fabrication Callout Banner
   ========================================================================== */
.styles-custom-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  color: #f8fafc;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  box-sizing: border-box;
}

.styles-custom-copy {
  max-width: 820px;
}

.styles-custom-copy h2 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #ffffff;
}

.styles-custom-copy p {
  margin: 0 0 8px 0;
  font-size: 13.5px;
  color: #cbd5e1;
  line-height: 1.55;
}

.styles-custom-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 12.5px;
  color: #e2e8f0;
}

.styles-custom-cta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 210px;
}

.styles-custom-phone-btn {
  background: #38bdf8;
  color: #0f172a !important;
  font-weight: 700;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 6px;
  text-decoration: none !important;
  text-align: center;
}

.styles-custom-sub-btn {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff !important;
  font-weight: 600;
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 6px;
  text-decoration: none !important;
  text-align: center;
}

/* ==========================================================================
   6. Floating 3-Style Compare Tray & Native <dialog> Modals
   ========================================================================== */
.styles-compare-tray {
  position: fixed;
  bottom: var(--compare-tray-bottom, 18px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 100010;
  background: #0f172a;
  color: #ffffff;
  border: 1px solid #334155;
  border-radius: 999px;
  padding: 8px 14px 8px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
  max-width: calc(100vw - 24px);
  box-sizing: border-box;
  transition: bottom 0.2s ease;
}

.styles-compare-tray[hidden] {
  display: none !important;
}

.compare-tray-chips {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compare-tray-chip {
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.compare-tray-chip button {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.btn-tray-compare {
  background: #38bdf8;
  color: #0f172a;
  border: none;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.btn-tray-clear {
  background: transparent;
  color: #cbd5e1;
  border: none;
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}

/* Native <dialog> Scroll Containment & Top-Layer Styling */
dialog.an-modal:modal {
  overscroll-behavior: contain;
}

dialog.an-modal::backdrop {
  overflow: hidden;
  overscroll-behavior: contain;
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(3px);
}

dialog.an-modal {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0;
  max-width: 820px;
  width: calc(100vw - 28px);
  max-height: 88vh;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.30);
  box-sizing: border-box;
}

dialog.an-modal-wide {
  max-width: 1020px;
}

dialog.an-modal[open] {
  display: flex;
  flex-direction: column;
}

.an-dialog-header {
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.an-dialog-title {
  margin: 0;
  font-size: 19px;
  color: #095ba6;
}

.an-dialog-close {
  appearance: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  font-family: inherit;
}

.an-dialog-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1 1 auto;
}

/* Animated Isometric Cross-Section Diagram inside Spec Modal */
.spec-iso-panel {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  align-items: center;
}

.spec-iso-svg-wrap {
  background: #ffffff;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.spec-size-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.spec-size-pill {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  color: #334155;
}

.spec-size-pill.active {
  background: #095ba6;
  border-color: #095ba6;
  color: #ffffff;
}

/* Side-by-Side Comparison Columns */
.an-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.an-compare-col {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   7. Responsive Breakpoints & Motion Accessibility
   ========================================================================== */
@media (max-width: 1120px) {
  .styles-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .studio-variants-group {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .styles-hero {
    padding: 16px;
  }
  .styles-hero-title {
    font-size: 21px;
  }
  .styles-studio-bar {
    position: static;
    padding: 12px;
  }
  .styles-cards-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .an-distance-pill,
  .an-cat-pill,
  .an-anim-toggle,
  .an-btn-compare,
  .an-btn-specs,
  .an-btn-3d,
  .an-btn-order {
    min-height: 40px;
  }
  .studio-search-input {
    width: 100%;
  }
  .studio-tools-right {
    width: 100%;
  }
  .spec-iso-panel {
    grid-template-columns: 1fr;
  }
  .styles-custom-banner {
    padding: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation: none !important;
  }
  .an-style-card,
  .an-specimen-glyphs-wrap,
  .an-specimen-glyphs-wrap::before,
  .an-specimen-glyphs,
  .an-depth-fill {
    transition: none !important;
    animation: none !important;
  }
}
