/* ============================================================
   RR AUDIOCAR PRO — Reset
   Reset moderno, mobile-first, respeta Elementor y WC.
   ============================================================ */

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern", "liga", "calt";
  scroll-padding-top: 96px; /* offset para anclas con sticky header */
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--rrac-font-sans);
  font-size: var(--rrac-text-base);
  line-height: var(--rrac-leading-normal);
  color: var(--rrac-text);
  background: var(--rrac-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  font-weight: var(--rrac-weight-bold);
  line-height: var(--rrac-leading-tight);
  letter-spacing: var(--rrac-tracking-tight);
  margin-top: 0;
  text-wrap: balance;
}

p { text-wrap: pretty; margin-top: 0; }

a {
  color: inherit;
  text-decoration: none;
  text-decoration-skip-ink: auto;
  -webkit-tap-highlight-color: transparent;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button, [role="button"] {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

button:disabled, [role="button"][aria-disabled="true"] {
  cursor: not-allowed;
}

button > svg, [role="button"] > svg, a > svg {
  pointer-events: none;
}

ul:where(:not([class])), ol:where(:not([class])) {
  padding-left: var(--rrac-space-6);
}

table:where(:not([class])) {
  border-collapse: collapse;
  width: 100%;
}

hr {
  border: 0;
  height: 1px;
  background: var(--rrac-border);
  margin: var(--rrac-space-6) 0;
}

::selection {
  background: var(--rrac-brand-100);
  color: var(--rrac-text);
}

/* Scrollbar moderna (Firefox + Webkit) */
@supports (scrollbar-width: thin) {
  * {
    scrollbar-width: thin;
    scrollbar-color: var(--rrac-ink-300) transparent;
  }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--rrac-ink-300);
  border-radius: var(--rrac-radius-full);
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--rrac-ink-400);
  background-clip: padding-box;
  border: 2px solid transparent;
}

/* Focus visible global — solo cuando no hay focus de mouse */
:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid var(--rrac-primary);
  outline-offset: 2px;
  border-radius: var(--rrac-radius-sm);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* iOS safe-area inset utilities */
@supports (padding: max(0px)) {
  .rrac-safe-bottom { padding-bottom: max(var(--rrac-space-4), env(safe-area-inset-bottom)); }
  .rrac-safe-top    { padding-top:    max(var(--rrac-space-4), env(safe-area-inset-top)); }
}

/* Print */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .rrac-cart-drawer, .rrac-cart-overlay,
  .rrac-header, .rrac-footer, .rrac-sticky-atc,
  .rrac-back-to-top { display: none !important; }
}
