/**
 * TuttyCosas Kids — layout.css
 * Navbar · Hero · Grid · Categorías · Footer · Responsive
 * Sprint 2 — Arquitectura modular
 */

/* ── NAVBAR ── */
.navbar {
  background: rgba(250,247,242,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cream-deep);
  position: sticky; top: 0; z-index: 100;
}
.nav-inner {
  max-width: 1240px; margin: 0 auto;
  padding: 0 28px; height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.logo {
  font-family: var(--font-display); font-size: 1.45rem; font-weight: 700;
  color: var(--sage-dark); display: flex; align-items: center; gap: 8px; white-space: nowrap;
}
.logo-leaf { display: inline-block; font-size: 1.2rem; animation: leafSway 4s ease-in-out infinite; }
.logo em   { font-style: italic; color: var(--terra); }

.nav-search { flex: 1; max-width: 360px; position: relative; }
.nav-search input {
  width: 100%; padding: 9px 16px 9px 38px;
  border: 1.5px solid var(--cream-deep); border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 0.88rem;
  background: var(--cream-dark); color: var(--bark);
  outline: none; transition: all 0.2s;
}
.nav-search input:focus { border-color: var(--sage); background: var(--white); }
.nav-search input::placeholder { color: var(--stone); }
.nav-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--stone); pointer-events: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn-cart {
  background: var(--sage); color: var(--white);
  padding: 9px 18px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 0.85rem;
  display: flex; align-items: center; gap: 7px;
  transition: all 0.25s var(--ease-out);
}
.btn-cart:hover { background: var(--sage-dark); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.cart-badge {
  background: var(--terra); color: var(--white);
  border-radius: 50%; width: 19px; height: 19px;
  font-size: 0.68rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── NAV CATEGORÍAS ── */
.nav-cats { border-bottom: 1px solid var(--cream-deep); background: var(--cream); }
.nav-cats-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 28px;
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
}
.nav-cats-inner::-webkit-scrollbar { display: none; }
.nav-cat-link {
  padding: 11px 18px; font-size: 0.83rem; font-weight: 500;
  color: var(--stone); border-bottom: 2px solid transparent;
  white-space: nowrap; transition: all 0.2s;
  display: flex; align-items: center; gap: 6px;
}
.nav-cat-link:hover { color: var(--sage); }
.nav-cat-link.active { color: var(--sage-dark); border-bottom-color: var(--sage); font-weight: 600; }

/* ── HERO ── */
.hero {
  background: var(--cream-dark); min-height: 520px;
  display: grid; grid-template-columns: 1fr 1.1fr; overflow: hidden;
}
.hero-content {
  padding: 72px 56px 72px 48px;
  display: flex; flex-direction: column; justify-content: center; position: relative;
}
.hero-content::after {
  content: ''; position: absolute; top: 40px; left: 40px;
  width: 120px; height: 120px;
  border: 1.5px solid var(--cream-deep); border-radius: 50%; opacity: 0.6;
}
.hero-eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--sage);
  margin-bottom: 18px; display: flex; align-items: center; gap: 8px;
}
.hero-eyebrow::before { content: ''; display: block; width: 28px; height: 1.5px; background: var(--sage); }
.hero h1 {
  font-family: var(--font-display); font-size: clamp(2.2rem,4vw,3.4rem);
  font-weight: 700; line-height: 1.12; color: var(--bark); margin-bottom: 20px;
}
.hero h1 em   { font-style: italic; color: var(--sage); }
.hero h1 span { color: var(--terra); }
.hero-desc {
  font-size: 1rem; color: var(--bark-mid); line-height: 1.75;
  font-weight: 400; max-width: 380px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.hero-trust-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 28px; }
.trust-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--white); padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 0.72rem; font-weight: 500; color: var(--bark-mid);
  box-shadow: var(--shadow-xs);
}
.hero-visual {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--sage-pale) 0%, var(--cream-deep) 100%);
  display: flex; align-items: center; justify-content: center;
}
.hero-badge {
  position: absolute; background: var(--white); border-radius: var(--radius-lg);
  padding: 10px 16px; box-shadow: var(--shadow-md);
  font-size: 0.78rem; font-weight: 600; color: var(--bark);
  display: flex; align-items: center; gap: 6px;
  animation: float 4s ease-in-out infinite;
}
.hero-badge-1 { top: 24%; left: 8%; animation-delay: 0s; }
.hero-badge-2 { bottom: 28%; right: 6%; animation-delay: 1.5s; }
.hero-badge .badge-icon { font-size: 1.1rem; }

/* ── CATEGORÍAS ── */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;
  gap: 16px;
}
.cat-grid .cat-card:first-child { grid-row: span 2; }
.cat-card {
  border-radius: var(--radius-lg); overflow: hidden;
  position: relative; cursor: pointer;
  transition: all 0.35s var(--ease-out); aspect-ratio: 1;
}
.cat-card:first-child { aspect-ratio: auto; }
.cat-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.cat-card:hover img { transform: scale(1.07); }
.cat-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(44,36,22,0.65) 0%, transparent 60%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px;
}
.cat-name  { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: var(--white); }
.cat-count { font-size: 0.72rem; color: rgba(250,247,242,0.75); margin-top: 2px; }

/* ── PRODUCTOS GRID ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.recos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

/* ── PROMO BANNER ── */
.promo-banner { background: var(--sage-dark); padding: 48px 28px; }
.promo-inner  { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.promo-eyebrow { font-size: 0.72rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--sage-light); margin-bottom: 8px; }
.promo-title { font-family: var(--font-display); font-size: clamp(1.6rem,3vw,2.2rem); font-weight: 700; color: var(--cream); margin-bottom: 10px; }
.promo-title em { font-style: italic; color: #C8E6CA; }
.promo-desc { color: rgba(250,247,242,0.7); font-size: 0.9rem; line-height: 1.6; }
.promo-cta  { flex-shrink: 0; }
.btn-promo {
  background: var(--cream); color: var(--sage-dark);
  padding: 14px 28px; border-radius: var(--radius-pill);
  font-weight: 700; font-size: 0.9rem; border: none; cursor: pointer;
  transition: all 0.25s var(--ease-out); white-space: nowrap;
}
.btn-promo:hover { background: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ── FOOTER ── */
footer { background: var(--bark); color: rgba(250,247,242,0.6); padding: 56px 28px 28px; }
.footer-inner { max-width: 1240px; margin: 0 auto; }
.footer-grid  { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand .logo { color: var(--cream); margin-bottom: 14px; }
.footer-brand .logo em { color: var(--terra-light); }
.footer-brand p { font-size: 0.85rem; line-height: 1.75; }
.footer-socials { display: flex; gap: 8px; margin-top: 18px; }
.social-btn {
  width: 36px; height: 36px;
  background: rgba(250,247,242,0.08); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem; transition: all 0.25s; cursor: pointer;
}
.social-btn:hover { background: var(--sage); transform: translateY(-3px); }
.footer-col h4  { color: var(--cream); font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; margin-bottom: 18px; }
.footer-col li  { margin-bottom: 9px; }
.footer-col a   { font-size: 0.83rem; color: rgba(250,247,242,0.55); transition: color 0.2s; font-weight: 400; }
.footer-col a:hover { color: var(--cream); }
.footer-bottom {
  border-top: 1px solid rgba(250,247,242,0.1);
  padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  font-size: 0.78rem;
}
.payment-icons { display: flex; gap: 7px; }
.payment-icon  { background: rgba(250,247,242,0.08); border-radius: 5px; padding: 4px 10px; font-size: 0.7rem; color: rgba(250,247,242,0.6); font-weight: 600; letter-spacing: 0.5px; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
  .cat-grid .cat-card:first-child { grid-row: auto; }
  .trust-bar-inner { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 900px) {
  .hero          { grid-template-columns: 1fr; }
  .hero-visual   { display: none; }
  .hero-content  { padding: 52px 32px; }
  .trust-bar-inner { grid-template-columns: repeat(2,1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .testimonios-grid { grid-template-columns: 1fr; }
  .modal-inner   { grid-template-columns: 1fr; }
  .modal-img-col { border-radius: var(--radius-xl) var(--radius-xl) 0 0; }
  .modal-img     { min-height: 220px; }
  .promo-inner   { grid-template-columns: 1fr; text-align: center; }
}
@media (max-width: 640px) {
  .nav-inner   { padding: 0 16px; height: 62px; }
  .nav-search  { display: none; }
  .hero-content { padding: 40px 20px; }
  .cat-grid    { grid-template-columns: 1fr 1fr; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .section     { padding: 48px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .trust-bar-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
}
@media (max-width: 400px) {
  .products-grid { grid-template-columns: 1fr; }
  .hero-actions  { flex-direction: column; align-items: flex-start; }
}
