/* =========================
   TIPOGRAFÍA
========================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* =========================
   DESIGN TOKENS
========================= */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f1f5f9;

  --primary: #22c55e;
  --primary-dark: #16a34a;

  --text: #111827;
  --muted: #6b7280;

  --border: #e5e7eb;

  --radius-sm: 8px;
  --radius-md: 14px;

  --shadow-sm: 0 4px 10px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 25px rgba(0,0,0,0.08);

  --transition: all 0.25s ease;
  
  --accent: #3b82f6;
  --accent-dark: #2563eb;
}

/* =========================
   RESET & BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* =========================
   TYPOGRAPHY
========================= */
h1, h2, h3 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin-bottom: 20px;
}

p {
  color: #4b5563;
  font-size: 0.95rem;
}

/* =========================
   LAYOUT
========================= */
.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 20px;
}

section {
  padding: 80px 0;
}

.section-block {
  margin-top: 40px;
}

section + section {
  margin-top: 20px;
}

.community-section {
  margin-bottom: 60px;
}

/* =========================
   HEADER
========================= */
.header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  gap: 20px;
}

.logo a {
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  color: var(--text);
}

.logo a img {
  width: 280px;
  height: auto;
  max-width: 100%;
}

/* NAV LINKS */
.nav-links ul {
  display: flex;
  list-style: none;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.9rem;
  letter-spacing: 0.2px;
  position: relative;
  padding: 6px 0;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.25s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--text);
}

.nav-links a.nav-buy {
  color: var(--accent) !important;
  font-weight: 600;
}

.nav-links .nav-buy::after {
  color: var(--accent-dark);
}

.nav-links .nav-buy::after {
  background: var(--accent);
}

/* NAV ACTIONS */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn:hover {
  border-color: var(--primary);
  background: rgba(34,197,94,0.08);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  stroke: var(--text);
  stroke-width: 2;
  fill: none;
}

.icon-close {
  display: none;
}

.menu-toggle {
  display: none;
}

.menu-toggle.active .icon-open {
  display: none;
}

.menu-toggle.active .icon-close {
  display: block;
}	

/* =========================
   HERO COMPARTIDO — ESTILO C
   Usar en: tienda, blog, comunidad
========================= */
section.cm-hero {
  padding: 0;
  margin-top: 0;
  margin-bottom: 40px;
  border-top: 4px solid var(--primary);
}

.cm-hero {
  margin-top: 32px;
  margin-bottom: 40px;
  padding: 0;
  border-top: 4px solid var(--primary);
}

.cm-hero-body {
  background: var(--surface);
  padding: 28px 32px;
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.cm-hero-icon {
  width: 52px;
  height: 52px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;  
}

.cm-hero-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.cm-hero-text .section-intro {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.6;  
}

.cm-hero-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cm-hero-pill {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 20px;
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid var(--border);
}

.cm-hero-pill.highlight {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 768px) {
  .cm-hero-body {
    padding: 20px;
    gap: 14px;
  }

  .cm-hero-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 10px;
  }

  .cm-hero-text h1 {
    font-size: 1.15rem;
  }

  .cm-hero-text .section-intro {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .cm-hero-body {
    /*flex-direction: column; MIRA QUIE HACER CON ESTO EN MIOVIL*/
    gap: 12px;
  }
}

/* =========================
   HERO SLIDER
========================= */

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn:active {
  transform: scale(0.98);
}

.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-buy {
  background: var(--accent);
  color: white;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-buy:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* =========================
   GRID
========================= */
.grid-3,
.grid-4 {
  display: grid;
  gap: 24px;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* =========================
   CARDS
========================= */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.card,
.product-card,
.blog-card {
  will-change: transform;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(34,197,94,0.3);
}

.product-card:hover,
.blog-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-8px);
}

.product-extra {
  font-size: 0.8rem;
  color: var(--primary);
  margin-top: 6px;
}

.product-info p {
  font-size: 0.9rem;
  min-height: 40px;
}

/* =========================
   BLOG GRID
========================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.blog-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.blog-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-image img {
  transform: scale(1.05);
}

.tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 500;
}

.blog-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-content h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.blog-content p {
  font-size: 0.95rem;
  margin-bottom: 14px;
  min-height: 60px;
}

.link {
  text-decoration: none;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.blog-content .link {
  margin-top: auto;
}

.link:hover {
  text-decoration: underline;
}

.blog-meta {
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.75rem;
  color: var(--muted);
}

.blog-card {
  display: flex;
  flex-direction: column;
}

.category {
  background: var(--surface-2);
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 500;
}

.reading-time {
  opacity: 0.8;
}

/* =========================
   UTILITIES
========================= */
.text-center { text-align: center; }
.mb-lg { margin-bottom: 24px; }
.mt-lg { margin-top: 24px; }

/* =========================
   FOOTER
========================= */
.footer {
  background: #111827;
  color: #9ca3af;
  text-align: center;
  padding: 40px 20px;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
  .grid-4,
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav {
    flex-wrap: wrap;
	padding: 12px 20px;
    align-items: center;
	position: relative;
  }

  .menu-toggle {
    display: flex;
  }
  
  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
  }
  
  .logo {
    flex: 1;
  }
  
  .nav-actions {
    order: 2;
  }

  .menu-toggle {
    order: 3;
  }

  .nav-links {
	position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;

    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    border-radius: 0 0 12px 12px;

    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: all 0.3s ease;

    z-index: 99;
  }

  .nav-links.active {
    max-height: 400px;
    opacity: 1;
    transform: translateY(0);
    padding: 10px 0;
  }

  .nav-links ul {
    padding: 10px 20px;
    flex-direction: column;
    gap: 12px;
  }

  .nav-links a {
    font-size: 1rem;
    padding: 10px 0;
  }
}

@media (max-width: 768px) {
section {
    padding: 40px 0;
  }

  .section-block {
    margin-top: 20px;
  }

  p {
    font-size: 0.9rem;
  }

  

  

  

  
   h2 {
    font-size: 1.4rem;
    line-height: 1.2;
  }

  .btn {
    width: 100%;
    text-align: center;
	font-size: 1rem;
    padding: 14px 20px;
    border-radius: 10px;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }
  
  .floating-sale {
    bottom: 15px;
    right: 15px;
    padding: 12px 16px;
    font-size: 0.85rem;
  }
}

@media (max-width: 600px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .logo a img {
    width: 185px;
  }

}

/* =========================
   ACCESSIBILITY
========================= */
a:focus,
button:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.floating-sale {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  padding: 14px 20px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
  z-index: 999;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 6px;

  animation: fadeInUp 0.6s ease, pulse 2.5s infinite;
}

/* Hover */
.floating-sale:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
}

/* =========================
   CART
========================= */
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.cart-container {
  background: var(--surface);
  padding: 40px 20px;
  min-height: 60vh;
}

.cart-empty {
  text-align: center;
  padding: 60px 20px;
}

.cart-items {
  max-width: 1200px;
  margin: 0 auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 100px 1fr 100px 120px;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.cart-item-image {
  aspect-ratio: 1/1;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-info h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.cart-item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.qty-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.cart-total {
  max-width: 1200px;
  margin: 40px auto 0;
  text-align: right;
  padding: 20px;
  border-top: 2px solid var(--border);
  font-size: 1.5rem;
  font-weight: 700;
}

.cart-checkout {
  max-width: 1200px;
  margin: 30px auto;
  text-align: right;
}
/* Click */
.floating-sale:active {
  transform: scale(0.96);
}

/* Animación de entrada */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(59,130,246, 0.5); }
  70% { box-shadow: 0 0 0 12px rgba(59,130,246, 0); }
  100% { box-shadow: 0 0 0 0 rgba(59,130,246, 0); }
}

.floating-sale {
  animation: fadeInUp 0.6s ease, pulse 2.5s infinite;
  background: linear-gradient(135deg, #3b82f6, #2563eb)
}