/* === LA CASITA VERDE — KAWAII PASTEL THEME === */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Fredoka+One&display=swap');

:root {
  --pink:       #FFB3C6;
  --pink-light: #FFD6E0;
  --pink-dark:  #FF8FAB;
  --green:      #6BCB77;
  --green-dark: #4D9A57;
  --green-light:#C8F5CC;
  --purple:     #C9B1FF;
  --purple-light:#EDE7FF;
  --yellow:     #FFE566;
  --yellow-light:#FFF8CC;
  --blue-light: #BDE0FE;
  --peach:      #FFDAB9;
  --white:      #FFFFFF;
  --gray-light: #F8F6FF;
  --gray:       #E8E4F0;
  --text:       #3D2C5E;
  --text-light: #7B6E9B;
  --radius:     16px;
  --radius-sm:  8px;
  --shadow:     0 4px 20px rgba(61,44,94,0.10);
  --shadow-hover: 0 8px 32px rgba(61,44,94,0.18);
  --font-display: 'Fredoka One', cursive;
  --font-body:    'Nunito', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--gray-light);
  color: var(--text);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* ===== TOP BAR ===== */
.top-bar {
  background: var(--green-dark);
  color: white;
  text-align: center;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}
.top-bar span { display: flex; align-items: center; gap: 6px; }

/* ===== HEADER ===== */
.site-header {
  background: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 12px rgba(61,44,94,0.08);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo img { height: 56px; border-radius: 12px; }
.logo-text h1 {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--green-dark);
  line-height: 1;
}
.logo-text p {
  font-size: 11px;
  font-weight: 800;
  color: var(--pink-dark);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.search-bar {
  flex: 1;
  display: flex;
  gap: 8px;
  min-width: 200px;
}
.search-bar input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--gray);
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.search-bar input:focus { border-color: var(--green); }
.search-bar button {
  background: var(--green);
  color: white;
  border: none;
  border-radius: 50px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 16px;
  transition: background .2s;
}
.search-bar button:hover { background: var(--green-dark); }

.header-actions { display: flex; gap: 16px; align-items: center; }
.header-actions a {
  display: flex; flex-direction: column; align-items: center;
  font-size: 11px; font-weight: 700; color: var(--text-light);
  gap: 3px; transition: color .2s;
}
.header-actions a:hover { color: var(--green-dark); }
.header-actions a span { font-size: 22px; }

/* ===== NAV ===== */
.site-nav {
  background: var(--green-dark);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
}
.site-nav a {
  color: white;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  transition: background .2s;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap;
}
.site-nav a:hover, .site-nav a.active { background: rgba(255,255,255,0.15); }
.badge {
  background: var(--pink-dark);
  color: white;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 20px;
  text-transform: uppercase;
}

/* ===== PROMO BANNER ===== */
.promo-banner {
  padding: 0 24px;
  margin: 12px 0 0;
}
.promo-slide {
  border-radius: var(--radius);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  animation: slideIn .4s ease;
}
.promo-slide img { height: 64px; border-radius: 10px; object-fit: cover; }
.promo-text h3 { font-family: var(--font-display); font-size: 20px; }
.promo-text p { font-size: 13px; color: var(--text-light); }
.promo-discount {
  margin-left: auto;
  background: var(--green);
  color: white;
  font-family: var(--font-display);
  font-size: 22px;
  padding: 8px 18px;
  border-radius: 50px;
  white-space: nowrap;
}

/* ===== HERO SLIDER ===== */
.hero-slider {
  margin: 12px 24px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 340px;
  background: var(--pink-light);
}
.slide {
  position: absolute; inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
}
.slide.active { display: flex; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
  background: linear-gradient(135deg, var(--pink-light), var(--purple-light));
  color: var(--text);
}
.slide-placeholder .slide-icon { font-size: 64px; }
.slide-placeholder h2 { font-family: var(--font-display); font-size: 32px; text-align: center; }
.slide-placeholder p { font-size: 16px; color: var(--text-light); text-align: center; }

.slider-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: white; border: none; border-radius: 50%;
  width: 40px; height: 40px; cursor: pointer;
  font-size: 18px; box-shadow: var(--shadow);
  z-index: 10; transition: transform .2s;
}
.slider-btn:hover { transform: translateY(-50%) scale(1.1); }
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.6); cursor: pointer; transition: all .2s;
}
.dot.active { background: white; width: 20px; border-radius: 4px; }

/* ===== CATEGORIES STRIP ===== */
.categories-strip {
  background: white;
  margin: 12px 24px;
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow);
}
.categories-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.categories-grid::-webkit-scrollbar { display: none; }
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 72px;
  cursor: pointer;
  transition: transform .2s;
}
.cat-item:hover { transform: translateY(-4px); }
.cat-item.selected .cat-icon { border-color: var(--green-dark); background: var(--green-light); }
.cat-icon {
  width: 56px; height: 56px;
  background: var(--gray-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  border: 2px solid transparent;
  transition: all .2s;
}
.cat-label { font-size: 11px; font-weight: 700; color: var(--text-light); text-align: center; }

/* ===== TRUST BAR ===== */
.trust-bar {
  display: flex;
  gap: 0;
  margin: 0 24px;
  background: var(--yellow-light);
  border-radius: var(--radius);
  padding: 14px 24px;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
}
.trust-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.trust-item .trust-icon { font-size: 28px; }
.trust-item strong { display: block; font-size: 13px; font-weight: 800; }
.trust-item span { font-size: 11px; color: var(--text-light); }

/* ===== SECTION ===== */
.section { margin: 24px 24px 0; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-header h2 { font-family: var(--font-display); font-size: 22px; }
.section-header a {
  color: var(--green-dark); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
}
.section-header a:hover { color: var(--pink-dark); }

/* ===== PRODUCT GRID ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.product-card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  position: relative;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }

.product-img {
  aspect-ratio: 1;
  background: var(--gray-light);
  position: relative;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.product-card:hover .product-img img { transform: scale(1.05); }
.product-img .no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; color: var(--gray);
}

.badge-discount {
  position: absolute; top: 8px; left: 8px;
  background: var(--pink-dark); color: white;
  font-size: 11px; font-weight: 900;
  padding: 3px 8px; border-radius: 20px;
}
.badge-new {
  position: absolute; top: 8px; left: 8px;
  background: var(--green); color: white;
  font-size: 11px; font-weight: 900;
  padding: 3px 8px; border-radius: 20px;
}
.badge-featured {
  position: absolute; top: 8px; right: 8px;
  background: var(--yellow); color: var(--text);
  font-size: 11px; font-weight: 900;
  padding: 3px 8px; border-radius: 20px;
}
.badge-no-stock {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.7);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: var(--text-light); font-size: 13px;
}

.product-info { padding: 12px; }
.product-info h3 { font-size: 14px; font-weight: 700; margin-bottom: 4px; line-height: 1.3; }
.product-info .cat { font-size: 11px; color: var(--text-light); margin-bottom: 8px; }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.price { font-family: var(--font-display); font-size: 20px; color: var(--green-dark); }
.price-original { font-size: 12px; color: var(--text-light); text-decoration: line-through; }
.btn-wa {
  display: flex; align-items: center; gap: 6px;
  background: #25D366; color: white;
  border: none; border-radius: 50px;
  padding: 8px 14px; font-family: var(--font-body);
  font-size: 12px; font-weight: 700;
  cursor: pointer; margin-top: 10px; width: 100%;
  justify-content: center; transition: background .2s;
}
.btn-wa:hover { background: #128C7E; }

/* ===== COLUMNS LAYOUT ===== */
.cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 900px) { .cols-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .cols-3 { grid-template-columns: 1fr; } }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: white;
  margin-top: 40px;
  padding: 40px 24px 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--green-light);
  margin-bottom: 14px;
}
.footer-col p, .footer-col a {
  font-size: 13px; color: rgba(255,255,255,0.7);
  display: block; margin-bottom: 8px; transition: color .2s;
}
.footer-col a:hover { color: var(--green-light); }
.social-links { display: flex; gap: 10px; margin-top: 8px; }
.social-links a {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px; display: flex;
  align-items: center; justify-content: center;
  font-size: 18px; transition: background .2s;
}
.social-links a:hover { background: var(--green); }
.maps-embed iframe { border-radius: 10px; margin-top: 8px; }
.footer-bottom {
  text-align: center;
  padding: 16px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}

/* ===== WHATSAPP FLOAT ===== */
.wa-float {
  position: fixed; bottom: 24px; right: 24px;
  width: 56px; height: 56px;
  background: #25D366; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 4px 20px rgba(37,211,102,0.5);
  z-index: 999; transition: transform .2s;
  cursor: pointer;
}
.wa-float:hover { transform: scale(1.1); }

/* ===== MODALS ===== */
.modal {
  display: none; position: fixed; inset: 0;
  background: rgba(61,44,94,0.5);
  z-index: 200; align-items: center; justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-box {
  background: white; border-radius: var(--radius);
  padding: 24px; max-width: 600px; width: 100%;
  max-height: 90vh; overflow-y: auto;
}
.modal-box h2 { font-family: var(--font-display); font-size: 22px; margin-bottom: 16px; }
.modal-gallery {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px;
}
.modal-gallery img { width: 100%; border-radius: 8px; aspect-ratio: 1; object-fit: cover; cursor: zoom-in; }
.modal-main-img { width: 100%; border-radius: 12px; margin-bottom: 12px; max-height: 260px; object-fit: contain; }
.modal-close {
  float: right; background: none; border: none;
  font-size: 22px; cursor: pointer; color: var(--text-light);
}

/* ===== ADMIN ===== */
.admin-body {
  background: var(--gray-light);
  min-height: 100vh;
}
.admin-topbar {
  background: var(--green-dark);
  color: white;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 60px;
}
.admin-topbar h1 { font-family: var(--font-display); font-size: 20px; }
.admin-topbar nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.admin-topbar nav a {
  color: rgba(255,255,255,0.8);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px; font-weight: 700;
  transition: all .2s;
  white-space: nowrap;
}
.admin-topbar nav a:hover,
.admin-topbar nav a.active { background: rgba(255,255,255,0.2); color: white; }
.admin-logout {
  margin-left: auto;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  font-weight: 700;
}
.admin-logout:hover { color: white; }

.admin-content { padding: 24px; max-width: 1200px; margin: 0 auto; }
.admin-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.admin-card h2 { font-family: var(--font-display); font-size: 20px; margin-bottom: 16px; color: var(--green-dark); }

/* ===== FORMS ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 700; color: var(--text-light); }
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 2px solid var(--gray);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--green); }
.form-group textarea { resize: vertical; min-height: 80px; }

.btn {
  padding: 10px 20px; border: none; border-radius: 50px;
  font-family: var(--font-body); font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all .2s; display: inline-flex;
  align-items: center; gap: 8px;
}
.btn-primary { background: var(--green-dark); color: white; }
.btn-primary:hover { background: var(--green); }
.btn-danger { background: var(--pink-dark); color: white; }
.btn-danger:hover { background: #e05080; }
.btn-secondary { background: var(--gray); color: var(--text); }
.btn-secondary:hover { background: var(--purple-light); }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* ===== ADMIN TABLE ===== */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th {
  background: var(--gray-light); padding: 10px 14px;
  text-align: left; font-size: 12px; font-weight: 800;
  color: var(--text-light); text-transform: uppercase; letter-spacing: .5px;
}
.admin-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--gray);
  font-size: 14px; vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table img { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; }

.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { display: none; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--gray); border-radius: 24px; cursor: pointer;
  transition: background .2s;
}
.toggle-slider:before {
  content: ''; position: absolute;
  width: 18px; height: 18px; left: 3px; top: 3px;
  background: white; border-radius: 50%; transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider:before { transform: translateX(20px); }

.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700; margin-bottom: 16px;
}
.alert-success { background: var(--green-light); color: var(--green-dark); }
.alert-error { background: var(--pink-light); color: #c0103a; }

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-header { padding: 12px 16px; }
  .hero-slider { margin: 8px 12px; height: 200px; }
  .section, .categories-strip, .trust-bar, .promo-banner { margin-left: 12px; margin-right: 12px; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .site-nav { overflow-x: auto; }
}
