/* ============================================
   FABRIEMPANADAS - Sistema de Diseño Global
   Mobile First
   ============================================ */

/* --------------------------------------------
   1. VARIABLES CSS
   -------------------------------------------- */
:root {
  /* Colores principales */
  --primary: #F57C00;
  --primary-dark: #E65100;
  --primary-light: #FFB74D;
  --secondary: #FBC02D;
  --secondary-dark: #F9A825;

  /* Colores de marca */
  --dark: #4E2A12;
  --dark-soft: #6D3B1A;
  --light: #FFF4E6;
  --light-soft: #FFF8F0;
  --gray: #666666;
  --gray-light: #F5F5F5;
  --gray-border: #E0E0E0;

  /* Estados */
  --success: #25D366;
  --success-dark: #1DA851;
  --error: #E53935;
  --warning: #FBC02D;

  /* Tipografía */
  --font-main: 'Poppins', sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-md: 1.125rem;   /* 18px */
  --font-size-lg: 1.25rem;    /* 20px */
  --font-size-xl: 1.5rem;     /* 24px */
  --font-size-2xl: 2rem;      /* 32px */
  --font-size-3xl: 2.5rem;    /* 40px */
  --font-size-4xl: 3rem;      /* 48px */

  /* Espaciado */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Sombras */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.16);
  --shadow-primary: 0 4px 20px rgba(245,124,0,0.35);
  --shadow-success: 0 4px 20px rgba(37,211,102,0.35);

  /* Transiciones */
  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s ease;

  /* Layout */
  --container-max: 1200px;
  --container-pad: 1rem;
  --header-height: 70px;
}

/* --------------------------------------------
   2. RESET MODERNO
   -------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: var(--font-size-base);
  color: var(--dark);
  background-color: #ffffff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

input, textarea, select, button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* --------------------------------------------
   3. TIPOGRAFÍA
   -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--dark);
}

h1 { font-size: var(--font-size-2xl); }
h2 { font-size: var(--font-size-xl); }
h3 { font-size: var(--font-size-lg); }
h4 { font-size: var(--font-size-md); }

p {
  color: var(--gray);
  line-height: 1.7;
}

/* Escalado responsive tipografía */
@media (min-width: 768px) {
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
  h3 { font-size: var(--font-size-xl); }
}

@media (min-width: 1024px) {
  h1 { font-size: var(--font-size-4xl); }
  h2 { font-size: var(--font-size-3xl); }
}

/* --------------------------------------------
   4. LAYOUT - CONTENEDOR
   -------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-pad);
 
}

@media (min-width: 768px) {
  :root { --container-pad: 1.5rem; }
}

@media (min-width: 1024px) {
  :root { --container-pad: 2rem; }
}

/* --------------------------------------------
   5. GRIDS REUTILIZABLES
   -------------------------------------------- */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--space-lg); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* --------------------------------------------
   6. SECCIONES
   -------------------------------------------- */
.section {
  padding: var(--space-2xl) 0;
}

.section-lg {
  padding: var(--space-3xl) 0;
}

@media (min-width: 768px) {
  .section { padding: var(--space-3xl) 0; }
  .section-lg { padding: 5rem 0; }
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: var(--font-size-md);
}

.section-divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
  margin: var(--space-md) auto 0;
}

/* --------------------------------------------
   7. UTILIDADES
   -------------------------------------------- */

/* Texto */
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-dark { color: var(--dark); }
.text-gray { color: var(--gray); }
.text-white { color: #ffffff; }
.text-sm { font-size: var(--font-size-sm); }
.text-lg { font-size: var(--font-size-lg); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

/* Fondos */
.bg-light { background-color: var(--light); }
.bg-dark { background-color: var(--dark); }
.bg-primary { background-color: var(--primary); }
.bg-white { background-color: #ffffff; }

/* Espaciado */
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

/* Flex */
.flex { display: flex; }
.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.flex-wrap { flex-wrap: wrap; }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }

/* Display */
.hidden { display: none !important; }
.show { display: block !important; }

/* Imagen de objeto */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay */
.overlay {
  position: absolute;
  inset: 0;
  background: rgba(78, 42, 18, 0.55);
}

/* Scroll suave para anclas */
[id] {
  scroll-margin-top: var(--header-height);
}