/* === 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;
}

/* Explore categories ---------------------------------------------------------
   One card per top category, its subcategories as links. Same card skin as the
   "Nos catégories" tiles. Phones get one column with the links as wrapping
   chips, so each one is a real tap target without needing an accordion. */
.explore-section h2 { margin-bottom: 1rem; }
.explore-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.explore-categories .explore-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  padding: 18px 20px 16px;
}
.explore-categories .explore-card h3 {
  margin: 0 0 10px;
  padding: 0 0 10px;   /* 02-base gives every h3 25px of padding-top */
  border-bottom: 1px solid #f0f0f0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
}
.explore-categories .explore-card h3 a { color: #1f2937; font-weight: inherit; text-decoration: none; }
.explore-categories .explore-card h3 a:hover { color: #d10024; }
.explore-categories .explore-card ul {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  flex: 1;
}
.explore-categories .explore-card li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.explore-categories .explore-card li a {
  display: block;
  padding: 5px 0;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.35;
  text-decoration: none;
}
.explore-categories .explore-card li a:hover,
.explore-categories .explore-card li a:focus-visible { color: #d10024; }
.explore-categories .explore-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  font-size: 0.88rem;
  font-weight: 600;
  color: #d10024;
  text-decoration: none;
}
.explore-categories .explore-all:hover { text-decoration: underline; }
[dir="rtl"] .explore-categories .explore-all svg { transform: scaleX(-1); }

@media (max-width: 991px) {
  .explore-categories { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .explore-categories { grid-template-columns: 1fr; gap: 10px; }
  .explore-categories .explore-card { padding: 14px 14px 12px; }
  .explore-categories .explore-card ul {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  .explore-categories .explore-card li a {
    padding: 6px 11px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #f9fafb;
    font-size: 0.88rem;
  }
}
