/* Red storefront from the design handoff. Dashboard controls keep their existing styles. */
.shop-announcement {
  display: flex;
  justify-content: center;
  gap: 26px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
}
.shop-announcement span + span::before { content: '/'; margin-right: 26px; color: var(--muted); }
.dashboard-mode .shop-announcement,
.dashboard-mode #storeSearch,
.dashboard-mode .shop-footer,
.dashboard-mode .shop-mobile-actions > :not(#menuToggle) { display: none; }
.shop-mobile-actions { display: none; }
body:not(.dashboard-mode) .reference-header {
  display: grid;
  min-height: auto;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0 22px;
  padding-block: 0;
}
body:not(.dashboard-mode) .reference-header > .logo,
.reference-header #storeSearch,
.reference-header .header-actions { margin-block: 14px; }
.reference-header > .logo { font-size: 34px; }
#storeSearch {
  display: flex;
  align-items: stretch;
  min-width: 0;
  padding: 5px;
  background: var(--panel);
  border: 1px solid var(--line);
}
#storeSearch input { flex: 1; min-width: 0; border: 0; background: transparent; }
#storeSearch button { background: #f5f5f5; border: 0; color: #111; font-weight: 700; padding: 8px 16px; }
body:not(.dashboard-mode) .reference-header nav {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  border-top: 1px solid var(--line);
  padding-block: 12px;
}
body:not(.dashboard-mode) .reference-header nav > button,
.reference-header nav summary {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
}
.reference-header nav > button[aria-pressed="true"],
.reference-header nav > button:hover,
.reference-header nav summary:hover { background: var(--raised); }
.reference-header .header-actions { align-items: center; white-space: nowrap; }
.message-inbox { display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
body:not(.dashboard-mode) .reference-header #inboxButton.message-inbox { min-height: 44px; padding: 8px 13px; background: var(--panel); color: var(--text); font-size: 14px; font-weight: 800; }
.message-inbox:has(.message-reply-count:not([hidden])) { border-color: #a52d3e; }
.message-reply-count, .admin-unread-count {
  min-width: 28px;
  padding: 2px 6px;
  background: #d9172d;
  color: #fff;
  font: 800 14px/1.4 'DM Sans', sans-serif;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
#adminButton .admin-unread-count, [data-admin-tab="chats"] .admin-unread-count { margin-inline-start: 6px; }
.admin-unread-count { display: inline-block; min-width: 20px; font-size: 12px; }
.shop-mobile-actions svg, .message-inbox svg, .shop-perks svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.message-inbox svg { flex: none; }
@media (761px <= width <= 1040px) {
  body:not(.dashboard-mode) .reference-header { grid-template-columns: auto 1fr; }
  .reference-header #storeSearch { grid-row: 2; grid-column: 1 / -1; margin-top: 0; }
  body:not(.dashboard-mode) .reference-header nav { grid-row: 3; }
}

.red-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #dc2128;
  isolation: isolate;
}
.red-hero::before,
.red-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: clamp(22px, 7vw, 134px);
  background: #f5f5f5;
  clip-path: polygon(32% 100%, 100% 0, 100% 100%);
  z-index: -1;
}
.red-hero::after {
  height: clamp(15px, 5.6vw, 108px);
  background: var(--bg);
  clip-path: polygon(43% 100%, 100% 0, 100% 100%);
}
.red-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding-block: 42px 67px;
}
.red-hero-copy { position: relative; z-index: 1; text-align: center; min-width: 0; container-type: inline-size; }
.red-hero-brand {
  font: 800 clamp(36px, 13.7cqi, 76px)/.95 'Barlow Condensed', sans-serif;
  letter-spacing: -.01em;
  text-shadow: 0 6px 22px #1113;
  white-space: nowrap;
}
.red-hero-brand b { color: #0b0b0c; }
.red-hero h1 {
  margin: 38px 0 0;
  font: 800 clamp(17px, 7.8cqi, 46px)/1 'Barlow Condensed', sans-serif;
  text-transform: uppercase;
  white-space: nowrap;
}
.red-hero-tagline { margin: 16px 0 32px; color: #fff; font: 800 clamp(16px, 4.4cqi, 26px)/1.15 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.red-hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 18px; }
.shop-white, .shop-black { min-height: 52px; font-size: 15px; gap: 12px; text-align: center; }
.shop-white { background: #f5f5f5; color: #111; border-color: #f5f5f5; }
.shop-black { background: #0b0b0c; color: #fff; border-color: #0b0b0c; }
.shop-white:hover { background: #fff; }
.shop-black:hover { background: #222226; }
.red-hero-art {
  position: relative;
  isolation: isolate;
  width: 98%;
  aspect-ratio: .78;
  justify-self: center;
}
.red-hero-tile {
  position: absolute;
  border: 0;
  padding: 0;
  background: transparent;
  filter: drop-shadow(0 14px 15px #1c07085a);
}
.red-hero-tile img { display: block; width: 100%; height: auto; }
.red-hero-tile:disabled { opacity: 1; }
img.red-hero-tile { pointer-events: none; }
.tile-laptop { top: 13%; left: 0; width: 98%; transform: rotate(-5deg); }
.tile-mac { top: 49%; left: 2%; width: 79%; transform: rotate(4deg); }
.tile-charger { top: 0; right: 1%; width: 76%; transform: rotate(8deg); }
.tile-memory { top: 39%; left: 4%; width: 76%; transform: rotate(-5deg); }
.red-hero-corner { position: absolute; top: 80%; right: -2%; width: 94%; aspect-ratio: 2.8; pointer-events: none; }
.red-hero-corner img { position: absolute; height: auto; filter: drop-shadow(0 6px 7px #1c070858); }
.corner-monitor { top: 0; left: 29%; width: 44%; clip-path: polygon(0 0, 26% 9%, 55% 14%, 100% 18%, 100% 65%, 41% 74%, 40% 84%, 91% 85%, 92% 88%, 50% 91%, 26% 100%, 25% 96%, 40% 91%, 30% 88%, 31% 75%, 0 80%); }
.corner-headphones { top: 19%; left: 0; width: 26%; transform: rotate(-9deg); }
.corner-phone { top: 26%; left: 21%; width: 17%; transform: rotate(-12deg); }
.corner-console { top: 25%; left: 68%; width: 19%; transform: rotate(7deg); }
.corner-game { top: 40%; right: 0; width: 15%; transform: rotate(12deg); }
.red-hero-stock { position: absolute; top: 77%; right: 0; width: 43%; padding: 4%; background: #0b0b0c; color: #fff; transform: rotate(5deg); box-shadow: 0 12px 30px #1c070858; }
.red-hero-art :focus-visible { z-index: 3; }
.red-hero-stock strong { display: block; font: 800 clamp(24px, 3vw, 39px)/1 'Barlow Condensed', sans-serif; }
.red-hero-stock span { font-size: 11px; font-weight: 700; }
.red-hero-stock span[aria-hidden] { color: #ff4a50; }
.red-hero-mobile-art { display: none; }

.shop-perks { border-block: 1px solid var(--line); }
.shop-perks-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.shop-perks-grid > div { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-inline-end: 1px solid var(--line); }
.shop-perks-grid > div:first-child { border-inline-start: 1px solid var(--line); }
.shop-perks svg { width: 29px; height: 29px; flex: none; padding: 6px; color: var(--accent); background: var(--panel); border: 1px solid var(--line); }
.shop-perks strong { display: block; font-size: 13px; line-height: 1.3; }
.shop-perks p { font-size: 12px; line-height: 1.35; margin: 2px 0 0; }
.shop-section { padding-top: clamp(42px, 5vw, 80px); padding-bottom: 0; }
.shop-section h2 { margin: 8px 0 22px; font: 800 clamp(32px, 4vw, 56px)/1 'Barlow Condensed', sans-serif; text-transform: uppercase; }
#shopping-guide, #condition { padding-top: clamp(24px, 3vw, 44px); }
.shop-explainer { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 8px; }
.shop-buying, .shop-repair { padding: clamp(12px, 2vw, 22px); border: 1px solid var(--line); }
.shop-buying { background: var(--panel); }
.shop-explainer h2, .shop-repair h3 { margin: 0 0 8px; font: 800 clamp(24px, 2.6vw, 34px)/1.05 'Barlow Condensed', sans-serif; text-transform: uppercase; }
.shop-explainer ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; counter-reset: buying-steps; }
.shop-explainer ol li { display: flex; align-items: center; gap: 8px; padding-inline: 10px; counter-increment: buying-steps; font-weight: 700; font-size: 13px; line-height: 1.35; }
.shop-explainer ol li:first-child { padding-inline-start: 0; }
.shop-explainer ol li + li { border-inline-start: 1px solid var(--line); }
.shop-explainer ol li::before { content: '0' counter(buying-steps); display: grid; place-items: center; width: 22px; height: 22px; flex: 0 0 22px; background: #321820; color: #ff7384; font: 800 16px/1 'Barlow Condensed', sans-serif; }
.shop-repair { background: linear-gradient(120deg, #2a151b, var(--panel) 85%); border-color: #59303a; }
.shop-repair ul { display: flex; flex-wrap: wrap; gap: 7px; margin: 0; padding: 0; list-style: none; }
.shop-repair li { padding: 4px 8px; border: 1px solid #59303a; color: #f3dce0; font-size: 12px; font-weight: 600; }
.shop-catalog-top { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 20px; }
.shop-catalog-top h2 { margin-bottom: 6px; }
.shop-catalog-top #itemCount, .shop-catalog-top .demo-inventory { margin: 5px 0 0; }
.shop-catalog-note { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; }
.shop-catalog-note p { margin: 2px 0 0; font-size: 13px; }
.shop-catalog-tools { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 20px; }
.shop-catalog-tools :is(select,button) { min-height: 44px; font-size: 13px; }
#categorySelect { display: none; }
.shop-catalog-tools .tabs .active { background: var(--text); color: var(--bg); border-color: var(--text); }
#catalog .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
#catalog .product-card { display: flex; flex-direction: column; }
#catalog .product-image { width: 82%; height: auto; aspect-ratio: 1.22; flex: none; align-self: center; }
#catalog .product-image img { display: block; object-fit: contain; }
#catalog .product-body { display: flex; flex-direction: column; flex: 1; padding: 15px; }
#catalog .product-body p { min-height: auto; margin: 0 0 9px; }
#catalog .product-bottom { display: block; margin-top: auto; }
#catalog .negotiable { display: inline; }
.shop-product-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; }
.shop-product-actions { display: flex; flex-wrap: wrap; margin-top: 12px; gap: 6px; }
#catalog .shop-product-actions button {
  min-height: 40px;
  font-size: 12px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  color: var(--text);
}
#catalog .shop-product-actions [data-offer] { flex: 1; background: var(--text); color: var(--bg); font-weight: 700; }
.shop-offer, .shop-condition, .shop-last-call { background: var(--panel); border: 1px solid var(--line); padding: clamp(20px, 4vw, 52px); }
.shop-offer { display: grid; grid-template-columns: 1.1fr minmax(0, .9fr); gap: 28px; align-items: center; }
.shop-offer h2 { margin-bottom: 12px; }
.shop-offer-example { width: min(100%, 360px); background: var(--bg); border: 1px solid var(--line); margin-inline: auto; }
.shop-offer-example img { display: block; width: 100%; height: 130px; padding-inline: 9%; object-fit: contain; background: #eceae9; }
.shop-offer-chat { display: flex; flex-direction: column; padding: 14px; gap: 8px; }
.shop-offer-chat strong { font-size: 12px; color: var(--muted); }
.shop-offer-chat p { max-width: 90%; margin: 0; padding: 8px 11px; font-size: 13px; }
.shop-offer-chat .offer-buyer { align-self: end; background: #dc2128; color: #fff; }
.shop-offer-chat .offer-seller { align-self: start; background: var(--raised); color: var(--text); }
.shop-condition { display: grid; grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr)); gap: 8px; padding: clamp(12px, 2vw, 22px); }
.shop-condition h2 { font-size: clamp(24px, 2.6vw, 34px); margin: 0; }
.shop-condition p { margin: 4px 0 0; font-size: 13px; line-height: 1.4; }
.condition-card { border: 1px solid var(--line); padding: 8px 10px; font-size: 13px; }
.condition-like-new { background: #15241b; color: #a6eed0; }
.condition-very-good { background: #162031; color: #a8c6ff; }
.condition-good { background: #281f14; color: #ffcf8d; }
.condition-card p { color: #e8e8e8; }
.product-detail-photo { position: relative; }
.product-detail-photo .main-photo { display: block; }
.product-gallery { min-width: 0; }
.swipe-photos { width: 100%; min-width: 0; }
.swipe-photo-frame { position: relative; aspect-ratio: 4 / 3; background: #f3f4f6; }
.swipe-photo-track {
  display: flex;
  width: 100%;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.swipe-photo-track::-webkit-scrollbar { display: none; }
.swipe-photo-slide { flex: 0 0 100%; min-width: 0; height: 100%; padding: 8px; border: 0; background: transparent; scroll-snap-align: start; }
.swipe-photo-slide img { display: block; width: 100%; height: 100%; object-fit: contain; }
.swipe-photo-slide:focus-visible, .swipe-photo-track:focus-visible { outline-offset: -3px; }
.swipe-photo-frame > :not(.swipe-photo-track) { pointer-events: none; }
.swipe-photo-counter { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; padding: 2px 7px; background: #111d; color: #fff; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.swipe-photo-dots { display: flex; justify-content: center; align-items: center; }
.swipe-photo-dots button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; background: none; }
.swipe-photo-dots button::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #77777e; }
.swipe-photo-dots button[aria-current]::before { background: var(--accent); }
.condition-badge {
  position: absolute;
  inset-inline-end: 8px;
  inset-block-end: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 8px;
  border: 1px solid currentColor;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
  text-transform: uppercase;
}
.shop-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 25px; }
.shop-faq-list { display: grid; gap: 9px; }
.shop-faq-list details { background: var(--panel); border: 1px solid var(--line); padding: 0 16px; }
.shop-faq-list summary { display: flex; white-space: normal; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 0; font-size: 15px; font-weight: 700; }
.shop-faq-list summary::after { content: '+'; color: var(--accent); font-size: 20px; }
.shop-faq-list details[open] summary::after { content: '−'; }
.shop-faq-list p { margin: 0 0 14px; }
.shop-last-call { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; background: #dc2128; border-color: #dc2128; color: #fff; }
.shop-last-call h2 { margin: 0; }
.shop-last-call p { color: #fff; margin: 8px 0 0; }
.shop-footer { margin-top: 52px; border-top: 1px solid var(--line); color: var(--muted); }
.shop-footer-grid { display: flex; flex-wrap: wrap; gap: 24px 40px; padding-block: 36px 28px; }
.shop-footer-grid > div { flex: 1 1 260px; }
.shop-footer nav { display: flex; flex-direction: column; align-items: start; gap: 6px; }
.shop-footer nav button { padding: 0; border: 0; background: none; }
.shop-footer a:hover, .shop-footer nav button:hover { color: var(--accent); }
.shop-copyright { border-top: 1px solid var(--line); padding-block: 13px; font-size: 12px; }

@media (max-width: 1000px) {
  #catalog .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .shop-explainer { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shop-announcement { display: none; }
  body:not(.dashboard-mode) .reference-header { grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px; }
  body:not(.dashboard-mode) .reference-header > .logo { font-size: 23px; }
  .shop-mobile-actions { display: flex; gap: 2px; align-items: center; }
  .shop-mobile-actions button { display: flex; align-items: center; justify-content: center; min-width: 40px; min-height: 44px; background: transparent; padding: 7px; border: 0; }
  .shop-mobile-actions .message-inbox { gap: 4px; padding-inline: 5px; background: var(--panel); border: 1px solid var(--line); }
  .shop-mobile-actions .message-inbox:has(.message-reply-count:not([hidden])) { border-color: #a52d3e; }
  .shop-mobile-actions .message-reply-count { min-width: 18px; padding-inline: 3px; font-size: 12px; }
  #menuToggle { position: relative; }
  #menuToggle .admin-unread-count { position: absolute; top: -2px; inset-inline-end: -3px; padding: 1px 3px; }
  .dashboard-mode .shop-mobile-actions { display: flex; }
  .reference-header #storeSearch { display: none; grid-column: 1 / -1; margin-top: 0; }
  .reference-header.search-open #storeSearch { display: flex; }
  .red-hero-grid { display: block; padding-block: 43px 55px; }
  .red-hero-art { display: none; }
  .red-hero-brand { font-size: clamp(36px, 13vw, 52px); }
  .red-hero h1 { margin: 36px 0 0; }
  .red-hero-tagline { margin: 12px 0 0; }
  .red-hero-mobile-art { position: relative; display: block; width: min(82%, 336px); aspect-ratio: 1.4; margin: 16px auto 28px; }
  .red-hero-mobile-art img { position: absolute; height: auto; filter: drop-shadow(0 12px 12px #1c070860); }
  .mobile-art-mac { left: 13%; top: 24%; width: 74%; z-index: 3; }
  .mobile-art-console { left: 69%; top: 12%; width: 27%; transform: rotate(9deg); }
  .mobile-art-game { right: -4%; top: 39%; width: 27%; z-index: 2; transform: rotate(15deg); border-radius: 5px; }
  .mobile-art-iphone { left: -4%; top: 26%; width: 32%; z-index: 2; transform: rotate(-8deg); }
  .red-hero-actions { max-width: 410px; margin-inline: auto; gap: 16px; }
  .red-hero-actions a { flex: 1 1 100%; }
  .shop-explainer, .shop-explainer ol { grid-template-columns: minmax(0, 1fr); }
  .shop-buying, .shop-repair { padding-block: 8px; }
  .shop-explainer h2, .shop-repair h3 { margin-bottom: 6px; }
  .shop-explainer ol { gap: 4px; }
  .shop-explainer ol li { padding-inline: 0; }
  .shop-explainer ol li + li { border-inline-start: 0; }
  .shop-repair li { padding-block: 2px; }
  .shop-perks-grid { grid-template-columns: 1fr; }
  .shop-perks-grid > div, .shop-perks-grid > div:first-child { padding: 7px 0; border: 0; }
  .shop-perks-grid > div + div { border-top: 1px solid var(--line); }
  .shop-catalog-top { display: block; }
  .shop-catalog-note, .shop-catalog-tools .tabs { display: none; }
  #categorySelect { display: block; }
  .shop-catalog-tools select { flex: 1 1 0; min-width: 0; }
  #catalog .product-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  #catalog .product-image { width: 100%; aspect-ratio: 4 / 3; }
  #catalog .product-image img { padding: 8px; }
  #catalog .product-body { padding: 14px; }
  #catalog .product-body h3 { font-size: 17px; }
  #catalog .shop-product-actions { gap: 4px; }
  #catalog .shop-product-actions button { flex: 1 1 100%; }
  .shop-faq, .shop-condition, .shop-offer { grid-template-columns: minmax(0, 1fr); }
  .condition-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); align-items: baseline; gap: 8px; }
  .condition-card p { margin: 0; }
  .shop-footer { margin-top: 38px; }
}
