/* R&M Best Deals design system — navy, white, restrained gold. Brand colors are overridden
   from admin settings via --brand / --accent on :root (see base.html). */
:root {
  --brand: #0B2545; --brand-2: #13315C; --brand-3: #1E4775; --accent: #B8913A; --accent-soft: #F3EBDA;
  --ink: #1B2430; --muted: #5B6575; --line: #E3E6EB; --bg: #FFFFFF; --bg-2: #F6F7F9; --paper: #F4F1EA;
  --ok: #1F7A4D; --ok-bg: #E7F4ED; --warn: #8A5A00; --warn-bg: #FFF4DB; --bad: #A12A2A; --bad-bg: #FBE9E9;
  --radius: 10px; --shadow: 0 1px 2px rgba(11,37,69,.06), 0 6px 20px rgba(11,37,69,.06);
  --font: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--brand-3); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; color: var(--brand); margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); } h2 { font-size: 1.45rem; } h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: #fff; padding: 8px 12px; z-index: 99; }
.skip:focus { left: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }

/* Demo strip */
.demo-strip { background: var(--accent-soft); color: #5a4416; font-size: .85rem; text-align: center; padding: 6px 12px;
  border-bottom: 1px solid #e6d7b5; }

/* Header */
.topbar { background: var(--brand); color: #cdd6e4; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 16px; padding-block: 6px; flex-wrap: wrap; }
.topbar a { color: #fff; }
.topbar nav { display: flex; gap: 18px; flex-wrap: wrap; }
.masthead { border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 20; }
.masthead .wrap { display: flex; align-items: center; gap: 24px; padding-block: 14px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.01em; white-space: nowrap; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 40px; height: 40px; border-radius: 9px; background: var(--brand); color: #fff; display: grid;
  place-items: center; font-size: .95rem; position: relative; }
.logo-mark::after { content: ""; position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px;
  border-radius: 3px; background: var(--accent); }
.logo small { display: block; font-size: .7rem; font-weight: 600; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.search { flex: 1; display: flex; max-width: 640px; }
.search input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius);
  padding: 10px 14px; font: inherit; }
.search input:focus { border-color: var(--brand-3); outline: none; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 18px; border-radius: 0 var(--radius) var(--radius) 0;
  font: inherit; font-weight: 600; cursor: pointer; }
.head-actions { display: flex; gap: 6px; align-items: center; }
.head-actions a, .head-actions button { display: flex; flex-direction: column; align-items: center; font-size: .78rem; color: var(--brand);
  padding: 4px 8px; border-radius: 8px; background: none; border: 0; font-family: inherit; cursor: pointer; position: relative; }
.head-actions a:hover { background: var(--bg-2); text-decoration: none; }
.head-actions svg { width: 22px; height: 22px; }
.badge-count { position: absolute; top: -2px; right: 4px; background: var(--accent); color: #fff; border-radius: 99px;
  font-size: .7rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
.catnav { background: #fff; border-bottom: 1px solid var(--line); }
.catnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: thin; }
.catnav a { display: block; padding: 11px 13px; color: var(--ink); font-weight: 600; font-size: .93rem; white-space: nowrap;
  border-bottom: 2px solid transparent; }
.catnav a:hover, .catnav a[aria-current] { color: var(--brand); border-bottom-color: var(--accent); text-decoration: none; }
.menu-toggle { display: none; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid var(--brand); background: var(--brand);
  color: #fff; padding: 10px 18px; border-radius: var(--radius); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none;
  line-height: 1.2; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn.gold { background: var(--accent); border-color: var(--accent); color: #1d1608; }
.btn.gold:hover { filter: brightness(.95); }
.btn.ghost { background: #fff; color: var(--brand); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.sm { padding: 6px 12px; font-size: .88rem; }
.btn.danger { background: #fff; color: var(--bad); border-color: #e2b4b4; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-3); font: inherit; cursor: pointer; }
.linkbtn:hover { text-decoration: underline; }
label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 4px; color: var(--brand); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel],
input[type=url], input[type=date], select, textarea { width: 100%; border: 1.5px solid var(--line); border-radius: 8px; padding: 9px 12px;
  font: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-3); outline: none; box-shadow: 0 0 0 3px rgba(30,71,117,.12); }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 14px; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.check input { margin-top: 4px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.inline-form { display: inline; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }

/* Flash & notices */
.flashes { margin: 16px auto 0; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; border: 1px solid; }
.flash.ok { background: var(--ok-bg); border-color: #b8dfc9; color: var(--ok); }
.flash.warn { background: var(--warn-bg); border-color: #f0d79a; color: var(--warn); }
.notice { background: var(--bg-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 12px 14px;
  border-radius: 8px; font-size: .92rem; }
.pill { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--bg-2);
  color: var(--muted); border: 1px solid var(--line); text-transform: capitalize; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: #b8dfc9; }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0d79a; }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: #ecc0c0; }
.pill.gold { background: var(--accent-soft); color: #6b4f14; border-color: #e6d7b5; }
.pill.navy { background: var(--brand); color: #fff; border-color: var(--brand); }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-slide { display: none; min-height: 340px; padding: 56px 0; }
.hero-slide.active { display: block; }
.hero-slide.navy { background: radial-gradient(1200px 400px at 85% 20%, #1E4775 0%, transparent 60%), linear-gradient(120deg, #0B2545, #13315C); }
.hero-slide.gold { background: radial-gradient(900px 400px at 85% 30%, #c9a861 0%, transparent 60%), linear-gradient(120deg, #13315C, #0B2545 70%); }
.hero-slide.slate { background: radial-gradient(1000px 420px at 80% 10%, #3c5b80 0%, transparent 60%), linear-gradient(120deg, #1b2a3d, #0B2545); }
.hero-slide.has-image { background-size: cover; background-position: center; }
.hero-slide.has-image .hero-art { display: none; }
.hero h1 { color: #fff; font-size: clamp(1.8rem, 3.6vw, 2.8rem); max-width: 640px; }
.hero p { font-size: 1.15rem; max-width: 560px; color: #dbe3ef; }
.hero .eyebrow { color: var(--accent); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; }
.hero-art { justify-self: end; width: 100%; max-width: 380px; }
.hero-dots { position: absolute; bottom: 16px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; }
.hero-dots button { width: 28px; height: 5px; border-radius: 3px; border: 0; background: rgba(255,255,255,.35); cursor: pointer; padding: 0; }
.hero-dots button[aria-current="true"] { background: var(--accent); }

/* Sections */
.section { padding: 48px 0; }
.section.alt { background: var(--bg-2); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head .eyebrow { display: block; color: var(--accent); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
.value-props { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.value { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.value img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.value-text { padding: 16px 18px 18px; }
.value strong { display: block; color: var(--brand); margin-bottom: 4px; }
.cat-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.cat-tile { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--brand); font-weight: 700; }
.cat-tile img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.cat-tile span { padding: 12px 14px; }
.cat-tile:hover { border-color: var(--accent); text-decoration: none; box-shadow: var(--shadow); }
.page-head { display: flow-root; }
.cat-banner { float: right; width: 200px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; margin-left: 16px; border-radius: var(--radius); }

/* Product cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: flex; flex-direction: column;
  overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.card:hover { box-shadow: var(--shadow); border-color: #d3d8e0; }
.card .thumb { background: var(--paper); aspect-ratio: 5/4; display: grid; place-items: center; }
.card .thumb img { width: 100%; height: 100%; object-fit: contain; }
.service-img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.card .body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .brand { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.card h3 { font-size: 1rem; margin: 0; color: var(--ink); }
.card h3 a { color: inherit; }
.card .sku { font-size: .78rem; color: var(--muted); }
.card .foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.price { font-size: 1.25rem; font-weight: 800; color: var(--brand); }
.price .msrp { font-size: .82rem; font-weight: 500; color: var(--muted); text-decoration: line-through; margin-left: 6px; }
.stock { font-size: .82rem; font-weight: 600; }
.stock.in { color: var(--ok); } .stock.out { color: var(--warn); } .stock.svc { color: var(--muted); }
.stale { font-size: .75rem; color: var(--warn); }
.card form { display: flex; gap: 6px; }

/* Catalog layout */
.page-head { padding: 22px 0 6px; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 28px; padding: 16px 0 48px; }
.filters { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; align-self: start; position: sticky; top: 92px; background: #fff; }
.filters h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .06em; margin: 14px 0 6px; }
.filters h3:first-child { margin-top: 0; }
.filters .opts { max-height: 190px; overflow: auto; }
.filters .check { font-size: .92rem; margin-bottom: 4px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar select { width: auto; }

/* Product page */
.pdp { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; padding: 10px 0 30px; }
.pdp .gallery { background: var(--paper); border-radius: var(--radius); display: grid; place-items: center; padding: 24px; aspect-ratio: 5/4; }
.pdp .buybox { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.pdp .buybox .price { font-size: 1.8rem; }
.qty { width: 84px !important; }
.offers-note { font-size: .85rem; color: var(--muted); }
.tabs { border-bottom: 1px solid var(--line); display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.tabs button { background: none; border: 0; padding: 10px 14px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--accent); }
.tabpanel { padding: 18px 0; }
.tabpanel[hidden] { display: none; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-2); }
.specs th { width: 34%; text-transform: none; letter-spacing: 0; font-size: .92rem; color: var(--brand); background: transparent; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table-wrap table th:first-child, .table-wrap table td:first-child { padding-left: 14px; }

/* Panels */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: #fff; margin-bottom: 18px; }
.panel h2 { font-size: 1.15rem; }
.two-col { display: grid; grid-template-columns: 1fr 360px; gap: 28px; padding: 18px 0 48px; align-items: start; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 0; }
.summary dt { color: var(--muted); } .summary dd { margin: 0; text-align: right; font-weight: 600; }
.summary .total { font-size: 1.25rem; color: var(--brand); border-top: 1px solid var(--line); padding-top: 8px; }
.narrow { max-width: 520px; margin: 36px auto 56px; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.4em; }
.status-steps { display: flex; gap: 0; margin: 10px 0 18px; flex-wrap: wrap; }
.status-steps span { flex: 1; min-width: 110px; text-align: center; font-size: .82rem; padding: 8px 4px; border-bottom: 3px solid var(--line); color: var(--muted); }
.status-steps span.done { border-color: var(--accent); color: var(--brand); font-weight: 700; }

/* Rooms */
.room-stage { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.room-stage svg.scene, .room-stage img.scene { width: 100%; display: block; }
.hotspot { position: absolute; transform: translate(-50%, -50%); width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff;
  background: var(--accent); color: #1d1608; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 0 rgba(184,145,58,.6); animation: pulse 2s infinite; }
.hotspot:focus-visible { outline: 3px solid var(--brand); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(184,145,58,.55);} 70% { box-shadow: 0 0 0 14px rgba(184,145,58,0);} 100% { box-shadow: 0 0 0 0 rgba(184,145,58,0);} }
@media (prefers-reduced-motion: reduce) { .hotspot { animation: none; } }
.spot-card { position: absolute; z-index: 5; width: 250px; background: #fff; border-radius: var(--radius); box-shadow: 0 8px 30px rgba(0,0,0,.18);
  padding: 12px; display: none; }
.spot-card.open { display: block; }
.spot-card img { background: var(--paper); border-radius: 6px; margin-bottom: 8px; aspect-ratio: 5/4; object-fit: contain; width: 100%; }
.pano { width: 100%; height: 480px; border-radius: var(--radius); }

/* Assistant */
.assistant-btn { position: fixed; right: 20px; bottom: 20px; z-index: 40; border-radius: 99px; padding: 12px 18px; box-shadow: var(--shadow); }
.assistant { position: fixed; right: 20px; bottom: 80px; width: min(380px, calc(100vw - 32px)); height: min(540px, calc(100vh - 120px));
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(11,37,69,.22); z-index: 41;
  display: none; flex-direction: column; overflow: hidden; }
.assistant.open { display: flex; }
.assistant header { background: var(--brand); color: #fff; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; }
.assistant header button { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }
.assistant .log { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--bg-2); }
.msg { padding: 9px 12px; border-radius: 12px; max-width: 88%; white-space: pre-wrap; font-size: .93rem; }
.msg.me { align-self: flex-end; background: var(--brand); color: #fff; }
.msg.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); }
.msg .links { margin-top: 6px; display: flex; flex-direction: column; gap: 3px; }
.assistant form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.assistant .disclaimer { font-size: .72rem; color: var(--muted); padding: 0 12px 8px; }

/* Footer */
.footer { background: var(--brand); color: #c5cfdd; margin-top: 40px; }
.footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-block: 40px; }
.footer h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; }
.footer a { color: #e7ecf3; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.footer .legal { border-top: 1px solid rgba(255,255,255,.12); }
.footer .legal .wrap { display: flex; justify-content: space-between; padding-block: 14px; font-size: .82rem; grid-template-columns: none; flex-wrap: wrap; gap: 8px; }

/* Compare */
.compare th { width: 180px; }
.compare td { min-width: 200px; }

/* Responsive */
@media (max-width: 980px) {
  .catalog, .two-col, .pdp, .hero-grid { grid-template-columns: 1fr; }
  .filters { position: static; }
  .hero-art { display: none; }
  .value-props { grid-template-columns: repeat(2, 1fr); }
  .cat-tiles { grid-template-columns: repeat(2, 1fr); }
  .footer .wrap { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .masthead .wrap { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .head-actions span.lbl { display: none; }
  .grid2, .grid3, .value-props { grid-template-columns: 1fr; }
  .footer .wrap { grid-template-columns: 1fr; }
  .hero-slide { padding: 36px 0 52px; min-height: 0; }
  .topbar .tagline { display: none; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
}
@media print {
  .topbar, .masthead, .catnav, .footer, .assistant-btn, .assistant, .demo-strip, .no-print { display: none !important; }
}
@media (max-width: 640px) { .cat-banner { width: 120px; } }
