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

:root {
  --bg: #f5f5f5;
  --white: #ffffff;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --accent: #6d28d9;
  --accent2: #7c3aed;
  --green: #16a34a;
  --green-light: #22c55e;
  --text: #111827;
  --text-muted: #6b7280;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* HEADER */
.header {
  position: sticky; top: 0; z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid var(--card-border);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.logo-icon { font-size: 22px; color: var(--accent); }
.logo-text { font-size: 20px; font-weight: 800; letter-spacing: 0.5px; color: var(--text); }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .2s; }
.nav a:hover { color: var(--text); }
.admin-link { color: var(--accent) !important; font-size: 13px !important; font-weight: 600 !important; }
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-nav { display: none; flex-direction: column; background: #fff; border-top: 1px solid var(--card-border); padding: 12px 24px 16px; }
.mobile-nav.open { display: flex; }
.mobile-nav a { color: var(--text-muted); text-decoration: none; padding: 12px 0; font-size: 15px; border-bottom: 1px solid var(--card-border); }
.mobile-nav a:last-child { border-bottom: none; }

/* BANNER */
.banner-section { width: 100%; }
.banner-img { width: 100%; max-height: 380px; object-fit: cover; display: block; }

/* HERO */
.hero {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #a855f7 100%);
  padding: 72px 24px 80px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; }
.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,0.2); border: 1px solid rgba(255,255,255,0.3);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 5px 16px; border-radius: 999px; margin-bottom: 20px;
}
.hero-title { font-size: clamp(28px, 5vw, 52px); font-weight: 900; line-height: 1.1; margin-bottom: 16px; color: #fff; }
.hero-accent { color: #fde68a; }
.hero-subtitle { font-size: 16px; color: rgba(255,255,255,0.85); margin-bottom: 32px; line-height: 1.6; }
.hero-btn {
  display: inline-block;
  background: #fff; color: var(--accent);
  font-size: 16px; font-weight: 700;
  padding: 14px 36px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2); transition: transform .2s, box-shadow .2s;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.3); }
.hero-shapes { display: none; }

/* PRODUCTS SECTION */
.products-section { padding: 56px 0 72px; background: var(--bg); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-title { font-size: clamp(22px, 4vw, 32px); font-weight: 800; color: var(--text); margin-bottom: 8px; }
.section-sub { color: var(--text-muted); font-size: 15px; }

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* PRODUCT CARD — rediseñada */
.product-card {
  background: var(--white);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform .22s, box-shadow .22s;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Imagen de la tarjeta — tamaño fijo y controlado */
.card-image-wrap {
  position: relative;
  width: 100%;
  height: 160px;
  overflow: hidden;
  background: #f0f0f0;
  flex-shrink: 0;
}
.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .3s;
}
.product-card:hover .card-image-wrap img { transform: scale(1.04); }
.card-image-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 56px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}
.account-badge {
  position: absolute; top: 10px; right: 10px;
  font-size: 10px; font-weight: 700; letter-spacing: .5px;
  padding: 3px 9px; border-radius: 999px; text-transform: uppercase;
}
.badge-cuenta { background: #7c3aed; color: #fff; }
.badge-perfil { background: #ec4899; color: #fff; }

.card-body {
  padding: 16px 18px 18px;
  flex: 1; display: flex; flex-direction: column; gap: 10px;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.3; }
.card-guarantee {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: var(--green);
  background: #dcfce7; padding: 3px 10px; border-radius: 999px; width: fit-content;
  border: 1px solid #bbf7d0;
}
.card-features { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.card-features li {
  font-size: 12px; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: 6px; line-height: 1.4;
}
.card-features li::before { content: "✓"; color: var(--green); font-weight: 800; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.card-price {
  font-size: 24px; font-weight: 900; color: var(--text);
  margin-top: auto; padding-top: 4px;
}
.card-price span { font-size: 13px; font-weight: 500; color: var(--text-muted); }

.wa-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #16a34a;
  color: #fff; font-size: 14px; font-weight: 700;
  padding: 12px; border-radius: 10px; text-decoration: none;
  transition: background .2s, transform .2s;
}
.wa-btn:hover { background: #15803d; transform: translateY(-1px); }
.wa-btn svg { width: 18px; height: 18px; flex-shrink: 0; }

/* LOADING / EMPTY */
.loading-state, .empty-state {
  grid-column: 1 / -1;
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.spinner {
  width: 36px; height: 36px; border: 3px solid #e5e7eb;
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin .8s linear infinite; margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* CONTACT */
.contact-section { padding: 32px 0 72px; background: var(--bg); }
.contact-card {
  background: var(--white); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 44px 32px; text-align: center;
  max-width: 480px; margin: 0 auto; box-shadow: var(--shadow);
}
.contact-icon { font-size: 44px; margin-bottom: 14px; }
.contact-card h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.contact-card p { color: var(--text-muted); margin-bottom: 24px; font-size: 14px; line-height: 1.6; }
.wa-btn-large {
  display: inline-flex; align-items: center; gap: 10px;
  background: #16a34a; color: #fff; font-size: 15px; font-weight: 700;
  padding: 13px 30px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 4px 16px rgba(22,163,74,0.3); transition: background .2s, transform .2s;
}
.wa-btn-large:hover { background: #15803d; transform: translateY(-1px); }

/* FOOTER */
.footer { background: #fff; border-top: 1px solid var(--card-border); padding: 28px 24px; text-align: center; }
.footer-logo { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* RESPONSIVE */
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: flex; }
  .hero { padding: 52px 20px 64px; }
  .products-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
}
@media (max-width: 520px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 12px 14px 14px; gap: 8px; }
  .card-image-wrap { height: 130px; }
  .card-title { font-size: 13px; }
  .card-price { font-size: 20px; }
  .wa-btn { font-size: 12px; padding: 10px 8px; }
  .wa-btn svg { width: 15px; height: 15px; }
}
@media (max-width: 360px) {
  .products-grid { grid-template-columns: 1fr; }
}
