/* accessories page styles (migrated). Shared tokens live in sierra.css */





html { scroll-behavior: smooth; }
body {
  font-family: 'Poppins', -apple-system, sans-serif;
  background: var(--ground);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Topbar ── */
.topbar {
  background: var(--ink);
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--rr);
}
.topbar-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-back {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.topbar-back:hover { color: rgba(255,255,255,0.75); }
.topbar-brand {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}
.topbar-brand span { color: var(--rr-text); }
.wishlist-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--rr-deep);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 1px;
  border: none;
  cursor: pointer;
  transition: background 150ms ease;
}
.wishlist-pill:hover { background: var(--rr-deep); }
.wishlist-count {
  background: #fff;
  color: var(--rr-text);
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Page header ── */
.page-header {
  background: var(--ink);
  padding: 0 24px;
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--rr) 0%, transparent 55%);
}
.page-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 36px 0 40px;
}
.page-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--rr-pale);
  margin-bottom: 10px;
}
.page-h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  color: #fff;
  line-height: 1;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.page-sub {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  max-width: 500px;
}

/* ── View tabs — sticky inside main column ── */
.view-tabs {
  display: flex;
  gap: 0;
  background: var(--ground-raised);
  border: 1px solid var(--rule);
  border-radius: 1px;
  padding: 0 4px;
  margin-bottom: 16px;
  position: sticky;
  top: 46px; /* below topbar */
  z-index: 150;
}
.view-tab {
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 11px 18px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease;
  white-space: nowrap;
}
.view-tab:hover { color: var(--text); }
.view-tab.active {
  color: var(--rr-text);
  font-weight: 600;
  border-bottom-color: var(--rr);
}
@media (max-width: 560px) {
  .view-tabs { overflow-x: auto; scrollbar-width: none; }
  .view-tabs::-webkit-scrollbar { display: none; }
  .view-tab { padding: 10px 14px; font-size: 12px; }
}

/* ── Layout ── */
.layout {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 80px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-filter-bar { display: flex !important; }
}

/* ── Sidebar ── */
.sidebar {
  position: sticky;
  top: 54px;
  background: var(--ground-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 20px;
}
.sidebar-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.search-wrap {
  position: relative;
  margin-bottom: 20px;
}
.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  width: 14px;
  height: 14px;
}
.search-input {
  width: 100%;
  padding: 9px 10px 9px 32px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--ground-raised);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s;
}
.search-input:focus { border-color: var(--teal); }
.search-input::placeholder { color: var(--text-faint); }

.filter-group { margin-bottom: 18px; }
.filter-group-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 8px;
}
.filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 7px 10px;
  border: none;
  border-radius: 2px;
  background: transparent;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  margin-bottom: 2px;
}
.filter-btn:hover { background: var(--ground); color: var(--text); }
.filter-btn.active { background: var(--teal-bg); color: var(--rr-text); font-weight: 600; }
.filter-btn .count {
  float: right;
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 400;
}
.filter-btn.active .count { color: var(--rr-text); }

.price-range { display: flex; flex-direction: column; gap: 8px; }
.price-range input[type=range] {
  width: 100%;
  accent-color: var(--teal);
}
.price-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ── Mobile filter bar ── */
.mobile-filter-bar {
  display: none;
  gap: 8px;
  padding: 10px 16px;
  background: var(--ground-raised);
  border-bottom: 1px solid var(--rule);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  /* Sticky below the topbar — topbar is ~46px tall */
  position: sticky;
  top: 46px;
  z-index: 190;
  /* Hide scrollbar but keep scrollability */
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.mobile-filter-bar::-webkit-scrollbar { display: none; }
.mobile-filter-chip {
  flex-shrink: 0;
  padding: 5px 13px;
  border: 1px solid var(--rule);
  border-radius: 1px;
  background: var(--ground-mid);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.mobile-filter-chip.active, .mobile-filter-chip.scroll-active {
  background: var(--rr-glow);
  border-color: var(--rule-rr);
  color: var(--rr-text);
  font-weight: 600;
}

/* ── Main content ── */
.main {}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.results-count {
  font-size: 13px;
  color: var(--text-muted);
}
.results-count b { color: var(--ink); }
.sort-select {
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  background: var(--ground-raised);
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}

/* ── Section headers ── */
.section-header {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.01em;
  padding: 14px 0 10px;
  border-bottom: 2px solid var(--teal);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-header span { font-size: 18px; }

/* ── Product grid ── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}

.prod-card {
  background: var(--ground-raised);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color 0.15s;
  position: relative;
}
.prod-card:hover { border-color: var(--teal-rule); }
.prod-card.in-wishlist { border-color: var(--teal); }
.prod-card.in-wishlist::after {
  content: '✓';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  background: var(--rr-deep);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.prod-card.affiliate {
  border-color: rgba(255,153,0,0.2);
  background: var(--amz-bg);
}
.prod-card.affiliate:hover { border-color: rgba(255,153,0,0.4); }

.prod-badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 10px;
  align-self: flex-start;
}
.prod-badge.official {
  background: var(--teal-bg);
  color: var(--rr-text);
  border: 1px solid var(--teal-rule);
}
.prod-badge.amz {
  background: rgba(255,153,0,0.12);
  color: var(--amz);
  border: 1px solid rgba(255,153,0,0.25);
}
.prod-badge.pack {
  background: rgba(160,98,42,0.1);
  color: var(--amber);
  border: 1px solid rgba(160,98,42,0.2);
}

.prod-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
  flex: 1;
}
.prod-part {
  font-size: 11px;
  color: var(--text-faint);
  font-family: 'Poppins', sans-serif;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
}
.prod-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}
.prod-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.prod-price .rupee { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.prod-price small { font-size: 10px; font-weight: 400; color: var(--text-faint); font-family: 'Poppins', sans-serif; display: block; }

.prod-actions { display: flex; gap: 6px; }
.btn-wishlist {
  padding: 7px 12px;
  border: 1px solid var(--rule-rr);
  border-radius: 1px;
  background: transparent;
  color: var(--rr-text);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease,
              border-color 150ms ease, transform 120ms ease;
  white-space: nowrap;
  min-width: 86px;
  text-align: center;
}
.btn-wishlist:hover { background: var(--rr-glow); }
/* Emil: button press — scale 0.95, 100ms */
.btn-wishlist:active { transform: scale(0.95); transition-duration: 100ms; }

/* State 2: just added — solid green confirmation */
.btn-wishlist.added {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
  animation: wishlistAdded 280ms var(--ease-out) both;
}
@keyframes wishlistAdded {
  0%   { transform: scale(0.88); }
  55%  { transform: scale(1.07); }
  100% { transform: scale(1); }
}

/* State 3: stable "remove" — red outline, transparent fill */
.btn-wishlist.removing {
  background: transparent;
  color: var(--crimson);
  border-color: rgba(158,45,30,0.45);
  animation: shiftToRemove 200ms var(--ease-out) both;
}
@keyframes shiftToRemove {
  from { opacity: 0.6; transform: scale(0.97); }
  to   { opacity: 1;   transform: scale(1); }
}
.btn-wishlist.removing:hover {
  background: rgba(158,45,30,0.07);
  border-color: var(--crimson);
}
.btn-wishlist.removing:active { transform: scale(0.95); }

@media (prefers-reduced-motion: reduce) {
  .btn-wishlist.added,
  .btn-wishlist.removing { animation: none; }
}

/* Emil: grid fade on filter — prevents jarring reflow, 150ms */
@keyframes gridFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-grid.fading { animation: gridFadeIn 150ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) {
  .product-grid.fading { animation: none; }
}
.btn-amz {
  padding: 7px 12px;
  border: 1px solid rgba(255,153,0,0.3);
  border-radius: 2px;
  background: rgba(255,153,0,0.08);
  color: var(--amz);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-amz:hover { background: rgba(255,153,0,0.16); }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-faint);
}
.empty-state p { font-size: 14px; margin-top: 8px; }

/* ── Wishlist drawer ── */
.wishlist-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,26,23,0.5);
  z-index: 300;
}
.wishlist-overlay.open { display: block; }
.wishlist-drawer {
  position: fixed;
  top: 0;
  right: -480px;
  width: 100%;
  max-width: 480px;
  height: 100%;
  background: var(--ground-raised);
  z-index: 400;
  display: flex;
  flex-direction: column;
  transition: right 0.28s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 32px rgba(28,26,23,0.18);
}
.wishlist-drawer.open { right: 0; }
.drawer-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.drawer-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}
.drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  line-height: 1;
}
.drawer-close:hover { color: var(--ink); }
.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.drawer-empty {
  text-align: center;
  padding: 48px 0;
  color: var(--text-faint);
  font-size: 14px;
}
.drawer-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--rule);
}
.drawer-item:last-child { border-bottom: none; }
.drawer-item-info { flex: 1; }
.drawer-item-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 3px;
  line-height: 1.4;
}
.drawer-item-part { font-size: 11px; color: var(--text-faint); }
.drawer-item-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.drawer-item-remove {
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 16px;
  line-height: 1;
}
.drawer-item-remove:hover { color: var(--crimson); }

.drawer-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--rule);
  flex-shrink: 0;
}
.drawer-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.drawer-total-label { font-size: 14px; font-weight: 600; color: var(--ink); }
.drawer-total-amount {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--rr-text);
}
.btn-generate {
  width: 100%;
  padding: 13px;
  background: var(--rr-deep);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 8px;
}
.btn-generate:hover { background: var(--rr-deeper); }
.btn-generate:disabled { background: var(--text-faint); cursor: not-allowed; }
.btn-clear-wishlist {
  width: 100%;
  padding: 9px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease;
}
.btn-clear-wishlist:hover { border-color: var(--crimson); color: var(--crimson); }

/* ── Email modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(28,26,23,0.65);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--ground-raised);
  border-radius: 2px;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(28,26,23,0.3);
}
.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-instructions {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.6;
  background: var(--teal-bg);
  border: 1px solid var(--teal-rule);
  border-radius: 2px;
  padding: 12px 14px;
}
.email-textarea {
  width: 100%;
  min-height: 320px;
  padding: 14px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.6;
  resize: vertical;
  outline: none;
  background: var(--ground-raised);
}
.email-textarea:focus { border-color: var(--teal); }
.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.btn-copy {
  flex: 1;
  padding: 11px;
  background: var(--rr-deep);
  color: #fff;
  border: none;
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-copy:hover { background: var(--rr-deeper); }
.btn-modal-close {
  padding: 11px 20px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--rule);
  border-radius: 2px;
  font-family: 'Poppins', sans-serif;
  font-size: 14px;
  cursor: pointer;
}
.btn-modal-close:hover { border-color: var(--text); color: var(--text); }

/* ── Product image ── */
.prod-img-wrap {
  width: 100%; aspect-ratio: 1/1;
  background: var(--ground-mid);
  border: 1px solid var(--rule);
  border-radius: 1px;
  margin-bottom: 12px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.prod-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.prod-img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%; height: 100%;
  font-size: 28px;
  opacity: 0.28;
}
.prod-img-placeholder span {
  font-family: 'Space Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  opacity: 1;
}

/* ── Empowered A advisory note ── */
.emp-note-block {
  font-size: 11px;
  color: var(--amber);
  background: rgba(184,107,26,0.07);
  border: 1px solid rgba(184,107,26,0.2);
  border-radius: 1px;
  padding: 5px 8px;
  margin: 6px 0 2px;
  line-height: 1.4;
}

/* ── Scroll spy active state on sidebar ── */
.filter-btn.scroll-active:not(.active) {
  background: var(--rr-glow);
  color: var(--rr-text);
  font-weight: 600;
  border-left: 2px solid var(--rr);
  padding-left: 8px;
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ink);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border-radius: 2px;
  z-index: 600;
  transition: transform 0.25s;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ── Product detail modal ── */
.prod-modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(26,22,18,0.7); z-index: 500;
  align-items: flex-end; justify-content: center; padding: 0;
}
@media (min-width: 640px) {
  .prod-modal-overlay { align-items: center; padding: 24px; }
}
.prod-modal-overlay.open { display: flex; }
.prod-modal {
  background: var(--ground-raised); border-radius: 2px 2px 0 0;
  width: 100%; max-width: 680px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 -4px 40px rgba(26,22,18,0.25);
  animation: modalSlideUp 280ms var(--ease-out) both;
}
@media (min-width: 640px) {
  .prod-modal { border-radius: 2px; box-shadow: 0 20px 60px rgba(26,22,18,0.3); animation: modalFadeIn 220ms var(--ease-out) both; }
}
@keyframes modalSlideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes modalFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) { .prod-modal { animation: none; } }
.prod-modal-head {
  padding: 14px 18px; border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.prod-modal-head-left { display: flex; align-items: center; gap: 8px; }
.prod-modal-close {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--text-muted); padding: 4px 6px;
  line-height: 1; border-radius: 1px; transition: color 150ms ease;
}
.prod-modal-close:hover { color: var(--ink); }
.prod-modal-body { overflow-y: auto; flex: 1; }
.prod-modal-img {
  width: 100%; aspect-ratio: 16/9;
  background: var(--ground-mid);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.prod-modal-img img { width: 100%; height: 100%; object-fit: cover; }
.prod-modal-img-placeholder { font-size: 48px; opacity: 0.22; }
.prod-modal-content { padding: 20px 20px 0; }
.prod-modal-badges { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.prod-modal-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.6rem; font-weight: 700; color: var(--ink); line-height: 1.1; margin-bottom: 6px;
}
.prod-modal-part {
  font-family: 'Space Mono', monospace;
  font-size: 11px; color: var(--text-faint); letter-spacing: 0.03em; margin-bottom: 14px;
}
.prod-modal-note {
  font-size: 13px; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px;
  padding: 11px 14px; background: var(--ground-mid);
  border-left: 2px solid var(--rr); border-radius: 0 1px 1px 0;
}
.prod-modal-price-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding-bottom: 18px;
  border-bottom: 1px solid var(--rule); margin-bottom: 18px;
}
.prod-modal-price {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem; font-weight: 700; color: var(--ink); line-height: 1;
}
.prod-modal-price small {
  font-family: 'Poppins', sans-serif; font-size: 11px; font-weight: 400;
  color: var(--text-faint); display: block; margin-top: 3px;
}
.prod-modal-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-modal-wl {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 1px;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1px solid var(--rule-rr);
  background: transparent; color: var(--rr-text); transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease;
}
.btn-modal-wl:hover { background: var(--rr-glow); }
.btn-modal-wl.added { background: var(--success); color: #fff; border-color: var(--success); }
.btn-modal-wl.removing { background: transparent; color: var(--crimson); border-color: rgba(158,45,30,0.45); }
.btn-modal-amz {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 20px; border-radius: 1px;
  font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 600;
  background: #FF9900; color: #000; text-decoration: none; border: none;
  transition: opacity 150ms ease;
}
.btn-modal-amz:hover { opacity: 0.88; }
/* Related strip */
.prod-modal-related { padding: 4px 20px 20px; }
.prod-modal-related-title {
  font-family: 'Space Mono', monospace; font-size: 10px;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 10px;
}
.prod-modal-related-strip {
  display: flex; gap: 10px; overflow-x: auto;
  scrollbar-width: none; padding-bottom: 4px;
}
.prod-modal-related-strip::-webkit-scrollbar { display: none; }
.related-chip {
  flex-shrink: 0; width: 120px;
  background: var(--ground-mid); border: 1px solid var(--rule);
  border-radius: 1px; overflow: hidden; text-decoration: none;
  color: inherit; transition: border-color 150ms ease; display: block;
}
.related-chip:hover { border-color: rgba(255,153,0,0.4); }
.related-chip-img {
  width: 100%; aspect-ratio: 1/1; background: var(--ground-high);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.related-chip-img img { width: 100%; height: 100%; object-fit: cover; }
.related-chip-img-placeholder { font-size: 22px; opacity: 0.28; }
.related-chip-info { padding: 7px 8px; }
.related-chip-name {
  font-size: 11px; font-weight: 500; color: var(--ink); line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.related-chip-cta {
  font-family: 'Space Mono', monospace; font-size: 9px;
  letter-spacing: 0.04em; text-transform: uppercase; color: #FF9900;
}

/* ── Footer ── */
.page-footer {
  background: var(--ink);
  padding: 28px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-text { font-size: 13px; color: rgba(255,255,255,0.45); }
.footer-text a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-bmc a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFDD00;
  color: #000;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 8px;
  text-decoration: none;
}

/* ── Migration additions ── */
button.prod-name { background: none; border: 0; padding: 0; margin: 0 0 6px; text-align: left; font-family: inherit; cursor: pointer; width: 100%; }
button.prod-name:hover { color: var(--rr-text); }
.wishlist-drawer, .prod-modal-body, .modal-body { overscroll-behavior: contain; }
.prod-modal-overlay.closing { display: flex; }
.prod-modal-overlay.closing .prod-modal { animation: modalOut 180ms var(--ease-out) forwards; }
@keyframes modalOut { to { opacity: 0; transform: translateY(24px); } }
.prod-modal-detail-link { display: inline-block; margin: 0 20px 18px; font-size: 13px; font-weight: 600; color: var(--rr-text); }
.paid-tag { font-family: 'Space Mono', monospace; font-size: 9px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.8; margin-left: 4px; }
.aff-disclosure { font-size: 12px; color: var(--text-muted); background: var(--amz-bg); border: 1px solid rgba(255,153,0,0.25); padding: 10px 14px; border-radius: 1px; margin-bottom: 16px; }
.acc-index { margin-top: 32px; background: var(--ground-raised); border: 1px solid var(--rule); border-radius: 1px; padding: 16px 20px; }
.acc-index summary { cursor: pointer; font-family: 'Barlow Condensed', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.acc-index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 24px; margin-top: 16px; }
.acc-index h3 { font-family: 'Space Mono', monospace; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 6px; }
.acc-index ul { list-style: none; }
.acc-index li { font-size: 13px; line-height: 1.8; }
.acc-index a { color: var(--rr-text); text-decoration: none; }
.acc-index a:hover { text-decoration: underline; }
.product-grid { content-visibility: auto; contain-intrinsic-size: auto 600px; }

@media (max-width: 440px) { .wl-text { display: none; } .wishlist-pill { padding: 6px 10px; } }
