/* =====================================================
  Agrocasares — Main Styles (Public)
   ===================================================== */

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  height: var(--header-h);
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-primary);
}

.site-logo img {
  height: 36px;
  width: auto;
}

.site-logo .logo-text {
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-sm);
}

.header-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #25D366;
  color: #fff;
  padding: 8px 16px;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background var(--t-fast);
}

.header-wa-btn:hover { background: #20bd5a; }

.header-wa-btn svg { width: 18px; height: 18px; }

/* HERO */
.hero {
  padding: var(--s-2xl) 0 var(--s-xl);
  text-align: center;
}

.hero-title {
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -0.03em;
  margin-bottom: var(--s-sm);
  line-height: 1.15;
}

.hero-rotating {
  color: var(--c-primary);
  position: relative;
  display: inline-block;
  min-width: 200px;
}

.hero-rotating .word {
  display: inline-block;
  transition: opacity 0.4s, transform 0.4s;
}

.hero-rotating .word.exit {
  opacity: 0;
  transform: translateY(-10px);
  position: absolute;
  left: 0;
}

.hero-rotating .word.enter {
  opacity: 0;
  transform: translateY(10px);
}

.hero-subtitle {
  font-size: 1rem;
  color: var(--c-text-secondary);
  max-width: 480px;
  margin: 0 auto var(--s-lg);
}

/* SEARCH */
.search-wrapper {
  max-width: 600px;
  margin: 0 auto var(--s-lg);
  position: relative;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--c-surface);
  border: 2px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: 4px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}

.search-box:focus-within {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 4px rgba(27,107,58,0.1);
}

.search-box input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  background: transparent;
  color: var(--c-text);
}

.search-box input::placeholder { color: var(--c-text-muted); }

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-md);
  flex-shrink: 0;
  transition: background var(--t-fast);
}

.search-btn:hover { background: var(--c-primary-light); }

.search-btn svg { width: 20px; height: 20px; }

.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--c-text-muted);
  flex-shrink: 0;
}

.search-clear.visible { display: flex; }

/* QUICK FILTERS */
.quick-filters {
  display: flex;
  gap: var(--s-sm);
  overflow-x: auto;
  padding: 0 var(--s-md) var(--s-md);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center;
  flex-wrap: wrap;
}

.quick-filters::-webkit-scrollbar { display: none; }

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--c-text-secondary);
  white-space: nowrap;
  transition: all var(--t-fast);
  cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
}

.filter-chip svg { width: 16px; height: 16px; }

/* FILTER PANEL */
.filter-panel {
  display: none;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  padding: var(--s-lg);
  margin-bottom: var(--s-lg);
  border: 1px solid var(--c-border);
}

.filter-panel.open { display: block; animation: fadeIn var(--t-base) both; }

.filter-group { margin-bottom: var(--s-md); }
.filter-group:last-child { margin-bottom: 0; }

.filter-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-text-secondary);
  margin-bottom: var(--s-sm);
}

.filter-select {
  width: 100%;
  padding: 10px 12px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  font-size: 0.9rem;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2378716C' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-sm);
}

.filter-actions {
  display: flex;
  gap: var(--s-sm);
  margin-top: var(--s-md);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--t-fast);
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--c-primary-light); }

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

.btn-sm { padding: 6px 14px; font-size: 0.8rem; }

/* CATEGORIES SECTION */
.section { padding: var(--s-xl) 0; }
.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--s-lg);
  letter-spacing: -0.02em;
}


/* PRODUCT GRID */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s-md);
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--s-sm);
  }
}

.product-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--t-base);
}

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

.product-card-img {
  aspect-ratio: 1;
  background: var(--c-surface-alt);
  overflow: hidden;
  position: relative;
}

.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}

.product-card:hover .product-card-img img {
  transform: scale(1.04);
}

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-featured { background: var(--c-accent); color: #1C1917; }
.badge-new { background: var(--c-primary); color: #fff; }
.badge-used { background: var(--c-text-secondary); color: #fff; }
.badge-reserved { background: var(--c-warning); color: #1C1917; }
.badge-sold { background: var(--c-error); color: #fff; }

.product-card-body { padding: 12px; }

.product-card-cat {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
  margin-bottom: 4px;
}

.product-card-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-brand {
  font-size: 0.8rem;
  color: var(--c-text-secondary);
  margin-bottom: 8px;
}

.product-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-primary-dark);
}

.product-card-consult {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--c-accent);
}

.product-card-short {
  font-size: 0.8rem;
  color: var(--c-text-secondary);
  line-height: 1.4;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.pill-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--r-full);
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.pill-financing { background: #EEF2FF; color: #4338CA; }
.pill-immediate { background: #DCFCE7; color: #166534; }
.pill-available { background: #F3F4F6; color: #374151; }

.modal-short-desc {
  font-weight: 500;
  color: var(--c-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--s-md);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--c-border-light);
  margin-top: 8px;
}

.product-card-condition {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--c-text-muted);
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: var(--s-3xl) var(--s-lg);
  color: var(--c-text-muted);
}

.empty-state svg { width: 48px; height: 48px; margin-bottom: var(--s-md); opacity: 0.5; }
.empty-state p { font-size: 1rem; }

/* LOADING */
.skeleton {
  background: linear-gradient(90deg, var(--c-surface-alt) 25%, var(--c-border-light) 50%, var(--c-surface-alt) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease infinite;
  border-radius: var(--r-sm);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-card { height: 320px; border-radius: var(--r-md); }

/* INSTITUTIONAL SECTIONS */
.institutional {
  padding: var(--s-2xl) 0;
}

.institutional-block {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--s-xl);
  margin-bottom: var(--s-lg);
}

.institutional-block h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: var(--s-md);
}

.institutional-block p {
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s-md);
}

/* PRODUCT MODAL */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: var(--s-md);
}

.modal-overlay.open {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 700px;
  margin: var(--s-md) auto;
  overflow: hidden;
  position: relative;
  animation: modalSlideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
  transition: background var(--t-fast);
}

.modal-close:hover { background: #fff; }

.modal-gallery {
  position: relative;
  aspect-ratio: 1;
  background: var(--c-surface-alt);
  overflow: hidden;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
}

.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }

.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.5);
  transition: background var(--t-fast);
}

.gallery-dot.active { background: #fff; }

.modal-body { padding: var(--s-lg); }

.modal-cat {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--c-primary);
  margin-bottom: 4px;
}

.modal-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--s-sm);
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-sm);
  margin-bottom: var(--s-md);
}

.modal-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--c-surface-alt);
  border-radius: var(--r-full);
  font-size: 0.8rem;
  color: var(--c-text-secondary);
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--c-primary-dark);
  margin-bottom: var(--s-sm);
}

.modal-consult {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--c-accent);
  margin-bottom: var(--s-sm);
}

.modal-financing {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #FEF3C7;
  border-radius: var(--r-md);
  font-size: 0.85rem;
  color: #92400E;
  margin-bottom: var(--s-md);
}

.modal-description {
  color: var(--c-text-secondary);
  line-height: 1.7;
  margin-bottom: var(--s-lg);
  font-size: 0.95rem;
}

.modal-description p { margin-bottom: var(--s-sm); }

.modal-video {
  aspect-ratio: 16/9;
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-lg);
  background: #000;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--s-md);
}

.modal-actions {
  display: flex;
  gap: var(--s-sm);
  margin-bottom: var(--s-lg);
}

.btn-wa {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25D366;
  color: #fff;
  padding: 14px 20px;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 700;
  transition: background var(--t-fast);
}

.btn-wa:hover { background: #20bd5a; }
.btn-wa svg { width: 22px; height: 22px; }

.btn-share, .btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  color: var(--c-text-secondary);
  transition: all var(--t-fast);
}

.btn-share:hover, .btn-copy:hover {
  background: var(--c-border-light);
}

.btn-share svg, .btn-copy svg { width: 20px; height: 20px; }

/* RELATED PRODUCTS */
.related-section {
  border-top: 1px solid var(--c-border);
  padding: var(--s-lg);
}

.related-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--s-md);
}

.related-scroll {
  display: flex;
  gap: var(--s-sm);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--s-sm);
}

.related-scroll::-webkit-scrollbar { display: none; }

.related-card {
  flex-shrink: 0;
  width: 160px;
  background: var(--c-surface-alt);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: transform var(--t-fast);
}

.related-card:hover { transform: translateY(-2px); }

.related-card-img {
  aspect-ratio: 1;
  background: var(--c-border-light);
  overflow: hidden;
}

.related-card-img img { width: 100%; height: 100%; object-fit: cover; }

.related-card-body { padding: 8px 10px; }

.related-card-name {
  font-size: 0.8rem;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* LEAD FORM */
.lead-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  overflow-y: auto;
  padding: var(--s-md);
}

.lead-overlay.open {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.lead-form-container {
  background: var(--c-surface);
  border-radius: var(--r-lg);
  width: 100%;
  max-width: 420px;
  padding: var(--s-xl);
  animation: modalSlideUp 0.3s cubic-bezier(0.4,0,0.2,1);
}

.lead-form-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.lead-form-subtitle {
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  margin-bottom: var(--s-lg);
}

.form-group {
  margin-bottom: var(--s-md);
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--c-text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--c-surface-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 0.95rem;
  color: var(--c-text);
  transition: border-color var(--t-fast);
}

.form-input:focus {
  border-color: var(--c-primary);
  outline: none;
}

.form-input.error { border-color: var(--c-error); }

.form-error {
  font-size: 0.75rem;
  color: var(--c-error);
  margin-top: 4px;
  display: none;
}

.form-error.visible { display: block; }

.phone-group {
  display: flex;
  gap: 8px;
}

.phone-country {
  width: 100px;
  flex-shrink: 0;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: var(--s-sm);
}

.checkbox-group input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--c-primary);
  flex-shrink: 0;
}

.checkbox-group label {
  font-size: 0.8rem;
  color: var(--c-text-secondary);
  line-height: 1.4;
}

.checkbox-group a {
  color: var(--c-primary);
  text-decoration: underline;
}

.btn-submit-lead {
  width: 100%;
  padding: 14px;
  background: #25D366;
  color: #fff;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--s-md);
  transition: background var(--t-fast);
}

.btn-submit-lead:hover { background: #20bd5a; }
.btn-submit-lead:disabled { opacity: 0.6; cursor: not-allowed; }

.lead-form-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text-muted);
}

/* COOKIE BANNER */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--s-md) var(--s-lg);
  box-shadow: var(--shadow-lg);
}

.cookie-banner.visible { display: block; animation: fadeIn var(--t-base); }

.cookie-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--s-md);
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  min-width: 200px;
}

.cookie-text a { color: var(--c-primary); text-decoration: underline; }

.cookie-actions { display: flex; gap: var(--s-sm); }

/* FOOTER */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: var(--s-xl) 0;
  margin-top: var(--s-2xl);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--s-md);
}

.footer-brand {
  font-weight: 700;
  font-size: 1rem;
  color: var(--c-primary);
  margin-bottom: var(--s-sm);
}

.footer-links {
  display: flex;
  gap: var(--s-md);
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--c-text-secondary);
  transition: color var(--t-fast);
}

.footer-links a:hover { color: var(--c-primary); }

.footer-copy {
  width: 100%;
  font-size: 0.75rem;
  color: var(--c-text-muted);
  margin-top: var(--s-md);
}

/* RESULTS INFO */
.results-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-md);
  flex-wrap: wrap;
  gap: var(--s-sm);
}

.results-count {
  font-size: 0.9rem;
  color: var(--c-text-secondary);
}

.results-count strong { color: var(--c-text); }

.active-filters {
  display: flex;
  gap: var(--s-xs);
  flex-wrap: wrap;
}

.active-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.active-filter-tag button {
  color: rgba(255,255,255,0.7);
  display: flex;
}

/* TOAST */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--c-text);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--r-full);
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0;
  transition: all var(--t-base);
  z-index: 600;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* DESKTOP ADJUSTMENTS */
@media (min-width: 768px) {
  .hero { padding: var(--s-3xl) 0 var(--s-2xl); }
  .hero-title { font-size: 2.6rem; }

  .modal {
    margin: var(--s-xl) auto;
  }

  .modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .modal-gallery { aspect-ratio: auto; min-height: 400px; }

  .categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

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

  .institutional-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s-lg);
  }

  .institutional-block { margin-bottom: 0; }
}

/* SCROLL TO TOP */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-md);
  z-index: 50;
  transition: all var(--t-fast);
}

.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--c-primary-light); transform: translateY(-2px); }

/* =====================================================
   REDISEÑO 2026 — Nav, Hero, Pages, FAB
   ===================================================== */
.nav-header{position:fixed;top:0;left:0;right:0;z-index:100;background:rgba(255,255,255,.85);backdrop-filter:blur(14px);border-bottom:1px solid transparent;transition:all .3s ease;padding:14px 0}
.nav-header.scrolled{padding:8px 0;background:rgba(255,255,255,.95);border-bottom-color:var(--c-border);box-shadow:var(--shadow-sm)}
.nav-inner{display:flex;align-items:center;justify-content:space-between;gap:24px}
.nav-logo{display:flex;align-items:center;gap:8px;font-weight:800;font-size:26px;color:var(--c-primary);transition:font-size .3s}
.nav-header.scrolled .nav-logo{font-size:20px}
.nav-logo-img{height:48px;width:auto;transition:height .3s}
.nav-header.scrolled .nav-logo-img{height:34px}
.nav-menu{display:flex;gap:4px;align-items:center}
.nav-menu a{padding:8px 14px;border-radius:8px;font-weight:500;color:var(--c-text);transition:all var(--t-fast);font-size:15px}
.nav-menu a:hover{background:var(--c-surface-alt)}
.nav-menu a.active{color:var(--c-primary);background:rgba(27,107,58,.08)}
.nav-toggle{display:none;padding:8px;border-radius:8px;color:var(--c-text)}
.nav-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,.4);z-index:99}
.nav-backdrop.open{display:block}
body{padding-top:76px}
@media(max-width:900px){
  .nav-toggle{display:flex}
  .nav-menu{position:fixed;top:0;right:-280px;width:260px;height:100vh;background:#fff;flex-direction:column;align-items:stretch;padding:80px 20px 20px;box-shadow:var(--shadow-lg);transition:right .3s ease;z-index:101;gap:4px}
  .nav-menu.open{right:0}
  .nav-menu a{font-size:16px;padding:14px 16px}
}

main#app{min-height:60vh}
.app-loading{display:flex;align-items:center;justify-content:center;min-height:60vh}
.app-loading .spinner{width:40px;height:40px;border:3px solid var(--c-border);border-top-color:var(--c-primary);border-radius:50%;animation:spin .7s linear infinite}

.hero-new{position:relative;min-height:80vh;display:flex;align-items:center;overflow:hidden;margin-top:-76px;padding-top:76px;color:#fff}
.hero-video-wrap{position:absolute;inset:0;z-index:0}
.hero-video{width:100%;height:100%;object-fit:cover}
.hero-overlay{position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.55),rgba(0,0,0,.65))}
.hero-content{position:relative;z-index:1;padding:60px 16px;text-align:center;width:100%}
.hero-title{font-size:clamp(32px,5vw,56px);font-weight:800;line-height:1.1;margin-bottom:18px;color:#fff}
.hero-rotating{display:inline-block;color:var(--c-accent-light);position:relative;min-width:2ch}
.hero-rotating .word{display:inline-block;transition:all .4s;opacity:1;transform:translateY(0)}
.hero-rotating .word.enter{opacity:0;transform:translateY(16px)}
.hero-rotating .word.exit{opacity:0;transform:translateY(-16px)}
.hero-subtitle{font-size:clamp(16px,2vw,20px);color:#ffffff;text-shadow:0 2px 8px rgba(0,0,0,0.6);margin-bottom:32px;max-width:640px;margin-left:auto;margin-right:auto}
.hero-actions{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.btn-lg{padding:14px 28px;font-size:16px;border-radius:12px}
.btn-outline-light{background:transparent;border:2px solid #fff;color:#fff;padding:14px 28px;border-radius:12px;font-weight:600;transition:all var(--t-base);cursor:pointer}
.btn-outline-light:hover{background:#fff;color:var(--c-primary)}

.page-hero{background:linear-gradient(135deg,var(--c-primary),var(--c-primary-dark));color:#fff;padding:136px 0 50px;margin-top:-76px}
.page-hero h1{font-size:clamp(28px,4vw,44px);font-weight:800;color:#fff}

.search-section{padding:32px 0}
.search-section .search-box{max-width:720px;margin:0 auto;display:flex;align-items:center;background:#fff;border:1px solid var(--c-border);border-radius:16px;padding:6px 12px;box-shadow:var(--shadow-sm);gap:8px}
.search-section .search-box:focus-within{border-color:var(--c-primary);box-shadow:0 0 0 4px rgba(27,107,58,.08)}
.search-section .search-box input{flex:1;padding:14px 8px;font-size:16px;background:transparent;border:none;outline:none}
.search-clear{display:none;padding:8px;color:var(--c-text-muted);border-radius:8px}
.search-clear.visible{display:flex}
.quick-filters{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:16px}

.section{padding:48px 0}
.section-alt{background:var(--c-surface-alt)}
.section-title{font-size:clamp(24px,3vw,32px);font-weight:700;margin-bottom:24px;text-align:center}
.section-lead{font-size:18px;color:var(--c-text-secondary);max-width:640px;margin:0 auto 28px}

.carousel-wrap{position:relative;overflow:hidden;user-select:none}
.carousel-track{display:flex;gap:16px;transition:transform 0.4s ease;cursor:grab}
.carousel-track:active{cursor:grabbing}
.carousel-arrow{position:absolute;top:50%;transform:translateY(-50%);z-index:5;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,0.9);border:1px solid var(--c-border);font-size:22px;line-height:1;display:flex;align-items:center;justify-content:center;opacity:0.5;transition:opacity var(--t-fast);cursor:pointer;box-shadow:var(--shadow-sm);color:var(--c-text)}
.carousel-arrow:hover{opacity:0.8}
.carousel-arrow-prev{left:4px}
.carousel-arrow-next{right:4px}
@media(max-width:479px){.carousel-arrow{display:none !important}}

.cats-carousel .category-card{flex:0 0 240px}
.category-card{background:#fff;border:1px solid var(--c-border);border-radius:16px;padding:28px;cursor:pointer;transition:all var(--t-base);border-top:4px solid var(--cat-color,var(--c-primary));box-shadow:var(--shadow-sm)}
.category-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md)}
.cat-name{font-size:18px;font-weight:700;margin-bottom:4px}
.cat-count{font-size:13px;color:var(--c-text-muted)}
@media(max-width:767px){.cats-carousel .category-card{flex:0 0 80vw}}

.products-carousel .product-card{flex:0 0 280px}
@media(max-width:767px){.products-carousel .product-card{flex:0 0 82vw}}

.brands-grid .brand-logo-card{flex:0 0 140px}
.brand-logo-card{background:#fff;border:1px solid var(--c-border);border-radius:14px;min-height:100px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:12px 16px;transition:all var(--t-base)}
.brand-logo-card:hover{border-color:var(--c-primary);transform:translateY(-2px)}
.brand-logo-card img{max-width:100%;max-height:100%;object-fit:contain;filter:grayscale(.2)}
.brand-logo-card span{font-weight:600;color:var(--c-text-secondary)}

.btn-wa-lg{display:inline-flex;align-items:center;gap:10px;padding:16px 32px;background:#25D366;color:#fff;border-radius:14px;font-size:16px;font-weight:700;transition:all var(--t-base);box-shadow:var(--shadow-md)}
.btn-wa-lg:hover{background:#1eb858;transform:translateY(-2px);box-shadow:var(--shadow-lg)}

.site-footer-new{background:#111;color:#e5e5e5;padding:48px 0 20px;margin-top:40px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 2fr;gap:32px;margin-bottom:32px}
.site-footer-new h4{font-size:14px;text-transform:uppercase;letter-spacing:.5px;margin-bottom:12px;color:#fff}
.site-footer-new p{margin-bottom:6px;font-size:14px}
.site-footer-new a{color:#ccc;transition:color var(--t-fast)}
.site-footer-new a:hover{color:#fff}
.footer-brand{font-size:22px;font-weight:800;color:#fff;margin-bottom:8px}
.footer-map iframe{width:100%;height:180px;border:0;border-radius:12px}
.footer-copy{border-top:1px solid #333;padding-top:20px;font-size:13px;color:#888;text-align:center}
@media(max-width:767px){.footer-grid{grid-template-columns:1fr}}

.about-grid{display:grid;grid-template-columns:1fr 1fr;gap:40px;align-items:center}
.about-text p{font-size:17px;line-height:1.7;color:var(--c-text-secondary);margin-bottom:24px}
.about-images{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.about-images img{width:100%;object-fit:cover;border-radius:14px;aspect-ratio:1}
.about-images img:first-child{grid-column:1/-1;aspect-ratio:2}
@media(max-width:767px){.about-grid{grid-template-columns:1fr}}

.contact-grid{display:grid;grid-template-columns:1fr 1.2fr;gap:40px}
.contact-info{display:flex;flex-direction:column;gap:20px}
.contact-item{padding:16px;background:#fff;border:1px solid var(--c-border);border-radius:12px}
.contact-item h4{font-size:13px;text-transform:uppercase;color:var(--c-text-muted);margin-bottom:6px;letter-spacing:.5px}
.contact-item a{color:var(--c-primary);font-weight:600}
.contact-map iframe{width:100%;height:100%;min-height:400px;border:0;border-radius:16px}
@media(max-width:767px){.contact-grid{grid-template-columns:1fr}}

.fab-stack{position:fixed;right:20px;bottom:20px;display:flex;flex-direction:column;gap:12px;z-index:90}
.fab{width:56px;height:56px;border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;box-shadow:var(--shadow-lg);transition:all var(--t-base)}
.fab:hover{transform:scale(1.08)}
.fab-wa{background:#25D366}
.fab-ig{background:linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888)}

.admin-danger-zone{border:1px dashed var(--c-error);border-radius:12px;padding:20px;margin-top:24px;background:#fff5f5}
.admin-danger-zone h3{color:var(--c-error);margin-bottom:8px}
.img-warning{background:#fff7ed;border:1px solid #fed7aa;color:#9a3412;padding:12px 16px;border-radius:10px;margin-top:10px;font-size:14px}
.img-warning a{color:#c2410c;font-weight:600;text-decoration:underline}

/* Hero typewriter */
.hero-typewriter{display:inline-block;color:var(--c-accent-light,#A7F3D0);min-height:1.2em;min-width:6ch;white-space:nowrap}
.hero-caret{display:inline-block;margin-left:2px;animation:hero-blink 1s steps(1) infinite;font-weight:400}
@keyframes hero-blink{50%{opacity:0}}
.hero-new.hero-fallback .hero-video{display:none}

/* Footer logo */
.footer-logo{max-height:56px;width:auto;object-fit:contain;margin-bottom:10px;display:block;background:#fff;padding:6px 10px;border-radius:8px}
.footer-map iframe{width:100%;height:200px;border:0;border-radius:12px}
.contact-map iframe{width:100%;height:100%;min-height:400px;border:0;border-radius:16px}

/* Brand logo sizing uniform */
.brand-logo-card{background:#fff}
.brand-logo-card .brand-img{max-height:60px;max-width:100%;width:auto;object-fit:contain;filter:none}
.brand-logo-card .brand-text{font-weight:600;color:var(--c-text-secondary)}
.brand-inline{height:20px;width:auto;object-fit:contain;margin-right:6px;vertical-align:middle}
.product-card-brand{display:flex;align-items:center;gap:6px;color:var(--c-text-muted);font-size:13px;margin-top:2px}

/* Price chips */
.price-chips{display:flex;gap:6px;margin-top:4px;flex-wrap:wrap}
.price-chip{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--c-text-secondary);background:#f1f5f9;border:1px solid #e2e8f0;border-radius:999px;padding:3px 9px;line-height:1}

/* WA inline buttons */
.wa-inline{display:inline-flex;align-items:center;gap:8px}
.wa-inline svg{flex:none}

/* Admin brand logo upload helper */
.brand-logo-preview{margin-top:10px;max-height:80px;max-width:160px;object-fit:contain;background:#fff;border:1px solid var(--c-border);border-radius:8px;padding:6px}

/* Footer social icons */
.footer-social{display:flex;gap:12px;margin-top:12px}
.footer-social-link{display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:50%;background:rgba(255,255,255,.1);color:#ccc;transition:all var(--t-fast)}
.footer-social-link:hover{background:rgba(255,255,255,.2);color:#fff;transform:scale(1.1)}
.footer-social-link svg{width:20px;height:20px}

/* Repuestos stock badge */
.repuestos-image{max-width:640px;margin:0 auto 24px}
.repuestos-image img{width:100%;height:auto;border-radius:16px;display:block;aspect-ratio:16/9;object-fit:cover}
@media(max-width:767px){.repuestos-image{max-width:100%}}
.repuestos-stock-badge{display:inline-flex;align-items:center;gap:10px;padding:14px 24px;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:14px;color:#1E40AF;font-size:15px;line-height:1.5;max-width:640px;margin:0 auto 24px;text-align:left}
.repuestos-stock-badge svg{flex-shrink:0;color:#3B82F6}
@media(max-width:767px){.repuestos-stock-badge{font-size:14px;padding:12px 16px}}

/* Repuestos: badge + WA button always stacked vertically */
.repuestos-cta-stack{display:flex;flex-direction:column;align-items:center;gap:16px}

/* Brand featured badge */
.brand-logo-card{position:relative}
.brand-featured{border-color:var(--c-primary) !important}
/* Representante oficial badge: static flow (no absolute) */
.brand-featured-badge{display:block;text-align:center;font-size:10px;font-weight:700;color:#166534;background:#dcfce7;border:1px solid #bbf7d0;padding:2px 10px;border-radius:999px;white-space:nowrap;letter-spacing:.02em;margin-top:6px}

/* Brand name label below logo/text on brand cards */
.brand-card-name{display:block;text-align:center;font-size:13px;color:var(--c-text-secondary);margin-top:6px;line-height:1.3}

/* Exact match badge on product cards */
.badge-exact-match{position:absolute;top:8px;right:8px;padding:3px 8px;border-radius:var(--r-full);font-size:0.65rem;font-weight:700;text-transform:uppercase;letter-spacing:0.04em;background:#fef3c7;color:#92400e;white-space:nowrap;z-index:2}

/* Modal description expandable */
.modal-desc-short{margin-bottom:var(--s-sm)}
.modal-desc-full{margin-bottom:var(--s-sm)}
.btn-expand-desc{background:none;border:none;color:var(--c-primary);font-size:0.85rem;font-weight:600;cursor:pointer;padding:0;margin-bottom:var(--s-md);text-decoration:underline}
.btn-expand-desc:hover{color:var(--c-primary-light)}

/* Modal actions aligned */
.modal-actions{display:flex;gap:12px;align-items:stretch;margin-bottom:var(--s-lg)}
.modal-actions .btn-wa{height:44px;display:flex;align-items:center}
.modal-actions .btn-share{height:44px;width:44px;display:flex;align-items:center;justify-content:center;border:1.5px solid #16a34a;color:#16a34a;background:#fff;border-radius:var(--r-md);transition:all var(--t-fast)}
.modal-actions .btn-share:hover{background:#dcfce7}

/* Admin novedades changelog */
.changelog-list{display:flex;flex-direction:column;gap:12px}
.changelog-entry{background:var(--c-surface);border:1px solid var(--c-border);border-radius:var(--r-md);padding:14px 16px}
.changelog-entry-header{display:flex;align-items:center;gap:8px;margin-bottom:6px;flex-wrap:wrap}
.changelog-date{font-size:0.75rem;color:var(--c-text-muted)}
.changelog-title{font-weight:600;font-size:0.9rem}
.changelog-body{font-size:0.85rem;color:var(--c-text-secondary);line-height:1.5}
.tag-new{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:0.7rem;font-weight:700;background:#dcfce7;color:#166534}
.tag-improvement{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:0.7rem;font-weight:700;background:#dbeafe;color:#1e40af}
.tag-fix{display:inline-flex;align-items:center;padding:2px 8px;border-radius:999px;font-size:0.7rem;font-weight:700;background:#ffedd5;color:#9a3412}
