/*
 Theme Name:   Hello Elementor Child
 Template:     hello-elementor
 Version:      1.0.0
*/

/* ===================== */
/* 🟦 General UX Layout  */
/* ===================== */

body {
  transition: opacity 0.6s ease-in-out;
  font-family: "Inter Tight";
}
body.fade-in {
  opacity: 1;
}
.fade-section {
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  will-change: opacity, transform;
}
.fade-section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===================== */
/* 📱 Mobile Menu        */
/* ===================== */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}
.mobile-menu.active {
  transform: translateX(0);
}

.mobile-backdrop-header {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-backdrop-header.active {
  opacity: 1;
  pointer-events: auto;
}

body.no-scroll {
  overflow: hidden;
}
.menu-toggle-wrapper {
  position: relative;
  width: 32px;
  height: 32px;
}
.menu-toggle-wrapper .openMobileMenu,
.menu-toggle-wrapper .closeMobileMenu {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  cursor: pointer;
}
.fade-toggle {
  pointer-events: none;
  transform: scale(0.95);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.fade-toggle.show {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

/* ===================== */
/* 📌 Sticky Header      */
/* ===================== */
.main-custom-header {
  z-index: 1000;
}
.sticky-custom-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  transform: translateY(-100%);
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 1000;
  transition: transform 0.3s ease;
}
.sticky-custom-header img {
  max-height: 60px;
  transition: max-height 0.3s ease;
}

/* ===================== */
/* 🛒 Catalogue Layout   */
/* ===================== */
.catalogue-layout {
  padding: 1rem;
  margin: auto;
  font-family: "Inter Tight", sans-serif;
}
.custom-btn {
  font-family: "Inter Tight", Sans-serif;
  background: #78d5e4;
  color: #000000;
  border: none;
  padding: 8px 12px;
  border-radius: 0;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 18px;
  font-weight: 600;
}
.custom-btn:hover {
  background: #000000;
  color: #78d5e4;
  scale: 0.9;
}
.toggle-filters-btn {
  display: none;
  margin-bottom: 1rem;
  align-items: center;
  gap: 6px;
}

.toggle-filters-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  transition: stroke 0.3s ease;
}

.catalogue-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  position: relative;
}

/* ===================== */
/* 📂 Sidebar & Filters  */
/* ===================== */
.catalogue-sidebar {
  width: 250px;
  background: #edeef2;
  border-radius: 6px;
  flex-shrink: 0;
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  position: sticky;
  top: 100px;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}
.sidebar-inner {
  padding: 1rem 0.5rem 1rem 1rem;
}

.catalogue-sidebar::-webkit-scrollbar {
  width: 6px;
}
.catalogue-sidebar::-webkit-scrollbar-track {
  background: transparent;
  margin-top: 2px; /* ⬆️ Top spacing */
  margin-bottom: 2px; /* ⬇️ Bottom spacing */
  margin-left: 2px;
}
.catalogue-sidebar::-webkit-scrollbar-thumb {
  background-color: #bbb;
  border-radius: 6px;
}
.catalogue-sidebar::-webkit-scrollbar-thumb:hover {
  background-color: #888;
}

/* Optional: spacing between content and scrollbar */
.catalogue-sidebar .filter-group {
  padding-right: 6px;
}

.catalogue-sidebar.hidden {
  transform: translateX(-120%);
  position: absolute;
  background: #f9f9f9;
  /* z-index: 10; */
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
  pointer-events: none;
  opacity: 0;
}
.filter-group {
  margin-bottom: 1.5rem;
}
.filter-group h3 {
  font-size: 1.1rem;
  color: #000;
  margin-bottom: 1rem;
}
.filter-group h4 {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  margin-left: 10px;
  color: #000;
}
.filter-list {
  list-style: none;
  padding: 0;
  margin-left: 20px;
}
.filter-list li {
  margin-bottom: 2px;
}
.custom-checkbox {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 0.8rem;
  color: #000;
}
.custom-checkbox input[type="checkbox"] {
  margin-right: 5px;
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #78d5e4;
  border-radius: 7px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background-color 0.2s, border-color 0.2s;
}
.custom-checkbox input[type="checkbox"]:checked {
  background-color: #78d5e4;
  border-color: #78d5e4;
}
.custom-checkbox input[type="checkbox"]:checked::after {
  content: "\2714";
  font-size: 12px;
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* ===================== */
/* 🧱 Product Grid       */
/* ===================== */
.catalogue-products-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}
.product-card {
  /* padding: 16px; */
  border: 1px solid #edeef2;
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 6px;
  overflow: hidden;
  max-width: 500px;
}
.product-card:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-card-content {
  display: flex;
  flex-direction: column;
  gap: 0px;
}

.product-excerpt {
  font-size: 0.85rem;
  color: #555;
  line-height: 1.4;
}

.brand-info {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-logo {
  max-height: 50px;
  width: auto;
  display: inline-block;
}

.brand-name {
  font-weight: 600;
  font-size: 0.8rem;
  color: #000;
}

.product-image {
  width: 100%;
  height: 300px !important;
  object-fit: contain;
  border-top-left-radius: 6px;
  border-top-right-radius: 6px;
}
.product-card-content {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: end;
}
.product-title {
  font-size: 1.1rem;
  color: #000;
  margin: 0 0 0.5rem;
}
.product-ref {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.5rem;
}
.product-status {
  margin: 0.5rem 0;
  font-weight: bold;
  font-size: 0.9rem;
}
.disponible {
  color: green;
}
.rupure {
  color: red;
}
.btn-devis {
  display: inline-block;
  margin-top: auto;
  padding: 8px 15px;
  background-color: #1b334e;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
  text-align: center;
  transition: background-color 0.3s ease;
}
.btn-devis:hover {
  background-color: #2a4b6d;
}
.btn-show-product {
  text-align: center;
}
.spinner {
  margin: auto;
  width: 32px;
  height: 32px;
  border: 4px solid #e0f6fa;
  border-top: 4px solid #78d5e4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Backdrop (mobile only) */
.mobile-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9999999;
}

.mobile-backdrop.visible {
  display: block;
}

.close-sidebar-btn {
  display: none;
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 26px;
  color: #78d5e4;
  z-index: 20;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.15s ease;
}

.close-sidebar-btn:hover,
.close-sidebar-btn:focus,
.close-sidebar-btn:active {
  color: #78d5e4;
  outline: none;
  transform: scale(1.1);
  background: none;
}

.btn-outline-small {
  font-size: 0.8rem;
  padding: 6px 10px;
  /* border: 1px solid #ccc; */
  background: #78d5e4;
  color: #000;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  font-weight: 500;
  font-family: inherit;
  border: none;
  outline: none;
}

.btn-outline-small:hover {
  background: #4ab4c6; /* darker than #78D5E4 */
  color: #000;
}

#pagination-container {
  text-align: center;
  margin-top: 2rem;
}

.custom-pagination {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.catalogue-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.pagination-btn {
  padding: 6px 12px;
  font-size: 14px;
  border: 1px solid #78d5e4;
  background-color: #fff;
  color: #000;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 4px;
  min-width: 36px;
}

.pagination-btn:hover {
  background-color: #78d5e4;
  border-color: #fff;
}

.pagination-btn.active {
  background-color: #78d5e4;
  color: #000;
  font-weight: bold;
  border-color: #fff;
}

@media (max-width: 768px) {
  .close-sidebar-btn {
    display: block;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================== */
/* 📱 Responsive Layout  */
/* ===================== */
@media (max-width: 768px) {
  .catalogue-layout {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .toggle-filters-btn {
    display: inline-flex;
  }
  .catalogue-wrapper {
    flex-direction: column;
  }
}
@media (max-width: 768px) {
  .catalogue-sidebar {
    position: fixed;
    top: 0; /* below header */
    left: 0;
    transform: translateX(-110%);
    transition: transform 0.3s ease;
    background: #edeef2;
    width: 80%;
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    z-index: 999999999999;
    padding: 0 0 5rem 0;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15);
    border-radius: 0 8px 8px 0;
  }

  .catalogue-sidebar.visible {
    transform: translateX(0);
  }

  .catalogue-sidebar.hidden {
    transform: translateX(-120%);
    opacity: 0;
    pointer-events: none;
  }
  .catalogue-products-grid {
    margin-top: 1rem;
  }
}
@media (max-width: 500px) {
  .catalogue-products-grid {
    grid-template-columns: 1fr;
  }
}

/*Single Product*/

.product-brand img.brand-logo {
  max-height: 100px;
  vertical-align: middle;
  margin-left: 5px;
}

.single-product-hero {
  /* padding: 2rem; */
  /* background-color: #f9f9f9; */
  font-family: inherit;
}

.single-product-container {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
}

.single-product-gallery {
  flex: 1 1 40%;
  /* max-width: 500px; */
}

.single-product-gallery .main-img {
  position: relative;
  width: 100%;
  padding-bottom: 75%; /* 4:3 ratio — adjust as needed */
  overflow: hidden;
  /* border: 1px solid #eee; */
  /* background-color: #fff; */
}

.single-product-gallery .main-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain; /* or 'cover' if you want fill */
}

.product-thumbnails {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.product-thumbnails .thumb {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 1px solid #ddd;
  cursor: pointer;
  border-radius: 3px;
}

.single-product-details {
  width: 100%;
  /* max-width: 600px; */
  align-self: stretch; /* allows stretching in a grid context */
  justify-self: start; /* optional: aligns it left in grid cell */
}

.single-product-details .product-title {
  font-size: 2rem;
  color: #000;
  margin-bottom: 1rem;
  font-weight: 600;
  max-width: 90%;
}

.single-product-details .brand-logo {
  max-height: 200px;
  width: auto;
  display: inline-block;
}

.single-product-details .product-excerpt {
  font-size: 1rem;
  color: #000;
  line-height: 1.4;
  max-width: 100%;
}

.product-brand,
.product-availability,
.product-ref {
  font-size: 0.95rem;
  color: #000;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.product-actions {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.btn-partner {
  font-size: 0.9rem;
  padding: 12px 20px;
  font-weight: 600;
}
/*
.product-actions a {
  padding: 8px 16px;
  border: 1px solid #1B334E;
  color: #1B334E;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.product-actions a:hover {
  background-color: #1B334E;
  color: white;
}*/

/* Mobile responsiveness */
@media (max-width: 768px) {
  .single-product-container {
    flex-direction: column;
  }

  .single-product-gallery,
  .single-product-details {
    max-width: 100%;
  }

  .product-thumbnails .thumb {
    width: 50px;
    height: 50px;
  }
}

.btn-blue {
  display: inline-block;
  background-color: #1b334e;
  color: white;
  padding: 10px 20px;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.btn-blue:hover {
  background-color: #162836;
}

.brochure-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #000;
  text-decoration: none;
  font-weight: 600;
}

.brochure-link:hover {
  text-decoration: underline;
}

/*End Single Product*/

/*Modal Cat*/

/*End Modal */

/* Hide Algeria and Western Sahara from the country list */
.iti__country[data-country-code="dz"],
.iti__country[data-country-code="eh"] {
  display: none !important;
}

/* --- Custom style for Forminator submit button --- */
.form-submit-custom-btn{
  font-family: "Inter Tight", Sans-serif;
  background: #78d5e4;
  color: #000000;
  border: none;
  padding: 8px 12px;
  border-radius: 6px !important;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  font-size: 18px;
  font-weight: 600;
  width: 100% !important;
  box-shadow: none !important;
}

/* Hover + active states for better UX */
.form-submit-custom-btn:hover {
  background-color: #6bc1cf;
  transform: translateY(-2px);
    box-shadow: none !important;

}

.form-submit-custom-btn:active {
  background-color: #5baab8;
  transform: translateY(0);
    box-shadow: none !important;

}

.iti__search-input {
  min-height: 24px !important;
  padding: 4px !important;
}
