@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;800;900&display=swap');

:root{color-scheme:dark;--red:#8b35d6;--red-bright:#c47cff;--red-glow:rgba(154,44,255,.22);--ink:#070a0e;--panel:#0d1218;--panel2:#111922;--line:#303b46;--steel:#8c9aa6;--text:#f1f4f7;--muted:#a2adb7}
*{box-sizing:border-box}
html{scroll-behavior:smooth;background:var(--ink)}
body{margin:0;min-height:100vh;color:var(--text);font-family:'Orbitron',Arial,sans-serif;background:#070a0e url('images/decepticons-background_result.webp') center top/cover fixed no-repeat;position:relative}
body::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(3,6,10,.42),rgba(3,6,10,.82) 65%,rgba(3,6,10,.94))}
a{color:inherit;text-decoration:none}button,input,select{font:inherit}button,select{cursor:pointer}
.site-header{position:relative;z-index:5;display:flex;align-items:center;gap:22px;padding:12px clamp(14px,3vw,42px);min-height:94px;background:linear-gradient(180deg,#202831,#0b1016);border-bottom:3px solid #59636d;box-shadow:0 8px 24px #000b}
.brand{display:flex;align-items:center;justify-content:center;flex:0 0 190px;min-width:0}.brand img{display:block;width:100%;max-width:190px;height:66px;object-fit:contain}
.main-nav{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px;flex:1}
.nav-item{min-height:62px;display:flex;align-items:center;justify-content:center;gap:9px;padding:8px 10px;background:linear-gradient(145deg,#1c252e,#080c11);border:1px solid #45515c;clip-path:polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px);font-size:clamp(9px,.8vw,12px);font-weight:700;text-transform:uppercase;letter-spacing:.04em;transition:background .2s,border-color .2s,transform .2s}
.nav-item img{width:31px;height:31px;object-fit:contain;flex:0 0 auto}.nav-item:hover,.nav-item.active{background:linear-gradient(145deg,#5b151b,#151014);border-color:var(--red-bright);box-shadow:inset 0 0 0 1px #ff515944,0 0 15px var(--red-glow)}
.hero{position:relative;isolation:isolate;min-height:clamp(210px,26vw,340px);display:flex;align-items:center;overflow:hidden;background:#10151b url('images/decepticons-background_result.webp') center 42%/cover no-repeat;border-bottom:1px solid #5e2383}
.hero-shade{position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,rgba(3,6,10,.84),rgba(3,6,10,.42) 65%,rgba(3,6,10,.55))}
.hero-content{width:min(1500px,100%);margin:0 auto;padding:36px clamp(20px,5vw,76px);display:flex;align-items:center;gap:clamp(20px,4vw,55px)}
.hero-symbol{width:clamp(90px,12vw,160px);height:clamp(90px,12vw,160px);object-fit:contain;filter:drop-shadow(0 0 18px #f12b35aa)}
.eyebrow{margin:0 0 8px;color:#ff666c;font-size:10px;font-weight:700;letter-spacing:.22em}
h1,h2,h3,p{margin-top:0}h1{margin-bottom:8px;font-size:clamp(26px,4vw,52px);font-weight:900;letter-spacing:.045em;text-shadow:0 3px 15px #000} .hero-subtitle{margin:0;color:#d6dce1;letter-spacing:.18em;text-transform:uppercase;font-size:clamp(10px,1vw,14px)}
.collection-area{width:min(1500px,100%);margin:0 auto;padding:clamp(20px,3vw,42px) clamp(14px,3vw,38px) 48px}
.section-heading{display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:22px;padding:0 0 18px;border-bottom:1px solid #ffffff25}.section-heading h2{font-size:clamp(20px,2.2vw,30px);margin:0 0 8px}.section-intro{margin:0;color:var(--muted);font-family:Arial,sans-serif;font-size:14px}.collection-count{font-size:10px;letter-spacing:.12em;color:#b8c3cd;text-align:right}
.controls-panel{position:relative;padding:18px 20px 20px;margin-bottom:28px;background:linear-gradient(140deg,rgba(23,31,39,.97),rgba(7,10,14,.97));border:1px solid #4c5964;box-shadow:0 10px 25px #0008,inset 0 0 0 4px #080c11}
.controls-title{display:flex;align-items:center;gap:10px;margin-bottom:16px}.controls-title h3,.gallery-heading h3{font-size:12px;letter-spacing:.16em;margin:0}.status-light{width:8px;height:8px;background:var(--red-bright);border-radius:50%;box-shadow:0 0 10px var(--red-bright)}
.controls-grid{display:grid;grid-template-columns:minmax(190px,1.5fr) repeat(3,minmax(130px,1fr)) minmax(145px,1fr) auto;gap:12px;align-items:end}
.control{display:flex;flex-direction:column;gap:7px;min-width:0}.control>span{font-size:9px;letter-spacing:.1em;color:#b8c3cc;text-transform:uppercase}
.control input,.control select{width:100%;min-width:0;height:42px;padding:0 11px;color:#f4f6f8;background:#070b10;border:1px solid #46525d;border-radius:0;outline:none;font-size:11px}.control input:focus,.control select:focus{border-color:var(--red-bright);box-shadow:0 0 0 2px #ff515922}
.clear-button{height:42px;padding:0 17px;color:#fff;background:#2a1115;border:1px solid var(--red);font-size:10px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.clear-button:hover{background:#4b171e}
.collection-layout{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(380px,.95fr);align-items:start;gap:24px}
.gallery-column{min-width:0}.gallery-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:0 0 14px;padding:0 0 12px;border-bottom:1px solid #ffffff2b}.gallery-heading span{font-size:10px;color:var(--muted)}
.gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.card{min-width:0;position:relative;overflow:hidden;background:linear-gradient(150deg,#1a222b,#080b10);border:1px solid #3c4853;box-shadow:0 8px 17px #0008;cursor:pointer;transition:transform .18s,border-color .18s,box-shadow .18s}
.card:hover,.card.selected{transform:translateY(-2px);border-color:var(--red-bright);box-shadow:0 8px 22px #000b,0 0 14px var(--red-glow)}
.card-image-wrap{height:clamp(130px,17vw,230px);display:flex;align-items:center;justify-content:center;padding:10px;background:radial-gradient(ellipse at center,#26313c 0,#10161d 60%,#080b0f 100%);border-bottom:1px solid #36414b}
.card-image{width:100%;height:100%;object-fit:contain;mix-blend-mode:normal;background:transparent}
.card-body{padding:12px}.card-body h4{margin:0 0 8px;font-size:clamp(10px,.95vw,13px);line-height:1.4;overflow-wrap:anywhere}.card-meta{margin:0 0 5px;color:#aab5bf;font:11px/1.45 Arial,sans-serif;overflow-wrap:anywhere}.card-link{margin-top:12px;padding-top:9px;border-top:1px solid #ffffff1a;color:#ff666c;font-size:9px;font-weight:700;letter-spacing:.08em}
.empty-state{grid-column:1/-1;padding:32px 18px;text-align:center;color:var(--muted);background:#0a0e13;border:1px solid #303b46;font:14px Arial,sans-serif}
.detail-panel{position:relative;min-width:0;padding:20px;background:linear-gradient(145deg,rgba(24,32,41,.98),rgba(5,8,12,.99));border:1px solid #66727c;box-shadow:0 15px 35px #000b,inset 0 0 0 5px #090d12}
.detail-panel[aria-hidden="true"]{opacity:.94}.panel-heading{display:flex;align-items:center;gap:12px;padding:0 0 15px;margin-bottom:16px;border-bottom:1px solid #ffffff25}.panel-mark{display:grid;place-items:center;width:42px;height:42px;flex:0 0 42px;background:#48151b;border:1px solid var(--red-bright);color:#fff;font-size:23px;font-weight:900}.panel-heading .eyebrow{margin-bottom:5px}.panel-heading h2{font-size:clamp(15px,1.5vw,22px);margin:0;line-height:1.3;overflow-wrap:anywhere}
.detail-image-frame{position:relative;display:flex;align-items:center;justify-content:center;height:clamp(230px,30vw,390px);padding:12px;overflow:hidden;background:radial-gradient(ellipse at center,#26323d 0,#121920 54%,#070a0e 100%);border:1px solid #3e4b56;cursor:zoom-in}
.detail-image-frame img{width:100%;height:100%;object-fit:contain;display:block;background:transparent}.image-placeholder{color:#7f8c98;text-align:center;font-size:12px;letter-spacing:.2em;line-height:2}.image-placeholder span{font-size:9px;color:#53616e}
.detail-thumbs{display:flex;gap:9px;flex-wrap:wrap;margin-top:10px}.detail-thumbs:empty{display:none}.detail-thumbs button{width:58px;height:58px;padding:4px;background:#090d12;border:1px solid #4a5661}.detail-thumbs button.active{border-color:var(--red-bright)}.detail-thumbs img{width:100%;height:100%;object-fit:contain}
.info-section,.notes-section{margin-top:19px;padding-top:16px;border-top:1px solid #ffffff25}.info-section h3,.notes-section h3{display:flex;align-items:center;gap:9px;margin:0 0 13px;font-size:11px;letter-spacing:.13em}.section-index{color:#ff656c}
.detail-specs{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}.spec{padding:9px 0;border-bottom:1px solid #ffffff13;min-width:0}.spec strong{display:block;margin-bottom:5px;color:#a8b4bf;font-size:9px;letter-spacing:.06em;text-transform:uppercase}.spec span{display:block;color:#f0f3f6;font:13px/1.4 Arial,sans-serif;overflow-wrap:anywhere}.muted,.notes-copy{color:#b4bec7;font:13px/1.65 Arial,sans-serif}.notes-copy{white-space:pre-wrap;margin:0}
.detail-navigation{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:20px;padding-top:14px;border-top:1px solid #ffffff25}.detail-navigation button{padding:10px 12px;background:#141b22;border:1px solid #53606b;color:#fff;font-size:9px;font-weight:700;letter-spacing:.06em}.detail-navigation button:not(:disabled):hover{border-color:var(--red-bright)}.detail-navigation button:disabled{opacity:.35;cursor:not-allowed}.detail-navigation span{font-size:10px;color:#c4ccd3}
.image-lightbox{width:min(92vw,1100px);max-width:92vw;max-height:92vh;padding:48px 18px 18px;background:#070a0e;border:1px solid #65717c}.image-lightbox::backdrop{background:#000d}.image-lightbox img{display:block;max-width:100%;max-height:78vh;margin:auto;object-fit:contain}.lightbox-close{position:absolute;top:8px;right:12px;width:34px;height:34px;color:#fff;background:#251014;border:1px solid var(--red-bright);font-size:22px}
.site-footer{display:flex;justify-content:space-between;gap:16px;padding:20px clamp(14px,3vw,42px);background:#05080c;border-top:1px solid #3e4953;color:#86939e;font-size:9px;letter-spacing:.14em}.site-footer b{color:#75d59b}
@media(max-width:1100px){.site-header{align-items:flex-start;flex-direction:column;gap:10px}.brand{flex-basis:auto;justify-content:flex-start}.brand img{height:52px}.main-nav{width:100%;grid-template-columns:repeat(6,minmax(0,1fr))}.nav-item{flex-direction:column;gap:4px;text-align:center}.nav-item img{width:25px;height:25px}.controls-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.search-control{grid-column:span 2}.collection-layout{grid-template-columns:minmax(0,1fr) minmax(340px,.95fr)}.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){body{background-attachment:scroll}.site-header{padding:10px 12px}.main-nav{grid-template-columns:repeat(3,minmax(0,1fr))}.nav-item{min-height:58px;font-size:9px}.hero{min-height:205px}.hero-content{gap:16px;padding:26px 18px}.hero-symbol{width:76px;height:76px}.collection-layout{grid-template-columns:1fr}.detail-panel{grid-row:1}.gallery{grid-template-columns:repeat(3,minmax(0,1fr))}.card-image-wrap{height:clamp(105px,24vw,175px)}.card-body{padding:9px}.card-meta{font-size:10px}.collection-area{padding-top:22px}.detail-image-frame{height:clamp(250px,65vw,420px)}}
@media(max-width:520px){.section-heading{align-items:flex-start;flex-direction:column}.collection-count{text-align:left}.controls-grid{grid-template-columns:1fr 1fr}.search-control{grid-column:1/-1}.clear-button{width:100%}.gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.card-image-wrap{height:clamp(145px,42vw,220px)}.detail-panel{padding:14px}.detail-specs{grid-template-columns:1fr 1fr;gap:0 10px}.detail-navigation button{padding:9px 7px;font-size:8px}.site-footer{flex-direction:column}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}


/* Match the established Autobots navigation geometry and styling. */
body .topbar {
  position:relative; z-index:100; min-height:88px; height:auto;
  display:flex; align-items:stretch; flex-wrap:nowrap;
  padding:7px 18px 7px 20px; gap:0;
  background:rgba(2,5,8,.97); border:0; border-bottom:2px solid rgba(0,207,255,.65);
  box-shadow:0 5px 18px rgba(0,0,0,.85);
}
body .site-logo {
  width:205px; flex:0 0 205px; display:flex; align-items:center; justify-content:center; margin-right:10px;
}
body .site-logo img { width:190px; max-height:82px; height:auto; object-fit:contain; display:block; }
body .topbar .main-nav {
  flex:1; min-width:0; width:auto; display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:7px;
}
body .topbar .nav-item {
  --nav-color:#ff1b1b; --nav-glow:rgba(255,27,27,.42);
  position:relative; min-width:0; min-height:0; display:grid!important;
  grid-template-columns:40px minmax(0,1fr) 40px!important; align-items:center!important;
  justify-items:stretch!important; flex-direction:row!important; gap:0!important;
  padding:8px 10px!important; color:#fff; text-decoration:none; text-align:center;
  background:radial-gradient(ellipse at 18% 20%,rgba(255,255,255,.045),transparent 24%),linear-gradient(180deg,rgba(17,23,29,.98),rgba(4,8,12,.98));
  border:0; overflow:hidden; box-shadow:0 3px 7px rgba(0,0,0,.95),0 0 6px var(--nav-glow);
  filter:drop-shadow(0 3px 7px rgba(0,0,0,.95)); transition:.2s ease;
}
body .topbar .nav-item::before { content:none!important; display:none!important; }
body .topbar .nav-item::after { content:none!important; display:none!important; }
body .topbar .nav-item img {
  grid-column:1!important; grid-row:1!important; width:40px!important; height:40px!important;
  min-width:40px!important; min-height:40px!important; max-width:40px!important; max-height:40px!important;
  margin:0!important; justify-self:center!important; object-fit:contain!important; display:block!important;
}
body .topbar .nav-item span {
  grid-column:2!important; grid-row:1!important; justify-self:center!important; margin:0!important; padding:0!important;
  white-space:nowrap!important; text-align:center!important; font-family:"Orbitron",Arial,sans-serif!important;
  font-size:clamp(10px,1vw,16px)!important; font-weight:800!important; line-height:1.05!important; letter-spacing:.5px!important;
}
body .topbar .nav-item.autobots { --nav-color:#ff1b1b; --nav-glow:rgba(255,27,27,.46); }
body .topbar .nav-item.decepticons { --nav-color:#9a2cff; --nav-glow:rgba(154,44,255,.46); }
body .topbar .nav-item.masterpiece { --nav-color:#ffc21c; --nav-glow:rgba(255,194,28,.42); }
body .topbar .nav-item.third-party { --nav-color:#00d8ff; --nav-glow:rgba(0,216,255,.46); }
body .topbar .nav-item.primes { --nav-color:#1d8cff; --nav-glow:rgba(29,140,255,.46); }
body .topbar .nav-item.contact { --nav-color:#1856a8; --nav-glow:rgba(24,86,168,.42); }
body .topbar .nav-item:hover, body .topbar .nav-item.active { transform:translateY(-1px); box-shadow:0 3px 7px rgba(0,0,0,.95),0 0 10px var(--nav-glow),inset 0 -2px var(--nav-color); }
@media(max-width:1100px) {
  body .topbar { flex-direction:column; align-items:stretch; padding:5px; min-height:72px; flex-wrap:wrap; }
  body .site-logo { width:100%; flex:0 0 100%; height:58px; min-height:58px; margin:0; }
  body .site-logo img { width:145px; height:auto; max-height:58px; }
  body .topbar .main-nav { width:100%; grid-template-columns:repeat(3,minmax(0,1fr)); gap:4px; }
  body .topbar .nav-item { padding:5px!important; }
  body .topbar .nav-item img { width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;max-width:28px!important;max-height:28px!important; }
  body .topbar .nav-item span { font-size:8px!important; }
}
@media(max-width:520px) {
  body .topbar .nav-item { grid-template-columns:28px minmax(0,1fr) 28px!important; }
}

/* The shared expansion panel is positioned and toggled by nav-expansion.js. */


/* Decorative Cybertronian frame around the Autobots hero. */
body .hero {
  border: 0;
  overflow: hidden;
  padding: 0;
}
body .hero-frame-edge {
  position: absolute;
  display: block;
  z-index: 4;
  pointer-events: none;
  object-fit: fill;
}
body .hero-frame-left,
body .hero-frame-right { z-index: 3; }
body .hero-frame-top,
body .hero-frame-bottom { z-index: 4; height: clamp(720px, 88vw, 1360px); }
body .hero-frame-top,
body .hero-frame-bottom {
  left: 0;
  width: 100%;
  height: clamp(144px, 17.6vw, 272px);
}
body .hero-frame-top { top: 0; }
body .hero-frame-bottom { bottom: 0; transform: scaleY(-1); }
body .hero-frame-left,
body .hero-frame-right {
  top: 50%;
  bottom: auto;
  width: clamp(288px, 36vw, 540px);
  height: calc((100% - 2 * clamp(144px, 17.6vw, 272px)) * 3.75);
}
body .hero-frame-left { left: calc(14.7% - 0.38 * clamp(288px, 36vw, 540px)); transform: translate(-50%, -50%) rotate(90deg); }
body .hero-frame-right { left: calc(85.3% + 0.33 * clamp(288px, 36vw, 540px)); right: auto; transform: translate(-50%, -50%) rotate(90deg) scaleX(-1); }
body .hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  min-height: inherit;
  padding: clamp(184px, 20vw, 300px) clamp(42px, 4.5vw, 68px);
}
@media(max-width:760px) {
  body .hero-frame-top,
  body .hero-frame-bottom { height: 880px; }
  body .hero-frame-left,
  body .hero-frame-right {
    top: 50%;
    bottom: auto;
    height: calc((100% - 352px) * 3.75);
    width: 324px;
  }
  body .hero-frame-left { left: calc(14.7% - 123.12px); transform: translate(-50%, -50%) rotate(90deg); }
  body .hero-frame-right { left: calc(85.3% + 106.92px); right: auto; transform: translate(-50%, -50%) rotate(90deg) scaleX(-1); }
  body .hero-content { padding: 200px 28px; }
}


/* Continuous Cybertron backdrop across the page; restore the hero's original divider placement and content layout. */
html { background: #070a0e; }
body {
  background-color: #070a0e;
  background-image: url('images/decorative%20elements/main-page-background_result.webp');
  background-position: center top;
  background-size: 100% auto;
  background-repeat: repeat-y;
  background-attachment: scroll;
}
body::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg,rgba(3,6,10,.28),rgba(3,6,10,.5) 55%,rgba(3,6,10,.72));
}
body .topbar {
  background: linear-gradient(180deg,rgba(8,13,19,.84),rgba(3,6,10,.9));
  border-bottom-color: rgba(0,207,255,.55);
}
body main { position: relative; z-index: 1; }
/* Hero reset: preserve the established divider positions and original hero background/content sizing. */
body .hero {
  min-height: clamp(1050px, 130vw, 1700px);
  background-color: transparent;
  background-image: url('images/decepticons-background_result.webp');
  background-position: center center;
  background-size: 50% auto;
  background-repeat: no-repeat;
  border: 0;
  overflow: hidden;
  padding: 0;
}
body .hero::before { content: none; }
body .hero-shade {
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg,rgba(3,6,10,.84),rgba(3,6,10,.42) 65%,rgba(3,6,10,.55));
}
body .hero-content {
  width: 100%;
  min-height: inherit;
  padding: clamp(184px, 20vw, 300px) clamp(42px, 4.5vw, 68px);
  position: relative;
  z-index: 2;
}
body .hero-frame-top,
body .hero-frame-bottom { z-index: 4; }
body .hero-frame-left,
body .hero-frame-right { z-index: 3; }
body .collection-area {
  position: relative;
  z-index: 1;
  background: rgba(5,8,12,.34);
  backdrop-filter: blur(1.5px);
}
body .controls-panel,
body .detail-panel {
  background: linear-gradient(145deg,rgba(18,25,33,.92),rgba(5,8,12,.94));
}
body .site-footer {
  position: relative;
  z-index: 1;
  background: rgba(3,6,10,.84);
}
@media(max-width:760px) {
  body .hero { min-height: 1025px; }
  body .hero::before { content: none; }
  body .hero-shade {
    inset: 0;
    background: linear-gradient(90deg,rgba(3,6,10,.84),rgba(3,6,10,.42) 65%,rgba(3,6,10,.55));
  }
  body .hero-content { padding: 200px 28px; }
  body .hero-frame-top,
  body .hero-frame-bottom { height: 176px; }
}


/* Single-piece metallic hero frame replaces the separate divider images. */
body .hero-metallic-frame {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 4;
  pointer-events: none;
}
body .hero-frame-edge { display: none !important; }
@media (max-width: 760px) {
  body .hero-metallic-frame {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
}


/* Reduce the metallic frame's displayed height to 50% while keeping its width. */
body .hero-metallic-frame {
  top: 0;
  bottom: auto;
  height: 50%;
  object-fit: fill;
}
@media (max-width: 760px) {
  body .hero-metallic-frame {
    top: 0;
    bottom: auto;
    height: 50%;
    object-fit: fill;
  }
}


/* Fit the Autobots artwork into the same area as the shortened metallic frame. */
body .hero {
  background-image: url('images/decepticons-background_result.webp');
  background-position: center top;
  background-size: 100% 50%;
  background-repeat: no-repeat;
}
@media (max-width: 760px) {
  body .hero {
    background-position: center top;
    background-size: 100% 50%;
    background-repeat: no-repeat;
  }
}


/* Shrink the Autobots background artwork 15% in both dimensions. */
body .hero {
  background-size: 85% 42.5%;
  background-position: center top;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 85% 42.5%;
    background-position: center top;
  }
}


/* Latest artwork sizing: increase width 2% and reduce height 10% from the prior size. */
body .hero {
  background-size: 86.7% 38.25%;
  background-position: center top;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 86.7% 38.25%;
    background-position: center top;
  }
}


/* Lower the Autobots background artwork within the metallic frame. */
body .hero {
  background-position: center 50px;
}
@media (max-width: 760px) {
  body .hero {
    background-position: center 50px;
  }
}


/* Remove the dark overlay from the hero and extend the artwork toward the frame. */
body .hero-shade {
  display: none !important;
  background: none !important;
  opacity: 0 !important;
}
body .hero {
  background-size: 86.7% 42.5%;
  background-position: center 50px;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 86.7% 42.5%;
    background-position: center 50px;
  }
}


/* Collapse the hero to the frame itself so no empty hero area remains below it. */
body .hero {
  height: 320px;
  min-height: 320px;
  max-height: 320px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
body .hero {
  background-size: 86.7% 100%;
  background-position: center 0;
}
@media (max-width: 760px) {
  body .hero {
    height: 240px;
    min-height: 240px;
    max-height: 240px;
    background-size: 86.7% 100%;
    background-position: center 0;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Increase hero and metallic frame height by 10% from the previous dimensions. */
body .hero {
  height: 352px;
  min-height: 352px;
  max-height: 352px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 264px;
    min-height: 264px;
    max-height: 264px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Increase frame height another 10%, and reduce the Autobots background image by 5%. */
body .hero {
  height: 387.2px;
  min-height: 387.2px;
  max-height: 387.2px;
  background-size: 82.365% 95%;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 290.4px;
    min-height: 290.4px;
    max-height: 290.4px;
    background-size: 82.365% 95%;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Increase the metallic frame's vertical height another 10%. */
body .hero {
  height: 426px;
  min-height: 426px;
  max-height: 426px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 319.44px;
    min-height: 319.44px;
    max-height: 319.44px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Fine-tune the artwork and increase the frame height by 10%. */
body .hero {
  height: 468.6px;
  min-height: 468.6px;
  max-height: 468.6px;
  background-size: 95.0% 95%;
  background-position: center 65px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 351.4px;
    min-height: 351.4px;
    max-height: 351.4px;
    background-size: 95.0% 95%;
    background-position: center 65px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Increase the frame's vertical height by another 10%. */
body .hero {
  height: 515.46px;
  min-height: 515.46px;
  max-height: 515.46px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 386.54px;
    min-height: 386.54px;
    max-height: 386.54px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Reposition the Autobots artwork behind the frame and keep the title fully visible. */
body .hero {
  background-size: 95% 93.1%;
  background-position: calc(50% - 24px) 45px;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 95% 93.1%;
    background-position: calc(50% - 12px) 45px;
  }
}


/* Reduce the Autobots artwork width by 3% and increase frame height by 5%. */
body .hero {
  background-size: 92.15% 93.1%;
  height: 541.23px;
  min-height: 541.23px;
  max-height: 541.23px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 92.15% 93.1%;
    height: 405.87px;
    min-height: 405.87px;
    max-height: 405.87px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Fine-tune artwork width and increase frame height by another 5%. */
body .hero {
  background-size: 91.23% 93.1%;
  height: 568.29px;
  min-height: 568.29px;
  max-height: 568.29px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 91.23% 93.1%;
    height: 426.16px;
    min-height: 426.16px;
    max-height: 426.16px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Increase the frame height by 3% to bring the lower border closer to the artwork edge. */
body .hero {
  height: 585.34px;
  min-height: 585.34px;
  max-height: 585.34px;
}
body .hero-metallic-frame {
  height: 100%;
  top: 0;
  bottom: auto;
}
@media (max-width: 760px) {
  body .hero {
    height: 438.94px;
    min-height: 438.94px;
    max-height: 438.94px;
  }
  body .hero-metallic-frame {
    height: 100%;
    top: 0;
    bottom: auto;
  }
}


/* Reduce the Autobots background image's vertical size by 4%, preserving width and position. */
body .hero {
  background-size: 91.23% 89.376%;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 91.23% 89.376%;
  }
}


/* Reduce the Autobots background image's vertical size by another 2%. */
body .hero {
  background-size: 91.23% 87.58848%;
}
@media (max-width: 760px) {
  body .hero {
    background-size: 91.23% 87.58848%;
  }
}


/* Collection page refinement: remove the introductory title block and let figure images sit directly against the page backdrop. */
.section-heading.archive-count-only {
  justify-content: flex-end;
  margin-bottom: 12px;
  padding: 0;
  border-bottom: 0;
}
.card-image-wrap {
  background: transparent;
  border-bottom: 0;
}


/* Strong override: remove all card and image-container backing panels around archive figures. */
#gallery .card {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
#gallery .card:hover,
#gallery .card.selected {
  background: transparent !important;
  border-color: var(--red-bright) !important;
  box-shadow: 0 0 14px var(--red-glow) !important;
}
#gallery .card-image-wrap {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 10px !important;
}
#gallery .card-image {
  background: transparent !important;
  box-shadow: none !important;
}


/* Make the entire Figure Archive gallery area transparent, not just the image windows. */
.gallery-column,
.gallery,
#gallery,
#gallery .card,
#gallery .card-body,
#gallery .card-image-wrap {
  background: transparent !important;
}
#gallery .card {
  border-color: transparent !important;
  box-shadow: none !important;
}
#gallery .card:hover,
#gallery .card.selected {
  background: transparent !important;
  border-color: var(--red-bright) !important;
  box-shadow: 0 0 14px var(--red-glow) !important;
}


/* Final section-level transparency override: allow the page's Cybertron background to show through the full collection/gallery region. */
#collection-shell,
#collection-shell .collection-layout,
#collection-shell .gallery-column,
#collection-shell .gallery-heading,
#collection-shell .gallery,
#collection-shell #gallery,
#collection-shell #gallery > .card,
#collection-shell #gallery > .card > .card-image-wrap,
#collection-shell #gallery > .card > .card-body {
  background: transparent !important;
  background-color: transparent !important;
}
#collection-shell #gallery > .card {
  border-color: transparent !important;
  box-shadow: none !important;
}
#collection-shell #gallery > .card:hover,
#collection-shell #gallery > .card.selected {
  border-color: var(--red-bright) !important;
  box-shadow: 0 0 14px var(--red-glow) !important;
}


/* Selected figure info window: remove dark backing behind the main image and alternative thumbnails. */
#detailMainImage,
#detailMainImage img {
  background: transparent !important;
  background-color: transparent !important;
}
#detailMainImage {
  background-image: none !important;
  border-color: transparent !important;
}
#detailThumbs button,
#detailThumbs img {
  background: transparent !important;
  background-color: transparent !important;
}
#detailThumbs button {
  border-color: transparent !important;
}
#detailThumbs button.active {
  border-color: var(--red-bright) !important;
}


/* Sort / Filter panel: replace the solid box and grey outline with the supplied panel artwork. */
#collection-shell .controls-panel {
  background: transparent url('images/decorative%20elements/panel-background-02_result.webp') center center / 100% 100% no-repeat !important;
  border: 0 !important;
  box-shadow: none !important;
}
#collection-shell .collection-count {
  display: none !important;
}


/* Sort / Filter panel sizing: double its vertical height and increase its horizontal width by 75%. */
#collection-shell .controls-panel {
  min-height: 2em;
  padding-top: 36px;
  padding-bottom: 40px;
  width: 175%;
  max-width: none;
}
@media (max-width: 760px) {
  #collection-shell .controls-panel {
    width: 100%;
    padding-top: 28px;
    padding-bottom: 30px;
  }
}


/* Extend the Sort / Filter panel artwork edge-to-edge across the viewport. */
#collection-shell .controls-panel {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: max(20px, calc((100vw - 1500px) / 2 + 38px)) !important;
  padding-right: max(20px, calc((100vw - 1500px) / 2 + 38px)) !important;
}
@media (max-width: 760px) {
  #collection-shell .controls-panel {
    width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}


/* Double the Sort / Filter panel's current vertical space while keeping its full-viewport width. */
#collection-shell .controls-panel {
  padding-top: 72px !important;
  padding-bottom: 80px !important;
}
@media (max-width: 760px) {
  #collection-shell .controls-panel {
    padding-top: 56px !important;
    padding-bottom: 60px !important;
  }
}


/* Double the Sort / Filter panel's vertical spacing again. */
#collection-shell .controls-panel {
  padding-top: 144px !important;
  padding-bottom: 160px !important;
}
@media (max-width: 760px) {
  #collection-shell .controls-panel {
    padding-top: 112px !important;
    padding-bottom: 120px !important;
  }
}


/* Align the filter controls with the central horizontal band of the panel artwork, leaving the Sort / Filter title in place. */
#collection-shell .controls-grid {
  transform: translateY(-34px);
}
@media (max-width: 760px) {
  #collection-shell .controls-grid {
    transform: translateY(-18px);
  }
}


/* Hide the Search Figures label while keeping the search field usable. */
#collection-shell .search-control > span {
  display: none !important;
}


/* Reflow controls after removing the Manufacturer filter. */
#collection-shell .controls-grid {
  grid-template-columns: minmax(190px, 1.5fr) repeat(3, minmax(130px, 1fr)) auto;
}


/* Figure archive: framed image tiles with the name overlaid at bottom-left. */
#collection-shell #gallery .card {
  aspect-ratio: 1 / 1;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  overflow: hidden;
  transform: none;
}
#collection-shell #gallery .card:hover,
#collection-shell #gallery .card.selected {
  border: 0 !important;
  box-shadow: 0 0 16px var(--red-glow) !important;
}
#collection-shell #gallery .card-image-wrap {
  position: absolute;
  inset: 0;
  height: 100%;
  padding: 12%;
  background: transparent !important;
  border: 0 !important;
  overflow: hidden;
}
#collection-shell #gallery .card-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
#collection-shell #gallery .card-frame {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}
#collection-shell #gallery .card-name {
  position: absolute;
  z-index: 3;
  left: 12%;
  right: 12%;
  bottom: 10%;
  margin: 0;
  padding: 6px 8px;
  color: #fff;
  background: linear-gradient(90deg, rgba(5,9,14,.9), rgba(5,9,14,.45), transparent);
  font-size: clamp(9px, .9vw, 13px);
  line-height: 1.25;
  text-align: left;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 4px #000;
}
@media (max-width: 760px) {
  #collection-shell #gallery .card-image-wrap { padding: 12%; }
  #collection-shell #gallery .card-name { font-size: 10px; }
}


/* Use the supplied info-window artwork as the selected figure panel background. */
#collection-shell .detail-panel {
  background: url("images/decorative%20elements/info-window_result.webp") center / 100% 100% no-repeat !important;
  border: 0 !important;
  box-shadow: none !important;
}
#collection-shell .detail-navigation {
  display: none !important;
}


/* Frame the main selected-figure image with the supplied portrait artwork. */
#collection-shell #detailMainImage {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}
#collection-shell #detailMainImage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: url("images/decorative%20elements/main-image-frame_result.webp") center / 100% 100% no-repeat;
}
#collection-shell #detailMainImage > img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* Keep all profile content inside the safe inner area of the decorative info-window frame. */
#collection-shell .detail-panel {
  box-sizing: border-box;
  padding: 5.5% 12% 5% !important;
  min-width: 0;
}
#collection-shell .detail-panel .panel-heading {
  min-width: 0;
  margin-top: 0;
}
#collection-shell .detail-panel .panel-heading > div {
  min-width: 0;
}
#collection-shell .detail-panel .detail-image-frame {
  box-sizing: border-box;
  width: 100%;
  height: clamp(220px, 29vw, 350px);
  padding: 0;
  border: 0;
  background: transparent !important;
}
#collection-shell .detail-panel .detail-thumbs {
  position: relative;
  z-index: 4;
  width: 100%;
  box-sizing: border-box;
  gap: 8px;
  margin-top: 10px;
}
#collection-shell .detail-panel .detail-thumbs button {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  background: rgba(5,9,14,.6);
}
#collection-shell .detail-panel .info-section,
#collection-shell .detail-panel .notes-section {
  min-width: 0;
  overflow-wrap: anywhere;
}
#collection-shell .detail-panel .detail-specs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 18px;
}
#collection-shell .detail-panel .spec,
#collection-shell .detail-panel .spec span {
  min-width: 0;
  overflow-wrap: anywhere;
}
#collection-shell .detail-panel .notes-copy {
  overflow-wrap: anywhere;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel {
    padding: 8% 9% 7% !important;
  }
  #collection-shell .detail-panel .detail-image-frame {
    height: clamp(220px, 58vw, 340px);
  }
  #collection-shell .detail-panel .detail-specs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
  }
}
@media (max-width: 520px) {
  #collection-shell .detail-panel {
    padding: 9% 8% 8% !important;
  }
  #collection-shell .detail-panel .detail-image-frame {
    height: clamp(190px, 64vw, 290px);
  }
  #collection-shell .detail-panel .detail-thumbs button {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }
  #collection-shell .detail-panel .detail-specs {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* Widen the collection workspace: four-column figure grid on the left, info window to the right edge. */
#collection-shell {
  width: 100vw !important;
  max-width: none !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
#collection-shell .section-heading,
#collection-shell .collection-layout {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#collection-shell .collection-layout {
  display: grid !important;
  grid-template-columns: minmax(360px, 40%) minmax(0, 60%) !important;
  gap: 0 !important;
  align-items: stretch !important;
}
#collection-shell .gallery-column {
  min-width: 0;
  padding: 0 12px 0 18px;
}
#collection-shell #gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
#collection-shell .detail-panel {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  justify-self: stretch !important;
}
@media (min-width: 761px) {
  #collection-shell .collection-layout {
    grid-template-columns: minmax(360px, 40%) minmax(0, 60%) !important;
  }
}
@media (max-width: 760px) {
  /* Keep the desktop workspace concept; mobile-specific redesign can be handled separately. */
  #collection-shell .collection-layout {
    grid-template-columns: minmax(0, 40%) minmax(0, 60%) !important;
    gap: 0 !important;
  }
  #collection-shell .gallery-column {
    padding: 0 6px;
  }
  #collection-shell #gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  #collection-shell .detail-panel {
    grid-row: auto !important;
    padding-left: 8% !important;
    padding-right: 8% !important;
  }
}


/* Align the main image frame with the profile text and size it to the image rather than the full panel. */
#collection-shell .detail-panel {
  padding-left: calc(12% + 5ch) !important;
  padding-right: 12% !important;
}
#collection-shell .detail-panel .detail-image-frame {
  width: min(100%, 360px) !important;
  margin-left: 0 !important;
  margin-right: auto !important;
  height: clamp(260px, 34vw, 390px) !important;
  flex: 0 0 auto;
}
#collection-shell .detail-panel .detail-image-frame::after {
  background-size: 100% 100% !important;
}
#collection-shell .detail-panel .detail-thumbs,
#collection-shell .detail-panel .info-section,
#collection-shell .detail-panel .notes-section {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel {
    padding-left: calc(8% + 5ch) !important;
    padding-right: 8% !important;
  }
  #collection-shell .detail-panel .detail-image-frame {
    width: min(100%, 300px) !important;
    height: clamp(230px, 58vw, 340px) !important;
  }
}
@media (max-width: 520px) {
  #collection-shell .detail-panel {
    padding-left: calc(8% + 5ch) !important;
    padding-right: 8% !important;
  }
  #collection-shell .detail-panel .detail-image-frame {
    width: min(100%, 240px) !important;
    height: clamp(200px, 64vw, 290px) !important;
  }
}


/* Responsive nine-slice frame: corners remain distinct while rails stretch with each photo's shape. */
#collection-shell .detail-panel .detail-image-frame {
  position: relative !important;
  isolation: isolate;
  display: block !important;
  width: min(100%, 560px) !important;
  height: auto !important;
  aspect-ratio: var(--frame-aspect, .72);
  margin: 0 auto 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  cursor: zoom-in;
}
#collection-shell .detail-panel .detail-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-style: solid;
  border-width: clamp(38px, 6.5vw, 76px) clamp(34px, 5.5vw, 68px);
  border-image-source: url("images/decorative%20elements/main-image-frame_result.webp");
  border-image-slice: 150 150 150 150 fill;
  border-image-width: clamp(38px, 6.5vw, 76px) clamp(34px, 5.5vw, 68px);
  border-image-repeat: stretch;
  background: transparent;
}
#collection-shell .detail-panel .detail-image-frame > img {
  position: absolute !important;
  z-index: 1;
  inset: 8.5% 13% 9% !important;
  width: 74% !important;
  height: 82.5% !important;
  object-fit: contain !important;
  display: block;
  background: transparent !important;
}
#collection-shell .detail-panel .detail-image-frame > .image-placeholder {
  position: absolute;
  z-index: 1;
  inset: 8.5% 13% 9%;
  display: grid;
  place-content: center;
  background: transparent;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-image-frame {
    width: min(100%, 430px) !important;
  }
  #collection-shell .detail-panel .detail-image-frame::after {
    border-width: clamp(32px, 8vw, 58px) clamp(28px, 7vw, 52px);
    border-image-width: clamp(32px, 8vw, 58px) clamp(28px, 7vw, 52px);
  }
}
@media (max-width: 520px) {
  #collection-shell .detail-panel .detail-image-frame {
    width: min(100%, 340px) !important;
  }
  #collection-shell .detail-panel .detail-image-frame::after {
    border-width: 32px 28px;
    border-image-width: 32px 28px;
  }
}


/* Prevent the legacy full-frame overlay from stacking with the responsive border-image frame. */
#collection-shell #detailMainImage::after {
  background: none !important;
  border: 0 !important;
  content: none !important;
}


/* Restore the single responsive frame overlay; disable border-image slicing to avoid a duplicate frame. */
#collection-shell .detail-panel .detail-image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 0 !important;
  border-image: none !important;
  background: url("images/decorative%20elements/main-image-frame_result.webp") center / 100% 100% no-repeat !important;
}
#collection-shell #detailMainImage::after {
  content: "" !important;
}


/* Final override: the ID-level legacy rule was suppressing the frame artwork. */
#collection-shell #detailMainImage::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  pointer-events: none !important;
  border: 0 !important;
  border-image: none !important;
  background-image: url("images/decorative%20elements/main-image-frame_result.webp") !important;
  background-position: center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}


/* Tune vertical frame fit: reduce excess top/bottom space and align the photo to the frame's inner aperture. */
#collection-shell #detailMainImage {
  aspect-ratio: var(--frame-aspect, .72) !important;
}
#collection-shell #detailMainImage::after {
  background-size: 100% 100% !important;
}
#collection-shell #detailMainImage > img {
  inset: 10.5% 13% 10.5% !important;
  width: 74% !important;
  height: 79% !important;
  object-fit: fill !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage > img {
    inset: 10.5% 13% 10.5% !important;
    width: 74% !important;
    height: 79% !important;
  }
}


/* Final small vertical fit adjustment: bring the photo closer to the frame's inner top and bottom rails. */
#collection-shell #detailMainImage > img {
  inset: 8.5% 13% !important;
  width: 74% !important;
  height: 83% !important;
  object-fit: fill !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage > img {
    inset: 8.5% 13% !important;
    width: 74% !important;
    height: 83% !important;
  }
}


/* Preserve photo proportions; adjust the frame opening to the photo instead of stretching the photo. */
#collection-shell #detailMainImage > img {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center !important;
  z-index: 1 !important;
}
/* Use the image's measured aspect ratio for the frame box; overlay artwork stretches around it. */
#collection-shell #detailMainImage {
  overflow: visible !important;
  aspect-ratio: var(--frame-aspect, .72) !important;
  height: auto !important;
}
#collection-shell #detailMainImage::after {
  inset: 0 !important;
  background-size: 100% 100% !important;
}
/* For the current portrait image, tighten the top opening without distorting the photo. */
#collection-shell #detailMainImage > img {
  object-fit: contain !important;
  transform: scale(1.02);
}


/* Keep photo inside the frame's aperture: the frame follows the photo ratio, not vice versa. */
#collection-shell #detailMainImage {
  width: min(100%, 560px) !important;
  height: auto !important;
  aspect-ratio: var(--frame-aspect, .72) !important;
  overflow: hidden !important;
  position: relative !important;
}
#collection-shell #detailMainImage > img {
  position: absolute !important;
  z-index: 1 !important;
  left: 13% !important;
  right: 13% !important;
  top: 8.5% !important;
  bottom: 8.5% !important;
  width: 74% !important;
  height: 83% !important;
  max-width: 74% !important;
  max-height: 83% !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
#collection-shell #detailMainImage::after {
  position: absolute !important;
  inset: 0 !important;
  z-index: 3 !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}


/* Match the frame's inner aperture to the photo ratio. The frame changes shape; the photo never does. */
#collection-shell #detailMainImage {
  width: min(100%, 560px) !important;
  height: auto !important;
  aspect-ratio: var(--frame-aspect, .84) !important;
  overflow: hidden !important;
  position: relative !important;
}
#collection-shell #detailMainImage > img {
  position: absolute !important;
  left: 13% !important;
  top: 8.5% !important;
  width: 74% !important;
  height: 83% !important;
  right: auto !important;
  bottom: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  transform: none !important;
}
#collection-shell #detailMainImage::after {
  content: "" !important;
  inset: 0 !important;
  background-image: url("images/decorative%20elements/main-image-frame_result.webp") !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
}


/* Fine-tune the top aperture edge upward slightly while leaving the lower edge in place. */
#collection-shell #detailMainImage > img {
  top: 7.2% !important;
  height: 84.3% !important;
  object-fit: contain !important;
}


/* Move the photo's top edge upward by three times the previous adjustment; preserve the lower edge. */
#collection-shell #detailMainImage > img {
  top: 4.6% !important;
  height: 86.9% !important;
  object-fit: contain !important;
}


/* Extend the frame's lower opening to meet the photo's bottom edge, keeping the adjusted top edge. */
#collection-shell #detailMainImage > img {
  top: 4.6% !important;
  height: 90.8% !important;
  object-fit: contain !important;
}


/* Reduce the frame's overall height while keeping the photo's natural aspect ratio and current image fit. */
#collection-shell #detailMainImage {
  aspect-ratio: calc(var(--frame-aspect, .84) * 1.10) !important;
}
#collection-shell #detailMainImage::after {
  background-size: 100% 100% !important;
}


/* Keep the info window and its image stage a fixed size across all selected figures. */
#collection-shell .detail-panel {
  align-self: start !important;
  height: auto !important;
  min-height: 0 !important;
}
#collection-shell #detailMainImage {
  width: min(100%, 560px) !important;
  height: 620px !important;
  min-height: 620px !important;
  max-height: 620px !important;
  aspect-ratio: auto !important;
  flex: 0 0 620px !important;
}
#collection-shell #detailMainImage > img {
  object-fit: contain !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    height: 420px !important;
    min-height: 420px !important;
    max-height: 420px !important;
    flex-basis: 420px !important;
  }
}


/* Scale the entire main-image frame stage to 75%, keeping it centered and leaving the info panel dimensions fixed. */
#collection-shell #detailMainImage {
  width: min(75%, 420px) !important;
  height: 465px !important;
  min-height: 465px !important;
  max-height: 465px !important;
  flex: 0 0 465px !important;
  margin-left: 0 !important;
  transform: scale(.75);
  transform-origin: top left;
  margin-bottom: -116px !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    width: min(75%, 315px) !important;
    height: 315px !important;
    min-height: 315px !important;
    max-height: 315px !important;
    flex-basis: 315px !important;
    margin-bottom: -105px !important;
  }
}


/* Correct 75% sizing without CSS transforms: frame and photo share the same resized coordinate box. */
#collection-shell #detailMainImage {
  box-sizing: border-box !important;
  width: min(75%, 420px) !important;
  height: 465px !important;
  min-height: 465px !important;
  max-height: 465px !important;
  flex: 0 0 465px !important;
  aspect-ratio: auto !important;
  transform: none !important;
  transform-origin: initial !important;
  margin: 0 0 0 0 !important;
  position: relative !important;
  overflow: hidden !important;
}
#collection-shell #detailMainImage > img {
  position: absolute !important;
  left: 13% !important;
  top: 4.6% !important;
  width: 74% !important;
  height: 90.8% !important;
  right: auto !important;
  bottom: auto !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center !important;
  transform: none !important;
}
#collection-shell #detailMainImage::after {
  position: absolute !important;
  inset: 0 !important;
  background-size: 100% 100% !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    width: min(75%, 315px) !important;
    height: 315px !important;
    min-height: 315px !important;
    max-height: 315px !important;
    flex-basis: 315px !important;
    margin: 0 !important;
  }
}


/* Tighten the frame's vertical proportions around the image while preserving its width and alignment. */
#collection-shell #detailMainImage {
  height: 365px !important;
  min-height: 365px !important;
  max-height: 365px !important;
  flex-basis: 365px !important;
  aspect-ratio: auto !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    height: 270px !important;
    min-height: 270px !important;
    max-height: 270px !important;
    flex-basis: 270px !important;
  }
}


/* Narrow the frame horizontally so its side rails sit closer to the photo, while retaining the tuned vertical fit. */
#collection-shell #detailMainImage::after {
  background-size: 82% 100% !important;
  background-position: center center !important;
}


/* Ratio-aware frame: its whole artwork scales with the selected photo orientation. */
#collection-shell #detailMainImage {
  width: min(75%, 420px);
  height: 365px;
  min-height: 365px;
  max-height: 365px;
  flex: 0 0 365px;
  overflow: hidden !important;
}
#collection-shell #detailMainImage::after {
  background-size: 100% 100% !important;
  background-position: center center !important;
}
#collection-shell #detailMainImage > img {
  left: 13% !important;
  top: 4.6% !important;
  width: 74% !important;
  height: 90.8% !important;
  object-fit: contain !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    width: min(75%, 315px);
    height: 270px;
    min-height: 270px;
    max-height: 270px;
    flex-basis: 270px;
  }
}


/* Final alignment rule: size the frame using its measured inner-opening proportions.
   The photo stays proportional and fills that opening for portrait, square, and landscape images. */
#collection-shell #detailMainImage {
  aspect-ratio: var(--frame-aspect, .72) !important;
}
#collection-shell #detailMainImage::after {
  background-size: 100% 100% !important;
  background-position: center !important;
}
#collection-shell #detailMainImage > img {
  left: 13% !important;
  top: 4.6% !important;
  width: 74% !important;
  height: 90.8% !important;
  object-fit: contain !important;
  object-position: center !important;
}


/* Override older fixed-size rules: use the dimensions calculated from each photo's aspect ratio. */
#collection-shell #detailMainImage {
  width: var(--frame-width, min(75%, 420px)) !important;
  height: var(--frame-height, 365px) !important;
  min-height: var(--frame-height, 365px) !important;
  max-height: var(--frame-height, 365px) !important;
  flex: 0 0 var(--frame-height, 365px) !important;
  aspect-ratio: auto !important;
  transform: none !important;
  margin: 0 !important;
  overflow: hidden !important;
}
#collection-shell #detailMainImage::after {
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  background-size: 100% 100% !important;
  background-position: center center !important;
}
#collection-shell #detailMainImage > img {
  left: 13% !important;
  top: 4.6% !important;
  width: 74% !important;
  height: 90.8% !important;
  object-fit: contain !important;
  object-position: center center !important;
}
@media (max-width: 760px) {
  #collection-shell #detailMainImage {
    width: var(--frame-width, min(75%, 315px)) !important;
    height: var(--frame-height, 270px) !important;
    min-height: var(--frame-height, 270px) !important;
    max-height: var(--frame-height, 270px) !important;
    flex-basis: var(--frame-height, 270px) !important;
  }
}


/* Keep the info window a fixed, uniform height independent of the selected image/frame.
   Sized to approximately the current four-column gallery plus three additional rows. */
@media (min-width: 761px) {
  #collection-shell .collection-layout {
    align-items: start !important;
  }
  #collection-shell .detail-panel {
    height: 1500px !important;
    min-height: 1500px !important;
    max-height: 1500px !important;
    box-sizing: border-box !important;
    align-self: start !important;
    overflow: hidden !important;
    background-size: 100% 100% !important;
  }
}


/* Selected-unit header: faction light strip under the inner frame, image lowered, nameplate alongside. */
#collection-shell .detail-panel {
  position: relative !important;
  padding-top: 58px !important;
}
#collection-shell .detail-lightstrip {
  position: absolute;
  top: 28px;
  left: 12%;
  right: 12%;
  height: 18px;
  background: url("images/decorative%20elements/lightstrip-purple_result.webp") center / 100% 100% no-repeat;
  pointer-events: none;
  z-index: 4;
}
#collection-shell .detail-hero-row {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(180px, 1fr);
  align-items: center;
  column-gap: 24px;
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  margin-bottom: 18px;
}
#collection-shell .detail-hero-row #detailMainImage {
  justify-self: start !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
#collection-shell .detail-hero-row .panel-heading {
  position: relative;
  z-index: 1;
  display: flex !important;
  align-items: flex-start !important;
  align-self: start;
  gap: 10px;
  min-width: 0;
  padding: 18px 12px !important;
  margin: 0 !important;
  border: 0 !important;
  background: url("images/decorative%20elements/honeycomb-vent-grille_result.webp") center / 100% 100% no-repeat !important;
}
#collection-shell .detail-hero-row .panel-heading > div {
  min-width: 0;
}
#collection-shell .detail-hero-row .panel-heading h2 {
  overflow-wrap: anywhere;
}
#collection-shell .detail-hero-row .panel-heading .eyebrow {
  margin-top: 3px;
}
@media (max-width: 900px) {
  #collection-shell .detail-hero-row {
    grid-template-columns: minmax(0, 1fr) minmax(125px, .7fr);
    column-gap: 12px;
  }
  #collection-shell .detail-hero-row .panel-heading {
    padding: 12px 8px !important;
    gap: 7px;
  }
  #collection-shell .detail-lightstrip {
    left: 8%;
    right: 8%;
  }
}


/* Place the main image and figure title fully below the info window's upper inner border. */
#collection-shell .detail-hero-row {
  margin-top: 112px !important;
  align-items: start !important;
}
#collection-shell .detail-hero-row .panel-heading {
  margin-top: 0 !important;
}


/* Bring the nameplate immediately beside the main image and double its horizontal span. */
#collection-shell .detail-hero-row {
  grid-template-columns: var(--frame-width, minmax(0, 560px)) minmax(360px, 2fr) !important;
  column-gap: 8px !important;
}
#collection-shell .detail-hero-row .panel-heading {
  width: 200% !important;
  box-sizing: border-box !important;
  justify-self: start !important;
  margin-left: 0 !important;
}
@media (max-width: 900px) {
  #collection-shell .detail-hero-row {
    grid-template-columns: minmax(0, 1fr) minmax(250px, 1.4fr) !important;
    column-gap: 8px !important;
  }
  #collection-shell .detail-hero-row .panel-heading {
    width: 200% !important;
  }
}


/* Restore the honeycomb nameplate to its natural column width. */
#collection-shell .detail-hero-row .panel-heading {
  width: 100% !important;
}


/* Shift the honeycomb nameplate left to create a small gap from the main image frame. */
#collection-shell .detail-hero-row .panel-heading {
  transform: translateX(-14px) !important;
}


/* Remove the faction letter badge and the "SELECTED UNIT" eyebrow from the nameplate. */
#collection-shell .detail-hero-row .panel-mark,
#collection-shell .detail-hero-row .panel-heading .eyebrow {
  display: none !important;
}
#collection-shell .detail-hero-row .panel-heading {
  gap: 0 !important;
}


/* Taller honeycomb nameplate and slight rightward text offset. */
#collection-shell .detail-hero-row .panel-heading {
  min-height: 2em !important;
  padding-top: 36px !important;
  padding-bottom: 36px !important;
  box-sizing: border-box !important;
}
#collection-shell .detail-hero-row .panel-heading > div {
  transform: translateX(60px) !important;
}


/* Double the honeycomb nameplate height downward while keeping its top edge aligned with the main image. */
#collection-shell .detail-hero-row .panel-heading {
  height: 200px !important;
  min-height: 200px !important;
  padding-top: 36px !important;
  padding-bottom: 36px !important;
  align-self: start !important;
  background-position: top center !important;
}

/* Wrap figure names at approximately 15 characters per line. */
#collection-shell .detail-hero-row .panel-heading h2 {
  width: 15ch !important;
  max-width: 15ch !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}


/* Ensure the square cybernetic frame is visible over every individual gallery image. */
#collection-shell #gallery .card-image-wrap { position: relative !important; }
#collection-shell #gallery .card-image-wrap .card-image { position: relative; z-index: 1; }
#collection-shell #gallery .card-image-wrap .card-frame {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  z-index: 5 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: none !important;
}


/* Square cybernetic frames around the alternative-image thumbnails in the info window. */
#collection-shell .detail-thumbs {
  align-items: flex-start !important;
  gap: 12px !important;
}
#collection-shell .detail-thumbs button.detail-thumb {
  position: relative !important;
  display: block !important;
  flex: 0 0 76px !important;
  width: 76px !important;
  height: 76px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  overflow: visible !important;
}
#collection-shell .detail-thumb-frame-wrap {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  background: radial-gradient(ellipse at center, #26313c 0, #0a0e13 78%) !important;
}
#collection-shell .detail-thumb-photo {
  position: absolute !important;
  z-index: 1 !important;
  inset: 13% !important;
  width: 74% !important;
  height: 74% !important;
  max-width: 74% !important;
  max-height: 74% !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 0 !important;
  background: transparent !important;
}
#collection-shell .detail-thumb-frame {
  position: absolute !important;
  z-index: 2 !important;
  inset: 0 !important;
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: fill !important;
  pointer-events: none !important;
}
#collection-shell .detail-thumbs button.detail-thumb.active {
  outline: 1px solid var(--red-bright) !important;
  outline-offset: 2px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-thumbs button.detail-thumb {
    flex-basis: 68px !important;
    width: 68px !important;
    height: 68px !important;
  }
}


/* Move the figure name down by two character heights within the honeycomb nameplate. */
#collection-shell .detail-hero-row .panel-heading > div {
  transform: translate(60px, 2em) !important;
}


/* Replace the thin white section rules with the large metallic divider artwork.
   Reserve a fixed divider lane so portrait, square, and landscape photos cannot
   change the vertical position of the content below the image row. */
#collection-shell .detail-panel .info-section,
#collection-shell .detail-panel .notes-section {
  position: relative !important;
  border-top: 0 !important;
  padding-top: 36px !important;
}
#collection-shell .detail-panel .info-section::before,
#collection-shell .detail-panel .notes-section::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  display: block !important;
  height: 24px !important;
  background: url("images/decorative%20elements/divider-bar-large_result.webp") center / 100% 100% no-repeat !important;
  pointer-events: none !important;
}
#collection-shell .detail-panel .detail-hero-row {
  height: 520px !important;
  min-height: 520px !important;
  max-height: 520px !important;
  align-items: start !important;
  overflow: visible !important;
}
#collection-shell .detail-panel #detailMainImage {
  height: 365px !important;
  min-height: 365px !important;
  max-height: 365px !important;
  flex-basis: 365px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-hero-row {
    height: 370px !important;
    min-height: 370px !important;
    max-height: 370px !important;
  }
  #collection-shell .detail-panel #detailMainImage {
    height: 270px !important;
    min-height: 270px !important;
    max-height: 270px !important;
    flex-basis: 270px !important;
  }
  #collection-shell .detail-panel .info-section,
  #collection-shell .detail-panel .notes-section {
    padding-top: 32px !important;
  }
  #collection-shell .detail-panel .info-section::before,
  #collection-shell .detail-panel .notes-section::before {
    height: 20px !important;
  }
}


/* Triple the red lightbar height and reserve its space above the image/name row. */
#collection-shell .detail-lightstrip {
  top: 12px !important;
  height: 54px !important;
}
#collection-shell .detail-panel .detail-hero-row {
  margin-top: 148px !important;
  height: 556px !important;
  min-height: 556px !important;
  max-height: 556px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-lightstrip {
    top: 10px !important;
    height: 42px !important;
  }
  #collection-shell .detail-panel .detail-hero-row {
    margin-top: 126px !important;
    height: 384px !important;
    min-height: 384px !important;
    max-height: 384px !important;
  }
}


/* Lower the red lightbar by four times its current height, triple its height again,
   and keep the image/name row beneath the enlarged lightbar. */
#collection-shell .detail-lightstrip {
  top: 228px !important;
  height: 162px !important;
}
#collection-shell .detail-panel .detail-hero-row {
  margin-top: 400px !important;
  height: 808px !important;
  min-height: 808px !important;
  max-height: 808px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-lightstrip {
    top: 168px !important;
    height: 126px !important;
  }
  #collection-shell .detail-panel .detail-hero-row {
    margin-top: 310px !important;
    height: 568px !important;
    min-height: 568px !important;
    max-height: 568px !important;
  }
}


/* Raise the enlarged lightbar by one full lightbar height. */
#collection-shell .detail-lightstrip {
  top: 66px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-lightstrip {
    top: 42px !important;
  }
}


/* Move the lightbar down by half its current height. */
#collection-shell .detail-lightstrip {
  top: 147px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-lightstrip {
    top: 105px !important;
  }
}


/* Bring the main image and nameplate back up to sit just below the approved lightbar. */
#collection-shell .detail-panel .detail-hero-row {
  margin-top: 174px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-hero-row {
    margin-top: 142px !important;
  }
}


/* Keep each gallery figure name above its decorative frame overlay. */
#collection-shell #gallery .card-image-wrap {
  isolation: isolate !important;
}
#collection-shell #gallery .card-body,
#collection-shell #gallery .card-body h4,
#collection-shell #gallery .card-body .card-meta {
  position: relative !important;
  z-index: 10 !important;
}
#collection-shell #gallery .card-frame {
  pointer-events: none !important;
}


/* Lower the image and nameplate row so its top edge sits directly below the lightbar. */
#collection-shell .detail-panel .detail-hero-row {
  margin-top: 180px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-hero-row {
    margin-top: 148px !important;
  }
}


/* Move the image and nameplate substantially farther below the lightbar. */
#collection-shell .detail-panel .detail-hero-row {
  margin-top: 250px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-hero-row {
    margin-top: 205px !important;
  }
}


/* Place alternate figure images directly beneath the main image frame. */
#collection-shell .detail-panel .detail-thumbs {
  margin-top: 8px !important;
  position: relative !important;
  z-index: 5 !important;
}
#collection-shell .detail-panel .detail-hero-row {
  margin-bottom: 8px !important;
}


/* Final gallery-label and thumbnail layout correction:
   keep each figure name above the square frame overlay, and let the hero row
   end at the actual image/nameplate height so alternate images sit right below it. */
#collection-shell #gallery .card-image-wrap {
  position: relative !important;
  isolation: isolate !important;
}
#collection-shell #gallery .card-image-wrap .card-frame {
  z-index: 2 !important;
  pointer-events: none !important;
}
#collection-shell #gallery .card-image-wrap .card-name {
  position: absolute !important;
  z-index: 10 !important;
  left: 8px !important;
  right: 8px !important;
  bottom: 8px !important;
  display: block !important;
  margin: 0 !important;
  padding: 4px 6px !important;
  color: #fff !important;
  text-align: center !important;
  line-height: 1.2 !important;
  text-shadow: 0 2px 4px #000, 0 0 5px #000 !important;
  background: rgba(3, 6, 10, .82) !important;
  border: 1px solid rgba(255, 190, 120, .7) !important;
  overflow-wrap: anywhere !important;
  pointer-events: none !important;
}
#collection-shell .detail-panel .detail-hero-row {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}
#collection-shell .detail-panel .detail-thumbs {
  display: flex !important;
  margin-top: 8px !important;
  clear: both !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .detail-hero-row {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
}


/* Wrap gallery figure names after roughly 12 characters per line. */
#collection-shell #gallery .card-image-wrap .card-name {
  width: auto !important;
  max-width: 12ch !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}


/* Restore gallery labels to their previous width; apply 12-character wrapping only to the info nameplate. */
#collection-shell #gallery .card-image-wrap .card-name {
  max-width: none !important;
  left: 8px !important;
  right: 8px !important;
  transform: none !important;
}
#collection-shell .detail-hero-row .panel-heading h2 {
  width: 12ch !important;
  max-width: 12ch !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}


/* Hide the numeric section indices while preserving the INFO and COLLECTOR'S NOTES headings. */
#collection-shell .detail-panel .info-section .section-index,
#collection-shell .detail-panel .notes-section .section-index {
  display: none !important;
}


/* Triple the vertical height of the info-window divider bars. */
#collection-shell .detail-panel .info-section::before,
#collection-shell .detail-panel .notes-section::before {
  height: 72px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .info-section::before,
  #collection-shell .detail-panel .notes-section::before {
    height: 60px !important;
  }
}


/* Double the divider bars again from the current height. */
#collection-shell .detail-panel .info-section::before,
#collection-shell .detail-panel .notes-section::before {
  height: 144px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .info-section::before,
  #collection-shell .detail-panel .notes-section::before {
    height: 120px !important;
  }
}


/* Keep section headings and text below the enlarged divider artwork, preserving the original 12px gap. */
#collection-shell .detail-panel .info-section,
#collection-shell .detail-panel .notes-section {
  padding-top: 156px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .info-section,
  #collection-shell .detail-panel .notes-section {
    padding-top: 132px !important;
  }
}


/* Fit the enlarged divider artwork inside the info window and move section content upward. */
#collection-shell .detail-panel .info-section::before,
#collection-shell .detail-panel .notes-section::before {
  left: 5% !important;
  right: auto !important;
  width: 90% !important;
}
#collection-shell .detail-panel .info-section,
#collection-shell .detail-panel .notes-section {
  padding-top: 100px !important;
}
@media (max-width: 760px) {
  #collection-shell .detail-panel .info-section,
  #collection-shell .detail-panel .notes-section {
    padding-top: 85px !important;
  }
}


/* MOBILE-ONLY SORT/FILTER RESET: use a clean, conventional mobile form layout. */
@media (max-width: 620px) {
  #collection-shell .controls-panel {
    position: static !important;
    margin: 0 0 18px !important;
    padding: 16px !important;
    background: #0b121b !important;
    border: 1px solid #344454 !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    outline: none !important;
  }

  #collection-shell .controls-panel::before,
  #collection-shell .controls-panel::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
  }

  #collection-shell .controls-title {
    display: block !important;
    margin: 0 0 14px !important;
    padding: 0 0 10px !important;
    border-bottom: 1px solid #293847 !important;
  }

  #collection-shell .controls-title .status-light {
    display: none !important;
  }

  #collection-shell .controls-title h3 {
    color: #f2f6fa !important;
    font-size: 14px !important;
    letter-spacing: .04em !important;
    font-weight: 700 !important;
  }

  #collection-shell .controls-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 13px !important;
  }

  #collection-shell .control {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #collection-shell .control > span {
    color: #d4dde6 !important;
    font-size: 12px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  #collection-shell .control input,
  #collection-shell .control select {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    padding: 0 12px !important;
    color: #f5f7fa !important;
    background: #111d2a !important;
    border: 1px solid #526477 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font-size: 16px !important;
  }

  #collection-shell .control input:focus,
  #collection-shell .control select:focus {
    border-color: #27cfff !important;
    outline: 2px solid #27cfff33 !important;
    outline-offset: 1px !important;
    box-shadow: none !important;
  }

  #collection-shell .clear-button {
    width: 100% !important;
    min-height: 44px !important;
    height: 44px !important;
    margin-top: 2px !important;
    color: #f5f7fa !important;
    background: #243343 !important;
    border: 1px solid #526477 !important;
    border-radius: 7px !important;
    box-shadow: none !important;
    font-size: 13px !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }
}


/* MOBILE-ONLY AUTOBOTS LAYOUT: selected figure information first, figure gallery below. */
@media (max-width: 620px) {
  #collection-shell .collection-layout {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 20px !important;
  }

  #collection-shell .detail-panel {
    order: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #collection-shell .gallery-column {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  #collection-shell .gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}


/* MOBILE-ONLY HERO BACKGROUND — desktop styling remains unchanged. */
@media (max-width: 620px) {
  body .hero {
    background-image: url("./images/decepticons-hero-mobile-background.webp") !important;
    background-position: center top !important;
    background-size: 100% auto !important;
    background-repeat: no-repeat !important;
  }
}


/* MOBILE-ONLY HERO EXTENSION — taller portrait artwork and frame; desktop stays unchanged. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    height: 720px !important;
    min-height: 720px !important;
    max-height: 720px !important;
    box-sizing: border-box !important;
    background-position: center top !important;
    background-size: 100% 100% !important;
  }

  body .hero-metallic-frame {
    top: 0 !important;
    bottom: 0 !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: fill !important;
  }

  body .hero::after {
    height: 100% !important;
    background-size: 100% 100% !important;
    background-position: center top !important;
  }
}


/* MOBILE-ONLY FINAL FIT: align the metallic hero frame with the portrait artwork edges. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    width: 100% !important;
    height: 720px !important;
    min-height: 720px !important;
    max-height: 720px !important;
    padding: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    background-position: center center !important;
    background-size: 100% 100% !important;
  }

  html body main > section.hero > .hero-metallic-frame,
  body .hero > .hero-metallic-frame {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: fill !important;
    transform: none !important;
  }

  body .hero::after {
    inset: 0 !important;
    height: 100% !important;
    background-size: 100% 100% !important;
    background-position: center center !important;
  }
}


/* MOBILE-ONLY: increase hero frame vertical height by 15%; desktop remains unchanged. */
@media (max-width: 620px) {
  html body main > section.hero > .hero-metallic-frame,
  body .hero > .hero-metallic-frame {
    height: 115% !important;
    max-height: none !important;
    top: -7.5% !important;
    bottom: auto !important;
    inset-block-start: -7.5% !important;
    transform: none !important;
  }
}


/* MOBILE-ONLY: move the portrait hero background and frame below the fixed header. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    margin-top: 64px !important;
  }
}


/* MOBILE-ONLY: reduce frame height by 10% and provide enough hero height to show it fully. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    height: 780px !important;
    min-height: 780px !important;
    max-height: 780px !important;
    overflow: visible !important;
  }

  html body main > section.hero > .hero-metallic-frame,
  body .hero > .hero-metallic-frame {
    height: 103.5% !important;
    top: -1.75% !important;
    bottom: auto !important;
    inset-block-start: -1.75% !important;
    max-height: none !important;
    transform: none !important;
  }
}


/* MOBILE-ONLY: inset hero background image within frame by reducing width 5% and height 10%. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    background-size: 95% 90% !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
  }
}


/* MOBILE-ONLY: scale the hero frame and inset background artwork down by 25%. */
@media (max-width: 620px) {
  html body main > section.hero > .hero-metallic-frame,
  body .hero > .hero-metallic-frame {
    width: 75% !important;
    height: 77.625% !important;
    left: 12.5% !important;
    right: auto !important;
    top: 9.6875% !important;
    bottom: auto !important;
  }

  html body main > section.hero,
  body .hero {
    background-size: 71.25% 67.5% !important;
    background-position: center center !important;
  }
}


/* MOBILE-ONLY: close the gap under the navigation without clipping the scaled frame. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
    background-position: center 0 !important;
  }

  html body main > section.hero > .hero-metallic-frame,
  body .hero > .hero-metallic-frame {
    top: 0 !important;
    height: 77.625% !important;
    transform: none !important;
  }
}


/* MOBILE-ONLY: shift the background artwork down so it begins inside the frame's top edge. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    background-position: center 22px !important;
  }
}


/* MOBILE-ONLY: nudge hero artwork down further so the category title clears the frame. */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    background-position: center 32px !important;
  }
}


/* MOBILE-ONLY: move hero background down another 20px (double the previous 10px nudge). */
@media (max-width: 620px) {
  html body main > section.hero,
  body .hero {
    background-position: center 52px !important;
  }
}


/* MOBILE-ONLY: compact collapsible search/filter directly beneath the hero frame. */
@media (max-width: 620px) {
  #collection-shell .controls-panel {
    margin-top: 0 !important;
    margin-bottom: 14px !important;
  }

  #collection-shell .controls-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 !important;
  }

  #collection-shell .controls-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 72px !important;
    min-height: 36px !important;
    padding: 7px 12px !important;
    border: 1px solid #617384 !important;
    border-radius: 5px !important;
    background: #243444 !important;
    color: #fff !important;
    font: inherit !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
  }

  #collection-shell #filterControls[hidden] {
    display: none !important;
  }

  #collection-shell .controls-panel.controls-collapsed {
    padding-bottom: 12px !important;
  }
}


/* MOBILE-ONLY: make Search / Filter a distinct collapsible bar directly below the hero. */
@media (max-width: 620px) {
  #collection-shell .controls-panel {
    margin-top: 0 !important;
    margin-bottom: 10px !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid #617384 !important;
    border-radius: 7px !important;
    background: #0a121d !important;
    box-shadow: 0 4px 12px #0008 !important;
  }

  #collection-shell .controls-title {
    min-height: 48px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    background: linear-gradient(180deg, #243444, #111d2a) !important;
    cursor: pointer !important;
  }

  #collection-shell .controls-title h3 {
    margin: 0 !important;
    font-size: 12px !important;
    letter-spacing: .12em !important;
  }

  #collection-shell .controls-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 112px !important;
    min-height: 32px !important;
    padding: 6px 10px !important;
    border: 1px solid #71879a !important;
    border-radius: 4px !important;
    background: #30465a !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    letter-spacing: .06em !important;
    cursor: pointer !important;
  }

  #collection-shell #filterControls {
    display: none !important;
    margin: 0 !important;
    padding: 14px !important;
    border-top: 1px solid #405364 !important;
  }

  #collection-shell .controls-panel.controls-expanded #filterControls {
    display: grid !important;
  }

  #collection-shell .controls-panel.controls-collapsed #filterControls {
    display: none !important;
  }
}


/* MOBILE-ONLY: stack every sort/filter option vertically and fit controls to the panel width. */
@media (max-width: 620px) {
  #collection-shell .controls-panel.controls-expanded #filterControls {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    align-items: stretch !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #collection-shell #filterControls > .control,
  #collection-shell #filterControls > .clear-button {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }

  #collection-shell #filterControls input,
  #collection-shell #filterControls select {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  #collection-shell #filterControls > .clear-button {
    min-height: 40px !important;
    justify-content: center !important;
  }
}


/* MOBILE-ONLY: remove stray cyan scanline accents crossing the sort/filter controls. */
@media (max-width: 620px) {
  #collection-shell .controls-panel::before,
  #collection-shell .controls-panel::after,
  #collection-shell .controls-title::before,
  #collection-shell .controls-title::after,
  #collection-shell .controls-title h3::before,
  #collection-shell .controls-title h3::after,
  #collection-shell .controls-toggle::before,
  #collection-shell .controls-toggle::after,
  #collection-shell #filterControls::before,
  #collection-shell #filterControls::after,
  #collection-shell #filterControls input::before,
  #collection-shell #filterControls input::after {
    content: none !important;
    display: none !important;
    background: none !important;
    box-shadow: none !important;
    border: 0 !important;
  }

  #collection-shell .controls-title,
  #collection-shell .controls-title h3,
  #collection-shell .controls-toggle,
  #collection-shell #filterControls input,
  #collection-shell #filterControls select {
    outline: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
  }
}


/* MOBILE-ONLY HARD RESET: suppress inherited faction scanlines inside the sort/filter panel. */
@media (max-width: 620px) {
  #collection-shell .controls-panel,
  #collection-shell .controls-panel * {
    background-image: none !important;
  }

  #collection-shell .controls-panel::before,
  #collection-shell .controls-panel::after,
  #collection-shell .controls-panel *::before,
  #collection-shell .controls-panel *::after {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    border-color: transparent !important;
    outline: 0 !important;
  }

  #collection-shell .controls-title {
    border-top: 0 !important;
    border-bottom: 0 !important;
    background-image: linear-gradient(180deg, #243444, #111d2a) !important;
  }

  #collection-shell .controls-toggle,
  #collection-shell #filterControls input,
  #collection-shell #filterControls select {
    background-image: none !important;
    box-shadow: none !important;
  }
}


/* MOBILE-ONLY FINAL CLEANUP: remove the remaining cyan rule crossing the filter header. */
@media (max-width: 620px) {
  #collection-shell::before,
  #collection-shell::after,
  #collection-shell .collection-area::before,
  #collection-shell .collection-area::after,
  #collection-shell .section-heading::before,
  #collection-shell .section-heading::after,
  #collection-shell .controls-panel,
  #collection-shell .controls-title {
    outline: 0 !important;
    border-top-color: transparent !important;
    border-bottom-color: transparent !important;
  }

  #collection-shell .controls-panel {
    border: 1px solid #617384 !important;
  }

  #collection-shell .controls-title {
    position: relative !important;
    z-index: 2 !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #collection-shell .controls-title::before,
  #collection-shell .controls-title::after,
  #collection-shell .controls-panel::before,
  #collection-shell .controls-panel::after,
  #collection-shell::before,
  #collection-shell::after {
    content: none !important;
    display: none !important;
  }
}


/* MOBILE-ONLY: shift the expanded sort/filter options down by 5px. */
@media (max-width: 620px) {
  #collection-shell #filterControls {
    padding-top: 19px !important;
  }
}


/* MOBILE-ONLY: compact +/- control for expanding and collapsing filters. */
@media (max-width: 620px) {
  #collection-shell .controls-toggle {
    min-width: 36px !important;
    width: 36px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    font-size: 22px !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
  }
}


/* MOBILE-ONLY: remove the outline border around the +/- filter toggle. */
@media (max-width: 620px) {
  #collection-shell .controls-toggle {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  #collection-shell .controls-toggle:focus,
  #collection-shell .controls-toggle:focus-visible,
  #collection-shell .controls-toggle:active {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
  }
}


/* MOBILE-ONLY: make expanded sort/filter float over the page instead of pushing content down. */
@media (max-width: 620px) {
  #collection-shell .controls-panel {
    position: relative !important;
    z-index: 1000 !important;
    overflow: visible !important;
  }

  #collection-shell .controls-panel.controls-expanded {
    z-index: 1000 !important;
  }

  #collection-shell .controls-panel.controls-expanded #filterControls {
    position: absolute !important;
    top: 100% !important;
    left: -1px !important;
    right: -1px !important;
    width: auto !important;
    box-sizing: border-box !important;
    z-index: 1001 !important;
    margin: 0 !important;
    border: 1px solid #617384 !important;
    border-top: 1px solid #405364 !important;
    border-radius: 0 0 7px 7px !important;
    background: #0a121d !important;
    box-shadow: 0 10px 22px #000b !important;
  }
}


/* MOBILE-ONLY: place Sort / Filter after the figure information panel and before the figure gallery. */
@media (max-width: 620px) {
  #collection-shell {
    display: flex !important;
    flex-direction: column !important;
  }

  #collection-shell .collection-layout {
    display: contents !important;
  }

  #collection-shell .detail-panel {
    order: 1 !important;
  }

  #collection-shell > .controls-panel {
    order: 2 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
    margin-bottom: 12px !important;
  }

  #collection-shell .gallery-column {
    order: 3 !important;
    width: 100% !important;
  }
}



/* MOBILE-ONLY: one authoritative Sort / Filter header rule; desktop styles are unchanged. */
@media (max-width: 620px) {
  #collection-shell .controls-panel {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 7px !important;
    overflow: visible !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  #collection-shell .controls-title,
  #collection-shell .controls-panel.controls-expanded .controls-title,
  #collection-shell .controls-panel.controls-collapsed .controls-title {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #617384 !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #243444, #111d2a) !important;
    box-shadow: none !important;
    line-height: 1 !important;
    transform: none !important;
  }
  #collection-shell .controls-title h3 {
    margin: 0 !important;
    line-height: 1 !important;
  }
  #collection-shell .controls-toggle {
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  #collection-shell .controls-panel.controls-expanded #filterControls {
    top: 47px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    border: 1px solid #617384 !important;
    border-top: 0 !important;
    border-radius: 0 0 7px 7px !important;
  }
}


/* MOBILE-ONLY: prevent the page/background from shifting when filters open. */
@media (max-width: 620px) {
  #collection-shell .controls-panel,
  #collection-shell .controls-panel.controls-collapsed,
  #collection-shell .controls-panel.controls-expanded {
    position: relative !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin-bottom: 12px !important;
    padding: 0 !important;
    overflow: visible !important;
    contain: layout style !important;
  }
  #collection-shell .controls-panel.controls-expanded #filterControls {
    position: absolute !important;
    display: grid !important;
    top: 47px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(65vh, 520px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    z-index: 1001 !important;
  }
  #collection-shell .controls-panel.controls-collapsed #filterControls {
    display: none !important;
  }
}


/* MOBILE-ONLY: Autobots red status dot on the Sort / Filter bar. Desktop remains unchanged. */
@media (max-width: 620px) {
  #collection-shell .controls-title {
    position: relative !important;
    padding-left: 32px !important;
  }
  #collection-shell .controls-title::before {
    content: "" !important;
    display: block !important;
    position: absolute !important;
    left: 13px !important;
    top: 50% !important;
    width: 9px !important;
    height: 9px !important;
    min-width: 9px !important;
    border: 1px solid #ff7777 !important;
    border-radius: 50% !important;
    background: #ef3434 !important;
    box-shadow: 0 0 7px #ef3434aa !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
  }
}


/* MOBILE-ONLY: replace the Autobots Sort / Filter header with the shared faction-page design.
   Use the existing status-light element (not a pseudo-element) so the red dot survives legacy resets. */
@media (max-width: 620px) {
  #collection-shell .controls-panel,
  #collection-shell .controls-panel.controls-collapsed,
  #collection-shell .controls-panel.controls-expanded {
    position: relative !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 0 12px !important;
    padding: 0 !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 7px !important;
    background: transparent !important;
    box-shadow: none !important;
    contain: layout style !important;
  }

  #collection-shell .controls-title,
  #collection-shell .controls-panel.controls-collapsed .controls-title,
  #collection-shell .controls-panel.controls-expanded .controls-title {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    margin: 0 !important;
    padding: 0 14px !important;
    border: 1px solid #7a3038 !important;
    border-radius: 7px !important;
    background: linear-gradient(180deg, #35151a, #160d11) !important;
    box-shadow: 0 4px 12px #0008, inset 0 0 0 1px #ef343422 !important;
    line-height: 1 !important;
    transform: none !important;
  }

  #collection-shell .controls-title .status-light {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: static !important;
    flex: 0 0 9px !important;
    width: 9px !important;
    min-width: 9px !important;
    height: 9px !important;
    min-height: 9px !important;
    margin: 0 !important;
    border: 1px solid #ff8589 !important;
    border-radius: 50% !important;
    background: #ef3434 !important;
    box-shadow: 0 0 8px #ef3434, 0 0 14px #ef343466 !important;
  }

  #collection-shell .controls-title h3 {
    display: block !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: 12px !important;
    letter-spacing: .12em !important;
    line-height: 1 !important;
  }

  #collection-shell .controls-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 36px !important;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #fff !important;
    font-size: 22px !important;
    line-height: 1 !important;
  }

  #collection-shell .controls-panel.controls-expanded #filterControls {
    position: absolute !important;
    display: grid !important;
    top: 47px !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: min(65vh, 520px) !important;
    margin: 0 !important;
    padding: 19px 14px 14px !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    box-sizing: border-box !important;
    border: 1px solid #7a3038 !important;
    border-top: 0 !important;
    border-radius: 0 0 7px 7px !important;
    background: #160d11 !important;
    box-shadow: 0 10px 22px #000b !important;
    z-index: 1001 !important;
  }

  #collection-shell .controls-panel.controls-collapsed #filterControls,
  #collection-shell #filterControls[hidden] {
    display: none !important;
  }
}


/* MOBILE-ONLY: force a single page background with the full background shorthand. */
@media (max-width: 620px) {
  html {
    background: #070a0e !important;
    background-image: none !important;
  }
  body {
    background: #070a0e url("./images/Main-page-mobile-background.webp") center top / 100% auto no-repeat scroll !important;
    background-image: url("./images/Main-page-mobile-background.webp") !important;
    background-position: center top !important;
    background-size: 100% auto !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }
}

/* MOBILE-ONLY: narrow the info-window lightstrip by 15% and lower it 5px. */
@media (max-width: 760px) {
  #collection-shell .detail-lightstrip {
    left: 14.3% !important;
    right: 14.3% !important;
    top: 110px !important;
  }
}

/* MOBILE/TABLET: shift the complete main image frame and its contents 10px left.
   Use a wider breakpoint because some mobile browsers report a layout viewport above 760px. */
@media (max-width: 1200px) {
  #collection-shell .detail-panel .detail-hero-row #detailMainImage,
  #collection-shell .detail-panel .detail-hero-row .detail-image-frame {
    position: relative !important;
    left: -10px !important;
    margin-left: -10px !important;
    transform: translateX(-10px) !important;
  }
}


/* MOBILE-ONLY: bridge the visual gap between the hero frame and the info window,
   and extend the info window vertically by 200px. */
@media (max-width: 620px) {
  #collection-shell {
    margin-top: -45px !important;
  }

  #collection-shell .detail-panel {
    padding-bottom: 200px !important;
    box-sizing: border-box !important;
  }
}


/* MOBILE-ONLY: lower the info-window lightstrip 10px and add another 200px of panel height. */
@media (max-width: 620px) {
  #collection-shell .detail-lightstrip {
    top: 120px !important;
  }

  #collection-shell .detail-panel {
    padding-bottom: 400px !important;
    box-sizing: border-box !important;
  }
}


/* MOBILE-ONLY: lower the info lightstrip another 10px and place the nameplate
   in the vertical space between the lightstrip and the main image frame. */
@media (max-width: 620px) {
  #collection-shell .detail-lightstrip {
    top: 130px !important;
  }

  #collection-shell .detail-panel .detail-hero-row {
    position: relative !important;
  }

  #collection-shell .detail-panel .detail-hero-row .panel-heading {
    position: absolute !important;
    top: -108px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    z-index: 20 !important;
    margin: 0 !important;
  }

  #collection-shell .detail-panel .detail-hero-row .detail-image-frame {
    margin-top: 0 !important;
  }
}


/* MOBILE-ONLY: align the nameplate to the image frame's left edge, position it
   below the lightstrip, then move the image frame and all following content down. */
@media (max-width: 620px) {
  #collection-shell .detail-panel .detail-hero-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  #collection-shell .detail-panel .detail-hero-row .panel-heading {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    align-self: flex-start !important;
    margin: 145px 0 18px -10px !important;
    order: -1 !important;
    z-index: 20 !important;
  }

  #collection-shell .detail-panel .detail-hero-row #detailMainImage {
    margin-top: 0 !important;
    align-self: flex-start !important;
  }
}


/* MOBILE-ONLY: move all contents inside the info window down 20px without moving the window itself. */
@media (max-width: 620px) {
  #collection-shell .detail-panel > * {
    translate: 0 20px !important;
  }
}


/* MOBILE-ONLY: cumulative 40px downward shift for all direct contents of the info window. */
@media (max-width: 620px) {
  #collection-shell .detail-panel > * {
    translate: 0 40px !important;
  }
}


/* MOBILE-ONLY: move every info-window element except the lightstrip down 50px
   from the current 40px position, for a cumulative 90px content shift. */
@media (max-width: 620px) {
  #collection-shell .detail-panel > *:not(.detail-lightstrip) {
    translate: 0 90px !important;
  }
}


/* MOBILE-ONLY: center the nameplate and main image frame horizontally in the info window. */
@media (max-width: 620px) {
  #collection-shell .detail-panel .detail-hero-row {
    align-items: center !important;
  }

  #collection-shell .detail-panel .detail-hero-row .panel-heading {
    align-self: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  #collection-shell .detail-panel .detail-hero-row #detailMainImage,
  #collection-shell .detail-panel .detail-hero-row .detail-image-frame {
    align-self: center !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
  }
}


/* MOBILE-ONLY: shift the nameplate, main image frame, and info dividers 10px left. */
@media (max-width: 620px) {
  #collection-shell .detail-panel .detail-hero-row .panel-heading,
  #collection-shell .detail-panel .detail-hero-row #detailMainImage,
  #collection-shell .detail-panel .detail-hero-row .detail-image-frame,
  #collection-shell .detail-panel .info-section h3,
  #collection-shell .detail-panel .notes-section h3 {
    translate: -35px 0 !important;
  }
}


/* MOBILE-ONLY: shift the two horizontal divider bars 35px left to align with the other panel elements. */
@media (max-width: 620px) {
  #collection-shell .detail-panel .info-section::before,
  #collection-shell .detail-panel .notes-section::before {
    translate: -35px 0 !important;
  }
}


/* MOBILE-ONLY: compact four-column figure gallery with proportionally smaller image frames and nameplates. */
@media (max-width: 620px) {
  #collection-shell .gallery-column .gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  #collection-shell .gallery-column .gallery .card {
    min-width: 0 !important;
    border-width: 1px !important;
  }

  #collection-shell .gallery-column .gallery .card-image-wrap {
    height: clamp(76px, 22vw, 112px) !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  #collection-shell .gallery-column .gallery .card-image {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }

  #collection-shell .gallery-column .gallery .card-frame {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
  }

  #collection-shell .gallery-column .gallery .card-name {
    left: 3px !important;
    right: 3px !important;
    bottom: 3px !important;
    padding: 4px 2px !important;
    font-size: clamp(6px, 1.7vw, 9px) !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    overflow-wrap: anywhere !important;
    text-align: center !important;
  }
}


/* MOBILE FIX: override the older two-column #gallery rule and use the full available width for four compact cards. */
@media (max-width: 620px) {
  #collection-shell #gallery {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: 5px !important;
    row-gap: 8px !important;
  }

  #collection-shell #gallery > .card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  #collection-shell #gallery > .card > .card-image-wrap {
    width: 100% !important;
    height: clamp(72px, 20vw, 104px) !important;
    padding: 2% !important;
    inset: 0 !important;
    box-sizing: border-box !important;
  }

  #collection-shell #gallery .card-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
  }

  #collection-shell #gallery .card-frame {
    width: 100% !important;
    height: 100% !important;
    object-fit: fill !important;
  }

  #collection-shell #gallery .card-name {
    left: 3% !important;
    right: 3% !important;
    bottom: 3% !important;
    width: auto !important;
    max-width: 94% !important;
    padding: 3px 1px !important;
    font-size: clamp(5px, 1.55vw, 8px) !important;
    line-height: 1.15 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }
}




/* SORT / FILTER THEME OVERRIDE v2: explicitly theme the panel and every visible control. */
#collection-shell .controls-panel,
#collection-shell .controls-panel.controls-collapsed,
#collection-shell .controls-panel.controls-expanded {
  border: 1px solid #8b35d6 !important;
  background: linear-gradient(140deg, rgba(70,24,100,.24), rgba(7,10,14,.98)) !important;
  box-shadow: 0 0 0 1px rgba(154,44,255,.22), 0 10px 25px #0008, inset 0 0 0 3px rgba(8,12,17,.95) !important;
}
#collection-shell .controls-title,
#collection-shell .controls-title h3 {
  color: #c47cff !important;
}
#collection-shell .controls-title .status-light {
  background: #c47cff !important;
  box-shadow: 0 0 10px #c47cff !important;
}
#collection-shell #filterControls .control > span {
  color: #c47cff !important;
}
#collection-shell #filterControls .control input,
#collection-shell #filterControls .control select {
  color: #f4f6f8 !important;
  border: 1px solid #8b35d6 !important;
  accent-color: #c47cff !important;
}
#collection-shell #filterControls .control input:focus,
#collection-shell #filterControls .control select:focus {
  border-color: #c47cff !important;
  box-shadow: 0 0 0 2px rgba(154,44,255,.22) !important;
}
#collection-shell #filterControls .clear-button {
  color: #c47cff !important;
  background: rgba(70,24,100,.24) !important;
  border: 1px solid #8b35d6 !important;
}
#collection-shell #filterControls .clear-button:hover,
#collection-shell #filterControls .clear-button:focus-visible {
  color: #fff !important;
  border-color: #c47cff !important;
  background: rgba(70,24,100,.24) !important;
  box-shadow: 0 0 12px rgba(154,44,255,.22) !important;
}
#collection-shell .controls-panel .controls-toggle {
  color: #c47cff !important;
  border-color: #8b35d6 !important;
}


/* MOBILE FACTION THEME: override legacy hard-coded Autobots red panel/header styles. */
@media (max-width: 620px) {
  #collection-shell .controls-panel,
  #collection-shell .controls-panel.controls-collapsed,
  #collection-shell .controls-panel.controls-expanded {
    border: 1px solid #8b35d6 !important;
    background: linear-gradient(140deg, #30153b, #130d18) !important;
    box-shadow: 0 0 0 1px rgba(154,44,255,.22), 0 10px 25px #0008, inset 0 0 0 3px rgba(8,12,17,.95) !important;
  }
  #collection-shell .controls-title,
  #collection-shell .controls-panel.controls-collapsed .controls-title,
  #collection-shell .controls-panel.controls-expanded .controls-title {
    border: 1px solid #8b35d6 !important;
    background: linear-gradient(180deg, #30153b, #130d18) !important;
    box-shadow: 0 4px 12px #0008, inset 0 0 0 1px rgba(154,44,255,.22) !important;
  }
  #collection-shell .controls-title .status-light {
    border-color: #c47cff !important;
    background: #c47cff !important;
    box-shadow: 0 0 8px #c47cff, 0 0 14px rgba(154,44,255,.22) !important;
  }
  #collection-shell .controls-title h3 { color: #c47cff !important; }
  #collection-shell .controls-toggle {
    color: #c47cff !important;
    border-color: #8b35d6 !important;
    background: #130d18 !important;
  }
}


/* SORT/FILTER: always expanded on desktop; collapsible behavior is mobile-only. */
@media (min-width: 621px) {
  #collection-shell .controls-toggle {
    display: none !important;
  }
  #collection-shell .controls-grid,
  #collection-shell #filterControls[hidden] {
    display: grid !important;
  }
}


/* DESKTOP SORT/FILTER: match the Autobots main-page design.
   Scoped to desktop widths so the existing mobile faction styling remains untouched. */
@media (min-width: 761px) {
  #collection-shell .controls-panel,
  #collection-shell .controls-panel.controls-collapsed,
  #collection-shell .controls-panel.controls-expanded {
    background: transparent url('images/decorative%20elements/panel-background-02_result.webp') center center / 100% 100% no-repeat !important;
    border: 0 !important;
    box-shadow: none !important;
    padding-top: 144px !important;
    padding-bottom: 160px !important;
  }

  #collection-shell .controls-title,
  #collection-shell .controls-title h3 {
    color: #f1f4f7 !important;
  }

  #collection-shell .controls-title .status-light {
    background: #ff5159 !important;
    box-shadow: 0 0 10px #ff5159 !important;
  }

  #collection-shell #filterControls .control > span {
    color: #b8c3cc !important;
  }

  #collection-shell #filterControls .control input,
  #collection-shell #filterControls .control select {
    color: #f4f6f8 !important;
    background: #070b10 !important;
    border: 1px solid #46525d !important;
    accent-color: #ff5159 !important;
  }

  #collection-shell #filterControls .control input:focus,
  #collection-shell #filterControls .control select:focus {
    border-color: #ff5159 !important;
    box-shadow: 0 0 0 2px #ff515922 !important;
  }

  #collection-shell #filterControls .clear-button {
    color: #fff !important;
    background: #2a1115 !important;
    border: 1px solid #d62832 !important;
  }

  #collection-shell #filterControls .clear-button:hover,
  #collection-shell #filterControls .clear-button:focus-visible {
    background: #4b171e !important;
    border-color: #ff5159 !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  #collection-shell .controls-toggle {
    display: none !important;
  }

  #collection-shell .controls-grid,
  #collection-shell #filterControls[hidden] {
    display: grid !important;
  }
}
