/* ─────────────────────────────────────────────────────────────────
   Compras Mix Atacarejo — Custom Styles
   Complements Tailwind CSS
───────────────────────────────────────────────────────────────── */

:root {
  --cmx-red:     #D42B2B;
  --cmx-redhov:  #B01F1F;
  --cmx-blue:    #003087;
  --cmx-bluehov: #002060;
  --cmx-bg:      #F5F7FA;
  --cmx-gold:    #F59E0B;
  --shadow-sm:   0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.06);
  --shadow-xl:   0 20px 25px -5px rgba(0,0,0,.1), 0 10px 10px -5px rgba(0,0,0,.04);
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }

/* ── Hero gradient ── */
.hero-gradient {
  background: linear-gradient(135deg, var(--cmx-red) 0%, #8B0000 35%, var(--cmx-blue) 100%);
}
.hero-pattern {
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}


/* ── Product cards ── */
.product-card {
  will-change: transform;
  transform: translateZ(0);
}
/* Card sem sombra: a separação vem da grade de 1px, como etiqueta de gôndola */


/* ── Scrollbar slim ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--cmx-red); }

/* ── Price number ── */
.price-value {
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

/* ── Search suggestions ── */
#searchSuggestions .suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid #f3f4f6;
}
#searchSuggestions .suggestion-item:last-child {
  border-bottom: none;
}
#searchSuggestions .suggestion-item:hover {
  background: #FEF2F2;
}
#searchSuggestions .suggestion-item img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  background: #f9fafb;
  padding: 2px;
  flex-shrink: 0;
}
#searchSuggestions .suggestion-item .name {
  font-weight: 600;
  font-size: 0.8125rem;
  color: #1f2937;
  line-height: 1.3;
}
#searchSuggestions .suggestion-item .meta {
  font-size: 0.6875rem;
  color: #9ca3af;
}
#searchSuggestions .suggestion-item .price {
  margin-left: auto;
  font-weight: 800;
  font-size: 0.875rem;
  color: var(--cmx-red);
  white-space: nowrap;
  flex-shrink: 0;
  font-family: 'Archivo', sans-serif;
}

/* ── Line clamp ── */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Transitions ── */
.transition-all    { transition: all 0.2s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* ── Skeleton loading animation ── */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
}

/* ── Fade-in on scroll ── */
.fade-in-up {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Print ── */
@media print {
  header, footer, .no-print { display: none !important; }
  body { background: white !important; }
}

/* ── Responsive tweaks ── */
@media (max-width: 640px) {
  .hero-gradient { padding: 3rem 1rem 4rem; }
}
