/* ── SKIP NAVIGATION (visible on focus for keyboard users) ── */
.skip-nav {
  position: absolute;
  top: -100%;
  left: 0;
  padding: 0.75rem 1.5rem;
  background: #c88520;
  color: #000;
  font-weight: bold;
  font-family: sans-serif;
  font-size: 1rem;
  z-index: 99999;
  border-radius: 0 0 6px 0;
  text-decoration: none;
  transition: top 0.15s;
}
.skip-nav:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ── ACCESSIBILITY TRIGGER BUTTON ── */
#a11y-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10002;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #c88520;
  color: #000;
  border: 2px solid #000;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 14px rgba(0,0,0,0.6);
  transition: transform 0.2s, box-shadow 0.2s;
}
#a11y-trigger:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 24px rgba(200,133,32,0.6);
}
#a11y-trigger:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

/* ── ACCESSIBILITY PANEL ── */
#a11y-panel {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 10002;
  width: 290px;
  background: #1a1005;
  border: 1px solid #4e3c22;
  border-radius: 10px;
  padding: 1.2rem 1.2rem 1rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.85);
  display: none;
  font-family: Arial, Helvetica, sans-serif;
}
#a11y-panel.open {
  display: block;
  animation: a11yFadeIn 0.15s ease;
}
@keyframes a11yFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
#a11y-panel h2 {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #c88520;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #352a1a;
}
.a11y-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  gap: 0.5rem;
}
.a11y-option:last-of-type {
  border-bottom: none;
}
.a11y-option-label {
  font-size: 0.82rem;
  color: #ddc89e;
  flex: 1;
}

/* Text size buttons */
.a11y-btn-group {
  display: flex;
  gap: 3px;
}
.a11y-sz-btn {
  padding: 4px 9px;
  background: #2c1e0e;
  border: 1px solid #4e3c22;
  color: #ddc89e;
  border-radius: 4px;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 700;
  transition: background 0.15s;
  line-height: 1;
}
.a11y-sz-btn:nth-child(1) { font-size: 0.7rem; }
.a11y-sz-btn:nth-child(2) { font-size: 0.85rem; }
.a11y-sz-btn:nth-child(3) { font-size: 1rem; }
.a11y-sz-btn:hover {
  background: #3d2910;
}
.a11y-sz-btn:focus-visible {
  outline: 2px solid #c88520;
  outline-offset: 1px;
}
.a11y-sz-btn.active {
  background: #c88520;
  color: #000;
  border-color: #c88520;
}

/* Toggle switch */
.a11y-toggle {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
}
.a11y-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.a11y-toggle-track {
  position: absolute;
  inset: 0;
  background: #2c1e0e;
  border: 1px solid #4e3c22;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}
.a11y-toggle-track::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  background: #a09890;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.a11y-toggle input:checked + .a11y-toggle-track {
  background: #c88520;
  border-color: #c88520;
}
.a11y-toggle input:checked + .a11y-toggle-track::before {
  transform: translateX(18px);
  background: #000;
}
.a11y-toggle input:focus-visible + .a11y-toggle-track {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Reset button */
#a11y-reset-btn {
  margin-top: 0.9rem;
  width: 100%;
  padding: 0.45rem 0;
  background: transparent;
  border: 1px solid #4e3c22;
  color: #a09890;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: Arial, Helvetica, sans-serif;
  letter-spacing: 0.5px;
  transition: color 0.15s, border-color 0.15s;
}
#a11y-reset-btn:hover {
  color: #ddc89e;
  border-color: #7a5a2a;
}
#a11y-reset-btn:focus-visible {
  outline: 2px solid #c88520;
  outline-offset: 2px;
}

/* ── HIGH CONTRAST MODE ── */
html.a11y-high-contrast {
  --bg:            #000000;
  --surface:       #0a0a0a;
  --surface-light: #111111;
  --surface-warm:  #0d0d0d;
  --border:        #666666;
  --border-light:  #999999;
  --text:          #ffffff;
  --muted:         #cccccc;
  --muted-light:   #dddddd;
  --accent:        #ffdd00;
  --accent-glow:   #ffee44;
  --accent-dim:    rgba(255,221,0,0.2);
  --cream:         #ffffff;
  --paper:         #eeeeee;
}
html.a11y-high-contrast body {
  background: #000 !important;
  color: #fff !important;
}
html.a11y-high-contrast body::after {
  display: none; /* remove vignette overlay */
}
html.a11y-high-contrast a {
  color: #ffdd00 !important;
  text-decoration: underline !important;
}
html.a11y-high-contrast a:hover,
html.a11y-high-contrast a:focus {
  color: #000 !important;
  background: #ffdd00 !important;
}
html.a11y-high-contrast nav {
  background: #000 !important;
  border-bottom: 2px solid #fff !important;
}
html.a11y-high-contrast .trust-bar,
html.a11y-high-contrast .affiliate-bar {
  background: #111 !important;
  border-color: #555 !important;
  color: #fff !important;
}
html.a11y-high-contrast .btn,
html.a11y-high-contrast button:not(#a11y-trigger):not(.a11y-sz-btn):not(#a11y-reset-btn) {
  border: 2px solid #fff !important;
}
html.a11y-high-contrast .card,
html.a11y-high-contrast .product-card,
html.a11y-high-contrast .filter-bar,
html.a11y-high-contrast .featured-section,
html.a11y-high-contrast footer {
  border-color: #888 !important;
}
html.a11y-high-contrast input,
html.a11y-high-contrast select {
  background: #111 !important;
  color: #fff !important;
  border: 2px solid #fff !important;
}
html.a11y-high-contrast img {
  filter: brightness(0.9) contrast(1.1);
}

/* ── GRAYSCALE MODE ── */
/* A CSS filter on html or body both break position:fixed (they become the
   containing block). Use a backdrop-filter overlay instead — it grays out
   everything below z-index 10000 while the button/panel stay above it. */
#a11y-grayscale-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  backdrop-filter: grayscale(100%);
  -webkit-backdrop-filter: grayscale(100%);
}

/* ── REDUCE MOTION ── */
html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.a11y-reduce-motion #a11y-panel {
  animation: none !important;
}

/* ── TEXT SIZE ── */
html.a11y-text-large  { font-size: 21px; }
html.a11y-text-xlarge { font-size: 25px; }

/* ── DYSLEXIA / READABLE FONT ── */
html.a11y-dyslexia body,
html.a11y-dyslexia p,
html.a11y-dyslexia span,
html.a11y-dyslexia div,
html.a11y-dyslexia a,
html.a11y-dyslexia button,
html.a11y-dyslexia label,
html.a11y-dyslexia li,
html.a11y-dyslexia td,
html.a11y-dyslexia input,
html.a11y-dyslexia select,
html.a11y-dyslexia textarea {
  font-family: Arial, Helvetica, sans-serif !important;
  letter-spacing: 0.05em !important;
  word-spacing: 0.12em !important;
  line-height: 1.85 !important;
}

/* ── FOCUS INDICATORS (global, improves keyboard navigation) ── */
*:focus-visible {
  outline: 3px solid #c88520 !important;
  outline-offset: 2px !important;
}
html.a11y-high-contrast *:focus-visible {
  outline: 3px solid #ffdd00 !important;
}
