/* ============================================================
   Tornillería Lupserr — Estilos globales
   Paleta de identidad: azul royal + dorado metálico + crema
   Inspirada directamente en el logo oficial.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Source+Serif+4:ital,wght@0,400;0,600;1,400&family=Oswald:wght@500;700&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --color-azul:         #060D28;
  --color-azul-mid:     #0A1840;
  --color-azul-light:   #112255;
  --color-dorado:       #D4A017;
  --color-dorado-dark:  #A87E0A;
  --color-dorado-light: #E8B923;
  --color-crema:        #F7F3EC;
  --color-crema-dark:   #EDE5D2;
  --color-gris:         #6b7280;
  --color-gris-light:   #d1d5db;
  --color-blanco:       #ffffff;

  --font-titulo:  'Bebas Neue', 'Oswald', sans-serif;
  --font-cuerpo:  'Source Serif 4', Georgia, serif;
  --font-ui:      system-ui, -apple-system, sans-serif;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.15);
  --shadow-md:     0 8px 24px rgba(0,0,0,0.2);
  --shadow-lg:     0 16px 48px rgba(0,0,0,0.3);
  --shadow-dorado: 0 4px 20px rgba(212,160,23,0.35);
  --shadow-azul:   0 8px 28px rgba(10,42,107,0.35);

  --gradient-dorado: linear-gradient(135deg, #E8B923 0%, #D4A017 50%, #A87E0A 100%);
  --gradient-dorado-soft: linear-gradient(135deg, #F0CF5E 0%, #D4A017 100%);

  --radius:       6px;
  --radius-lg:    12px;
  --transition:   0.3s ease;
  --max-width:    1200px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-cuerpo);
  color: var(--color-azul);
  background-color: var(--color-crema);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Patrón de cuadrícula industrial ──────────────────────────
   Cuadrícula visible usada para alternar secciones.
   .section-azul  → fondo azul royal + cuadrícula dorado/blanco
   .section-crema → fondo crema + cuadrícula azul sutil
   ─────────────────────────────────────────────────────────── */
.bg-pattern,
.section-azul {
  background-color: var(--color-azul);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 26px,
      rgba(232,185,35,0.09) 26px,
      rgba(232,185,35,0.09) 27px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 26px,
      rgba(255,255,255,0.07) 26px,
      rgba(255,255,255,0.07) 27px
    );
}
.section-crema {
  background-color: var(--color-crema);
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 26px,
      rgba(10,42,107,0.07) 26px,
      rgba(10,42,107,0.07) 27px
    ),
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 26px,
      rgba(212,160,23,0.05) 26px,
      rgba(212,160,23,0.05) 27px
    );
}

/* En secciones azules el texto se invierte */
.section-azul .section-title,
.section-azul .feature-item__title { color: var(--color-crema); }
.section-azul .section-label { color: var(--color-dorado-light); }
.section-azul p { color: rgba(247,243,236,0.72); }
.section-azul .lead { color: var(--color-crema); }
.section-azul .product-card__name { color: var(--color-azul); }
.section-azul .product-card__desc { color: var(--color-gris); }
.section-azul .product-card p { color: var(--color-gris); }

/* En secciones crema los títulos se mantienen azul */
.section-crema .section-title,
.section-crema .feature-item__title { color: var(--color-azul); }
.section-crema .section-label { color: var(--color-dorado-dark); }

/* ── Tipografía ────────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  font-family: var(--font-titulo);
  letter-spacing: 0.04em;
  line-height: 1.1;
}
h1 { font-size: clamp(3rem, 8vw, 7rem); }
h2 { font-size: clamp(2rem, 5vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 3vw, 2rem); }
h4 { font-size: 1.3rem; }

p { font-size: 1rem; color: var(--color-gris); }
p.lead { font-size: 1.15rem; color: var(--color-azul); }

/* Texto con brillo dorado metálico (imita las letras del logo) */
.text-gold-shine {
  background: var(--gradient-dorado);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 1px 0 rgba(168,126,10,0.25));
}

/* ── Contenedor ────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Secciones ─────────────────────────────────────────────── */
section { padding: 5rem 0; }
.section-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-dorado-dark);
  margin-bottom: 0.5rem;
  display: block;
}
.section-title {
  margin-bottom: 1rem;
  color: var(--color-azul);
}
.section-title.light { color: var(--color-crema); }
.section-subtitle { max-width: 600px; }

/* ── Botones ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all var(--transition);
  will-change: transform;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gradient-dorado);
  color: var(--color-azul);
  box-shadow: var(--shadow-dorado);
  border-color: var(--color-dorado-dark);
}
.btn-primary:hover {
  background: var(--gradient-dorado-soft);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(212,160,23,0.55);
  color: var(--color-azul);
}
.btn-outline {
  background: transparent;
  color: var(--color-crema);
  border: 2px solid rgba(232,185,35,0.5);
}
.btn-outline:hover {
  border-color: var(--color-dorado-light);
  background: rgba(212,160,23,0.12);
  color: var(--color-dorado-light);
}
.btn-dark {
  background: var(--color-azul);
  color: var(--color-crema);
  border-color: var(--color-azul-mid);
}
.btn-dark:hover {
  background: var(--color-azul-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-azul);
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
}

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-radius: 20px;
}
.badge-disponible  { background: #d1fae5; color: #065f46; }
.badge-agotado     { background: #fee2e2; color: #991b1b; }
.badge-destacado   { background: #fef3c7; color: #92400e; }

/* ── Grid de productos ─────────────────────────────────────── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* ── Card de producto ──────────────────────────────────────── */
.product-card {
  background: var(--color-blanco);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  will-change: transform;
  border: 1px solid rgba(10,42,107,0.06);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: rgba(212,160,23,0.4);
}
.product-card__img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--color-crema-dark);
}
.product-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card__img img {
  transform: scale(1.05);
}
.product-card__body {
  padding: 1.2rem;
}
.product-card__cat {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-dorado-dark);
  margin-bottom: 0.4rem;
}
.product-card__name {
  font-family: var(--font-titulo);
  font-size: 1.25rem;
  color: var(--color-azul);
  margin-bottom: 0.4rem;
  letter-spacing: 0.03em;
}
.product-card__desc {
  font-size: 0.85rem;
  color: var(--color-gris);
  margin-bottom: 0.75rem;
}
.product-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.product-card__price {
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dorado-dark);
}

/* ── Divisor decorativo ────────────────────────────────────── */
.divider-dorado {
  width: 60px;
  height: 4px;
  background: var(--gradient-dorado);
  border-radius: 2px;
  margin: 1rem 0 1.5rem;
  box-shadow: 0 1px 6px rgba(212,160,23,0.4);
}

/* ── Estado vacío ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--color-gris);
}
.empty-state__icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.4; }

/* ── Alerta ────────────────────────────────────────────────── */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #059669; }
.alert-danger  { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-info    { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ── Paginación ────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--color-blanco);
  color: var(--color-azul);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.pagination a:hover { background: var(--color-azul); color: var(--color-dorado-light); }
.pagination .active {
  background: var(--gradient-dorado);
  color: var(--color-azul);
  box-shadow: var(--shadow-dorado);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 3rem 0; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr 1fr; }
}
