:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --card-border: #dcdcdc;
  --badge-blue: #5271ff;
  --black: #000000;
  --whatsapp: #16a34a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.4;
  padding-bottom: 90px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f1f1f1;
}

.header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Logo Style */
.logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 2.5px solid #000;
  border-bottom: 2.5px solid #000;
  padding: 2px 10px;
  position: relative;
}

.logo-cap {
  width: 14px;
  height: 4px;
  background: #000;
  margin-bottom: 2px;
}

.logo-letters {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
}

.logo-sub {
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 2.5px;
  margin-top: 3px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cart-badge {
  position: absolute;
  top: 1px;
  right: 0;
  background: var(--black);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Search Bar */
.search-bar {
  display: none;
  padding: 0 16px 12px;
  max-width: 1120px;
  margin: 0 auto;
}

.search-bar.open {
  display: block;
}

.search-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--card-border);
  border-radius: 999px;
  padding: 8px 14px;
  background: #fafafa;
}

.search-input-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  font-family: inherit;
}

.search-input-wrap button {
  background: none;
  border: none;
  font-size: 18px;
  color: var(--muted);
  cursor: pointer;
}

/* Toolbar & Filter Tabs */
.toolbar {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  border: 1px solid var(--card-border);
  background: #fff;
  color: var(--text);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tab-btn.active {
  background: var(--black);
  color: #fff;
  border-color: var(--black);
}

.product-count {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

/* Main Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 10px 16px;
}

.catalog-section {
  margin-top: 16px;
  margin-bottom: 34px;
}

.catalog-section.hidden {
  display: none;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.section-header h2 {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.section-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  background: #f5f5f5;
  padding: 4px 10px;
  border-radius: 999px;
}

/* Grid (2 colonnes sur téléphone comme les captures) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card */
.product-card {
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-card:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.card-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.08;
  background: #f8f5f6;
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--badge-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 4px;
  z-index: 2;
}

.card-body {
  padding: 14px 12px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.product-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Bouton BUY noir */
.btn-buy {
  width: 100%;
  background: var(--black);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

.btn-buy:active {
  transform: scale(0.98);
}

/* Bouton Ajouter au panier blanc */
.btn-cart {
  width: 100%;
  background: #fff;
  color: var(--text);
  border: 1px solid #222;
  border-radius: 999px;
  padding: 10px 10px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn-cart:hover {
  background: #f5f5f5;
}

/* Overlay & Panier Drawer */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 370px;
  height: 100%;
  background: #fff;
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h3 {
  font-size: 16px;
  font-weight: 800;
}

.close-btn {
  background: none;
  border: none;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.empty-cart {
  text-align: center;
  color: var(--muted);
  margin-top: 40px;
  font-size: 14px;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
}

.cart-item img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.cart-item-type {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.qty-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--card-border);
  background: #fff;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
}

.remove-item {
  background: none;
  border: none;
  color: #dc2626;
  font-size: 12px;
  cursor: pointer;
}

.cart-footer {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.whatsapp-order-btn {
  width: 100%;
  background: var(--whatsapp);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Bouton Flottant Chat */
.floating-chat {
  position: fixed;
  bottom: 20px;
  right: 18px;
  z-index: 45;
  background: #333538;
  color: #fff;
  text-decoration: none;
  padding: 11px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #111;
  color: #fff;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 70;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}