/** Vehicles search form **/
.fy_search {
  text-align: center;
  z-index: 10000 !important;
  max-width: 800px;
  margin: auto;
}

.fy_search-form {
  display: flex;
  flex-wrap: wrap; /* Permet de passer les éléments à la ligne sur petits écrans */
  justify-content: space-between;
  gap: 20px; /* Espacement entre les listes */
}

.fy_search-select-container {
  flex: 1; /* Les éléments prendront un espace égal */
  min-width: 200px; /* Largeur minimale pour éviter que les listes soient trop petites */
}

.fy_search-select-container select {
  width: 100%;
  box-sizing: border-box; /* Pour inclure le padding et la bordure dans la largeur */
}

.fy_search-form-button {
  width: 100%; /* Prend la largeur complète sous les selects */
  text-align: center; /* Centrer le bouton */
  margin-top: 20px;
}

.fy_search button {
  display: block;
  margin: auto;
  font-size: 20px;
  font-weight: bold;
  color: white;
  background-color: #ff2a65;
  padding: 10px 20px;
  border: 2px solid #ffffff;
}

.fy_search button:hover {
  cursor: pointer;
  border: 2px solid #ff2a65;
}

/* Responsive: Sur petits écrans */
@media (max-width: 600px) {
  .fy_search-form {
    flex-direction: column;
  }
}

.fy_velicules_list > li {
  list-style: none;
  font-weight: bold;
}

.fy_velicules_list > li > a {
  font-weight: normal;
}

.wcpas-product-attribute {
  text-indent: 0px;
  list-style: none;
}

/* Style du conteneur du tableau */
.woocommerce-attributes-table,
.woocommerce-variation-description .product-attributes {
  margin-bottom: 20px;
}

/* Style du tableau */
.woocommerce-attributes-table__table,
.woocommerce-variation-description .product-attributes {
  width: 100%;
  border-collapse: collapse;
}

/* Style des lignes du tableau */
.woocommerce-attributes-table__row,
.woocommerce-variation-description .product-attributes tr {
  border-bottom: 1px solid #ddd;
}

/* Style des cellules d'étiquette du tableau */
.woocommerce-attributes-table__label,
.woocommerce-variation-description .product-attributes tr > td:first-of-type {
  padding: 10px;
  font-weight: bold;
  vertical-align: top;
  width: 50%;
}

/* Style des cellules de valeur du tableau */
.woocommerce-attributes-table__value,
.woocommerce-variation-description .product-attributes tr > td:last-of-type {
  padding: 10px;
  vertical-align: top;
}

/* Style pour la hiérarchie des catégories */
.category-hierarchy {
  margin-bottom: 5px;
  font-size: 14px;
  line-height: 1.4;
}

.category-hierarchy:last-child {
  margin-bottom: 0;
}

.category-hierarchy a {
  color: #ff2a65;
  text-decoration: none;
  transition: color 0.3s ease;
}

.category-hierarchy a:hover {
  color: #ff5c89;
  text-decoration: underline;
}

/* Styles pour la métabox des véhicules en admin */
#vehicule-load-all {
  width: 100%;
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
}

#vehicule-load-all:hover {
  background: #e9e9e9;
  border-color: #999;
}

#vehicule-load-all:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#vehicule-loading {
  color: #666;
  font-style: italic;
}

#vehicule-loading .spinner {
  float: none;
  margin: 0 5px 0 0;
}

/* Style pour la liste des véhicules sélectionnés */
#vehiculechecklist-selected {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 10px;
  background: #fafafa;
  margin-bottom: 10px;
}

#vehiculechecklist-selected li {
  margin-bottom: 5px;
  padding: 2px 0;
}

#vehiculechecklist-selected .selectit {
  font-size: 13px;
  color: #333;
}

#product-sort-form,
#product-filter-form {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* Styles pour les menus déroulants */
.product-table-container select {
  width: calc(25% - 10px);
  padding: 5px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
  background-color: #fff;
  cursor: pointer;
}

.product-table-table {
  width: 100%;
  border-collapse: collapse;
}

.product-table-header {
  border-bottom: 3px double #333;
}

.product-table-line {
  border-bottom: 1px solid #333;
}

.product-table-line td {
  padding: 15px 5px;
  text-align: center;
}

.product-table-line img {
  max-height: 150px;
  width: auto;
}

.product-table-line td a {
  color: #ff2a65;
  text-decoration: none;
}

.product-table-line td a:hover {
  text-decoration: underline;
}

.product-table-line .product-price {
  margin-bottom: 10px;
  font-weight: 400;
}

.product-table-line td .product-add-to-cart {
  background-color: #ff2a65;
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  padding: 5px 10px;
}

.product-table-line td .product-add-to-cart:hover {
  text-decoration: none;
  background-color: #ff5c89;
}

.product-table-line td .added_to_cart {
  margin-left: 10px;
}

/* Pagination links */
.product-table-table .pagination a,
.product-table-table .pagination span {
  color: black;
  float: left;
  padding: 8px 16px;
  text-decoration: none;
  transition: background-color 0.3s;
}

/* Style the active/current link */
.product-table-table .pagination span.current {
  background-color: #ff2a65;
  color: white;
}

/* Add a grey background color on mouse-over */
.product-table-table .pagination a:hover {
  background-color: #ddd;
}

/** Attribute filter widget **/
.fy-attribute-filter {
  border: 1px solid #e6e6e6;
  background: #fafafa;
  padding: 12px;
  border-radius: 8px;
}

.fy-attribute-filter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 260px;
  overflow-y: auto;
}

.fy-attribute-filter-item {
  margin: 0;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
}

.fy-attribute-filter-item:last-child {
  border-bottom: 0;
}

.fy-attribute-filter-item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
}

.fy-attribute-filter-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.fy-attribute-filter-count {
  margin-left: auto;
  font-size: 12px;
  color: #777;
}

.fy-attr-filter-clear {
  margin-top: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fy-attr-filter-clear:hover {
  background: #f0f0f0;
  border-color: #ccc;
}

/** Active filters widget **/
.fy-active-filters {
  border: 1px solid #e6e6e6;
  background: #fff;
  padding: 12px;
  border-radius: 8px;
}

.fy-active-filters-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fy-active-filters-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin: 4px 0 6px;
}

.fy-active-filters-item {
  margin: 0;
}

.fy-active-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f7f7f7;
  border: 1px solid #e0e0e0;
  color: #333;
  text-decoration: none;
  font-size: 13px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.fy-active-filter-chip:hover {
  background: #efefef;
  border-color: #d5d5d5;
}

.fy-active-filter-remove {
  font-size: 14px;
  line-height: 1;
  color: #777;
}

.fy-active-filters-clear {
  display: inline-block;
  font-size: 13px;
  color: #666;
  text-decoration: none;
}

.fy-active-filters-clear:hover {
  text-decoration: underline;
  color: #333;
}

.fy-active-filters-empty {
  font-size: 13px;
  color: #777;
}

@media (max-width: 700px) {
  .product-table-table thead {
    display: none;
  }

  .product-table-table tr {
    display: block;
    margin-bottom: 40px;
  }

  .product-table-table td {
    display: block;
    text-align: right;
  }

  .product-table-table td:before {
    content: attr(data-label);
    float: left;
    font-weight: bold;
  }
}

/** LISTE DE CATEGORIES POUR LE MEGA MENU **/

/* Conteneur principal */
.memucat-container {
  display: flex;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  margin: 0 auto;
  z-index: 1000000;
}

/* Catégories */
.categories {
  flex: 1;
  max-width: 25%;
  background-color: #f9f9f9;
  border-right: 1px solid #ddd;
}

.categoryList {
  list-style: none !important;
  padding: 0;
  margin: 0;
}

.categoryList li {
  padding: 12px 15px;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 1px solid #ddd;
  transition: background-color 0.3s, color 0.3s;
}

.categoryList li a {
  display: inline-block;
  width: 100%;
}

.categoryList li:last-child {
  border-bottom: none;
}

.categoryList li:hover {
  background-color: #ff2a65;
  color: #fff;
}

.categoryList li:hover a {
  color: #fff;
}

/* Sous-catégories */
.sub-categories {
  flex: 3;
  padding: 20px;
  background-color: #fff;
  color: #333;
  text-align: left;
  font-weight: 400;
  min-height: 120px;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  transition: box-shadow 0.3s;
}

.sub-categories ul {
  list-style: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sub-categories li {
  background: #f5f5fa;
  border-radius: 6px;
  padding: 10px 18px;
  margin: 0;
  font-size: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: background 0.2s, box-shadow 0.2s;
}

.sub-categories li:hover {
  background: #ff2a65;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 42, 101, 0.12);
}

.sub-categories li a {
  color: #ff2a65;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.sub-categories li:hover a {
  color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
  .memucat-container {
    flex-direction: column;
  }

  .categories,
  .sub-categories {
    max-width: 100%;
    flex: none;
  }

  .categories {
    border-right: none;
    border-bottom: 1px solid #ddd;
  }
}

@media (max-width: 480px) {
  #categoryList li {
    padding: 10px;
    font-size: 0.9rem;
  }

  .sub-categories {
    padding: 15px;
  }
}

.et_pb_widget {
  margin-bottom: 5px !important;
}

/** Brand Logos **/
.fy-brand-logo {
  max-width: 100%;
  height: auto;
  display: inline-block;
}

.fy-brand-logo-small {
  max-height: 50px;
  max-width: 100px;
}

.fy-brand-logo-medium {
  max-height: 80px;
  max-width: 150px;
}

.fy-brand-logo-large {
  max-height: 120px;
  max-width: 200px;
}

.fy-brand-logo-link {
  display: inline-block;
  text-decoration: none;
  transition: opacity 0.3s ease;
}

.fy-brand-logo-link:hover {
  opacity: 0.8;
}

.fy-brand-logo-fallback {
  color: #666;
  font-style: italic;
  font-size: 0.9em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .fy-brand-logo-small {
    max-height: 40px;
    max-width: 80px;
  }

  .fy-brand-logo-medium {
    max-height: 60px;
    max-width: 120px;
  }

  .fy-brand-logo-large {
    max-height: 80px;
    max-width: 150px;
  }
}

/* Styles pour les liens de téléchargement de fichiers */
.woocommerce-files-row .product-files-links {
  text-align: center;
  padding: 15px 10px;
}

.file-download-link {
  display: inline-block;
  color: #ff2a65;
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border: 2px solid #ff2a65;
  border-radius: 5px;
  transition: all 0.3s ease;
  background-color: transparent;
}

.file-download-link:hover {
  background-color: #ff2a65;
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(255, 42, 101, 0.3);
}

.file-download-link:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(255, 42, 101, 0.3);
}

.file-separator {
  color: #666;
  font-weight: normal;
  padding: 0 8px;
  font-size: 16px;
}

/* Responsive pour les liens de fichiers */
@media (max-width: 600px) {
  .woocommerce-files-row .product-files-links {
    text-align: center;
  }

  .file-download-link {
    display: block;
    margin: 5px auto;
    width: 80%;
    text-align: center;
  }

  .file-separator {
    display: none;
  }
}

/** CHILD CATEGORIES GRID **/

/* Conteneur principal de la grille - même style que .sub-categories ul */
.fy-child-categories-grid {
  list-style: none !important;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* Item de catégorie - même style que .sub-categories li */
.fy-child-category-item {
  background: #f5f5fa;
  border-radius: 6px;
  padding: 10px 18px;
  margin: 0;
  font-size: 1rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: background 0.2s, box-shadow 0.2s;
  list-style: none;
  display: inline-block;
}

.fy-child-category-item:hover {
  background: #ff2a65;
  color: #fff;
  box-shadow: 0 2px 8px rgba(255, 42, 101, 0.12);
}

/* Item du label - style différencié */
.fy-child-category-label-item {
  background: #e8e8f0;
  cursor: default;
  font-weight: 600;
  display: flex;
  align-items: center;
}

.fy-child-category-label-item:hover {
  background: #e8e8f0;
  color: #333;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* Label texte */
.fy-child-category-label {
  margin: 0;
  font-weight: 600;
  color: #333;
  font-size: 1rem;
}

/* Lien de la catégorie */
.fy-child-category-link {
  display: inline;
  text-decoration: none;
  color: inherit;
}

/* Titre de la catégorie */
.fy-child-category-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
  color: #ff2a65;
  transition: color 0.2s;
  display: inline;
}

.fy-child-category-item:hover .fy-child-category-title {
  color: #fff;
}

/* Compteur de produits */
.fy-child-category-count {
  display: none;
}

/* Image de la catégorie - masquée par défaut */
.fy-child-category-image {
  display: none;
}

/* Contenu de la catégorie */
.fy-child-category-content {
  display: inline;
  padding: 0;
}

/* Messages d'erreur et vide */
.fy-child-categories-error,
.fy-child-categories-empty {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

/* Responsive pour mobiles */
@media (max-width: 768px) {
  .fy-child-categories-grid {
    gap: 10px;
  }
  
  .fy-child-category-item {
    padding: 8px 14px;
    font-size: 0.95rem;
  }
}

/* Eco-participation note */
.eco-participation-note {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #e6f4ea;
  color: #1f6a2f;
  font-size: 0.85em;
  font-weight: 600;
  line-height: 1.2;
}
