/* ============================================================
   Confecciones Fénix — Hoja de estilos
   Paleta: moderno y minimalista con acento "Fénix" (naranja cálido)
   ============================================================ */

:root {
  --bg: #ffffff;
  --surface: #f8fafc;
  --surface-alt: #f1f5f9;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #475569;
  --text-soft: #64748b;
  --primary: #0f172a;
  --accent: #ea580c;
  --accent-soft: #fed7aa;
  --accent-dark: #c2410c;
  --teal: #0d9488;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px -8px rgba(15, 23, 42, 0.15);
  --radius: 14px;
  --radius-sm: 8px;
  --max-w: 1200px;
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-dark); }

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

h1, h2, h3, h4 {
  color: var(--text);
  margin: 0 0 0.6em;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 600; }

p { margin: 0 0 1em; color: var(--text-muted); }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================ NAV ============================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 32px; height: 32px; }
.brand-tag { color: var(--text-soft); font-weight: 400; font-size: 0.82rem; }
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  color: var(--text);
}
.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 820px) {
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 18px 24px;
    gap: 18px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-toggle { display: inline-flex; }
  .brand-tag { display: none; }
}

/* ============================ HERO ============================ */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(ellipse at 80% 0%, rgba(234, 88, 12, 0.10), transparent 55%),
    radial-gradient(ellipse at 10% 80%, rgba(13, 148, 136, 0.10), transparent 55%),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.hero p.lead {
  font-size: 1.1rem;
  max-width: 520px;
  margin-bottom: 28px;
}
.cta-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(234, 88, 12, 0.3);
}
.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(234, 88, 12, 0.4);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--surface); color: var(--text); }
.btn-whatsapp {
  background: #25d366;
  color: #fff;
}
.btn-whatsapp:hover { background: #1ebe5d; color: #fff; }

.hero-visual {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--surface);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-visual svg { width: 100%; height: 100%; }
.hero-badge {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: 0.5; }
}

@media (max-width: 820px) {
  .hero { padding: 40px 0 30px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
}

/* ============================ FEATURES ============================ */
.features {
  padding: 50px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature {
  text-align: center;
  padding: 10px;
}
.feature-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  background: #fff;
  color: var(--accent);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: 0.88rem; margin: 0; }

@media (max-width: 820px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}

/* ============================ CATALOG ============================ */
.section {
  padding: 80px 0;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 44px;
}
.section-head p { font-size: 1.05rem; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 36px;
}
.filter-chip {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.filter-chip:hover { color: var(--text); border-color: var(--text-soft); }
.filter-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--text-soft);
}
.product-image {
  aspect-ratio: 1/1;
  background: var(--surface);
  overflow: hidden;
  position: relative;
}
.product-image svg { width: 100%; height: 100%; }
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.product-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-name {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
  margin: 0 0 6px;
}
.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0 0 14px;
  flex: 1;
}
.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.product-price {
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
}
.product-price span {
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--text-soft);
}
.product-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.product-cta:hover { color: var(--accent-dark); }

/* ============================ MODAL ============================ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal.open { display: flex; opacity: 1; }
.modal-card {
  background: #fff;
  border-radius: var(--radius);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.modal-image {
  background: var(--surface);
  aspect-ratio: 1/1;
}
.modal-image svg { width: 100%; height: 100%; }
.modal-body { padding: 30px; position: relative; }
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-close:hover { background: var(--border); }
.modal-body h3 { font-size: 1.4rem; margin-bottom: 8px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip-list .chip {
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.modal-meta {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  font-size: 0.9rem;
}
.modal-meta strong { color: var(--text); font-weight: 600; }
.modal-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 12px 0 18px;
}
.modal-price span { font-weight: 400; font-size: 0.8rem; color: var(--text-soft); }

@media (max-width: 640px) {
  .modal-grid { grid-template-columns: 1fr; }
  .modal-image { aspect-ratio: 4/3; }
}

/* ============================ CONTACT ============================ */
.contact {
  background: var(--primary);
  color: #fff;
  padding: 80px 0;
}
.contact h2 { color: #fff; }
.contact p { color: rgba(255, 255, 255, 0.75); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}
.contact-info {
  display: grid;
  gap: 20px;
  margin-top: 28px;
}
.contact-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.contact-icon {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--accent);
}
.contact-row h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
  opacity: 0.65;
  font-weight: 500;
}
.contact-row a, .contact-row p {
  color: #fff;
  margin: 0;
  font-size: 1rem;
}
.contact-row a:hover { color: var(--accent); }

.contact-form {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 30px;
}
.contact-form label {
  display: block;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 14px;
  transition: border 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
}
.contact-form textarea { min-height: 110px; resize: vertical; }
.contact-form .btn-primary { width: 100%; justify-content: center; }

@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ============================ FOOTER ============================ */
.footer {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.6);
  padding: 30px 0;
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.footer a { color: rgba(255, 255, 255, 0.75); }
.footer a:hover { color: #fff; }

/* ============================ FLOATING WHATSAPP ============================ */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.45);
  color: #fff;
  z-index: 60;
  transition: transform 0.2s;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }
.whatsapp-float svg { width: 30px; height: 30px; }

/* ============================ ADMIN ============================ */
.admin-body {
  background: var(--surface);
  min-height: 100vh;
}

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--surface) 0%, #fff 100%);
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card .brand { justify-content: center; margin-bottom: 10px; }
.login-card h2 { margin-bottom: 8px; font-size: 1.4rem; }
.login-card p { font-size: 0.9rem; margin-bottom: 22px; }
.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 12px;
}
.login-card input:focus { outline: none; border-color: var(--accent); }
.login-card .btn-primary { width: 100%; justify-content: center; }
.login-error {
  background: #fef2f2;
  color: var(--danger);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  margin-bottom: 12px;
  display: none;
}
.login-error.show { display: block; }
.login-hint {
  font-size: 0.78rem;
  color: var(--text-soft);
  margin-top: 14px;
}

.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}
.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.admin-nav {
  display: flex;
  gap: 12px;
  align-items: center;
}
.admin-nav a { color: var(--text-muted); font-size: 0.9rem; }
.admin-nav a:hover { color: var(--text); }

.admin-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px;
}
.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.admin-toolbar h2 { margin: 0; }

.admin-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.table-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
}
table.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 800px;
}
.admin-table th, .admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--surface); }

.mini-img {
  width: 42px;
  height: 42px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.row-actions { display: flex; gap: 4px; }
.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.icon-btn:hover { background: var(--border); color: var(--text); }
.icon-btn.danger:hover { background: #fef2f2; color: var(--danger); }
.cat-tag {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}
.cat-tag.medico { background: #ccfbf1; color: #0f766e; }
.cat-tag.industrial { background: #fed7aa; color: #c2410c; }

/* Admin form (modal) */
.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
}
.form-grid .full { grid-column: 1/-1; }
.form-grid label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.form-grid input,
.form-grid textarea,
.form-grid select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
}
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  outline: none;
  border-color: var(--accent);
}
.form-grid textarea { min-height: 100px; resize: vertical; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: all 0.25s;
  z-index: 200;
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
}
