/* =============================================
   base.css — Reset, CSS variables, typography
   ============================================= */

/* --- Reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- CSS Custom Properties (design tokens from Figma) --- */
:root {
  /* Colors */
  --color-text-primary:     #000000;
  --color-text-secondary:   rgba(0, 0, 0, 0.68);
  --color-text-placeholder: rgba(0, 0, 0, 0.20);
  --color-bg-white:         #FFFFFF;
  --color-bg-light:         #F4F4F4;
  --color-bg-tag:           rgba(0, 0, 0, 0.04);
  --color-border-light:     rgba(0, 0, 0, 0.12);
  --color-border-medium:    rgba(0, 0, 0, 0.20);

  --color-brand-green:      #82C11E;
  --color-brand-green-dark: #138126;
  --color-brand-orange:     #F15E00;

  --color-promo-gradient:   linear-gradient(146deg, #7EBD1C 0%, #488801 100%);
  --color-promo-cta:        #272727;

  --color-card-btn:         #74B317;
  --color-badge-bg:         #141414;

  --color-expert-bg:        #F2F9E8;
  --color-product-bg:       #F3F4EF;


  /* Typography */
  --font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --font-size-xs:   10px;
  --font-size-sm:   12px;
  --font-size-md:   14px;
  --font-size-lg:   16px;
  --font-size-xl:   20px;
  --font-size-xxl:  28px;

  --font-weight-regular: 400;
  --font-weight-medium:  500;
  --font-weight-bold:    700;

  --line-height-sm: 16px;
  --line-height-md: 20px;
  --line-height-lg: 24px;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  15px;
  --space-lg:  25px;

  /* Radii */
  --radius-pill: 2000px;
  --radius-card: 15px;
  --radius-sm:   8px;
  --radius-md:   25px;

  /* Layout */
  --max-width:      393px;
  --header-height:  56px;
  --bottom-nav-height: 56px;
}

/* --- Base --- */
html, body {
  font-family: var(--font-family);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-md);
  color: var(--color-text-primary);
  background: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

body {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* --- Typography utilities --- */
.text-primary   { color: var(--color-text-primary); }
.text-secondary { color: var(--color-text-secondary); }

.font-regular { font-weight: var(--font-weight-regular); }
.font-medium  { font-weight: var(--font-weight-medium); }
.font-bold    { font-weight: var(--font-weight-bold); }

.text-xs  { font-size: var(--font-size-xs); line-height: var(--line-height-sm); }
.text-sm  { font-size: var(--font-size-sm); line-height: var(--line-height-sm); }
.text-md  { font-size: var(--font-size-md); line-height: var(--line-height-md); }
.text-lg  { font-size: var(--font-size-lg); line-height: var(--line-height-lg); }
.text-xl  { font-size: var(--font-size-xl); line-height: var(--line-height-lg); }
.text-xxl { font-size: var(--font-size-xxl); line-height: 26px; letter-spacing: -0.01em; }

/* --- Layout utilities --- */
.flex-row    { display: flex; flex-direction: row; }
.flex-col    { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* --- Icon --- */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon img, .icon svg {
  width: 100%;
  height: 100%;
}
.icon--16 { width: 16px; height: 16px; }
.icon--24 { width: 24px; height: 24px; }
