/* === home.css === */
/* ---------------------------------------------------------------------------
home.css

Lifted verbatim out of views/home.ejs (an inline <style> block). The template now
links this file from the exact spot the block occupied, because that position
decides which declarations win ties against the core stylesheet.
--------------------------------------------------------------------------- */

.discount {
  width: 50px;
}
/* Brand carousel -----------------------------------------------------------
   Only the brands with real depth behind them reach the home page, so the row
   is short enough to scroll rather than wrap. The track scrolls natively: no
   JS is needed to use it, and the arrows only appear when there is something
   to scroll to. */
.brands-carousel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.brands-carousel-head h2 { margin: 0; }
.brands-all-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d10024;
  white-space: nowrap;
}
.brands-all-link:hover { text-decoration: underline; }

.brands-carousel {
  position: relative;
  margin-top: 1rem;
}
.brands-track {
  list-style: none;
  margin: 0;
  padding: 4px;
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.brands-track::-webkit-scrollbar { display: none; }
.brands-track > li {
  flex: 0 0 150px;
  scroll-snap-align: start;
}
.brands-track .brand-item { width: 100%; }

.brands-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.brands-nav:hover:not(:disabled) { color: #d10024; border-color: #d10024; }
.brands-nav:disabled { opacity: 0.35; cursor: default; }
.brands-nav[hidden] { display: none; }
.brands-nav.prev { left: -8px; }
.brands-nav.next { right: -8px; }

[dir="rtl"] .brands-nav.prev { left: auto; right: -8px; }
[dir="rtl"] .brands-nav.next { right: auto; left: -8px; }

@media (max-width: 640px) {
  .brands-track > li { flex-basis: 120px; }
  .brands-nav { display: none; }   /* swipe is the gesture here */
}
.brand-item {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  height: 100px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}
.brand-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #D10024;
  transform: translateY(-2px);
}
.brand-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
