/* --- PAGE WISHLIST ARTIFACT --- */

@keyframes popInWishlist {
    0% { opacity: 0; transform: scale(0.95) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.wishlist-page-wrapper {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.wishlist-header {
    text-align: center;
    margin-bottom: 50px;
}

.wishlist-header h1 {
    font-size: 36px;
    text-transform: uppercase;
    font-weight: 800;
}

.highlight-gold {
    color: #b8860b;
}

/* --- TRANSFORMATION DU TABLEAU EN GRILLE (GRID) --- */

/* 1. On transforme le tableau en Flexbox/Grid */
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    border: none !important;
}

.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tbody {
    display: contents; /* Permet aux lignes (tr) de devenir les éléments de la grille */
}

/* 2. Style de la CARTE (chaque ligne devient une carte) */
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr {
    display: flex;
    flex-direction: column;
    width: calc(33.333% - 20px); /* 3 cartes par ligne */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    animation: popInWishlist 0.5s ease-out both;
}

.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:nth-child(1) { animation-delay: 0.1s; }
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:nth-child(2) { animation-delay: 0.2s; }
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:nth-child(3) { animation-delay: 0.3s; }
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:nth-child(4) { animation-delay: 0.4s; }
.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:nth-child(5) { animation-delay: 0.5s; }

.wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* 3. L'Image du produit */
.wishlist-page-wrapper td.product-thumbnail {
    width: 100%;
    height: 250px;
    border: none !important;
    padding: 0 !important;
    overflow: hidden;
}

.wishlist-page-wrapper td.product-thumbnail a img {
    height: 100%;
    width: 100% !important;
    max-width: 100% !important;
    object-fit: cover;
}

/* 4. Le Titre du produit */
.wishlist-page-wrapper td.product-name {
    padding: 15px 15px 5px 15px !important;
    border: none !important;
    text-align: left;
}

.wishlist-page-wrapper td.product-name a {
    font-weight: 700;
    font-size: 16px;
    color: #1a1a1a;
    text-decoration: none;
    text-transform: uppercase;
}

/* 5. Le Prix */
.wishlist-page-wrapper td.product-price {
    padding: 0 15px 15px 15px !important;
    border: none !important;
    text-align: left;
    color: #b8860b; /* OR Artifact */
    font-weight: 800;
    font-size: 18px;
}

/* 6. Le Bouton "Ajouter au panier" */
.wishlist-page-wrapper td.product-add-to-cart {
    padding: 0 15px 20px 15px !important;
    border: none !important;
}

.wishlist-page-wrapper td.product-add-to-cart a.add_to_cart_button {
    display: block;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: background 0.3s;
}

.wishlist-page-wrapper td.product-add-to-cart a.add_to_cart_button:hover {
    background: #b8860b; /* Survol OR */
}

/* 7. Le bouton Supprimer (Croix) */
.wishlist-page-wrapper td.product-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    padding: 0 !important;
    border: none !important;
    z-index: 10;
}

.wishlist-page-wrapper td.product-remove a.remove {
    background: #fff;
    color: #d32f2f; /* Rouge */
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* 8. Cacher les éléments inutiles (Stock, Checkbox) */
.wishlist-page-wrapper td.product-stock-status,
.wishlist-page-wrapper th {
    display: none !important; /* Cache les en-têtes du tableau */
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .wishlist-page-wrapper form#yith-wcwl-form table.shop_table tr {
        width: 100%; /* 1 carte par ligne sur mobile */
    }
}