/*
Theme Name: Kibli
Theme URI: https://kibli.com.mx
Author: Kibli
Description: Tienda digital de contenido libre. Libros, imágenes, plantillas, música, cursos y más.
Version: 1.0
Text Domain: kibli
*/

:root {
  --primary: #6c5ce7;
  --primary-dark: #5541d9;
  --primary-light: #a29bfe;
  --accent: #fd79a8;
  --accent-hover: #e84393;
  --yellow: #fdcb6e;
  --green: #00b894;
  --teal: #00cec9;
  --dark: #2d3436;
  --gray-100: #f8f9fd;
  --gray-200: #e9ecef;
  --gray-500: #6c757d;
  --gray-700: #495057;
  --gradient-main: linear-gradient(135deg, #6c5ce7, #a29bfe);
  --gradient-accent: linear-gradient(135deg, #fd79a8, #e84393);
  --gradient-hero: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 50%, #fd79a8 100%);
  --shadow-sm: 0 2px 8px rgba(108,92,231,0.08);
  --shadow-md: 0 4px 16px rgba(108,92,231,0.12);
  --shadow-lg: 0 8px 32px rgba(108,92,231,0.16);
  --radius: 12px;
  --radius-lg: 20px;
}

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

body {
  font-family: 'Nunito', system-ui, -apple-system, sans-serif;
  color: var(--gray-700);
  background: var(--gray-100);
  line-height: 1.7;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* ========== HEADER ========== */
.site-header {
  background: #fff;
  box-shadow: 0 2px 20px rgba(108,92,231,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.site-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  color: var(--gray-700);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.main-nav a:hover, .main-nav a.active {
  background: var(--gradient-main);
  color: #fff;
}

.nav-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 22px; border-radius: 10px; font-size: 0.9rem; font-weight: 700; cursor: pointer; border: none; transition: all 0.3s; }
.btn-primary-nav { background: var(--gradient-main); color: #fff !important; }
.btn-primary-nav:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(108,92,231,0.4); }
.btn-outline-nav { background: transparent; border: 2px solid var(--primary); color: var(--primary) !important; }
.btn-outline-nav:hover { background: var(--primary); color: #fff !important; }

/* ========== HERO ========== */
.hero-section {
  background: var(--gradient-hero);
  color: #fff;
  padding: 80px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-content { max-width: 700px; margin: 0 auto; position: relative; z-index: 1; }

.hero-content h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
}

.hero-content p {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-bottom: 28px;
}

.hero-search {
  background: #fff;
  border-radius: 14px;
  padding: 6px;
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

.hero-search input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
}

.hero-search button {
  padding: 14px 28px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-search button:hover { opacity: 0.9; transform: scale(1.02); }

.hero-categories {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.hero-cat {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px;
  border-radius: 50px;
  font-size: 0.85rem;
  color: #fff;
  transition: all 0.2s;
}

.hero-cat:hover { background: rgba(255,255,255,0.25); color: #fff; }

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

.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: 2rem; font-weight: 800; color: var(--dark); margin-bottom: 8px; }
.section-title p { color: var(--gray-500); font-size: 1rem; }

.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }

/* ========== CATEGORY CARDS ========== */
.cat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
  cursor: pointer;
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.cat-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  font-size: 1.4rem;
}

.cat-card h4 { font-size: 0.95rem; font-weight: 700; color: var(--dark); }
.cat-card span { font-size: 0.8rem; color: var(--gray-500); }

/* ========== PRODUCT CARDS ========== */
.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  transition: all 0.3s;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.product-icon {
  height: 140px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,0.3);
}

.product-body { padding: 16px; }
.product-body h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 4px; }
.product-body p { font-size: 0.85rem; color: var(--gray-500); margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.product-meta {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--gray-200);
}

.product-price { font-size: 1.1rem; font-weight: 800; color: var(--primary); }
.product-price .oldprice { font-size: 0.8rem; font-weight: 400; color: var(--gray-500); text-decoration: line-through; margin-left: 6px; }

/* ========== FOOTER ========== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 48px 20px 24px;
}

.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px;
}

.footer-col h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; font-weight: 700; }
.footer-col a { display: block; color: rgba(255,255,255,0.5); font-size: 0.9rem; margin-bottom: 8px; }
.footer-col a:hover { color: var(--primary-light); }

.footer-bottom {
  max-width: 1200px; margin: 32px auto 0; padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center; font-size: 0.85rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 12px 20px; }
  .main-nav { flex-wrap: wrap; justify-content: center; margin-top: 12px; }
  .hero-content h1 { font-size: 1.8rem; }
  .hero-search { flex-direction: column; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
