/**
 * AYM Product Miniature CSS
 * Design moderne avec background beige et typographie Dancing Script
 */

/* Variables */
:root {
  --aym-primary-brown: #9B5F45;
  --aym-background-beige: #C2B5A6;
  --aym-text-gray: #374151;
  --aym-white: #FFFFFF;
}

/* Grille de produits */
.products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  justify-content: center;
  width: 100%;
  max-width: 100%;
}

.js-product {
  width: 100%;
  max-width: 260px;
  justify-self: center;
}

/* Container principal */
.aym-product-container {
  width: 100%;
  max-width: 260px;
  height: 460px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
}

.product-miniature-link {
  text-decoration: none;
  display: block;
}

.product-miniature-link:hover .aym-product-container {
  transform: translateY(-8px);
}

/* Image wrapper avec background beige */
.aym-product-image-wrapper {
  width: 100%;
  height: 260px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
}

.aym-product-background-circle {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: none;
}

.aym-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  border-radius: 16px;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.aym-product-background-circle picture,
.aym-product-background-circle img {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

.product-miniature-link:hover .aym-product-image {
  transform: scale(1.05);
}

/* Nom du produit */
.aym-product-name-container {
  width: 100%;
  height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 8px;
  overflow: hidden;
}

.aym-product-name {
  width: auto;
  max-width: 100%;
  color: var(--aym-primary-brown);
  font-size: 22px;
  font-family: 'Dancing Script', cursive;
  font-weight: 400;
  line-height: 32px;
  word-wrap: break-word;
  margin: 0;
  transition: color 0.3s ease;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-miniature-link:hover .aym-product-name {
  color: #7a4a35;
}

/* Description courte */
.aym-product-description-container {
  width: 100%;
  height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 8px;
  overflow: hidden;
}

.aym-product-description {
  width: 100%;
  color: var(--aym-text-gray);
  font-size: 15px;
  font-family: 'Playfair Display', serif;
  font-weight: 400;
  line-height: 24px;
  word-wrap: break-word;
  margin: 0;
  text-align: left;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Prix */
.aym-product-price-container {
  width: 100%;
  height: 28px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  margin-bottom: 12px;
}

.aym-product-price {
  color: var(--aym-primary-brown);
  font-size: 18px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  line-height: 28px;
  word-wrap: break-word;
  margin: 0;
}

/* Bouton Voir */
.aym-product-button-container {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.aym-product-button {
  display: inline-block;
  padding: 10px 24px;
  background-color: var(--aym-primary-brown);
  color: var(--aym-white);
  font-size: 16px;
  font-family: 'Playfair Display', serif;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.product-miniature-link:hover .aym-product-button {
  background-color: #7a4a35;
  transform: translateX(4px);
}

/* Flags produit (nouveau, promo, etc.) */
.product-flags {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-flag {
  padding: 4px 12px;
  background-color: var(--aym-primary-brown);
  color: var(--aym-white);
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  text-transform: uppercase;
}

.product-flag.discount {
  background-color: #dc2626;
}

.product-flag.new {
  background-color: #16a34a;
}

/* Responsive */
@media (max-width: 1200px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 992px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
  }

  .aym-product-container {
    max-width: 240px;
  }

  .aym-product-image-wrapper {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 0 16px;
  }

  .js-product {
    max-width: 100%;
  }

  .aym-product-container {
    max-width: 100%;
    height: 440px;
  }

  .aym-product-image-wrapper {
    height: 220px;
  }

  .aym-product-name {
    font-size: 20px;
    line-height: 28px;
  }

  .aym-product-description {
    font-size: 14px;
    line-height: 20px;
  }

  .aym-product-price {
    font-size: 16px;
    line-height: 24px;
  }
}

@media (max-width: 576px) {
  .products {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 20px;
  }

  .aym-product-container {
    max-width: 100%;
    height: 420px;
    margin: 0 auto;
  }

  .aym-product-image-wrapper {
    height: 200px;
  }

  .aym-product-name {
    font-size: 18px;
    line-height: 26px;
  }

  .aym-product-description {
    font-size: 13px;
    line-height: 18px;
  }

  .aym-product-price {
    font-size: 15px;
    line-height: 22px;
  }

  .aym-product-button {
    padding: 8px 20px;
    font-size: 14px;
  }
}
