@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Autour+One&display=swap');

/* ── PAGE TITLE ── */
h1 {
  font-size: 2.8rem;
  font-weight: 800;
  font-family: 'Autour One', cursive;
  color: var(--accent);
  letter-spacing: 0.08em;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0 3rem 0;
}

/* ── PRODUCT GRID ── */
.grid {
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  padding: 0;
}

/* ── PRODUCT CARD ── */
.items {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.items:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(250,61,17,0.15);
}

.items img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: #f2f2f2;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.info { padding: 1.4rem; }

.info h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.6rem;
  line-height: 1.4;
  height: calc(1.4rem * 1.4 * 3);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.info h3 span {
  display: -webkit-box;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info p {
  font-size: 1.3rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.precio {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 0.8rem 0;
}
.precio p { font-size: 1.6rem; font-weight: 700; }
.precio p:first-child { text-decoration: line-through; color: var(--text-muted); font-weight: 400; }
.precio p.descuento { color: var(--accent); }

.info button {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s, transform 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.info button:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── SEARCH RESULTS ── */
.search-results {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 100%;
  min-width: 320px;
  background: #1e1e2a;
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 1200;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  max-height: 360px;
  overflow-y: auto;
}
.search-item {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem 1.4rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: #2a2a38; }
.search-item img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  background: #f2f2f2;
  border-radius: 6px;
  padding: 4px;
  flex-shrink: 0;
}
.search-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.search-item-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.search-item-meta {
  font-size: 1.1rem;
  color: var(--text-muted);
}
.search-no-results {
  padding: 1.4rem;
  font-size: 1.3rem;
  color: var(--text-muted);
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
  h1 { padding: 0rem 1rem 2rem 1rem; font-size: 2.2rem;}
  .container { padding: 2rem 0rem 2rem 0rem; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 1rem 2rem; }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
