/*
Theme Name: Ferme Noary WooCommerce
Description: Thème e-commerce Ferme Noary - Poussins, Miels, Formations
Author: Votre Nom
Version: 1.0
Text Domain: ferme-noary
*/

* { box-sizing: border-box; }
body { font-family: 'Arial', sans-serif; margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* Header */
header { background: #2E7D32; color: white; padding: 1rem 0; }
.site-title { font-size: 2rem; margin: 0; }

/* WooCommerce Base */
.woocommerce .price { color: #2E7D32; font-size: 1.5rem; font-weight: bold; }
.add_to_cart_button { background: #4CAF50; color: white; padding: 12px 24px; border: none; }

/* Couleurs Ferme Noary */
:root { --vert-ferme: #2E7D32; --jaune-poussin: #FFEB3B; }

/* Grille produits */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }

/* BARRE DE NAV PRINCIPALE */

.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.top-nav {
  max-width: 1200px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

/* Logo */
.nav-logo a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}
.nav-logo img {
  height: 26px;
  width: auto;
}
.nav-logo .logo-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 14px;
  color: #1d7b3a;
}

/* Menu principal */
.nav-main {
  flex: 1;
  display: flex;
  justify-content: center;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}

/* Les <li> et <a> générés par wp_nav_menu */
.nav-links > li {
  position: relative;
}

.nav-links > li > a {
  position: relative;
  display: inline-block;
  padding: 6px 0;
  font-size: 14px;
  color: #444;
  text-decoration: none;
  transition: color 0.25s ease;
}

/* Animation soulignement */
.nav-links > li > a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #1d7b3a;
  border-radius: 999px;
  transition: width 0.25s ease;
}

.nav-links > li:hover > a,
.nav-links > li.current-menu-item > a,
.nav-links > li.current-menu-ancestor > a {
  color: #1d7b3a;
}

.nav-links > li:hover > a::after,
.nav-links > li.current-menu-item > a::after,
.nav-links > li.current-menu-ancestor > a::after {
  width: 100%;
}

/* Sous-menu dropdown */
.nav-links li .sub-menu {
  position: absolute;
  top: 115%;
  left: 0;
  min-width: 180px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  border-radius: 8px;
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 999;
}

.nav-links li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-links li .sub-menu a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
  color: #444;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s;
}

.nav-links li .sub-menu a:hover {
  background: #f3faf5;
  color: #1d7b3a;
  padding-left: 20px;
}

/* Icônes droite */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  position: relative;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: #f3faf5;
  transform: translateY(-1px);
}

/* Icônes via Dashicons */
.icon-search::before,
.icon-cart::before,
.icon-user::before {
  font-family: "Dashicons";
  font-size: 15px;
  color: #444;
}
.icon-search::before { content: "\f179"; }
.icon-cart::before   { content: "\f174"; }
.icon-user::before   { content: "\f110"; }

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}



/*Design produit*/
/* ===== Grille produits WooCommerce (safe) ===== */

.fp-shop-wrapper ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Carte produit */

.fp-card-product {
  margin: 0;
}

.fp-card-inner {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fp-card-inner:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Image produit */

.fp-thumb-link {
  display: block;
}

.fp-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* Corps de la carte */

.fp-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fp-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.fp-title a {
  color: #222;
  text-decoration: none;
}

.fp-title a:hover {
  color: #1d7b3a;
}

.fp-excerpt {
  font-size: 12px;
  color: #666;
  margin: 0 0 6px;
  min-height: 32px;
}

/* Bas de la carte */

.fp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.fp-price {
  font-weight: 700;
  color: #1d7b3a;
  font-size: 15px;
}

.fp-actions .button {
  background: #1d7b3a;
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  border: none;
  text-transform: none;
  letter-spacing: 0.02em;
}

.fp-actions .button:hover {
  background: #159a46;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .fp-thumb {
    height: 140px;
  }
}

/* TEST GRILLE FORCÉE */
body ul.products {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 18px !important;
}

/* TEST VISUEL CARTES */
body .fp-card-inner {
  outline: 2px solid red !important;
}

/* ===== Grille produits WooCommerce (FarmUp) ===== */

ul.products {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

/* Carte produit */

.fp-card-product {
  margin: 0;
}

.fp-card-inner {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fp-card-inner:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* Image */

.fp-thumb-link {
  display: block;
}

.fp-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* Corps */

.fp-card-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fp-title {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
}

.fp-title a {
  color: #222;
  text-decoration: none;
}

.fp-title a:hover {
  color: #1d7b3a;
}

.fp-excerpt {
  font-size: 12px;
  color: #666;
  margin: 0 0 6px;
  min-height: 32px;
}

/* Bas de carte */

.fp-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 4px;
}

.fp-price {
  font-weight: 700;
  color: #1d7b3a;
  font-size: 15px;
}

.fp-actions .button {
  background: #1d7b3a;
  color: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  border: none;
  text-transform: none;
  letter-spacing: 0.02em;
}

.fp-actions .button:hover {
  background: #159a46;
  transform: translateY(-1px);
}

@media (max-width: 480px) {
  .fp-thumb {
    height: 140px;
  }
}

/* CSS content-single-product*/

/* ===== Fiche produit type carte ===== */

.fp-single-wrapper {
  max-width: 1100px;
  margin: 20px auto;
}

.fp-single-card {
  display: grid;
  grid-template-columns: minmax(0, 48%) minmax(0, 52%);
  gap: 20px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
  overflow: hidden;
}

/* Colonne gauche : photo */

.fp-single-left {
  background: #f5f7fa;
}

.fp-single-left .woocommerce-product-gallery {
  margin: 0;
}

.fp-single-left .woocommerce-product-gallery__wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Colonne droite : bloc vert */

.fp-single-right {
  padding: 18px 22px 20px;
  background: #f9fffb;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fp-single-category {
  font-size: 12px;
  color: #1d7b3a;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fp-single-title {
  margin: 0 0 4px;
  font-size: 22px;
}

/* On réutilise les éléments WooCommerce déjà sortis */

.fp-single-right .price {
  font-size: 22px;
  font-weight: 700;
  color: #1d7b3a;
  display: block;
  margin: 6px 0;
}

.fp-single-right .woocommerce-product-details__short-description {
  font-size: 13px;
  color: #555;
  margin-bottom: 10px;
}

.fp-single-right .cart {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 6px;
}

.fp-single-right .quantity input.qty {
  width: 70px;
}

.fp-single-right button.single_add_to_cart_button {
  background: #1d7b3a;
  border-radius: 999px;
  padding: 8px 20px;
  border: none;
}

.fp-single-right .product_meta {
  font-size: 12px;
  color: #777;
  margin-top: 6px;
}

/* Bloc infos supplémentaires */

.fp-single-extra {
  margin-top: 16px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.12);
  padding: 15px 18px;
}

/* Responsive */

@media (max-width: 768px) {
  .fp-single-card {
    grid-template-columns: 1fr;
  }
}





