:root {
  --text: #2b2b2b;
  --muted: #666;
  --soft: #f6f6f6;
  --max: 1250px;
  --radius: 12px;
  --line: #e6e6e6;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: #fff;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* =========================
   CATEGORIES
   ========================= */

.wrap {
  width: min(var(--max), 100% - 20px);
  margin: 0 auto;
  padding: 14px 0 0;
}

.catButtons {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
}

.catBtn {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  min-width: 110px;
  cursor: pointer;
}

.catBtn:hover,
.catBtn:focus,
.catBtn:active {
  background: transparent;
  box-shadow: none;
  outline: none;
}

.catIcon {
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f3f3;
  border-radius: 50%;
  border: 1px solid #c9a86a;
  overflow: hidden;
  flex-shrink: 0;
}

.catIcon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.catBtn span {
  font-size: 13px;
  font-weight: 700;
}

.catSelect {
  display: none;
}

/* =========================
   CATALOGUE
   ========================= */

#app {
  width: min(var(--max), 100% - 20px);
  margin: 20px auto 30px;
}

/* ====== GRILLE ====== */
.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* ====== CARTES ====== */
figure {
  margin: 0;
  border: 1px solid #e5e5e5;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .05);
  transition: transform .15s ease, box-shadow .15s ease;
}

figure:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

figcaption {
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  background: #f2f2f2;
  padding: 10px;
  margin-bottom: 10px;
  border-radius: 10px;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* IMAGE */
.thumb {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #f0f0f0;
  margin-bottom: 10px;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

.stock {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

/* TAILLES */
.size {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.size select {
  width: 80%;
  max-width: 180px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
}

/* PRIX */
.price {
  margin-top: auto;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.price-label {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}

.price-amount {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-weight: 800;
  color: #222;
}

.price-amount .int {
  font-size: 22px;
}

.price-amount .dec {
  font-size: 13px;
  position: relative;
  top: 4px;
}

.price-amount .eur {
  font-size: 13px;
  font-weight: 700;
  position: relative;
  top: 7px;
}

/* ========== RESPONSIVE ========== */

@media (max-width:1200px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width:800px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .thumb {
    height: 120px;
  }
}

@media (max-width:480px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .thumb {
    height: 110px;
  }
}

@media (max-width:700px) {
  .catButtons {
    display: none;
  }

  .catSelect {
    display: block;
  }
}