:root {
  --primary: #102052;
  --primary-dark: #0a1538;
  --accent: #1f3d8a;
  --light: #f5f7ff;
  --text: #121212;
  --muted: #6f7c9b;
  --success: #34af61;
  --danger: #ff4d6d;
  --radius: 18px;
  --shadow: 0 18px 35px -20px rgba(16, 32, 82, 0.55);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: #ffffff;
  line-height: 1.6;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: linear-gradient(180deg, rgba(10, 21, 56, 0.82), rgba(10, 21, 56, 0));
  backdrop-filter: blur(8px);
  padding: 0.5rem 1rem;
}

.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #ffffff;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.4rem;
}

.logo-text strong {
  display: block;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.logo-text span {
  font-size: 0.75rem;
  opacity: 0.8;
}

.nav-actions {
  display: flex;
  gap: 0.75rem;
}

.search-toggle,
.close-search,
.modal-close,
.whatsapp-cart,
.product-like,
.add-to-cart,
.wishlist-add,
.filter-btn,
.tab-link,
.cta,
.modal-whatsapp,
.modal-cart {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.search-toggle,
.close-search {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1rem;
  transition: background 0.3s ease;
}

.search-toggle:hover,
.close-search:hover {
  background: rgba(255, 255, 255, 0.25);
}

.search-panel {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: rgba(10, 21, 56, 0.92);
  color: #ffffff;
  padding: 1rem;
  transform: translateY(-120%);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s ease;
}

.search-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.search-box input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: none;
  font-size: 1rem;
}

.search-results {
  margin-top: 1rem;
  max-height: 40vh;
  overflow-y: auto;
  display: grid;
  gap: 0.75rem;
}

.search-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  transition: transform 0.3s ease;
}

.search-result-card:hover {
  transform: translateY(-4px);
}

.search-result-card strong {
  font-size: 0.95rem;
}

main {
  padding-bottom: 100px;
}

.hero {
  position: relative;
  height: 70vh;
  min-height: 420px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.hero-slider {
  width: 100%;
  height: 300%;
  display: flex;
  flex-direction: column;
  animation: heroSlide 21s infinite;
}

.hero-slide {
  position: relative;
  flex: 0 0 calc(100% / 3);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.hero-slide:nth-child(1) {
  background-image: linear-gradient(120deg, rgba(16, 32, 82, 0.9), rgba(10, 21, 56, 0.7)), url('product_image/PhoneStand1.png');
}

.hero-slide:nth-child(2) {
  background-image: linear-gradient(120deg, rgba(16, 32, 82, 0.85), rgba(10, 21, 56, 0.65)), url('product_image/LaptopStand.png');
}

.hero-slide:nth-child(3) {
  background-image: linear-gradient(120deg, rgba(16, 32, 82, 0.85), rgba(10, 21, 56, 0.65)), url('product_image/AirpodPro2.png');
}

.hero-content {
  max-width: 680px;
  text-align: center;
  backdrop-filter: blur(6px);
  background: rgba(10, 21, 56, 0.45);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: contentFade 7s infinite;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  margin-bottom: 1.5rem;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: #ffffff;
  color: var(--primary);
  padding: 0.8rem 1.8rem;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow);
}

.cta:hover {
  transform: translateY(-3px);
}

.section-title {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  color: var(--primary);
}

.section-title p {
  margin-top: 0.5rem;
  color: var(--muted);
}

.filter-bar {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  padding: 0 1.5rem 1.5rem;
}

.filter-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: #e7ecff;
  color: var(--primary);
  font-weight: 500;
  transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  padding: 0 1.5rem 3rem;
}

.product-card {
  background: #ffffff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 45px -22px rgba(16, 32, 82, 0.65);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: linear-gradient(135deg, #ffb347, #ff9966);
  color: #ffffff;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 2;
  box-shadow: var(--shadow);
}

.product-gallery {
  position: relative;
  overflow: hidden;
  height: 220px;
}

.product-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.product-gallery::after {
  content: 'A&A Mall';
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(10, 21, 56, 0.75);
  color: #ffffff;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.6px;
}

.product-details {
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-title {
  margin: 0;
  font-size: 1.1rem;
  color: var(--primary-dark);
  font-weight: 600;
}

.product-price {
  font-weight: 600;
  color: var(--primary);
}

.product-description {
  color: var(--muted);
  font-size: 0.85rem;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.discount-tag {
  font-size: 0.85rem;
  color: var(--success);
}

.product-like {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: #eef1ff;
  color: var(--primary);
  transition: background 0.3s ease;
}

.product-like.liked {
  background: rgba(255, 77, 109, 0.1);
  color: var(--danger);
}

.tab-section {
  display: none;
  animation: fadeUp 0.5s ease;
}

.tab-section.active {
  display: block;
}

.cart-wrapper {
  display: grid;
  gap: 2rem;
  padding: 0 1.5rem 3rem;
}

.cart-panel,
.wishlist-panel {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-items,
.wishlist-items {
  display: grid;
  gap: 1rem;
}

.cart-item,
.wishlist-item {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 1rem;
  align-items: center;
  background: #f8f9ff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
}

.item-info h4 {
  margin: 0 0 0.3rem 0;
  font-size: 1rem;
  color: var(--primary);
}

.item-info span {
  color: var(--muted);
  font-size: 0.9rem;
}

.item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(31, 61, 138, 0.08);
}

.quantity-selector button {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 1rem;
  cursor: pointer;
}

.remove-item {
  border: none;
  background: rgba(255, 77, 109, 0.1);
  color: var(--danger);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.whatsapp-cart,
.modal-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #1ebe5d;
  color: #ffffff;
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.whatsapp-cart:hover,
.modal-whatsapp:hover {
  transform: translateY(-2px);
}

.add-to-cart,
.modal-cart,
.wishlist-add {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-weight: 500;
  box-shadow: var(--shadow);
}

.wishlist-add {
  background: rgba(16, 32, 82, 0.12);
  color: var(--primary);
  box-shadow: none;
}

.floating-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(16, 32, 82, 0.9);
  color: #ffffff;
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px);
  transition: all 0.35s ease;
  z-index: 2000;
}

.floating-notification.show {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 30, 0.72);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  width: min(900px, 92vw);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(16, 32, 82, 0.08);
  color: var(--primary);
  font-size: 1rem;
}

.modal-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem;
}

.modal-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.modal-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-slider::after {
  content: 'A&A Mall';
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(10, 21, 56, 0.75);
  color: #ffffff;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.6px;
}

.slider-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 21, 56, 0.55);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.slider-control.prev {
  left: 12px;
}

.slider-control.next {
  right: 12px;
}

.modal-thumbs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.modal-thumbs button {
  border: 2px solid transparent;
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.modal-thumbs button.active {
  border-color: var(--primary);
}

.modal-thumbs img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  display: block;
}

.modal-details {
  padding: 2rem;
  display: grid;
  gap: 1rem;
}

.modal-title {
  margin: 0;
  font-size: 1.6rem;
  color: var(--primary);
}

.modal-price {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.modal-description {
  color: var(--muted);
}

.color-swatches {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(0, 0, 0, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* === SOCIAL TILES GRADIENTS === */
.social-links {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.social-links li {
  display: flex;
}

.social-links a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #ffffff;
  font-weight: 600;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  transition: all 0.35s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-size: 0.95rem;
}

.social-links a i {
  font-size: 1.2rem;
}

/* Gradients spécifiques aux marques */
.social-links a[href*="whatsapp"] {
  background: linear-gradient(135deg, #25D366, #128C7E);
}

.social-links a[href*="tiktok"] {
  background: linear-gradient(135deg, #69C9D0, #EE1D52);
}

.social-links a[href*="instagram"] {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-links a[href*="facebook"] {
  background: linear-gradient(135deg, #3b5998, #1d305e);
}

/* Hover effect */
.social-links a:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: rgba(10, 21, 56, 0.9);
  backdrop-filter: blur(8px);
  padding: 0.5rem;
  z-index: 1000;
}

.tab-link {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0;
  border-radius: var(--radius);
  transition: color 0.3s ease;
  position: relative;
}

.tab-link .indicator {
  position: absolute;
  bottom: 6px;
  width: 8px;
  height: 8px;
  background: transparent;
  border-radius: 50%;
}

.tab-link.active {
  color: #ffffff;
}

.tab-link.active .indicator {
  background: #ffb347;
}

@media (min-width: 992px) {
  body {
    font-size: 18px;
  }
  main {
    padding-bottom: 0;
  }
  .hero {
    height: 80vh;
  }
  .cart-wrapper {
    grid-template-columns: 1.3fr 1fr;
  }
  .tab-bar {
    display: none;
  }
}

@media (max-width: 768px) {
  .product-gallery {
    height: 200px;
  }
  .cart-item,
  .wishlist-item {
    grid-template-columns: 64px 1fr;
  }
  .quantity-selector {
    margin-top: 0.5rem;
  }
  .item-actions {
    align-items: flex-start;
  }
  .modal-content {
    grid-template-columns: 1fr;
  }
  .modal-gallery,
  .modal-details {
    padding: 1.5rem;
  }
  .modal-thumbs img {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 540px) {
  .site-header {
    padding: 0.5rem;
  }
  .hero-content {
    padding: 1.5rem;
  }
  .product-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .cart-panel,
  .wishlist-panel {
    padding: 1.2rem;
  }
}

@keyframes heroSlide {
  0%, 33% {
    transform: translateY(0);
  }
  33.01%, 66% {
    transform: translateY(-100%);
  }
  66.01%, 100% {
    transform: translateY(-200%);
  }
}

@keyframes contentFade {
  0% {
    opacity: 1;
  }
  33% {
    opacity: 0.4;
  }
  66% {
    opacity: 1;
  }
  100% {
    opacity: 0.4;
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
