/* Google Fonts Link (Imported directly to be standalone) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

/* CSS Variables for Light / Dark Themes */
:root {
  /* LIGHT THEME (Warm Cozy Linen) */
  --bg-main: #f4eee8; /* Beige chaud plus doux */
  --bg-card: #fcfbf8; /* Blanc cassé pour les cartes */
  --bg-nav: rgba(244, 238, 232, 0.85);
  
  --primary: hsl(351, 40%, 58%); /* Rose poudré un peu plus soutenu */
  --primary-hover: hsl(351, 40%, 48%);
  --primary-light: hsl(351, 35%, 88%);
  --primary-glow: rgba(214, 162, 168, 0.25);
  
  --secondary: hsl(139, 15%, 55%); /* Vert sauge plus soutenu */
  --secondary-hover: hsl(139, 15%, 45%);
  --secondary-light: hsl(139, 13%, 88%);
  
  --text-main: #2c2828; /* Texte plus foncé pour un meilleur contraste */
  --text-muted: #6b6363;
  --border-light: rgba(133, 126, 125, 0.15);
  --border-focus: hsl(351, 40%, 58%);
  --btn-primary-text: #ffffff;
  
  --shadow-sm: 0 2px 8px rgba(58, 53, 53, 0.05);
  --shadow-md: 0 8px 24px rgba(58, 53, 53, 0.08);
  --shadow-lg: 0 16px 40px rgba(58, 53, 53, 0.12);
  
  --font-title: 'Playfair Display', serif;
  --font-ui: 'Outfit', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius-lg: 18px;
  --border-radius-md: 12px;
}

html.dark {
  /* DARK THEME (Elegant Night Silk) */
  --bg-main: #0c0b0f;
  --bg-card: #15131b;
  --bg-nav: rgba(12, 11, 15, 0.85);
  
  --primary: hsl(351, 55%, 72%); /* Rose poudré lumineux */
  --primary-hover: hsl(351, 55%, 78%);
  --primary-light: rgba(241, 184, 190, 0.08);
  --primary-glow: rgba(241, 184, 190, 0.2);
  
  --secondary: hsl(139, 20%, 68%); /* Vert sauge doux */
  --secondary-hover: hsl(139, 20%, 75%);
  --secondary-light: rgba(173, 199, 183, 0.08);
  
  --text-main: #f5f2fa;
  --text-muted: #9691a3;
  --border-light: rgba(255, 255, 255, 0.06);
  --border-focus: hsl(351, 55%, 72%);
  --btn-primary-text: #0c0b0f;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ui);
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 15px;
  z-index: 100;
  background-color: var(--bg-nav);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  padding: 15px 30px;
  margin: 20px auto;
  max-width: 1400px;
  border-radius: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: var(--transition-smooth);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 100%;
  margin: 0;
}

.logo {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 28px;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--primary);
}

.logo-needle {
  font-size: 18px;
  transform: rotate(45deg);
  display: inline-block;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-icon {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-icon:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--border-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background-color: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  box-shadow: 0 0 10px var(--primary-glow);
}

.btn-login {
  padding: 10px 22px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: #fff;
  background-color: var(--primary);
  border: none;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-login:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

/* User Info Badge */
.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--primary-light);
  border: 1px solid var(--border-light);
  padding: 5px 12px;
  border-radius: 20px;
}

.user-badge span {
  font-size: 13px;
  font-weight: 600;
}

.user-badge button {
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  font-size: 14px;
}

/* Hero Section */


.hero h2 {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 15px;
}

.hero h2 span {
  color: var(--primary);
  font-style: italic;
}

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Main Shop Content */
.shop-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 5% 80px 5%;
  flex-grow: 1;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 30px;
}

/* Product Card */
.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}

.product-img-wrapper {
  position: relative;
  aspect-ratio: 4/3;
  width: 100%;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.05);
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.2, 1, 0.2, 1);
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
}

.product-stock-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  background-color: rgba(255, 42, 133, 0.1);
  color: var(--primary);
  border: 1px solid rgba(255, 42, 133, 0.2);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.product-stock-tag.out {
  background-color: rgba(255, 0, 0, 0.1);
  color: #ff3b30;
  border-color: rgba(255, 0, 0, 0.2);
}

.product-details {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  gap: 8px;
}

.product-title {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.product-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.product-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.btn-add-cart {
  background-color: var(--primary);
  color: #fff;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 10px var(--primary-glow);
}

.btn-add-cart:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: scale(1.05);
}

.btn-add-cart:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  box-shadow: none;
}

/* Slide-over Drawer (Cart / Login / Orders) */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--bg-card);
  border-left: 1px solid var(--border-light);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.2, 1);
  display: flex;
  flex-direction: column;
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}

.drawer.open { transform: translateX(0); }

.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(7, 4, 16, 0.4);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.drawer-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.drawer-title i {
  color: var(--primary);
}

.drawer-body {
  padding: 20px;
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Cart Item */
.cart-item {
  display: flex;
  gap: 15px;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
}

.cart-item-img {
  width: 60px;
  height: 60px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
  background-color: rgba(0,0,0,0.05);
}

.cart-item-details {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.cart-item-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.cart-qty-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 12px;
  transition: var(--transition-smooth);
}

.cart-qty-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.cart-qty-value {
  font-size: 13px;
  font-weight: 700;
  width: 15px;
  text-align: center;
}

.btn-remove-item {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  padding: 5px;
}

.btn-remove-item:hover {
  color: #ff3b30;
}

/* Drawer Footer / Cart totals */
.drawer-footer {
  padding: 20px;
  border-top: 1px solid var(--border-light);
  background-color: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cart-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}

.cart-summary-line.total {
  font-size: 18px;
  font-weight: 800;
  font-family: var(--font-title);
  border-top: 1px dashed var(--border-light);
  padding-top: 10px;
}

.btn-block {
  width: 100%;
  padding: 14px;
  border-radius: var(--border-radius-md);
  border: none;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary-action {
  background-color: var(--primary);
  color: var(--btn-primary-text);
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary-action:hover:not(:disabled) {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-primary-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Empty States */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  gap: 15px;
  flex-grow: 1;
}

.empty-state-icon {
  font-size: 40px;
  color: var(--primary-hover);
  opacity: 0.5;
}

/* Forms & Inputs styling */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  margin-bottom: 12px;
}

.form-group label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 11px 15px;
  border-radius: var(--border-radius-md);
  border: 1px solid var(--border-light);
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-ui);
  outline: none;
  font-size: 14px;
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--border-focus);
  background-color: var(--bg-card);
  box-shadow: 0 0 8px var(--primary-glow);
}

.form-row {
  display: flex;
  gap: 15px;
  width: 100%;
}

.form-text-link {
  font-size: 12px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

.form-text-link:hover {
  text-decoration: underline;
}

/* Checkout View */
.checkout-view {
  display: flex;
  flex-direction: column;
  gap: 15px;
  animation: slideIn 0.3s ease;
}

/* Success View */
.success-view {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 15px;
  animation: scaleIn 0.3s ease;
}

.success-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--secondary-light);
  color: var(--secondary);
  font-size: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 0 20px rgba(141, 168, 150, 0.2);
}

/* Mode Sombre / Clair Icon Switch animations */
#theme-toggle .sun-icon {
  display: none;
}
#theme-toggle .moon-icon {
  display: block;
}

html.dark #theme-toggle .sun-icon {
  display: block;
}
html.dark #theme-toggle .moon-icon {
  display: none;
}

/* Keypad Login for Admin */
.keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 220px;
  margin: 0 auto;
}

.keypad-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid var(--border-light);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-ui);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition-smooth);
}

.keypad-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.pin-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  background: transparent;
  transition: var(--transition-smooth);
}

.pin-dot.filled {
  background-color: var(--primary);
  border-color: var(--primary);
  transform: scale(1.1);
}

/* ADMIN PANEL LAYOUT */
.admin-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: calc(100vh - 71px);
}

@media (max-width: 768px) {
  .admin-container {
    grid-template-columns: 1fr;
  }
}

.admin-sidebar {
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-light);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

.admin-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-nav-item button {
  width: 100%;
  text-align: left;
  padding: 12px 15px;
  border-radius: var(--border-radius-md);
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition-smooth);
}

.admin-nav-item button:hover {
  background-color: var(--primary-light);
  color: var(--primary);
}

.admin-nav-item.active button {
  background-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px var(--primary-glow);
}

.admin-content {
  padding: 40px;
  overflow-y: auto;
}

@media (max-width: 500px) {
  .admin-content {
    padding: 20px 10px;
  }
}

.admin-section {
  display: none;
  animation: fadeIn 0.4s ease;
}

.admin-section.active {
  display: block;
}

/* Orders Dashboard elements */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 25px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
}

.order-card.pending { border-left: 4px solid var(--primary); }
.order-card.shipped { border-left: 4px solid var(--secondary); }
.order-card.completed { border-left: 4px solid #48bb78; opacity: 0.8; }

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 15px;
}

.order-id {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}

.order-date {
  font-size: 12px;
  color: var(--text-muted);
}

.order-client-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.info-block h5 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.info-block p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.4;
}

.order-items-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.order-items-table th, .order-items-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.order-items-table th {
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 10px;
}

.order-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 10px;
}

.btn-sm {
  padding: 8px 15px;
  font-size: 12px;
  font-weight: 700;
  border-radius: var(--border-radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
}

.btn-shipped {
  background-color: var(--secondary);
  color: #fff;
}
.btn-shipped:hover { background-color: var(--secondary-hover); }

.btn-completed {
  background-color: #48bb78;
  color: #fff;
}
.btn-completed:hover { background-color: #38a169; }

.btn-delete {
  background-color: transparent;
  border-color: var(--border-light);
  color: var(--text-muted);
}
.btn-delete:hover {
  background-color: rgba(255, 0, 0, 0.05);
  color: #ff3b30;
  border-color: rgba(255, 0, 0, 0.1);
}

/* Product list (Admin CRUD) */
.admin-products-table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-products-table th, .admin-products-table td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.admin-products-table th {
  background-color: var(--primary-light);
  font-family: var(--font-ui);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--text-main);
}

.admin-product-row-img {
  width: 45px;
  height: 45px;
  border-radius: var(--border-radius-md);
  object-fit: cover;
}

.admin-product-actions {
  display: flex;
  gap: 8px;
}

.btn-edit {
  background-color: transparent;
  border-color: var(--border-light);
  color: var(--text-main);
}
.btn-edit:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Modal styling */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(7, 4, 16, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

.modal.open {
  display: flex;
}

.modal-content {
  background-color: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 500px;
  box-shadow: var(--shadow-lg);
  position: relative;
  animation: scaleIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Responsive Footer */
.footer {
  border-top: 1px solid var(--border-light);
  padding: 30px 5%;
  background-color: var(--bg-card);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
}

.footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition-smooth);
}

.footer-links a:hover {
  color: var(--primary);
}


/* =========================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION
   ========================================= */
@media (max-width: 768px) {
    /* Navbar */
  .navbar {
    margin: 10px;
    padding: 12px 15px;
    border-radius: 20px;
    max-width: 100%;
  }
  .nav-container { padding: 0; }
  .logo { font-size: 22px; }
  .btn-login { padding: 8px 14px; font-size: 13px; }
  .nav-actions { gap: 10px; }
  
  /* Hero */
  .hero { padding: 60px 20px; }
  .hero h2 { font-size: 36px; }
  .hero p { font-size: 16px; }
  
  /* Catalog & Controls */
  .section-header { 
    flex-direction: column !important; 
    align-items: flex-start !important; 
    gap: 15px !important; 
  }
  .catalog-controls { 
    width: 100% !important; 
    justify-content: space-between !important; 
  }
  .catalog-controls > div {
    flex-grow: 1;
  }
  #search-input { width: 100% !important; }
  
  /* Grid */
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
  }
  
  /* Drawers */
  .drawer {
    width: 100% !important;
    transform: translateX(100%);
  }
  .drawer.open {
    transform: translateX(0);
  }
  
  /* Admin Panel Mobile Fixes */
  #admin-login-screen > div {
    padding: 20px !important;
  }
  .keypad-btn {
    width: 60px !important;
    height: 60px !important;
    font-size: 22px !important;
  }
  
  /* Chat & Messages Layout on Mobile */
  .admin-section > div[style*="display: flex"] {
    flex-direction: column !important;
    height: calc(100vh - 120px) !important;
  }
  #admin-threads-list {
    width: 100% !important;
    height: 180px !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-light) !important;
  }
  #admin-active-thread {
    flex-grow: 1 !important;
  }
}


/* Modal Tabs */
.modal-tab {
  flex: 1;
  padding: 15px;
  background: transparent;
  border: none;
  font-family: var(--font-ui);
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  border-bottom: 2px solid transparent;
}
.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(255, 42, 133, 0.05);
}
.modal-tab i {
  margin-right: 8px;
}

/* AI Dropzone */
.ai-dropzone {
  border: 2px dashed var(--border-light);
  border-radius: 15px;
  padding: 30px;
  text-align: center;
  transition: var(--transition-smooth);
  cursor: pointer;
  background: rgba(0,0,0,0.02);
}
.ai-dropzone:hover, .ai-dropzone.dragover {
  border-color: var(--primary);
  background: var(--primary-light);
}
.ai-dropzone i {
  font-size: 32px;
  color: var(--primary);
  margin-bottom: 10px;
}
.ai-dropzone p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Spinner */
.ai-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.ai-notice {
  background: linear-gradient(135deg, rgba(161, 140, 209, 0.1) 0%, rgba(251, 194, 235, 0.1) 100%);
  border: 1px solid rgba(161, 140, 209, 0.3);
  padding: 12px;
  border-radius: 12px;
  font-size: 13px;
  color: var(--text-main);
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ai-notice i {
  color: #a18cd1;
  font-size: 18px;
}

/* =====================================================================
   PREMIUM DESIGN OVERHAUL
   ===================================================================== */

/* --- Scroll Reveal Animations --- */
.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.2, 1, 0.2, 1), transform 0.8s cubic-bezier(0.2, 1, 0.2, 1);
}
.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

/* --- Hero Section Premium --- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 20px;
  overflow: hidden;
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-title {
  font-family: var(--font-title);
  font-size: 64px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-main);
  text-shadow: 0 4px 20px rgba(0,0,0,0.1);
}
.hero-title span {
  background: linear-gradient(135deg, var(--primary) 0%, #fbc2eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero-subtitle {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.6;
}
.hero-btn {
  padding: 18px 40px;
  font-size: 16px;
  border-radius: 40px;
  box-shadow: 0 10px 30px var(--primary-glow);
  transition: all 0.4s ease;
}
.hero-btn:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px var(--primary-glow);
}
.hero-btn i {
  margin-left: 10px;
  animation: bounceDown 2s infinite;
}
@keyframes bounceDown {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(5px); }
  60% { transform: translateY(3px); }
}

.hero-floating-icons {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
}
.float-icon {
  position: absolute;
  font-size: 30px;
  color: var(--text-muted);
  opacity: 0.3;
  animation: floatIcon 6s ease-in-out infinite alternate;
}
@keyframes floatIcon {
  0% { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(-30px) rotate(15deg); }
}

/* --- Savoir-Faire Section --- */
.savoir-faire {
  padding: 100px 5%;
  position: relative;
  z-index: 2;
}
.sf-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.sf-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-light);
  border-radius: 24px;
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  box-shadow: var(--shadow-sm);
}
.sf-card:hover {
  transform: translateY(-15px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.sf-icon {
  width: 80px;
  height: 80px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 32px;
  margin: 0 auto 25px;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.sf-card:hover .sf-icon {
  transform: scale(1.1) rotate(10deg);
  background: var(--primary);
  color: white;
}
.sf-card h3 {
  font-family: var(--font-title);
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--text-main);
}
.sf-card p {
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Parallax Banner --- */
.parallax-banner {
  position: relative;
  margin: 100px 0;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-image: url('https://images.unsplash.com/photo-1558769132-cb1fac0840f2?auto=format&fit=crop&q=80&w=2000');
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
  z-index: 2;
}
.parallax-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
}
.parallax-content {
  position: relative;
  z-index: 3;
  max-width: 800px;
  padding: 0 20px;
}
.parallax-content h2 {
  font-family: var(--font-title);
  font-size: 42px;
  font-style: italic;
  font-weight: 400;
  margin-bottom: 20px;
  line-height: 1.4;
}
.parallax-content p {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
}

/* --- Premium Footer --- */
.footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-light);
  padding: 80px 5% 30px;
  position: relative;
  z-index: 2;
}
.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto 50px;
}
.footer-col h3, .footer-col h4 {
  font-family: var(--font-title);
  color: var(--text-main);
  margin-bottom: 20px;
}
.footer-col h3 { font-size: 24px; }
.footer-col h4 { font-size: 20px; }
.footer-col p {
  color: var(--text-muted);
  line-height: 1.6;
}
.footer-col ul {
  list-style: none;
}
.footer-col ul li {
  margin-bottom: 12px;
}
.footer-col ul li a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s ease;
}
.footer-col ul li a:hover {
  color: var(--primary);
  padding-left: 5px;
}
.social-links {
  display: flex;
  gap: 15px;
}
.social-icon {
  width: 45px;
  height: 45px;
  background: var(--bg-main);
  color: var(--text-main);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid var(--border-light);
}
.social-icon:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-5px);
  border-color: var(--primary);
}
.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid var(--border-light);
  color: var(--text-muted);
  font-size: 14px;
}

/* Enhancing Product Cards 3D effect setup */
.product-card {
  transform-style: preserve-3d;
  perspective: 1000px;
}

@media (max-width: 768px) {
  .hero-title { font-size: 42px; }
  .parallax-content h2 { font-size: 28px; }
   /* Disable custom cursor on mobile */
  
}

/* =====================================================================
   BOXED LAYOUT & NAVIGATION
   ===================================================================== */

/* Body Background */
body {
  /* Subtle luxurious pattern or distinct color to contrast with the box */
  background-color: #ede9e3; /* Light warm grey/beige */
  background-image: radial-gradient(#d5cdc4 1px, transparent 1px);
  background-size: 20px 20px;
}

html.dark body {
  background-color: #060508;
  background-image: radial-gradient(#1f1d24 1px, transparent 1px);
}

/* The Main Boxed Container */
#main-boxed-container {
  max-width: 1400px;
  margin: 0 auto 50px auto;
  background-color: var(--bg-card);
  border-radius: 30px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid var(--border-light);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

html.dark #main-boxed-container {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Nav Menu Tabs */
.nav-menu {
  display: flex;
  justify-content: center;
  flex-grow: 1;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  transition: var(--transition-smooth);
  padding: 8px 12px;
  border-radius: 20px;
}

.nav-links li a:hover {
  color: var(--primary);
  background-color: var(--primary-light);
}

@media (max-width: 992px) {
  .nav-menu {
    display: none; /* Hide standard tabs on smaller screens if too cramped */
  }
  #main-boxed-container {
    margin: 0 10px 30px 10px;
    border-radius: 20px;
  }
}

/* Section À Propos */
.a-propos {
  padding: 80px 5%;
  background: var(--bg-main);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.apropos-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 50px;
}
.apropos-text {
  flex: 1;
}
.apropos-text h2 {
  font-family: var(--font-title);
  font-size: 36px;
  color: var(--text-main);
  margin-bottom: 20px;
}
.apropos-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 15px;
  font-size: 16px;
}
.apropos-image {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.apropos-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .apropos-container {
    flex-direction: column;
  }
}
