/* ========================================
   ARCHIVE / CATÉGORIE - LOU GARŪ
   ======================================== */

body.archive,
body.tax-product_cat {
  overflow-x: hidden;
}

.lg-archive-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  overflow-x: hidden;
}

.lg-archive-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.lg-archive-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  margin-bottom: var(--space-md);
  font-family: var(--font-primary);
}

.lg-archive-subtitle {
  font-size: var(--fs-large);
  color: var(--color-text-secondary);
  font-family: var(--font-primary);
}

.lg-archive-description {
  max-width: 700px;
  margin: var(--space-lg) auto 0;
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.lg-desc-content {
  overflow: hidden;
  max-height: 4.8em;
  transition: max-height 0.4s ease;
  position: relative;
  line-height: 1.6;
}

.lg-desc-content:not(.expanded)::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  height: 2.4em;
  background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1) 100%);
  pointer-events: none;
}

.lg-desc-content.expanded {
  max-height: 1000px;
}

.lg-read-more {
  display: inline-block;
  margin-top: var(--space-sm);
  margin-bottom: var(--space-lg);
  padding: 6px 16px;
  background: transparent;
  color: var(--color-accent-main);
  border: 1px solid var(--color-accent-main);
  border-radius: var(--radius-soft);
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
  font-family: var(--font-primary);
  cursor: pointer;
  transition: var(--transition-fast);
}

.lg-read-more:hover {
  background: var(--color-accent-main);
  color: var(--color-white);
}

.lg-read-more.hidden {
  display: none;
}

.lg-archive-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--color-line);
}

.lg-results-count {
  font-size: var(--fs-body);
  color: var(--color-text-secondary);
  font-weight: var(--fw-medium);
}

.lg-ordering select {
  padding: 10px 40px 10px 16px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-soft);
  font-family: var(--font-primary);
  font-size: var(--fs-body);
  color: var(--color-text-primary);
  background: var(--color-white);
  cursor: pointer;
  transition: var(--transition-fast);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23a1907d' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.lg-ordering select:hover,
.lg-ordering select:focus {
  border-color: var(--color-accent-main);
  outline: none;
}

/* ========================================
   GRILLE PRODUITS
   ======================================== */

.lg-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.lg-product-card {
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-soft);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
}

.lg-product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  border-color: var(--color-accent-main);
}

.lg-product-link {
  text-decoration: none;
  color: inherit;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lg-product-image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-ivory);
  position: relative;
}

.lg-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-base);
}

.lg-product-card:hover .lg-product-image img {
  transform: scale(1.02);
}

.lg-product-details {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.lg-product-name {
  font-size: var(--fs-large);
  font-weight: var(--fw-medium);
  color: var(--color-text-primary);
  margin: 0;
  font-family: var(--font-primary);
  line-height: 1.3;
}

.lg-product-excerpt {
  font-size: var(--fs-small);
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
  flex: 1;
}

.lg-product-price {
  font-size: var(--fs-large);
  font-weight: var(--fw-medium);
  color: var(--color-accent-main);
  font-family: var(--font-primary);
}

.lg-product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.lg-product-actions {
  padding: 0 var(--space-lg) var(--space-lg);
}

.lg-btn-primary {
  display: block;
  width: 100%;
  padding: 12px 24px;
  background: var(--color-accent-main);
  color: var(--color-white);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-soft);
  font-weight: var(--fw-medium);
  font-family: var(--font-primary);
  transition: var(--transition-base);
  border: none;
  cursor: pointer;
}

.lg-btn-primary:hover {
  background: #8a7c69;
  transform: translateY(-1px);
}

/* ========================================
   NO PRODUCTS
   ======================================== */

.lg-no-products {
  text-align: center;
  padding: var(--space-2xl);
}

.lg-no-products p {
  font-size: var(--fs-large);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
  .lg-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--space-lg);
  }
}

@media (max-width: 768px) {
  .lg-archive-wrapper {
    padding: var(--space-xl) var(--space-md);
  }
  
  .lg-archive-toolbar {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  .lg-results-count {
    text-align: center;
  }
  
  .lg-ordering {
    width: 100%;
  }
  
  .lg-ordering select {
    width: 100%;
  }
  
  .lg-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .lg-archive-wrapper {
    padding: var(--space-lg) var(--space-sm);
  }
  
  .lg-products-grid {
    grid-template-columns: 1fr;
  }
  
  .lg-product-card {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (hover: hover) and (pointer: fine) {

  .lg-product-image img.img-hover {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.35s ease;
  }

  .lg-product-card:hover .lg-product-image img.img-hover {
    opacity: 1;
  }

  .lg-product-card:hover .lg-product-image img.img-main {
    opacity: 0;
  }

}
