/* Icône panier */
.mini-cart {
  position: relative;
  transition: transform 0.3s ease;
}

.mini-cart.cart-updated {
  transform: scale(1.2);
}

.cart-contents {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
}

.cart-icon {
  font-size: 24px;
}

.cart-count {
  background: #e74c3c;
  color: white;
  border-radius: 50%;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: bold;
  min-width: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

/* Dropdown panier */
.mini-cart-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 300px;
  z-index: 9999;
  padding: 20px;
  margin-top: 10px;
}

.mini-cart:hover .mini-cart-dropdown {
  display: block;
}

/* Notification d'ajout au panier */
.woocommerce-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #27ae60;
  color: white;
  padding: 15px 20px;
  border-radius: 4px;
  z-index: 10000;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.woocommerce ul.products li.product {
  margin-bottom: 24px;
}

.woocommerce .product-category .product-category-title {
  font-weight: 400 !important;
}

.woocommerce .product-category .product-category-title-count {
  color: var(--text-ultralight);
}

.woocommerce .product-category a {
  color: var(--text-light);
  text-decoration: underline !important;
}

/* ==========================================================================
   PANIER WOOCOMMERCE - STYLES
   ========================================================================== */

/* Messages de notification */
.woocommerce-notices-wrapper {
  grid-column: 1 / -1;
  margin-bottom: 1rem;
}

.woocommerce-message {
  background: rgba(16, 185, 129, 0.1);
  border-left: 4px solid var(--success);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  color: var(--success);
  font-weight: var(--fw-semibold);
}

/* Conteneur grid principal */
.woocommerce {
  display: grid;
  gap: 2rem;
  align-items: start;
}

/* body:not(.woocommerce-order-received) .woocommerce {
    grid-template-columns: 1fr minmax(400px, 500px);
} */

/* Formulaire du panier */
.woocommerce-cart-form {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}

/* Table du panier */
.woocommerce .cart-collaterals .cart_totals,
.woocommerce-page .cart-collaterals .cart_totals {
  width: 100%;
}

.shop_table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.shop_table thead {
  background: var(--bg-input);
}

.shop_table thead th {
  padding: 1rem;
  font-weight: var(--fw-semibold);
  color: var(--text);
  text-align: left;
  font-size: 0.95rem;
  border-bottom: 2px solid var(--border);
}

.shop_table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.shop_table tbody tr:hover {
  background: var(--bg-input);
}

.shop_table tbody td {
  padding: 1.5rem 1rem;
  vertical-align: middle;
}

/* Colonne produit */
.product-name a {
  color: var(--text);
  font-weight: var(--fw-semibold);
  text-decoration: none;
  transition: var(--transition);
}

.product-name a:hover {
  color: var(--primary);
}

h2.woocommerce-loop-product__title {
  font-size: 1.5rem !important;
}

/* Miniature produit */
.product-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

/* Prix */
.woocommerce-Price-amount {
  font-weight: var(--fw-semibold);
  color: var(--primary);
  font-size: 1.1rem;
}

/* Bouton supprimer */
.product-remove a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--error);
  border-radius: 50%;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.2rem;
  transition: var(--transition);
}

.product-remove a:hover {
  background: var(--error);
  color: var(--white);
  transform: scale(1.1);
}

/* Quantité */
.quantity {
  display: inline-flex;
}

.quantity input[type="number"] {
  width: 80px;
  padding: 0.625rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1rem;
  font-weight: var(--fw-semibold);
  transition: var(--transition);
}

.quantity input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(178, 128, 81, 0.1);
}

/* Bouton mise à jour */
.actions {
  padding: 1.5rem 1rem !important;
  background: var(--bg-input);
}

.actions button[name="update_cart"] {
  padding: 0.875rem 2rem;
  background: var(--secondary);
  color: var(--white);
  border: none;
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: var(--transition);
}

.actions button[name="update_cart"]:hover:not(:disabled) {
  background: var(--dark-green);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.actions button[name="update_cart"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Total du panier */
.cart-collaterals {
  position: sticky;
  top: 20px;
  min-width: 0;
}

.cart_totals {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  width: 100%;
}

.cart_totals h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border);
}

.cart_totals .shop_table {
  box-shadow: none;
  padding: 0;
  table-layout: auto;
  width: 100%;
}

.cart_totals .shop_table th,
.cart_totals .shop_table td {
  padding: 1rem 0;
  font-size: 1rem;
  word-break: keep-all;
  white-space: nowrap;
}

.cart_totals .shop_table th {
  font-weight: var(--fw-normal);
  color: var(--text-light);
  width: auto;
}

.cart_totals .shop_table td {
  text-align: right;
  width: auto;
}

.cart_totals .cart-subtotal {
  border-bottom: 1px solid var(--border);
}

.cart_totals .order-total {
  border-top: 2px solid var(--primary);
}

.cart_totals .order-total th {
  font-weight: var(--fw-semibold);
  color: var(--text);
  font-size: 1.1rem;
}

.cart_totals .order-total .woocommerce-Price-amount {
  font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
  /* Passer en mode colonne sur tablette et mobile */
  .woocommerce {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cart-collaterals {
    position: static;
  }
}

@media (max-width: 768px) {
  .woocommerce-cart-form {
    padding: 1rem;
    overflow-x: auto;
  }

  .shop_table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .shop_table thead {
    display: none;
  }

  .shop_table tbody,
  .shop_table tr,
  .shop_table td {
    display: block;
    width: 100%;
  }

  .shop_table tr {
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
  }

  .shop_table td {
    padding: 0.75rem 0;
    text-align: left;
    border: none;
  }

  .shop_table td::before {
    content: attr(data-title) ": ";
    font-weight: var(--fw-semibold);
    color: var(--text-light);
    display: inline-block;
    margin-right: 0.5rem;
  }

  .product-remove {
    order: -1;
    text-align: right;
  }

  .product-thumbnail {
    text-align: center;
  }

  .product-thumbnail img {
    width: 120px;
    height: 120px;
  }

  .cart_totals {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .woocommerce-cart-form {
    padding: 0.75rem;
  }

  .cart_totals {
    padding: 1.5rem;
  }

  .checkout-button {
    padding: 1rem;
    font-size: 1rem;
  }
}

/* Bouton valider la commande */
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  #respond
  input#submit.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  a.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  button.button.alt,
.woocommerce:where(body:not(.woocommerce-block-theme-has-button-styles))
  input.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  #respond
  input#submit.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  a.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  button.button.alt,
:where(body:not(.woocommerce-block-theme-has-button-styles)):where(
    :not(.edit-post-visual-editor)
  )
  .woocommerce
  input.button.alt,
.wc-block-components-button {
  background-color: var(--dark-green);
  color: var(--white) !important;
  border-color: transparent;
  border-radius: 8px !important;
}

.wc-proceed-to-checkout {
  margin-top: 1.5rem;
}

.wc-proceed-to-checkout a.checkout-button {
  display: block;
  width: 100%;
  padding: 1.25rem;
  background: var(--primary);
  color: var(--white);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  font-size: 1.1rem;
  transition: var(--transition);
  box-shadow: 0 4px 6px rgba(178, 128, 81, 0.2);
}

.wc-proceed-to-checkout a.checkout-button:hover,
.wc-block-components-button:hover {
  background: var(--secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(178, 128, 81, 0.3);
}

/* Classe pour masquer visuellement les éléments (accessibilité) */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

/* Valider la commande */
#wc-guest-checkout-notice {
  display: none;
}

.wp-block-woocommerce-checkout,
.woocommerce-order {
  max-width: 1340px;
  margin: 0 auto !important;
}

.wc-block-components-form,
.wp-block-woocommerce-checkout-order-summary-block,
.woocommerce-order-received .woocommerce-order {
  background: white;
  padding: 2rem !important;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.woocommerce-order-received .woocommerce-order {
  margin-top: 50px !important;
}

.wc-block-components-form h2,
.woocommerce-order-received .woocommerce-order h2 {
  font-family: "Poppins", sans-serif;
}

.woocommerce-notice {
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 16px;
}

#product-category .e-con.e-flex > .e-con-inner {
  margin: 0 auto;
  max-width: 1340px;
  display: flex;
  gap: 0px 32px;
  row-gap: 0px;
  column-gap: 32px;
  margin-top: 32px;
  margin-bottom: 0px;
  padding: 20px;
}
#product-category
  .elementor-element.elementor-element-ccb3958.e-con-full.e-flex.e-con.e-child {
  display: flex;
  flex-direction: column;
  row-gap: 20px;
  column-gap: 20px;
}
@media (max-width: 767px) {
  #product-category .e-con.e-flex > .e-con-inner {
    flex-direction: column;
  }
  #product-category
    .elementor-element.elementor-element-ccb3958.e-con-full.e-flex.e-con.e-child {
    width: 100%;
  }
  #product-category
    .elementor-element.elementor-element-7dde1b4.e-con-full.e-flex.e-con.e-child {
    width: 100%;
  }
}

@media (min-width: 768px) {
  #product-category
    .elementor-element.elementor-element-ccb3958.e-con-full.e-flex.e-con.e-child {
    width: 20%;
    border-right: 1px solid #cccccc;
  }
  #product-category
    .elementor-element.elementor-element-7dde1b4.e-con-full.e-flex.e-con.e-child {
    width: 80%;
  }
}
#product-category
  .elementor-element.elementor-element-e4d966e
  .elementor-heading-title {
  font-family: "Poppins", Sans-serif;
  font-size: 18px;
}
#product-category
  .elementor-element.elementor-element-65546fa.elementor-widget-divider--view-line.elementor-widget.elementor-widget-divider {
  max-width: 100%;
  border: 1px solid #eeeeee;
}

/* NOTICES */
.woocommerce-notices-wrapper {
  position: relative;
}
.woocommerce-message {
  top: 100px;
}
