/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --primary:   #2563eb;
  --primary-d: #1d4ed8;
  --accent:    #f59e0b;
  --danger:    #ef4444;
  --success:   #22c55e;
  --warning:   #f59e0b;
  --gray-100:  #f3f4f6;
  --gray-200:  #e5e7eb;
  --gray-600:  #4b5563;
  --gray-900:  #111827;
  --white:     #ffffff;
  --radius:    10px;
  --shadow:    0 4px 16px rgba(0,0,0,.10);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: var(--gray-900); background: var(--white); }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; }

/* ── Container ──────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ── Header / Nav ───────────────────────────────────────────────────────────── */
.header { background: var(--primary); color: white; position: sticky; top: 0; z-index: 100; box-shadow: var(--shadow); }
.nav-container { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.5rem; }
.logo { font-size: 1.4rem; font-weight: 700; color: white; }
.header nav { display: flex; gap: 1.5rem; }
.header nav a { color: rgba(255,255,255,.85); font-weight: 500; transition: color .2s; }
.header nav a:hover { color: white; }
.nav-toggle { display: none; background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--primary) 0%, #1e40af 100%); color: white; padding: 5rem 0; text-align: center; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); margin-bottom: 1rem; }
.hero p  { font-size: 1.2rem; margin-bottom: 2rem; opacity: .9; }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section { padding: 4rem 0; }
.section-gray { background: var(--gray-100); }
.section-title { text-align: center; font-size: 2rem; margin-bottom: 2.5rem; color: var(--primary); }

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

/* ── Card ───────────────────────────────────────────────────────────────────── */
.card { background: white; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.15); }
.card-img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 1.2rem; }
.card-body h3 { font-size: 1.1rem; margin-bottom: .5rem; }
.card-body p  { color: var(--gray-600); font-size: .9rem; margin-bottom: .5rem; }
.card-categoria { background: linear-gradient(135deg, #eff6ff, #dbeafe); border: 1px solid #bfdbfe; text-align: center; }
.card-categoria .card-body { padding: 2rem 1.5rem; }
.precio { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-top: .5rem !important; }
.codigo { font-size: .8rem; color: var(--gray-600); }
.descripcion { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn { display: inline-block; padding: .6rem 1.4rem; border-radius: var(--radius); font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: all .2s; font-size: .95rem; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-d); }
.btn-outline  { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-block { width: 100%; text-align: center; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn-warning { background: var(--warning); color: white; border-color: var(--warning); }
.btn-danger  { background: var(--danger);  color: white; border-color: var(--danger); }
.btn-success { background: var(--success); color: white; border-color: var(--success); }

/* ── Badge ──────────────────────────────────────────────────────────────────── */
.badge { display: inline-block; padding: .2rem .7rem; border-radius: 99px; font-size: .78rem; font-weight: 600; margin-bottom: .5rem; background: var(--gray-200); }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-danger  { background: #fee2e2; color: #b91c1c; }

/* ── Alerts ─────────────────────────────────────────────────────────────────── */
.alert { padding: .9rem 1.2rem; border-radius: var(--radius); margin-bottom: 1rem; font-weight: 500; }
.alert-success { background: #dcfce7; color: #15803d; border-left: 4px solid #22c55e; }
.alert-error   { background: #fee2e2; color: #b91c1c; border-left: 4px solid #ef4444; }

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group input,
.form-group textarea,
.form-group select { padding: .65rem .9rem; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: 1rem; transition: border-color .2s; width: 100%; }
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { outline: none; border-color: var(--primary); }

/* ── Filtros ────────────────────────────────────────────────────────────────── */
.filtros { display: flex; gap: .75rem; flex-wrap: wrap; margin-bottom: 2rem; justify-content: center; }
.btn-filtro { padding: .5rem 1.2rem; border-radius: 99px; border: 2px solid var(--primary); background: white; color: var(--primary); cursor: pointer; font-weight: 600; transition: all .2s; }
.btn-filtro.active, .btn-filtro:hover { background: var(--primary); color: white; }

/* ── Categoria section ──────────────────────────────────────────────────────── */
.categoria-seccion { margin-bottom: 3rem; }
.categoria-titulo { font-size: 1.5rem; color: var(--primary); margin-bottom: 1.2rem; padding-bottom: .5rem; border-bottom: 2px solid var(--gray-200); }

/* ── Contacto ───────────────────────────────────────────────────────────────── */
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.contacto-form-wrap { background: white; padding: 2rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.contacto-info { padding: 2rem; }
.contacto-info h3 { font-size: 1.3rem; margin-bottom: 1.2rem; color: var(--primary); }
.contacto-info p { margin-bottom: 1rem; font-size: 1rem; }

/* ── Acerca ─────────────────────────────────────────────────────────────────── */
.acerca-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.acerca-texto h2 { font-size: 1.3rem; color: var(--primary); margin: 1.5rem 0 .5rem; }
.acerca-texto p  { color: var(--gray-600); line-height: 1.7; }
.placeholder-img { font-size: 8rem; text-align: center; background: var(--gray-100); border-radius: var(--radius); padding: 3rem; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.footer { background: var(--gray-900); color: rgba(255,255,255,.7); text-align: center; padding: 2rem; margin-top: auto; }
.footer p { margin-bottom: .3rem; }

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .header nav { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--primary); padding: 1rem; }
  .header nav.open { display: flex; }
  .nav-toggle { display: block; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .contacto-grid, .acerca-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .cards-grid { grid-template-columns: 1fr; }
}
