@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,wght@0,400;0,500;0,700;1,400&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Colors - Based on Logo & Brand Identity */
  --primary: #E8107F; /* Rose fuchsia primaire */
  --primary-dark: #C0006A;
  --primary-light: #FFF0F7; /* Rose pâle */
  --white: #FFFFFF;
  --black: #1A1A1A; /* Noir charbon */
  --gray-light: #F5F5F5;
  --gray: #888888;
  --gray-border: #E0E0E0;
  --accent: #D4A853; /* Or accent */
  --whatsapp: #25D366;
  --success: #10B981;
  --danger: #EF4444;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'DM Sans', sans-serif;

  /* Shadow & Radius */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.3s ease;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--black);
  background-color: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--black);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

ul {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: transparent;
}

/* ==========================================================================
   Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.bg-primary { background-color: var(--primary); color: var(--white); }
.bg-light { background-color: var(--gray-light); }
.bg-primary-light { background-color: var(--primary-light); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ==========================================================================
   Components
   ========================================================================== */
/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition);
  text-align: center;
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background-color: transparent;
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: var(--white);
}

.btn-whatsapp:hover {
  background-color: #1da851;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-block {
  width: 100%;
}

/* Floating WhatsApp */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--whatsapp);
  color: var(--white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: var(--transition);
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  transform: scale(1.05);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Announcement Bar */
.announcement-bar {
  background-color: var(--black);
  color: var(--white);
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.announcement-bar a {
  color: var(--primary);
  font-weight: bold;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 900;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 40px;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-links a {
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -4px;
  left: 0;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.header-icons {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.icon-btn {
  font-size: 1.25rem;
  color: var(--black);
  position: relative;
}

.icon-btn:hover {
  color: var(--primary);
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: var(--primary);
  color: var(--white);
  font-size: 0.75rem;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

.mobile-menu-btn {
  display: none;
  font-size: 1.5rem;
}

/* Trust Bar */
.trust-bar {
  background-color: var(--gray-light);
  border-top: 1px solid var(--primary-light);
  border-bottom: 1px solid var(--primary-light);
  padding: 1.5rem 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: center;
}

.trust-icon {
  font-size: 2rem;
  color: var(--primary);
}

.trust-text h4 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.trust-text p {
  font-size: 0.875rem;
  color: var(--gray);
  margin: 0;
}

/* Product Card */
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  transition: var(--transition);
  position: relative;
  group: true;
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.product-image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  aspect-ratio: 1;
  background-color: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image-wrap img {
  transition: var(--transition);
  mix-blend-mode: multiply;
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.05);
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background-color: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: bold;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  z-index: 2;
}

.badge.new {
  background-color: var(--success);
}

.fav-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--white);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  color: var(--gray);
  transition: var(--transition);
}

.fav-btn:hover {
  color: var(--primary);
}

.product-brand {
  font-size: 0.75rem;
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 1rem;
}

.product-price .ugx {
  font-size: 0.875rem;
  color: var(--gray);
}

.product-card .btn-add {
  width: 100%;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  bottom: -1rem;
  left: 0;
  transition: var(--transition);
}

.product-card:hover .btn-add {
  opacity: 1;
  visibility: visible;
  bottom: 1rem;
}

/* Footer */
.footer {
  background-color: var(--black);
  color: var(--white);
  padding: 4rem 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.125rem;
  margin-bottom: 1.5rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--gray);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--gray);
  font-size: 0.875rem;
}

/* Section Titles */
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.section-title p {
  color: var(--gray);
  max-width: 600px;
  margin: 0 auto;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--white);
  border-left: 4px solid var(--primary);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 1rem;
  transform: translateX(-150%);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

/* Shop Layout */
.shop-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.sidebar-filter {
  background: var(--gray-light);
  padding: 1.5rem;
  border-radius: var(--radius);
  position: sticky;
  top: 100px;
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-group h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  border-bottom: 1px solid var(--gray-border);
  padding-bottom: 0.5rem;
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

/* Product Detail Layout */
.product-detail-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-gallery { display: flex; flex-direction: column; gap: 1rem; }
.main-image { background: var(--gray-light); border-radius: var(--radius); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.main-image img { width: 80%; mix-blend-mode: multiply; }
.thumbnail-list { display: flex; gap: 1rem; overflow-x: auto; padding-bottom: 0.5rem; }
.thumbnail { width: 80px; height: 80px; background: var(--gray-light); border-radius: var(--radius-sm); cursor: pointer; border: 2px solid transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.thumbnail img { width: 80%; mix-blend-mode: multiply; }
.thumbnail.active { border-color: var(--primary); }

.product-info h1 { font-family: var(--font-heading); font-size: 2.5rem; margin-bottom: 0.5rem; }
.product-info .price { font-size: 2.5rem; font-weight: 700; color: var(--primary); font-family: var(--font-heading); margin: 1rem 0; }
.qty-selector { display: inline-flex; border: 1px solid var(--gray-border); border-radius: var(--radius-full); overflow: hidden; align-items: center; }
.qty-btn { padding: 0.75rem 1.25rem; background: var(--gray-light); cursor: pointer; font-size: 1.25rem; font-weight: bold; }
.qty-input { width: 50px; text-align: center; border: none; outline: none; font-weight: bold; font-size: 1.1rem; }

.product-tabs { margin-top: 4rem; border-top: 1px solid var(--gray-border); padding-top: 2rem; }
.tab-headers { display: flex; gap: 2rem; border-bottom: 1px solid var(--gray-border); margin-bottom: 2rem; overflow-x: auto; }
.tab-btn { padding: 1rem 0; font-weight: 600; color: var(--gray); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab-btn.active { color: var(--primary); border-color: var(--primary); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Cart Layout */
.cart-layout { display: grid; grid-template-columns: 2fr 1fr; gap: 3rem; align-items: start; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th { text-align: left; padding: 1rem; border-bottom: 1px solid var(--gray-border); color: var(--gray); font-weight: 500; text-transform: uppercase; font-size: 0.8rem; letter-spacing: 1px; }
.cart-table td { padding: 1.5rem 1rem; border-bottom: 1px solid var(--gray-border); vertical-align: middle; }
.cart-item-info { display: flex; align-items: center; gap: 1rem; }
.cart-item-info img { width: 80px; height: 80px; border-radius: var(--radius-sm); object-fit: contain; background: var(--gray-light); mix-blend-mode: multiply; }
.cart-summary { background: var(--gray-light); padding: 2rem; border-radius: var(--radius); position: sticky; top: 100px; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 1rem; }
.summary-row.total { font-size: 1.5rem; font-weight: bold; font-family: var(--font-heading); margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--gray-border); color: var(--primary); }

/* Checkout Layout */
.checkout-layout { display: grid; grid-template-columns: 3fr 2fr; gap: 4rem; align-items: start; }
.checkout-step { background: var(--white); border: 1px solid var(--gray-border); border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem; }
.checkout-step h3 { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; font-size: 1.25rem; }
.step-number { width: 32px; height: 32px; background: var(--primary); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1rem; font-family: var(--font-heading); font-weight: bold; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-group label { font-size: 0.9rem; font-weight: 500; color: var(--gray); }
.form-group.full { grid-column: 1 / -1; }
.form-control { padding: 0.75rem 1rem; border: 1px solid var(--gray-border); border-radius: var(--radius-sm); outline: none; transition: var(--transition); font-size: 1rem; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.radio-card { border: 1px solid var(--gray-border); border-radius: var(--radius-sm); padding: 1.25rem; display: flex; align-items: flex-start; gap: 1rem; cursor: pointer; transition: var(--transition); margin-bottom: 1rem; }
.radio-card:hover { border-color: var(--primary); background-color: var(--primary-light); }
.radio-card input { margin-top: 0.25rem; }
.radio-card-content { flex: 1; }
.radio-card-title { font-weight: 600; margin-bottom: 0.25rem; display: block; }
.radio-card-desc { font-size: 0.875rem; color: var(--gray); }

/* Responsive */
@media (max-width: 1024px) {
  .grid-cols-4 { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .checkout-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .mobile-menu-btn { display: block; }
  .grid-cols-3, .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .trust-item { flex-direction: column; text-align: center; }
  .section { padding: 3rem 0; }
  .section-title h2 { font-size: 2rem; }
  .product-card .btn-add { opacity: 1; visibility: visible; position: static; margin-top: 1rem; }
  .shop-layout { grid-template-columns: 1fr; }
  .sidebar-filter { display: none; }
  .product-detail-layout { grid-template-columns: 1fr; gap: 2rem; }
  
  .cart-layout { grid-template-columns: 1fr; }
  .cart-table thead { display: none; }
  .cart-table td { display: block; padding: 0.5rem 0; text-align: right; border: none; }
  .cart-table td::before { content: attr(data-label); float: left; font-weight: 600; color: var(--gray); }
  .cart-table td.cart-item-col { display: flex; text-align: left; margin-bottom: 1rem; border-bottom: 1px solid var(--gray-border); padding-bottom: 1rem; }
  .cart-table td.cart-item-col::before { display: none; }
  .cart-table tr { display: block; border-bottom: 2px solid var(--gray-light); margin-bottom: 2rem; padding-bottom: 1rem; }
  
  .form-grid { grid-template-columns: 1fr; }
}

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