/* =========================================================
   public/front/assets/css/components/product-card.css
   Styles du composant templates/front/_product_card.html.twig
   ========================================================= */

.card-product {
    overflow: hidden;
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 1.25rem;
}

.card-product img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.card-product-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: var(--img-aspect, 0.8);
    margin-bottom: 0;
    border: 1px solid rgba(0,0,0,.05);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.8);
}

/* tailles overlay */
.size-overlay {
    position: absolute;
    bottom: 2.6rem;
    left: 0;
    right: 0;
    align-items: center;
    padding: .4rem .65rem;
    background: rgba(255,255,255,0.6);
    display: flex;
    justify-content: center;
    gap: .35rem;
    border-top: 1px solid transparent;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .25s ease, transform .25s ease;
    z-index: 3;
}

.card-product-media:hover .size-overlay {
    opacity: 1;
    transform: translateY(0);
}

/* zoom */
.zoom-overlay {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.6);
    background: rgba(255,255,255,.35);
    color: rgba(0,0,0,.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
    z-index: 4;
    opacity: .75;
}

.zoom-overlay i,
.zoom-overlay .zoom-fallback {
    font-size: .65rem;
}

.zoom-overlay:hover {
    transform: scale(1.15);
    background: rgba(255,255,255,.95);
    opacity: 1;
    color: rgba(0,0,0,.85);
}



/* Favoris overlay: même style que zoom-overlay, juste en dessous */
.wishlist-overlay{
    position: absolute;
    top: calc(0.3rem + 24px + 6px); /* sous le zoom (24px) + gap */
    right: 0.3rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.6);
    background: rgba(255,255,255,.35);
    color: rgba(0,0,0,.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, opacity .2s ease;
    z-index: 4;
    opacity: .75;
    padding: 0;
    line-height: 1;
}

.wishlist-overlay i,
.wishlist-overlay .wishlist-fallback{
    font-size: .65rem;
}

.wishlist-overlay:hover{
    transform: scale(1.15);
    background: rgba(255,255,255,.95);
    opacity: 1;
    color: rgba(0,0,0,.85);
}

/* état actif (favori ajouté) */
.wishlist-overlay.is-active{
    background: rgba(220, 38, 38, .92);
    border-color: rgba(220, 38, 38, .92);
    color: #fff;
    opacity: 1;
}

.wishlist-overlay.is-active:hover{
    background: rgba(220, 38, 38, 1);
    border-color: rgba(220, 38, 38, 1);
}


/* ratio tag */
.ratio-tag {
    position: absolute;
    left: .6rem;
    bottom: .6rem;
    padding: .1rem .4rem;
    border-radius: .4rem;
    background: rgba(0,0,0,.65);
    color: #fff;
    font-size: .65rem;
    letter-spacing: .04rem;
    text-transform: uppercase;
    z-index: 5;
}

/* badges */
.badges-wrapper {
    position: absolute;
    top: .6rem;
    left: .6rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    z-index: 5;
}

.badge {
    padding: .2rem .55rem;
    border-radius: 999px;
    font-size: .6rem;
    font-weight: 600;
    letter-spacing: .02rem;
}

.badge-stockout {
    background: rgba(239, 68, 68, .95);
    color: #fff;
}

.badge-new {
    background: rgba(59, 130, 246, .9);
    color: #fff;
}

.badge-promo {
    background: rgba(16, 185, 129, .9);
    color: #fff;
}

/* swatches */
.color-swatches {
    display: flex;
    gap: .35rem;
    align-items: center;
    flex-wrap: wrap;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.15);
    cursor: pointer;
    outline: none;
    position: relative;
}

.color-swatch.active::after {
    content: "";
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px rgba(0,0,0,.35);
}

.more-colors {
    background: transparent;
    border: none;
    padding: 0 .3rem;
    font-size: .75rem;
    color: #111;
    cursor: pointer;
}

/* body */
.card-product-body {
    padding: .2rem .5rem .3rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 1;
    text-align: left;
    position: relative;
    min-height: 3rem;
}

/* prix */
.product-price {
    font-size: .72rem;
    line-height: 1.1;
}

.price-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.price-value {
    font-size: .85rem;
    font-weight: 400;
}

.price-meta {
    display: flex;
    align-items: baseline;
    gap: .35rem;
}

.price-meta .original-price {
    font-size: .7rem;
    color: #c70000;
    text-decoration: line-through;
}

.price-meta .discount-flag {
    background: #dc2626;
    color: #fff;
    padding: .1rem .35rem;
    border-radius: .4rem;
    font-size: .6rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* titre hover */
.home-card-title {
    font-size: .76rem;
    font-weight: 400;
    margin: 0;
    letter-spacing: .01rem;
    color: #222;
    text-transform: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .25s ease, transform .25s ease;
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: 3.2rem;
}

.card-product-media:hover + .card-product-body .home-card-title,
.card-product-body:hover .home-card-title {
    opacity: 1;
    transform: translateY(0);
}

/* description */
.product-description {
    font-size: .7rem;
    color: #555;
}

/* actions */
.card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .4rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    font-size: 1rem;
    cursor: pointer;
}

.btn-icon.btn-primary {
    background: #111;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
}

.btn-icon.btn-primary:disabled {
    background: rgba(0,0,0,.3);
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    border: 1px solid rgba(0,0,0,.2);
    color: #111;
    font-size: .85rem;
}

.notify-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.2);
    background: rgba(0,0,0,.05);
    font-size: .85rem;
}

.notify-btn {
    border: 0;
    background: transparent;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .05rem;
    color: #111;
    cursor: pointer;
}

/* color row dans l'image */
.card-product-media .color-row {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: .3rem .6rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: .35rem;
    background: rgba(255,255,255,.92);
    border-top: 1px solid rgba(0,0,0,.08);
    z-index: 1;
}

.card-product-media .color-swatches {
    display: flex;
    gap: .3rem;
}

/* surcharges swatches */
.card-product-media .color-swatches .color-swatch {
    width: 18px;
    height: 18px;
}

.card-product-media .color-row .more-colors {
    font-size: .7rem;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    height: auto;
    letter-spacing: .08rem;
    text-transform: uppercase;
}

/* variantes de prix (bloc plus bas dans ton CSS) */
.product-price {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .9rem;
}

.price-main {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.discount-flag {
    background: #c70000;
    color: #fff;
    padding: .1rem .4rem;
    border-radius: 4px;
    font-size: .6rem;
    letter-spacing: .02rem;
    text-transform: uppercase;
}

.price-value {
    font-size: .82rem;
    font-weight: 300;
    text-transform: none;
}

.price-meta {
    font-size: .65rem;
    color: #c70000;
}

/* badge stock bas */
.stock-bottom-badge {
    position: absolute;
    bottom: 0.4rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(239,68,68,0.95);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.65rem;
    letter-spacing: .05rem;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}

/* skeleton loaders */
.skeleton-card {
    border-radius: 1.2rem;
    border: 1px solid rgba(0,0,0,.08);
    background: #f4f4f4;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.skeleton-image {
    width: 100%;
    height: 260px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(0,0,0,0.06), rgba(255,255,255,0));
    animation: shimmer 1.4s infinite;
}

.skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(0,0,0,0.08), rgba(255,255,255,0));
    margin-bottom: .6rem;
    animation: shimmer 1.2s infinite;
}

.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-80 { width: 80%; }

@keyframes shimmer {
    0% { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}

/* taille pill */
.size-pill {
    font-size: 10px;
    padding: 5px 8px;
}

/* view controls */
.view-controls {
    display: flex;
    align-items: center;
    gap: 2px;
}

.view-controls .view-btn {
    width: 26px;
    height: 26px;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 4px;
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition:
        background-color .15s ease,
        color .15s ease,
        transform .15s ease;
}

.view-controls .view-btn svg {
    display: block;
}

.view-controls .view-btn:hover {
    background-color: #000;
    color: #fff;
    transform: scale(1.05);
}

.view-controls .view-btn.active {
    background-color: #000;
    color: #fff;
}

.view-controls .view-btn.active svg {
    stroke-width: 2.4;
}


/* filtre trigger */
.filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 0;
    padding: 0;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: .12rem;
    text-transform: uppercase;
    color: #000;
    cursor: pointer;
}

.filter-trigger:hover {
    opacity: .7;
}

.view-separator {
    width: 1px;
    height: 16px;
    background: rgba(0,0,0,.2);
    margin: 0 6px;
}

/* =========================
   Packs listing (premium)
   ========================= */

/* Tokens (faciles à ajuster) */
:root{
  --pack-radius: 14px;
  --pack-border: rgba(15, 23, 42, .08);
  --pack-shadow: 0 10px 26px rgba(15, 23, 42, .06);
  --pack-shadow-hover: 0 18px 40px rgba(15, 23, 42, .12);
  --pack-text: #0f172a;
  --pack-muted: #64748b;
  --pack-bg: #fff;
}

/* Card wrapper */
.card-product{
  background: var(--pack-bg);
  border: 1px solid var(--pack-border);
  border-radius: var(--pack-radius);
  box-shadow: var(--pack-shadow);
  overflow: hidden;
  transition: transform .12s ease, box-shadow .16s ease, border-color .16s ease;
}

.card-product:hover{
  transform: translateY(-2px);
  box-shadow: var(--pack-shadow-hover);
  border-color: rgba(15, 23, 42, .14);
}

/* Media */
.card-product-media{
  position: relative;
  background: #f8fafc;
  border-bottom: 1px solid rgba(15, 23, 42, .06);
}

/* Image polish */
.card-product-media img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: translateZ(0);
  transition: transform .18s ease;
}

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

/* Title overlay (si ton CSS existant positionne déjà home-card-title,
   on ajoute juste du contraste + lisibilité) */
.home-card-title.product-name{
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(15, 23, 42, .08);
  backdrop-filter: blur(6px);

  font-weight: 900;
  letter-spacing: .2px;
  color: var(--pack-text);

  /* clamp 2 lignes */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Body spacing */
.card-product-body{
  padding: 12px 12px 14px;
}

/* Reference */
.card-product-body .small.text-muted{
  color: var(--pack-muted) !important;
  font-weight: 700;
}

/* Price hierarchy */
.product-price .price-current{
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.price-value{
  font-weight: 900;
  font-size: 1.12rem;
  letter-spacing: .2px;
  color: #111827;
}

/* Old price + discount */
.price-meta{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.original-price{
  color: #94a3b8;
  font-weight: 800;
  text-decoration: line-through;
  font-size: .92rem;
}

.discount-flag{
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .8rem;
  color: #7c2d12;
  background: #ffedd5;
  border: 1px solid rgba(245, 158, 11, .35);
}

/* Swatches – plus propres */
.color-swatches{
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.color-swatch{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, .14);
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
  transition: transform .08s ease, box-shadow .12s ease;
}

.color-swatch:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, .12);
}

.more-colors{
  margin-left: 2px;
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 800;
  font-size: .82rem;
  padding: 4px 6px;
  border-radius: 999px;
  transition: background .12s ease;
}

.more-colors:hover{
  background: rgba(15, 23, 42, .06);
}

/* CTA button polish */
.card-product-body .btn.btn-dark.btn-sm{
  margin-top: 12px;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 900;
  letter-spacing: .15px;
}


/* Mobile: button full width + better spacing */
@media (max-width: 575.98px){
  .card-product-body .btn.btn-dark.btn-sm{
    width: 100%;
  }
  .price-value{
    font-size: 1.08rem;
  }
}

/* Optional: cursor pointer on image area without inline style */
.card-product-media img{
  cursor: pointer;
}
