:root {
  --bg: #0d0f12;
  --panel: #13161b;
  --panel-2: #191d23;
  --line: #2b3139;
  --line-soft: #22272e;
  --text: #f2f2ee;
  --muted: #939aa4;
  --paper: #e9e6df;
  --ink: #171a1f;
  --accent: #b7c8ff;
  --danger: #ff6e7a;
  --shadow: 0 22px 60px rgba(0,0,0,.32);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
[hidden] { display: none !important; }
.shell { width: min(1240px, calc(100% - 40px)); margin-inline: auto; }

/* HEADER */
.site-header {
  position: relative;
  z-index: 30;
  background: rgba(13,15,18,.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-row {
  min-height: 74px;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  gap: 22px;
  align-items: center;
}
.brand {
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.045em;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.brand-logo {
  width: auto;
  max-width: 116px;
  height: 30px;
  object-fit: contain;
  object-position: left center;
  display: block;
}
.brand-logo[hidden] { display: none !important; }
.brand::after {
  content: ' / 01';
  color: #676f79;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .12em;
  vertical-align: top;
  margin-left: 6px;
}
.header-search {
  height: 42px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #111419;
}
.header-search > span { color: #8d949d; font-size: 18px; }
.header-search input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}
.header-search input::placeholder { color: #666e78; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.utility-btn,
.kako-btn {
  height: 38px;
  border: 1px solid var(--line);
  background: #15181d;
  color: #d9dce1;
  text-decoration: none;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 11px;
}
.utility-btn:hover { border-color: #4a535f; background: #1a1e24; }
.kako-btn {
  border-color: #e8e8e5;
  background: #ededeb;
  color: #121418;
  font-weight: 700;
}
.kako-btn:hover { background: #fff; }
.kako-copy { display: grid; gap: 1px; text-align: left; line-height: 1.05; }
.kako-copy strong { font-size: 10px; letter-spacing: .02em; }
.kako-copy small { color: #5f6570; font-size: 8px; font-weight: 700; letter-spacing: .01em; }
.kako-logo-mark {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}
.kako-logo-header { width: 27px; height: 27px; }
.kako-logo-detail { width: 34px; height: 34px; margin-right: 2px; }
.language-wrap,
.currency-wrap { position: relative; }
.lang-toggle { min-width: 105px; justify-content: space-between; }
.currency-toggle { min-width: 92px; justify-content: space-between; }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 7px);
  width: 184px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #12151a;
  box-shadow: var(--shadow);
}
.lang-menu button {
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  color: #d7dbe0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 12px;
}
.lang-menu button:last-child { border-bottom: 0; }
.lang-menu button:hover,
.lang-menu button.active { color: #fff; background: #1c2127; }
.detail-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

/* CATALOG */
.catalog-shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: calc(100vh - 75px);
}
.catalog-rail {
  padding: 42px 28px 64px 0;
  border-right: 1px solid var(--line);
}
.rail-title { padding-bottom: 28px; }
.rail-kicker,
.rail-label,
.content-index,
.detail-overline {
  color: #737c87;
  font-size: 9px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: .16em;
}
.rail-title h1 {
  margin: 12px 0 10px;
  max-width: 180px;
  font-size: 27px;
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -.04em;
}
.rail-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.rail-block { padding: 23px 0; border-top: 1px solid var(--line); }
.rail-label { margin-bottom: 13px; }
.category-list { display: grid; gap: 3px; }
.category-btn {
  width: 100%;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  color: #9ca3ac;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-size: 12px;
}
.category-btn span:last-child { color: #626b75; font-size: 9px; }
.category-btn:hover { color: #fff; background: #15191e; }
.category-btn.active { color: #111419; background: var(--accent); font-weight: 700; }
.category-btn.active span:last-child { color: #4d5870; }
.rail-controls label { display: grid; gap: 8px; color: #767e88; font-size: 9px; text-transform: uppercase; letter-spacing: .14em; }
.rail-controls select {
  height: 39px;
  width: 100%;
  padding: 0 10px;
  outline: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  color: #d9dce0;
  background: #12151a;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
}
.result-count { margin: 12px 0 0; color: #69717b; font-size: 10px; }

.catalog-content { min-width: 0; padding: 40px 0 72px 34px; }
.content-head {
  min-height: 78px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.content-head h2 { margin: 8px 0 0; font-size: 24px; font-weight: 500; letter-spacing: -.03em; }
.clear-btn {
  padding: 7px 0;
  border: 0;
  border-bottom: 1px solid #5c6570;
  color: #a4abb4;
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.clear-btn:hover { color: #fff; border-bottom-color: #fff; }
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 18px;
}
.product-card { min-width: 0; outline: none; cursor: pointer; }
.product-media {
  position: relative;
  aspect-ratio: .88 / 1;
  overflow: hidden;
  border: 1px solid #303640;
  background: #111419;
  isolation: isolate;
  line-height: 0;
}
.product-media > svg,
.product-media > img {
  width: 100%;
  height: 100%;
  display: block;
}
.product-media > svg {
  object-fit: contain;
  background: #111419;
}
.product-media > img {
  object-fit: cover;
  object-position: center;
  background: #111419;
  transform: scale(1.035);
  transition: transform .25s ease, filter .25s ease;
  will-change: transform;
}
.product-card:hover .product-media > img { transform: scale(1.065); }
.product-badge,
.qc-chip {
  position: absolute;
  z-index: 4;
  top: 9px;
  padding: 5px 7px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  backdrop-filter: blur(8px);
}
.product-badge { left: 9px; color: #171a1f; background: rgba(242,242,238,.9); }
.qc-chip { right: 9px; }
.qc-chip.ready { color: #09140d; background: rgba(166,239,182,.92); }
.qc-chip.pending { color: #4d3b13; background: rgba(247,218,139,.94); }
.product-copy { padding: 12px 1px 0; }
.product-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #7d858f; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.product-copy h3 { margin: 9px 0 11px; color: #f0f0ed; font-size: 14px; line-height: 1.35; font-weight: 500; letter-spacing: -.012em; }
.product-linkline { min-height: 28px; padding-top: 8px; border-top: 1px solid var(--line-soft); color: #686f79; display: flex; justify-content: space-between; gap: 10px; font-size: 10px; }
.product-card:hover .product-copy h3 { color: var(--accent); }
.product-card:focus-visible .product-media { outline: 2px solid var(--accent); outline-offset: 3px; }
.empty-state { padding: 80px 20px; border: 1px dashed #3a414b; color: #969da6; text-align: center; }
.empty-state span { font-size: 9px; letter-spacing: .18em; }
.empty-state h2 { margin: 13px 0 6px; color: #f2f2ee; font-size: 28px; font-weight: 500; }
.empty-state p { margin: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #6f7781; font-size: 10px; }

/* PRODUCT DETAIL */
.detail-page { min-height: 100vh; background: var(--bg); }
.detail-header-row { grid-template-columns: 1fr auto 1fr; }
.detail-header-row .detail-header-tools { justify-self: end; }
.back-btn { justify-self: start; padding: 0; border: 0; color: #9ca3ad; background: transparent; cursor: pointer; font-size: 11px; }
.back-btn:hover { color: #fff; }
.detail-wrap { padding: 38px 0 76px; }
.detail-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
  gap: 28px;
  align-items: start;
}
.detail-image-wrap {
  min-height: 620px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper);
}
.detail-image-wrap > img,
.detail-image-wrap > svg { width: 100%; height: 100%; max-height: 760px; display: block; object-fit: contain; }
.detail-info {
  position: sticky;
  top: 22px;
  padding: 26px;
  border: 1px solid var(--line);
  background: #111419;
}
.breadcrumb { margin-bottom: 28px; color: #626b76; display: flex; align-items: center; gap: 7px; font-size: 9px; }
.breadcrumb button { padding: 0; border: 0; color: #89919a; background: transparent; cursor: pointer; }
.breadcrumb button:hover { color: #fff; }
.detail-overline { margin: 0 0 11px; }
.detail-title { margin: 0; color: #f4f4f0; font-size: clamp(27px, 3vw, 42px); line-height: .98; font-weight: 500; letter-spacing: -.045em; }
.detail-price { margin: 17px 0 26px; color: var(--accent); font-size: 22px; font-weight: 600; }
.detail-actions { display: grid; gap: 8px; }
.primary-buy,
.secondary-buy {
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #ecece8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}
.primary-buy { color: #111419; background: #efefec; font-weight: 700; }
.primary-buy:hover { background: #fff; }
.secondary-buy { color: #c9cdd2; background: transparent; border-color: #3a414a; }
.secondary-buy:hover { border-color: #69727e; background: #171b20; }
.product-facts { margin: 25px 0 0; border-top: 1px solid var(--line); }
.product-facts > div { min-height: 46px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.product-facts dt { color: #727b85; font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.product-facts dd { margin: 0; color: #d9dce0; font-size: 11px; text-align: right; }
.order-help { margin-top: 18px; }
.order-help details { border: 1px solid #313741; background: #15191f; }
.order-help summary { min-height: 45px; padding: 0 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; cursor: pointer; list-style: none; color: #c7ccd2; font-size: 11px; }
.order-help summary::-webkit-details-marker { display: none; }
.order-help details[open] summary { border-bottom: 1px solid #313741; }
.support-content { padding: 10px 15px 16px; color: #8f97a1; font-size: 10px; line-height: 1.7; }
.support-content ol { margin: 0; padding-left: 18px; }
.support-content li + li { margin-top: 7px; }

/* QC — intentionally prominent */
.qc-section { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.qc-heading { min-height: 66px; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.qc-heading h2 { margin: 8px 0 0; font-size: 26px; font-weight: 500; letter-spacing: -.035em; }
.qc-heading > span { color: #767f89; font-size: 10px; }
.qc-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.qc-card { min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); color: var(--text); background: #12151a; cursor: zoom-in; text-align: left; }
.qc-card img { width: 100%; aspect-ratio: 4 / 3; display: block; object-fit: contain; background: #e8e5dd; }
.qc-card > span { min-height: 42px; padding: 0 11px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.qc-card b { font-size: 10px; font-weight: 500; }
.qc-card small { color: #69717b; font-size: 9px; }
.qc-card:hover { border-color: #66707c; }
.qc-empty { margin-top: 20px; min-height: 150px; padding: 24px; border: 1px dashed #39404a; background: #111419; display: flex; flex-direction: column; justify-content: center; gap: 8px; }
.qc-empty strong { font-size: 15px; font-weight: 500; }
.qc-empty span { max-width: 620px; color: #777f89; font-size: 11px; line-height: 1.6; }

.qc-lightbox { position: fixed; z-index: 300; inset: 0; padding: 34px; background: rgba(2,3,4,.94); display: grid; place-items: center; }
.qc-lightbox-content { width: min(1180px, 94vw); height: min(86vh, 920px); display: grid; place-items: center; }
.qc-lightbox-content img { max-width: 100%; max-height: 100%; object-fit: contain; }
.qc-lightbox-close { position: fixed; top: 18px; right: 22px; width: 42px; height: 42px; border: 1px solid #4a515a; color: #fff; background: #15181d; cursor: pointer; font-size: 25px; }
.toast { position: fixed; z-index: 400; left: 50%; bottom: 30px; transform: translateX(-50%); max-width: min(460px, calc(100% - 30px)); padding: 11px 14px; border: 1px solid #444c56; color: #f2f2ef; background: #171b20; box-shadow: var(--shadow); font-size: 11px; text-align: center; }

.admin-corner {
  position: fixed;
  z-index: 80;
  right: 12px;
  bottom: 10px;
  padding: 5px 7px;
  border: 0;
  color: #59616b;
  background: rgba(13,15,18,.72);
  text-decoration: none;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .48;
  backdrop-filter: blur(8px);
}
.admin-corner:hover,
.admin-corner:focus-visible {
  color: #aab1ba;
  opacity: .9;
  outline: 1px solid #39414b;
  outline-offset: 2px;
}

@media (max-width: 1020px) {
  .header-row { grid-template-columns: auto minmax(180px, 1fr); }
  .header-actions { grid-column: 1 / -1; padding-bottom: 13px; justify-content: flex-end; }
  .catalog-shell { grid-template-columns: 190px minmax(0, 1fr); }
  .catalog-rail { padding-right: 20px; }
  .catalog-content { padding-left: 24px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-hero { grid-template-columns: minmax(0, 1fr) 350px; }
  .detail-image-wrap { min-height: 520px; }
}

@media (max-width: 760px) {
  .shell { width: min(100% - 24px, 1240px); }
  .header-row { min-height: auto; padding: 15px 0; grid-template-columns: 1fr auto; gap: 12px; }
  .header-search { grid-column: 1 / -1; grid-row: 2; }
  .header-actions { grid-column: 1 / -1; grid-row: 3; padding-bottom: 0; justify-content: stretch; }
  .header-actions > * { flex: 1; }
  .utility-btn, .kako-btn { width: 100%; }
  .catalog-shell { display: block; }
  .catalog-rail { position: static; padding: 26px 0 18px; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail-title h1 { max-width: none; }
  .category-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
  .rail-controls { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
  .result-count { margin: 0 0 8px; }
  .catalog-content { padding: 26px 0 56px; }
  .detail-header-row { grid-template-columns: 1fr 1fr; }
  .detail-header-row .brand { display: none; }
  .detail-hero { display: flex; flex-direction: column; }
  .detail-image-wrap { min-height: 0; width: 100%; aspect-ratio: 1 / 1.12; }
  .detail-info { position: static; width: 100%; }
  .qc-grid { grid-template-columns: 1fr; }
}

@media (max-width: 500px) {
  .header-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 22px 9px; }
  .product-copy h3 { font-size: 12px; min-height: 32px; }
  .product-meta { display: grid; gap: 4px; }
  .product-meta span:last-child { color: #c5cad0; }
  .product-linkline span:first-child { display: none; }
  .product-media { aspect-ratio: .84 / 1; }
  .content-head h2 { font-size: 20px; }
  .detail-wrap { padding-top: 18px; }
  .detail-info { padding: 20px; }
  .detail-title { font-size: 30px; }
}

/* Cloud loading state */
.catalog-loading {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  color: #7b8490;
  background: #111419;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}


/* Currency selector */
@media (max-width: 860px) {
  .header-actions { gap: 6px; }
  .currency-toggle { min-width: 80px; padding-inline: 9px; }
  .detail-header-tools { gap: 6px; }
}

@media (max-width: 680px) {
  .header-actions #sheetBtn { display: none !important; }
  .header-actions .kako-btn { display: none; }
  .lang-toggle, .currency-toggle { min-width: auto; max-width: 110px; }
  .lang-menu { width: 164px; }
}

/* Shopping-agent selector and multi-agent checkout */
.agent-wrap { position: relative; }
.agent-toggle { min-width: 138px; justify-content: space-between; }
.agent-toggle b { color: #f2f3f4; font-size: 10px; letter-spacing: .02em; }
.agent-menu { width: 260px; padding: 6px; }
.agent-menu-option {
  width: 100%; min-height: 54px; padding: 7px 9px; border: 1px solid transparent;
  background: transparent; color: #d9dde2; display: grid; grid-template-columns: 38px 1fr;
  gap: 9px; align-items: center; text-align: left; cursor: pointer;
}
.agent-menu-option + .agent-menu-option { margin-top: 4px; }
.agent-menu-option:hover, .agent-menu-option.active { border-color: #3f4854; background: #171c22; }
.agent-menu-option img { width: 36px; height: 36px; border-radius: 9px; object-fit: contain; background: #f3f5f7; }
.agent-menu-option span { min-width: 0; display: grid; gap: 3px; }
.agent-menu-option b { font-size: 10px; letter-spacing: .04em; }
.agent-menu-option small { color: #7f8994; font-size: 8px; line-height: 1.3; white-space: normal; }
.agent-signup-btn { max-width: 190px; }
.agent-signup-btn [data-agent-logo] { background: #f3f5f7; }

@keyframes promoFlow { to { background-position: 300% 0; } }
@keyframes promoPulse { 50% { transform: scale(1.35) rotate(12deg); filter: drop-shadow(0 0 6px #ffd166); } }

.agent-buy-stack { display: grid; gap: 8px; }
.agent-buy-stack .primary-buy, .agent-buy-stack .secondary-buy { width: 100%; }
.agent-action-logo { width: 33px; height: 33px; border-radius: 8px; object-fit: contain; background: #f3f5f7; flex: 0 0 auto; }
.agent-action-copy { min-width: 0; flex: 1; display: grid; gap: 2px; text-align: left; }
.agent-action-copy strong { font-size: 11px; }
.agent-action-copy small { color: #6d747d; font-size: 8px; font-weight: 600; }
.agent-alt-buy .agent-action-copy small { color: #818b96; }
.source-buy { margin-top: 2px; }

@media (max-width: 1020px) {
  .agent-signup-btn { max-width: none; }
  .agent-toggle { min-width: 118px; }
}
@media (max-width: 680px) {
  .header-actions .agent-signup-btn { display: none; }
  .agent-toggle { min-width: auto; max-width: 140px; }
  .agent-menu { width: min(260px, calc(100vw - 24px)); }
}

/* V5.2: agent promo is visually attached to the Kakobuy card. */
.agent-signup-card {
  display: inline-grid;
  align-self: stretch;
  min-width: 0;
}
.agent-signup-card .agent-signup-btn {
  max-width: none;
  width: 100%;
}
.agent-card-promo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 24px;
  margin-top: -1px;
  padding: 4px 8px;
  border: 1px solid #5b4b7a;
  background: #111419;
  color: #f5f3ff;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font: inherit;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
}
.agent-card-promo::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -2;
  background: linear-gradient(105deg,#00d4ff,#8b5cf6,#ff4ecd,#ffc857,#00d4ff);
  background-size: 300% 100%;
  animation: promoFlow 5s linear infinite;
  opacity: .72;
}
.agent-card-promo::after {
  content: '';
  position: absolute;
  inset: 1px;
  z-index: -1;
  background: #111419;
}
.agent-card-promo b {
  color: #fff;
  text-shadow: 0 0 10px rgba(139,92,246,.9);
}
.agent-card-promo small {
  margin-left: auto;
  color: #aeb5be;
  font-size: 7px;
}
.agent-card-promo .promo-spark {
  color: #ffd166;
  animation: promoPulse 1.4s ease-in-out infinite;
}
.header-agent-promo {
  width: 100%;
  border-color: #7d5cb6;
}
.agent-buy-card {
  display: grid;
  min-width: 0;
}
.agent-buy-card > .primary-buy,
.agent-buy-card > .secondary-buy {
  width: 100%;
}
.agent-buy-card.has-promo > .primary-buy,
.agent-buy-card.has-promo > .secondary-buy {
  border-bottom-color: #5b4b7a;
}
.agent-buy-card .agent-card-promo {
  width: 100%;
  min-height: 28px;
  padding-inline: 10px;
  font-size: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .agent-card-promo::before,
  .agent-card-promo .promo-spark { animation: none; }
}

@media (max-width: 680px) {
  .agent-signup-card { display: none; }
  .agent-buy-card .agent-card-promo { white-space: normal; }
}


/* V5.3: cleaner desktop header and interaction motion. */
:root {
  --motion-fast: 150ms;
  --motion-mid: 280ms;
  --motion-slow: 460ms;
  --ease-ui: cubic-bezier(.2,.8,.2,1);
  --ease-pop: cubic-bezier(.16,1,.3,1);
}

@media (min-width: 1021px) {
  .header-row {
    grid-template-columns: auto minmax(250px, 1fr) minmax(430px, auto);
    gap: 20px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-areas:
      "nav prefs"
      "spotlight spotlight";
    justify-content: end;
    align-items: center;
    gap: 7px 10px;
    min-width: 0;
  }

  .header-nav-group {
    grid-area: nav;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
  }

  .header-pref-group {
    grid-area: prefs;
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
  }

  .header-agent-spotlight {
    grid-area: spotlight;
    justify-self: end;
    display: flex;
    align-items: stretch;
    width: max-content;
    max-width: 100%;
    margin-left: 0 !important;
    order: initial !important;
  }

  .header-agent-spotlight .agent-signup-btn {
    height: 34px;
    min-width: 178px;
    padding: 0 10px;
  }

  .header-agent-spotlight .header-agent-promo {
    width: auto;
    min-width: 180px;
    min-height: 34px;
    margin-top: 0;
    margin-left: -1px;
    padding-inline: 9px;
  }
}

.header-nav-group,
.header-pref-group {
  min-width: 0;
}

.header-tiktok-btn {
  position: relative;
  overflow: hidden;
}

.header-tiktok-btn::after {
  content: '';
  position: absolute;
  inset: auto 8px 5px;
  height: 1px;
  background: linear-gradient(90deg, transparent, #b7c8ff, transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--motion-mid) var(--ease-ui);
}

.header-tiktok-btn:hover::after { transform: scaleX(1); }
.header-btn-icon { color: #b7c8ff; font-size: 8px; transform: translateY(-.5px); }
.agent-open-arrow { margin-left: 3px; color: #59616b; font-size: 11px; transition: transform var(--motion-mid) var(--ease-pop), color var(--motion-fast) ease; }
.agent-signup-btn:hover .agent-open-arrow { transform: translate(2px,-2px); color: #111419; }

@media (max-width: 1020px) and (min-width: 761px) {
  .header-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "nav prefs"
      "spotlight spotlight";
    gap: 7px 10px;
    padding-bottom: 13px;
    justify-content: stretch;
  }
  .header-nav-group { grid-area: nav; display: flex; gap: 6px; }
  .header-pref-group { grid-area: prefs; display: flex; gap: 6px; justify-content: flex-end; }
  .header-agent-spotlight {
    grid-area: spotlight;
    display: flex;
    justify-self: end;
    margin-left: 0 !important;
    order: initial !important;
  }
  .header-agent-spotlight .header-agent-promo { margin-top: 0; margin-left: -1px; width: auto; }
}

@media (max-width: 760px) {
  .header-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .header-nav-group,
  .header-pref-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
  }
  .header-pref-group { grid-template-columns: 1.35fr .8fr 1fr; }
  .header-actions > * { flex: initial; }
  .header-actions .utility-btn { width: 100%; min-width: 0; }
  .header-agent-spotlight { display: none; }
}

@media (max-width: 500px) {
  .header-nav-group { grid-template-columns: 1fr; }
  .header-sheet-btn { display: none !important; }
  .header-pref-group { grid-template-columns: 1.3fr .8fr 1fr; }
}

/* Consistent interactive feedback. */
.utility-btn,
.kako-btn,
.category-btn,
.clear-btn,
.primary-buy,
.secondary-buy,
.source-buy,
.qc-card,
.product-card,
.agent-card-promo,
.lang-menu button,
.agent-menu-option {
  transition:
    transform var(--motion-fast) var(--ease-ui),
    border-color var(--motion-fast) ease,
    background-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    box-shadow var(--motion-mid) var(--ease-ui),
    opacity var(--motion-fast) ease;
}

.utility-btn:hover,
.kako-btn:hover,
.primary-buy:hover,
.secondary-buy:hover,
.source-buy:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(0,0,0,.18);
}

.utility-btn:active,
.kako-btn:active,
.primary-buy:active,
.secondary-buy:active,
.source-buy:active,
.agent-card-promo:active,
.category-btn:active {
  transform: translateY(0) scale(.975);
  transition-duration: 70ms;
}

.category-btn:hover { transform: translateX(3px); }
.category-btn.active { transform: translateX(5px); box-shadow: -4px 0 0 rgba(183,200,255,.28); }

@keyframes productCardEnter {
  from { opacity: 0; transform: translateY(14px) scale(.985); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes detailMediaEnter {
  from { opacity: 0; transform: translateX(-18px) scale(.985); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes detailInfoEnter {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes softReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.product-card {
  animation: productCardEnter var(--motion-slow) var(--ease-pop) both;
  animation-delay: var(--card-delay, 0ms);
  transform-origin: center center;
}

.product-card:hover { transform: translateY(-5px); }
.product-card:hover .product-media { border-color: #505965; box-shadow: 0 16px 30px rgba(0,0,0,.22); }
.product-card:hover .product-media > img { transform: scale(1.085); filter: brightness(1.035) contrast(1.01); }
.product-card .product-linkline span:last-child { transition: transform var(--motion-mid) var(--ease-pop), color var(--motion-fast) ease; }
.product-card:hover .product-linkline span:last-child { transform: translateX(4px); color: #d9dce1; }

.product-card.is-opening {
  animation: none;
  opacity: .62;
  transform: translateY(-1px) scale(.975);
  filter: saturate(.8);
  pointer-events: none;
}

#detailView:not([hidden]) .detail-image-wrap { animation: detailMediaEnter 520ms var(--ease-pop) both; }
#detailView:not([hidden]) .detail-info { animation: detailInfoEnter 520ms var(--ease-pop) 45ms both; }
#detailView:not([hidden]) .qc-section { animation: softReveal 440ms var(--ease-pop) 110ms both; }

.qc-card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,.2); }
.qc-card:active { transform: translateY(-1px) scale(.985); }

.lang-menu:not([hidden]),
.agent-menu:not([hidden]) {
  animation: softReveal 180ms var(--ease-pop) both;
  transform-origin: top right;
}

/* Small shine for the selected agent card without making the header noisy. */
.header-agent-spotlight .agent-signup-btn {
  position: relative;
  overflow: hidden;
}
.header-agent-spotlight .agent-signup-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 18%, rgba(255,255,255,.55) 47%, transparent 72%);
  transform: translateX(-135%);
  transition: transform 620ms var(--ease-ui);
  pointer-events: none;
}
.header-agent-spotlight .agent-signup-btn:hover::after { transform: translateX(135%); }

@media (prefers-reduced-motion: reduce) {
  .product-card,
  #detailView:not([hidden]) .detail-image-wrap,
  #detailView:not([hidden]) .detail-info,
  #detailView:not([hidden]) .qc-section,
  .lang-menu:not([hidden]),
  .agent-menu:not([hidden]) {
    animation: none !important;
  }
  .utility-btn,
  .kako-btn,
  .category-btn,
  .clear-btn,
  .primary-buy,
  .secondary-buy,
  .source-buy,
  .qc-card,
  .product-card,
  .agent-card-promo,
  .lang-menu button,
  .agent-menu-option,
  .product-media > img {
    transition: none !important;
  }
}

@media (min-width: 761px) {
  .header-pref-group {
    padding: 3px;
    border: 1px solid #232932;
    background: rgba(15,18,22,.74);
  }
  .header-pref-group .utility-btn {
    height: 32px;
    border-color: transparent;
    background: transparent;
  }
  .header-pref-group .utility-btn:hover {
    border-color: #343c47;
    background: #181c22;
  }
  .header-nav-group .utility-btn {
    height: 38px;
    background: #111419;
  }
}


/* V5.3.1: right-aligned dark agent stack. */
.header-agent-stack {
  min-width: 0;
}

.header-agent-stack .agent-signup-btn {
  border-color: #303842;
  background: #15191f;
  color: #f0f2f5;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.header-agent-stack .agent-signup-btn:hover {
  border-color: #4d5866;
  background: #1b2027;
  color: #fff;
}
.header-agent-stack .agent-signup-btn [data-agent-logo] {
  background: #f0f2f4;
}
.header-agent-stack .agent-signup-btn .kako-copy small { color: #7f8995; }
.header-agent-stack .agent-signup-btn .agent-open-arrow { color: #87919d; }
.header-agent-stack .agent-signup-btn:hover .agent-open-arrow { color: #dfe4ea; }
.header-agent-stack .agent-signup-btn::after { opacity: .18; }

.header-agent-stack .header-agent-promo {
  border-color: #4a3f64;
  background: #12161b;
}
.header-agent-stack .header-agent-promo::after { background: #12161b; }

.header-agent-picker { position: relative; }
.header-agent-picker .agent-toggle {
  width: 100%;
  min-width: 0;
  height: 34px;
  justify-content: space-between;
  border-color: #2c333d;
  background: #101419;
  color: #b9c0c8;
}
.header-agent-picker .agent-toggle:hover {
  border-color: #46515e;
  background: #171c22;
  color: #fff;
}
.header-agent-picker .agent-menu {
  right: 0;
  left: auto;
  width: 100%;
  min-width: 220px;
}

@media (min-width: 1021px) {
  .header-row {
    grid-template-columns: auto minmax(250px, 1fr) auto;
    gap: 18px;
  }
  .header-actions.header-actions-v531 {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
    width: auto;
    min-width: 0;
  }
  .header-actions-v531 .header-nav-group,
  .header-actions-v531 .header-pref-group {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .header-actions-v531 .header-pref-group .utility-btn,
  .header-actions-v531 .header-nav-group .utility-btn {
    height: 38px;
    border: 1px solid var(--line);
    background: #111419;
  }
  .header-actions-v531 .header-pref-group .utility-btn:hover,
  .header-actions-v531 .header-nav-group .utility-btn:hover {
    border-color: #4a535f;
    background: #1a1e24;
  }
  .header-agent-stack {
    width: 224px;
    margin-left: 10px;
    display: grid;
    gap: 5px;
    align-self: flex-start;
  }
  .header-agent-stack .header-agent-spotlight {
    display: grid;
    width: 100%;
    max-width: none;
    margin: 0 !important;
  }
  .header-agent-stack .agent-signup-btn {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 42px;
    padding: 0 10px;
    justify-content: flex-start;
  }
  .header-agent-stack .header-agent-promo {
    width: 100%;
    min-width: 0;
    min-height: 25px;
    margin: -1px 0 0;
  }
  .header-agent-stack .header-agent-promo small { margin-left: auto; }
}

@media (max-width: 1020px) and (min-width: 681px) {
  .header-actions.header-actions-v531 {
    display: grid;
    grid-template-columns: auto 1fr 220px;
    align-items: start;
    gap: 8px;
    width: 100%;
    padding-bottom: 13px;
  }
  .header-actions-v531 .header-nav-group { display: flex; gap: 6px; }
  .header-actions-v531 .header-pref-group {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .header-agent-stack {
    width: 220px;
    display: grid;
    gap: 5px;
    justify-self: end;
  }
  .header-agent-stack .header-agent-spotlight { display: grid; width: 100%; }
  .header-agent-stack .agent-signup-btn { width: 100%; max-width: none; }
  .header-agent-stack .header-agent-promo { width: 100%; margin: -1px 0 0; }
}

@media (max-width: 680px) {
  .header-actions.header-actions-v531 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .header-actions-v531 .header-nav-group,
  .header-actions-v531 .header-pref-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .header-agent-stack {
    width: 100%;
    display: block;
  }
  .header-agent-stack .agent-signup-card { display: none; }
  .header-agent-picker .agent-toggle { height: 38px; }
}

/* V5.4: stable two-row header with a dedicated shopping-agent dock. */
.site-header-v54 {
  overflow: visible;
}

.header-v54-shell {
  display: grid;
  gap: 0;
}

.header-v54-main {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.header-search-v54 {
  min-width: 0;
}

.header-v54-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  min-width: 0;
}

.header-v54-tools .utility-btn {
  height: 36px;
  background: #111419;
  border-color: #29313a;
}

.header-v54-tools .utility-btn:hover {
  background: #171c22;
  border-color: #46515e;
}

.header-v54-agentbar {
  min-height: 48px;
  padding: 8px 0 10px;
  border-top: 1px solid #20262d;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
  min-width: 0;
}

.header-v54-agentlabel {
  min-width: 150px;
  padding: 0 14px 0 0;
  display: grid;
  align-content: center;
  gap: 3px;
  text-align: right;
}

.header-v54-agentlabel span {
  color: #d6dbe1;
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .15em;
}

.header-v54-agentlabel small {
  color: #69737e;
  font-size: 8px;
  line-height: 1.15;
}

.header-v54-agentpicker {
  position: relative;
  flex: 0 0 142px;
  min-width: 0;
}

.header-v54-agentpicker .agent-toggle {
  width: 100%;
  height: 100%;
  min-width: 0;
  justify-content: space-between;
  border-color: #303943;
  border-right: 0;
  background: #101419;
  color: #eef1f4;
  font-weight: 750;
  letter-spacing: .015em;
}

.header-v54-agentpicker .agent-toggle:hover {
  background: #171d23;
  border-color: #4a5664;
}

.header-v54-agentpicker .agent-menu {
  left: 0;
  right: auto;
  top: calc(100% + 7px);
  width: 260px;
  z-index: 80;
}

.header-v54-agentcard {
  display: flex;
  align-items: stretch;
  min-width: 0;
  height: 38px;
}

.header-v54-agentcard .agent-signup-btn {
  width: 218px;
  max-width: none;
  height: 38px;
  padding: 0 10px;
  justify-content: flex-start;
  border-color: #303943;
  background: #151a20;
  color: #f0f3f6;
  box-shadow: none;
}

.header-v54-agentcard .agent-signup-btn:hover {
  border-color: #4b5866;
  background: #1a2027;
  color: #fff;
}

.header-v54-agentcard .agent-signup-btn [data-agent-logo] {
  width: 27px;
  height: 27px;
  padding: 0;
  background: transparent;
  border-radius: 6px;
}

.header-v54-agentcard .kako-copy {
  flex: 1;
}

.header-v54-agentcard .kako-copy strong {
  color: #f5f6f7;
}

.header-v54-agentcard .kako-copy small {
  color: #7f8995;
}

.header-v54-agentcard .agent-open-arrow {
  color: #8c96a2;
  margin-left: auto;
}

.header-v54-agentcard .agent-signup-btn:hover .agent-open-arrow {
  color: #fff;
}

.header-v54-agentcard .header-agent-promo {
  width: 205px;
  min-width: 205px;
  min-height: 38px;
  height: 38px;
  margin: 0 0 0 -1px;
  padding: 0 9px;
  border-color: #51476b;
  background: #11151a;
  font-size: 7px;
}

.header-v54-agentcard .header-agent-promo::after {
  background: #11151a;
}

.header-v54-agentcard .header-agent-promo small {
  margin-left: auto;
}

.header-v54-agentcard .agent-signup-btn::after {
  opacity: .12;
}

.header-v54-main-videos {
  grid-template-columns: auto 1fr auto;
}

.header-v54-tools-videos {
  justify-self: end;
}

@media (max-width: 1120px) {
  .header-v54-main {
    grid-template-columns: auto minmax(220px, 1fr) auto;
    gap: 12px;
  }
  .header-v54-tools {
    gap: 5px;
  }
  .header-v54-tools .header-sheet-btn {
    display: none !important;
  }
  .header-v54-agentlabel {
    display: none;
  }
}

@media (max-width: 860px) {
  .header-v54-main {
    padding: 12px 0 10px;
    min-height: 0;
    grid-template-columns: auto 1fr;
    gap: 10px 12px;
  }
  .header-search-v54 {
    grid-column: 1 / -1;
    grid-row: 2;
    height: 40px;
  }
  .header-v54-tools {
    grid-column: 2;
    grid-row: 1;
  }
  .header-v54-agentbar {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 7px;
    align-items: stretch;
    padding: 8px 0 11px;
  }
  .header-v54-agentpicker {
    flex: initial;
  }
  .header-v54-agentpicker .agent-toggle {
    border-right: 1px solid #303943;
  }
  .header-v54-agentcard {
    width: 100%;
  }
  .header-v54-agentcard .agent-signup-btn {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
  .header-v54-agentcard .header-agent-promo {
    flex: 0 0 190px;
    width: 190px;
    min-width: 190px;
  }
  .header-v54-main-videos {
    grid-template-columns: auto 1fr auto;
  }
  .header-v54-main-videos .videos-header-title {
    display: grid;
  }
  .header-v54-main-videos .header-v54-tools-videos {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 620px) {
  .header-v54-main {
    grid-template-columns: 1fr auto;
  }
  .header-v54-tools .currency-wrap,
  .header-v54-tools .language-wrap {
    display: none;
  }
  .header-v54-tools .header-tiktok-btn {
    min-width: 108px;
  }
  .header-v54-agentbar {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .header-v54-agentpicker .agent-toggle {
    height: 36px;
  }
  .header-v54-agentcard {
    display: flex !important;
    height: auto;
    width: 100%;
  }
  .header-v54-agentcard .agent-signup-btn {
    min-width: 0;
    width: 52%;
    height: 40px;
    display: flex !important;
  }
  .header-v54-agentcard .header-agent-promo {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    height: 40px;
    font-size: 6.5px;
  }
  .header-v54-agentcard .header-agent-promo span:nth-child(2) {
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .header-v54-agentcard .header-agent-promo small {
    display: none;
  }
  .header-v54-main-videos {
    grid-template-columns: 1fr auto;
  }
  .header-v54-main-videos .videos-header-title {
    display: none;
  }
  .header-v54-main-videos .header-v54-tools-videos {
    grid-column: 2;
  }
}

@media (max-width: 420px) {
  .header-v54-tools .header-tiktok-btn {
    padding-inline: 9px;
  }
  .header-v54-agentcard .kako-copy small {
    display: none;
  }
  .header-v54-agentcard .header-agent-promo {
    font-size: 6px;
  }
}

/* V5.4.1: merge the shopping-agent controls into one continuous dock. */
@media (min-width: 861px) {
  .header-v54-agentbar {
    width: max-content;
    max-width: 100%;
    min-height: 44px;
    margin-left: auto;
    padding: 0;
    border: 1px solid #2d353e;
    background: #101419;
    align-items: stretch;
    overflow: visible;
  }

  .header-v54-agentlabel {
    min-width: 152px;
    padding: 0 14px;
    text-align: left;
    background: transparent;
  }

  .header-v54-agentpicker {
    flex-basis: 142px;
  }

  .header-v54-agentpicker .agent-toggle {
    height: 44px;
    border: 0;
    border-left: 1px solid #2d353e;
    border-radius: 0;
    background: transparent;
  }

  .header-v54-agentpicker .agent-toggle:hover {
    border-color: #2d353e;
    background: #171c22;
  }

  .header-v54-agentcard {
    height: 44px;
  }

  .header-v54-agentcard .agent-signup-btn {
    height: 44px;
    border: 0;
    border-left: 1px solid #2d353e;
    border-radius: 0;
    background: transparent;
  }

  .header-v54-agentcard .agent-signup-btn:hover {
    border-color: #2d353e;
    background: #171c22;
  }

  .header-v54-agentcard .header-agent-promo {
    height: 44px;
    min-height: 44px;
    margin: 0;
    border: 0;
    border-left: 1px solid #51476b;
    border-radius: 0;
    background: #11151a;
  }
}

@media (max-width: 860px) {
  .header-v54-agentbar {
    border: 1px solid #2d353e;
    background: #101419;
    padding: 0;
    gap: 0;
  }

  .header-v54-agentpicker .agent-toggle,
  .header-v54-agentcard .agent-signup-btn,
  .header-v54-agentcard .header-agent-promo {
    border-radius: 0;
  }
}

/* V5.4.2: one unified shopping-agent block. */
@media (min-width: 861px) {
  .header-v54-agentbar {
    width: max-content;
    max-width: 100%;
    min-height: 48px;
    margin-left: auto;
    padding: 4px;
    gap: 0;
    align-items: stretch;
    border: 1px solid #2a323b;
    border-radius: 8px;
    background: linear-gradient(180deg, #151a20 0%, #101419 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 8px 24px rgba(0,0,0,.16);
    overflow: visible;
  }

  .header-v54-agentlabel {
    min-width: 148px;
    padding: 0 14px 0 10px;
    text-align: left;
    background: transparent;
    border: 0;
  }

  .header-v54-agentpicker {
    flex: 0 0 138px;
    display: flex;
    align-items: stretch;
  }

  .header-v54-agentpicker .agent-toggle {
    height: 40px;
    padding-inline: 12px;
    border: 0 !important;
    border-radius: 6px 0 0 6px;
    background: rgba(255,255,255,.025);
    box-shadow: inset 1px 0 0 rgba(255,255,255,.045);
  }

  .header-v54-agentpicker .agent-toggle:hover {
    border: 0 !important;
    background: rgba(255,255,255,.055);
  }

  .header-v54-agentcard {
    height: 40px;
    display: flex;
    align-items: stretch;
    background: rgba(255,255,255,.018);
    border-radius: 0 6px 6px 0;
    overflow: hidden;
  }

  .header-v54-agentcard .agent-signup-btn {
    width: 216px;
    height: 40px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: inset 1px 0 0 rgba(255,255,255,.045);
  }

  .header-v54-agentcard .agent-signup-btn:hover {
    border: 0 !important;
    background: rgba(255,255,255,.045) !important;
  }

  .header-v54-agentcard .header-agent-promo {
    width: 202px;
    min-width: 202px;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0 10px;
    border: 0 !important;
    border-radius: 0;
    background: transparent !important;
    box-shadow: inset 1px 0 0 rgba(255,255,255,.055);
  }

  .header-v54-agentcard .header-agent-promo::before,
  .header-v54-agentcard .header-agent-promo::after {
    display: none !important;
    content: none !important;
  }

  .header-v54-agentcard .header-agent-promo:hover {
    background: rgba(255,255,255,.04) !important;
  }

  .header-v54-agentcard .header-agent-promo b {
    background: linear-gradient(90deg,#ffd166,#ff8ee7,#8bd8ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: none;
  }

  .header-v54-agentcard .header-agent-promo small {
    margin-left: auto;
    color: #9aa4af;
  }
}

@media (max-width: 860px) {
  .header-v54-agentbar {
    border-radius: 8px;
    background: linear-gradient(180deg,#151a20 0%,#101419 100%);
    overflow: hidden;
  }

  .header-v54-agentcard .header-agent-promo::before,
  .header-v54-agentcard .header-agent-promo::after {
    display: none !important;
    content: none !important;
  }
}

/* V5.4.3: homepage agent dock shows only the selected agent; promo remains on product actions. */
@media (max-width: 620px) {
  .site-header-v54 .header-v54-agentcard .agent-signup-btn {
    width: 100%;
    flex: 1 1 100%;
  }
}
