/* ============================================
   ALL FIXES - THIS FILE IS LOADED BY THEME.YML
   ============================================ */

/* Section spacing fixes */
body #wrapper .productstab + .productstab,
body #main .productstab + .productstab,
html body .productstab + .productstab {
  margin-top: 18.75rem;
  margin-bottom: 12.5rem;
  display: block;
}

body #wrapper .actus,
body #main .actus,
body #wrapper #custom-text,
body #main #custom-text {
  margin-top: 25rem;
  display: block;
}

/* 1. SEARCH WIDGET - Fix icon overlapping (CORRECT SELECTORS) */
#_desktop_ps_searchbar .ps-searchbar {
  position: relative;
}

#_desktop_ps_searchbar .ps-searchbar__form {
  position: relative;
}

#_desktop_ps_searchbar .ps-searchbar__input {
  padding-left: 55px;
  padding-right: 20px;
  padding-top: 12px;
  padding-bottom: 12px;
  border-radius: 50px;
}

#_desktop_ps_searchbar .ps-searchbar__magnifier {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #666;
  z-index: 100;
  pointer-events: none;
  font-size: 20px;
}

/* 2. PHONE BUTTON - Fix spacing */
.btn-call {
  background: #e94560;
  color: #ffffff;
  border-radius: 25px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
  margin-left: 20px;
}

.btn-call:hover {
  background: #ff6b6b;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

/* 3. DCATEGORIES - Fix images */
.dcategories {
  padding: 2.5rem 0;
  text-align: center;
}

.dcategories a {
  display: inline-block;
  margin: 0 1.875rem;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.dcategories img {
  max-height: 4.375rem;
  width: auto;
  height: auto;
  object-fit: contain;
}

.dcategories p {
  margin-top: 0.9375rem;
  font-size: 14px;
  font-weight: 600;
  color: #1a1a2e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 4. TABS - Populaire/Les mieux Notés/Voir tout as clickable LINKS */
.tabmenu,
.nav-tabs,
.products-section-title,
.section-title {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 2.5rem;
  border: none;
  flex-wrap: wrap;
}

/* Reset list styles */
.tabmenu ul,
.nav-tabs,
.nav-item {
  list-style: none;
  display: flex;
  gap: 15px;
  padding: 0;
  margin: 0;
}

/* Style the list items as CLICKABLE LINKS */
.tabmenu li,
.nav-tabs li,
.nav-item li,
.tabmenu a,
.nav-tabs a,
.tabmenu li a {
  background: #f8f9fa;
  color: #1a1a2e;
  border-radius: 50px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-block;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.tabmenu li:hover,
.tabmenu li.active,
.nav-tabs li:hover,
.nav-tabs li.active,
.nav-item li:hover,
.tabmenu a:hover,
.tabmenu a.active,
.nav-tabs a:hover {
  background: #1a1a2e;
  color: #fff;
  border-color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(26, 26, 46, 0.2);
}

/* Voir tout link */
.tabmenu > a,
.section-title > a,
.products-section-title > a {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  color: #fff;
  border-radius: 50px;
  padding: 14px 28px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  display: inline-block;
}

.tabmenu > a:hover,
.section-title > a:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(233, 69, 96, 0.3);
}

/* Next/Previous buttons - MAKE THEM WORK */
.next-previous,
.nav-btn,
.prev-next-buttons,
.carousel-controls,
.slider-controls {
  display: flex;
  gap: 10px;
}

.nav-btn,
.next-previous button,
.prev-btn,
.next-btn,
.carousel-prev,
.carousel-next {
  background: #f8f9fa;
  border: 2px solid #1a1a2e;
  color: #1a1a2e;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.3s ease;
  pointer-events: auto;
}

.nav-btn:hover,
.next-previous button:hover,
.prev-btn:hover,
.next-btn:hover {
  background: #1a1a2e;
  color: #fff;
  transform: scale(1.1);
}

/* Ensure buttons are clickable */
.nav-btn *,
.next-previous button * {
  pointer-events: none;
}

/* 5. PRODUCTS - Horizontal scroll for carousel, 3 visible */
.products,
.product-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 30px;
  padding: 1.875rem 1.25rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: thin;
}

.products::-webkit-scrollbar,
.product-list::-webkit-scrollbar {
  height: 0.5rem;
}

.products::-webkit-scrollbar-thumb,
.product-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.product-miniature,
.products > div,
.product-list > div {
  flex: 0 0 18.75rem;
  max-width: 18.75rem;
  margin: 0;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

/* 6. LIVRAISON & ACTUS SECTION - Move DOWN and fix visibility */
.actus,
.actus-description,
.actus-flex,
#custom-text,
.custom-text-section {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  color: #fff;
  padding: 3.75rem 2.5rem;
  text-align: center;
  margin: 18.75rem 0 2.5rem 0;
  border-radius: 20px;
}

/* Extra margin to push Livraison section down significantly */
.actus,
#custom-text {
  margin-top: 21.875rem;
}

/* Specifically target the "les experts" text */
.actus-description article p,
.actus article p {
  color: rgba(255,255,255,0.9);
}

.actus-description article h2,
.actus article h2 {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

/* Fix livraison icons - actus-icon section */
.actus-icon,
.actus-flex {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 30px;
  padding: 2.5rem 1.25rem;
}

.actus-icon > div,
.actus-flex > div,
.actus-icon > img,
.actus-flex > img,
.actus-icon > section,
.actus-flex > section {
  flex: 0 0 auto;
  text-align: center;
  max-width: 12.5rem;
}

.actus-icon img,
.actus-flex img {
  max-width: 3.75rem;
  max-height: 3.75rem;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 15px;
  transition: transform 0.3s ease;
}

.actus-icon img:hover,
.actus-flex img:hover {
  transform: scale(1.1);
}

.actus-icon p,
.actus-flex p,
.actus-icon div p,
.actus-flex section p {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a2e;
  line-height: 1.4;
  margin: 5px 0;
}

/* 7. INJECTEUR SECTION - Fix collision with proper spacing */
.productstab {
  margin: 9.375rem 0;
  padding: 3.75rem;
}

/* Second productstab (Injecteur) - move DOWN and add spacing below */
.productstab + .productstab {
  margin-top: 15.625rem;
  margin-bottom: 12.5rem;
}

/* Move Injecteur header and tabs DOWN significantly */
.productstab h2,
.productstab .section-title,
.productstab .tabmenu,
.productstab .nav-tabs {
  margin-top: 6.25rem;
  margin-bottom: 3.75rem;
}

/* Move Injecteur products UP (closer to buttons) */
.productstab .products {
  margin-top: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Space between Injecteur and next section */
.productstab + .productstab + * {
  margin-top: 5rem;
}

.injecteur-section,
.injector-section,
.product-highlight-section,
.banner-content.second {
  background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
  color: #1a1a2e;
  padding: 40px;
  text-align: center;
  margin: 2.5rem 0;
  border-radius: 20px;
  border: 1px solid rgba(0,0,0,0.05);
}

.injecteur-section h2,
.injecteur-section h3,
.injecteur-section h4,
.injecteur-section h5,
.injecteur-section p,
.injector-section h2,
.injector-section h3,
.injector-section h4,
.injector-section h5,
.injector-section p,
.product-highlight-section h2,
.product-highlight-section h3,
.product-highlight-section h4,
.product-highlight-section h5,
.product-highlight-section p {
  color: #1a1a2e;
  font-weight: 600;
}

/* Banner styling - subtle red accent */
.productstab .banner,
.banner-content .banner {
  background: linear-gradient(135deg, #e94560 0%, #ff6b6b 100%);
  border-radius: 16px;
  padding: 40px;
  margin-bottom: 30px;
}

.productstab .banner h4,
.banner h4 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.625rem;
}

.productstab .banner h5,
.banner h5 {
  color: #fff;
  font-size: 1.2rem;
  font-weight: 500;
}

/* 8. NEWSLETTER - Fix spacing AGGRESSIVELY */
.block-newsletter {
  padding: 3.75rem 0;
}

.block-newsletter form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.125rem;
}

.block-newsletter input[type="email"] {
  margin-bottom: 0;
}

.block-newsletter .btn,
.block-newsletter input[type="submit"],
.block-newsletter button[type="submit"] {
  background: linear-gradient(135deg, #1a1a2e 0%, #2d3436 100%);
  color: #fff;
  border-radius: 50px;
  padding: 1.25rem 3.75rem;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 3.125rem;
  box-shadow: 0 4px 20px rgba(26, 26, 46, 0.25);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  display: block;
}

.block-newsletter .btn:hover,
.block-newsletter input[type="submit"]:hover,
.block-newsletter button[type="submit"]:hover {
  background: linear-gradient(135deg, #2d3436 0%, #1a1a2e 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(26, 26, 46, 0.35);
}

/* Force spacing between elements */
.block-newsletter form > * {
  margin-bottom: 1.5625rem;
}

.block-newsletter form > *:last-child {
  margin-bottom: 0;
  margin-top: 1.5625rem;
}

/* 9. FOOTER - Fix white space underneath */
#footer {
  margin-bottom: 0;
  padding-bottom: 1.875rem;
}

#footer::after,
#footer::before {
  display: none;
}

/* Footer spacing fix */
body {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* 10. GLOBAL STYLES - Apply to ALL pages */
/* All styles above apply globally using */
/* All pages will inherit these styles automatically */

/* MOBILE RESPONSIVE FIXES */
@media (max-width: 992px) {
  /* Tablet adjustments */
  .products > div,
  .product-list > div,
  .products .product-miniature {
    flex: 0 0 calc(50% - 15px);
    max-width: none;
    min-width: auto;
  }
}

@media (max-width: 768px) {
  /* Header mobile fixes */
  .header-top,
  #header .header-top {
    padding: 0.625rem 0.9375rem;
  }
  
  .header-nav,
  #header .header-nav {
    padding: 0.625rem 0.9375rem;
  }
  
  /* Mobile menu button */
  .menu-button,
  .navbar-toggler {
    display: block;
    background: #e94560;
    border: none;
    padding: 0.625rem 0.9375rem;
    border-radius: 0.5rem;
    color: #fff;
  }
  
  /* Product cards - 2 per row on tablet */
  .products > div,
  .product-list > div,
  .products .product-miniature {
    flex: 0 0 calc(50% - 15px);
    max-width: none;
    min-width: auto;
  }
  
  /* Search bar mobile */
  .search-widget {
    width: 100%;
    max-width: 100%;
    margin: 0.625rem 0;
  }
  
  .search-widget input {
    width: 100%;
  }
  
  /* Footer mobile */
  #footer .row > div {
    margin-bottom: 1.875rem;
    text-align: center;
  }
  
  /* Newsletter mobile */
  .block-newsletter form {
    width: 100%;
    padding: 0 1.25rem;
  }
  
  .block-newsletter input[type="email"] {
    width: 100%;
    max-width: 18.75rem;
  }
  
  /* Tabs mobile */
  .tabmenu,
  .nav-tabs {
    flex-direction: column;
    align-items: center;
  }
  
  .tabmenu li,
  .nav-tabs li,
  .tabmenu a {
    width: 100%;
    max-width: 17.5rem;
    text-align: center;
    margin: 0.3125rem 0;
  }
  
  /* Reduce large margins on mobile */
  .productstab {
    margin: 4.6875rem 0;
    padding: 2.5rem 1.25rem;
  }
  
  .productstab + .productstab {
    margin-top: 6.25rem;
    margin-bottom: 4.6875rem;
  }
  
  .actus,
  #custom-text {
    margin-top: 9.375rem;
    padding: 3.75rem 1.25rem;
  }
}

@media (max-width: 480px) {
  /* Small mobile adjustments */
  .products > div,
  .product-list > div,
  .products .product-miniature {
    flex: 0 0 100%;
  }
  
  .productstab {
    margin: 3.125rem 0;
    padding: 2rem 1rem;
  }
  
  .productstab + .productstab {
    margin-top: 4.6875rem;
    margin-bottom: 3.125rem;
  }
}

/* Product page specific fixes */
.page-product .product-miniature,
.page-product .card {
  border-radius: 20px;
}

/* Category page specific fixes */
.page-category .product-miniature,
.page-category .card {
  border-radius: 20px;
}

/* 11. HEADER NAV FULL WIDTH - Fix navbar links stacking */
.ps-mainmenu,
.ps-mainmenu__desktop,
.ps-mainmenu__tree {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
}

.ps-mainmenu {
  margin-left: -18rem !important;
}

/* Ensure navbar links display horizontally */
.ps-mainmenu__tree-item {
  display: inline-flex !important;
  flex-direction: row !important;
  margin-right: 1rem !important;
  margin-bottom: 0 !important;
}

/* Fix link colors - remove red styling */
.ps-mainmenu__tree-link {
  color: #1a1a2e !important;
  text-decoration: none !important;
  display: inline-block !important;
}

.ps-mainmenu__tree-link:hover {
  color: #e94560 !important;
}
