/* =========================================================
   Artiziane — cartes produits WooCommerce (code court [artiziane_produits])
   Valeurs reprises de css/style.css de la maquette (.products, .product).
   Déposé dans wp-content/uploads/artiziane/artiziane-boutique.css, chargé par le mu-plugin.
   Copie de référence : integration/artiziane-boutique.css
   ========================================================= */

.art-products { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(14px, 2vw, 26px); }
.art-products * { box-sizing: border-box; }
.art-product a { text-decoration: none; color: inherit; }

.art-product .art-product__media { position: relative; aspect-ratio: 1; border-radius: 22px; overflow: hidden; background: #EDE3D8; }
.art-product .art-product__media > a { display: block; height: 100%; }
.art-product .art-product__media img { display: block; width: 100%; height: 100%; max-width: none; border-radius: 0; object-fit: cover; transition: transform .6s ease; }
.art-product:hover .art-product__media img { transform: scale(1.05); }

.art-product .art-product__tags { position: absolute; top: 12px; left: 12px; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; }
.art-product .art-product__tags span { padding: 6px 11px; border-radius: 999px; background: rgba(255, 252, 248, .92); font: 500 11px/1 "Poppins", sans-serif; color: #3A2A2D; }

/* Sélecteurs renforcés : Astra et WooCommerce stylent .add_to_cart_button (display: block, bottom…) */
.art-products .art-product .art-product__media .art-product__add {
  position: absolute; top: 10px; right: 10px; bottom: auto; left: auto; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px; min-height: 0; margin: 0; padding: 0;
  border: 0; border-radius: 12px; background: #5C2A35; color: #F5EFE8; line-height: 0; box-shadow: none;
  cursor: pointer; transition: background .25s, transform .25s;
}
.art-products .art-product .art-product__media .art-product__add:hover { background: #7A3F4B; color: #F5EFE8; transform: translateY(-2px); }
.art-products .art-product .art-product__media .art-product__add svg { width: 18px; height: 18px; }
/* Après ajout au panier (classes posées par WooCommerce) ; l'icône de chargement de WooCommerce est masquée */
.art-products .art-product .art-product__media .art-product__add.added { background: #2E4B31; }
.art-products .art-product .art-product__media .art-product__add.loading { opacity: .6; }
.art-products .art-product .art-product__media .art-product__add::after { display: none; }
.art-product .added_to_cart { display: none; }

.art-product .art-product__badge {
  position: absolute; left: 12px; bottom: 12px; z-index: 1;
  padding: 6px 11px; border-radius: 999px; background: #2E4B31; color: #F5EFE8;
  font: 600 10px/1 "Poppins", sans-serif; letter-spacing: .12em; text-transform: uppercase;
}

.art-product h3 { margin: 16px 4px 4px; font: 600 19px/1.12 "Lora", Georgia, serif; color: #5C2A35; }
.art-product .art-product__price { margin: 0 4px; font: 500 14px/1 "Poppins", sans-serif; color: #7B6B6D; }

/* Filtres de la boutique (artiziane.js) : carte masquée = sans « card-show » */
.art-product.card-hide { display: none; }
.art-product.card-show { display: block; }

.art-products__empty { margin: 0; font: 400 15px/1.6 "Poppins", sans-serif; color: #7B6B6D; text-align: center; }

/* =========================================================
   Panier (code court [artiziane_panier]) — .cart-layout, .cart-item, .cart-summary de la maquette
   Bloc nommé « art-panier » : « art-cart » est déjà la classe de l'icône panier de l'en-tête.
   ========================================================= */
.art-panier { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; color: #3A2A2D; }
.art-panier * { box-sizing: border-box; }
.art-panier a { color: inherit; }
.art-panier__notices:empty { display: none; }
.art-panier__notices { grid-column: 1 / -1; }
.art-panier__notices .woocommerce-message, .art-panier__notices .woocommerce-info, .art-panier__notices .woocommerce-error {
  margin: 0; padding: 16px 18px; border: 0; border-radius: 14px; background: #DFE8DB; list-style: none;
  font: 500 14px/1.5 "Poppins", sans-serif; color: #2E4B31;
}
.art-panier__notices .woocommerce-error { background: #F2DEDD; color: #5C2A35; }
.art-panier__notices :is(.woocommerce-message, .woocommerce-info, .woocommerce-error)::before { display: none; }
.art-panier__notices a { color: #5C2A35; text-decoration: underline; }
.art-panier__main { min-width: 0; }
.art-panier__items { margin: 0; border-top: 1px solid rgba(92, 42, 53, .14); }
.art-panier__empty { margin: 0; padding: 22px 0; border-top: 1px solid rgba(92, 42, 53, .14); border-bottom: 1px solid rgba(92, 42, 53, .14); font: 400 15px/1.6 "Poppins", sans-serif; color: #7B6B6D; }

.art-cart-item { display: grid; grid-template-columns: 96px 1fr auto; gap: 20px; align-items: center; padding: 22px 0; border-bottom: 1px solid rgba(92, 42, 53, .14); }
.art-cart-item img { display: block; width: 96px; height: 96px; max-width: none; border-radius: 14px; object-fit: cover; }
.art-panier .art-cart-item h3 { margin: 0 0 4px; font: 600 20px/1.12 "Lora", Georgia, serif; color: #5C2A35; }
.art-panier .art-cart-item h3 a { text-decoration: none; }
.art-cart-item__cat { margin: 0; font: 400 13px/1.4 "Poppins", sans-serif; color: #7B6B6D; }
.art-cart-item__actions { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.art-panier .art-cart-item__remove { padding: 1px 6px; font: 500 12px/1 "Poppins", sans-serif; color: #7B6B6D; text-decoration: underline; }
.art-cart-item__price { font: 500 17px/1 "Poppins", sans-serif; color: #5C2A35; }
.art-cart-item__price .woocommerce-Price-amount { font: inherit; color: inherit; }

.art-qty { display: inline-flex; align-items: center; border: 1.5px solid rgba(92, 42, 53, .14); border-radius: 999px; }
.art-panier .art-qty button {
  width: 42px; height: 46px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  font: 500 18px/1 "Poppins", sans-serif; color: #5C2A35; cursor: pointer;
}
.art-panier .art-qty button:hover { background: none; color: #7A3F4B; }
.art-panier .art-qty button:disabled { opacity: .35; cursor: default; }
.art-qty__value { width: 34px; text-align: center; font: 500 15px/1 "Poppins", sans-serif; color: #3A2A2D; }

.art-panier__continue { margin: 22px 0 0; }
.art-panier .art-link-arrow { padding-bottom: 3px; border-bottom: 1.5px solid #D9A6A8; font: 600 12px/1.4 "Poppins", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #5C2A35; text-decoration: none; }

.art-cart-summary { position: sticky; top: 110px; padding: 28px; border: 1px solid rgba(92, 42, 53, .14); border-radius: 30px; background: #FFFCF8; }
.art-panier .art-cart-summary h2 { margin: 0 0 18px; font: italic 600 28px/1.12 "Lora", Georgia, serif; color: #5C2A35; }
.art-specs { margin: 0 0 20px; padding: 0; list-style: none; border-top: 1px solid rgba(92, 42, 53, .14); }
.art-specs li { display: flex; justify-content: space-between; gap: 16px; margin: 0; padding: 13px 0; border-bottom: 1px solid rgba(92, 42, 53, .14); font: 400 14px/1.5 "Poppins", sans-serif; }
.art-specs li span:first-child { color: #7B6B6D; }
.art-specs li span:last-child { text-align: right; }
.art-specs li:last-child { font-weight: 600; font-size: 16px; color: #5C2A35; }
.art-specs .woocommerce-Price-amount { font: inherit; color: inherit; }
.art-panier .art-btn-primary {
  display: flex; align-items: center; justify-content: center; width: 100%; margin: 0 0 18px; padding: 15px 28px;
  border: 1.5px solid #5C2A35; border-radius: 999px; background: #5C2A35; color: #F5EFE8;
  font: 600 13px/1 "Poppins", sans-serif; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; white-space: nowrap;
  transition: background .25s, border-color .25s;
}
.art-panier .art-btn-primary:hover { background: #7A3F4B; border-color: #7A3F4B; color: #F5EFE8; }
.art-panier .art-btn-primary.is-disabled { opacity: .4; pointer-events: none; }
.art-cart-summary__terms { margin: -6px 0 18px; font: 400 12px/1.6 "Poppins", sans-serif; color: #7B6B6D; text-align: center; }
.art-panier .art-cart-summary__terms a { color: #5C2A35; }
.art-cart-summary__pay { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.art-chip { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 50px; padding: 6px 9px; border-radius: 7px; background: #fff; }
.art-chip img { display: block; width: auto; height: 100%; max-width: 84px; }

/* Validation de commande (formulaire WooCommerce classique, en attendant sa mise au style de la maquette) :
   même conteneur centré que les autres pages (1200 px gouttières comprises) */
body.woocommerce-checkout #content > .ast-container {
  box-sizing: border-box; width: 100%; max-width: 1200px; margin: 0 auto;
  padding: clamp(36px, 5vw, 64px) clamp(16px, 4vw, 40px) clamp(64px, 9vw, 120px);
}

@media (max-width: 1024px) {
  .art-products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .art-panier { grid-template-columns: 1fr; }
  .art-cart-summary { position: static; }
}
@media (max-width: 600px) {
  .art-products { gap: 12px; }
  .art-product h3 { font-size: 16px; }
  .art-product .art-product__tags span { padding: 5px 8px; font-size: 10px; }
  .art-products .art-product .art-product__media .art-product__add { width: 36px; height: 36px; }
  .art-cart-item { grid-template-columns: 76px 1fr; }
  .art-cart-item img { width: 76px; height: 76px; }
  .art-cart-item__price { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .art-product .art-product__media img, .art-products .art-product .art-product__media .art-product__add { transition: none; }
}
