/* Total RV – Global styles, typography, design tokens, layout primitives */

:root {
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #fff;
  --color-primary: #0066cc;
  --color-primary-hover: #0052a3;
  --font-sans: system-ui, -apple-system, sans-serif;
  --line-height: 1.5;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* Fluid base font: 15px on the narrowest phones → 18px on wide screens */
html {
  font-size: clamp(15px, 1.5vw, 18px);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background: var(--color-bg);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* Global image safety — prevent overflow and preserve aspect ratio */
img,
video,
svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
}

a:hover {
  color: var(--color-primary-hover);
}

/* Minimum touch target size for all interactive elements */
button,
[role="button"],
input[type="submit"],
input[type="button"],
input[type="reset"],
select {
  min-height: 44px;
  cursor: pointer;
}

/* Inventory detail page: constrained layout and responsive content */
.inventory-detail-main {
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  padding: 1rem;
}
.inventory-detail-main a,
.inventory-detail-main p,
.inventory-detail-main h1 {
  overflow-wrap: break-word;
  word-wrap: break-word;
}
