.gameshelf-page .gameshelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.gameshelf-visibility {
    font-size: 0.9rem;
}

.gameshelf-visibility .badge-public {
    color: #2e7d32;
}

.gameshelf-visibility .badge-private {
    color: #757575;
}

.gameshelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gameshelf-card {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 14px;
    position: relative;
}

.gameshelf-card h3 {
    font-size: 1rem;
    margin: 0 0 6px;
}

.gameshelf-card .gameshelf-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.gameshelf-card .gameshelf-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.gameshelf-status {
    display: inline-block;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f0f0f0;
    margin-bottom: 6px;
}

.gameshelf-status-owned { background: #e3f2e5; color: #256029; }
.gameshelf-status-wishlist { background: #e3ecf7; color: #1a4a8a; }

.gameshelf-form {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.gameshelf-form .form-group {
    margin-bottom: 14px;
}

/* Game autocomplete, styled like the header search bar */
.gameshelf-search {
    position: relative;
}

.gameshelf-search #gameshelf-game-search {
    border-radius: 25px;
    height: 44px;
    padding-left: 20px;
    padding-right: 44px;
    background-color: #f3ece1;
    border: 1px solid #e8ddcd;
}

.gameshelf-search-icon {
    position: absolute;
    right: 14px;
    top: 22px;
    transform: translateY(-50%);
    color: #2b2420;
    pointer-events: none;
}

#gameshelf-game-results {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    max-height: 21rem;
    overflow-y: auto;
    padding: 6px;
    background: #fff;
    border: 1px solid #e8ddcd;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 1070;
}

#gameshelf-game-results.is-open {
    display: block;
}

.gameshelf-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
}

.gameshelf-result-item.is-active {
    background: #f3ece1;
}

.gameshelf-result-empty {
    cursor: default;
    color: #666;
}

.gameshelf-result-thumb {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f3ece1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: #b8a78e;
}

.gameshelf-result-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.gameshelf-result-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.gameshelf-result-name {
    color: #2b2420;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gameshelf-result-item:hover .gameshelf-result-name,
.gameshelf-result-item.is-active .gameshelf-result-name {
    color: #DD3238;
}

.gameshelf-result-publisher {
    font-size: 0.8rem;
    color: #777;
}

.gameshelf-result-item[data-selectable]:hover {
    background: #f3ece1;
}


/* ---------- Liste de cadeaux (1.3.0) ---------- */

.gameshelf-giftlist-box,
.gameshelf-received {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 30px;
}

.gameshelf-giftlist-box h2,
.gameshelf-received h2 {
    margin-top: 0;
}

.gameshelf-giftlist-summary {
    margin-bottom: 14px;
}

.gameshelf-share {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.gameshelf-share .form-control {
    flex: 1;
    min-width: 0;
}

.gameshelf-share .btn,
.gameshelf-share-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.gameshelf-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gameshelf-giftlist-settings {
    margin-top: 16px;
}

.gameshelf-giftlist-settings > summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 12px;
}

.gameshelf-giftlist-settings .gameshelf-form {
    margin-bottom: 12px;
}

.gameshelf-giftlist-danger {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gameshelf-received-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gameshelf-received-list li {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.gameshelf-received-list li:last-child {
    border-bottom: none;
}

.gameshelf-received-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Page partagée avec les proches */

.gameshelf-giftlist-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 6px;
    background: #fdf6ec;
    margin-bottom: 16px;
}

.gameshelf-giftlist-emoji {
    font-size: 2.2rem;
    line-height: 1;
}

.gameshelf-giftlist-event {
    font-size: 1.2rem;
}

.gameshelf-giftlist-shh {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
}

.gameshelf-giftlist-loyalty {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 16px;
    border-radius: 6px;
    background: #f3eefb;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.gameshelf-giftlist-loyalty .material-icons {
    color: #6b3fa0;
}

.gameshelf-gift-card {
    display: flex;
    flex-direction: column;
}

.gameshelf-gift-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    margin-bottom: 10px;
}

.gameshelf-gift-price {
    font-weight: 600;
    color: #222;
    margin-top: 4px;
}

.gameshelf-gift-comment {
    font-size: 0.85rem;
    font-style: italic;
}

.gameshelf-gift-reserved,
.gameshelf-gift-purchased {
    opacity: 0.6;
}

.gameshelf-status-reserved { background: #fff3cd; color: #7a5b00; }
.gameshelf-status-gifted { background: #e3f2e5; color: #256029; }

.gameshelf-gift-offer {
    margin-top: auto;
    padding-top: 10px;
}

.gameshelf-gift-offer > summary {
    list-style: none;
    width: 100%;
}

.gameshelf-gift-offer > summary::-webkit-details-marker {
    display: none;
}

.gameshelf-gift-offer[open] > summary {
    display: none;
}

.gameshelf-gift-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.gameshelf-gift-form small {
    display: block;
}

.gameshelf-hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.gameshelf-owned-list {
    columns: 2 220px;
    padding-left: 18px;
}

.gameshelf-gift-card .gameshelf-status {
    align-self: flex-start;
}

.gameshelf-giftlist-owned-title {
    margin-top: 30px;
}

.gameshelf-result-shop {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 8px;
    background: #fdecea;
    color: #a13a2f;
    vertical-align: middle;
}

.gameshelf-result-shop { flex-shrink: 0; }

/* ---------- Coeur de la fiche produit + popup (remplace blockwishlist) ---------- */

.gameshelf-heart {
    flex: 0 0 auto;
    order: -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin: 0 -2px 0 -4px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #DD3238;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.gameshelf-heart:hover,
.gameshelf-heart:focus-visible {
    background: #fdecea;
    transform: scale(1.08);
}

.gameshelf-heart .material-icons {
    font-size: 26px;
    line-height: 1;
}

.gameshelf-heart-modal .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gameshelf-heart-modal .modal-title .material-icons {
    color: #DD3238;
}

.gameshelf-heart-game {
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 12px;
}

.gameshelf-heart-status {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
}

.gameshelf-heart-status legend {
    grid-column: 1 / -1;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.gameshelf-heart-choice {
    margin: 0;
    cursor: pointer;
}

.gameshelf-heart-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.gameshelf-heart-choice span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    padding: 10px 6px;
    border: 1px solid #e8ddcd;
    border-radius: 10px;
    background: #fff;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.gameshelf-heart-choice span .material-icons {
    color: #b8a78e;
}

.gameshelf-heart-choice input:checked + span {
    background: #f3ece1;
    border-color: #DD3238;
    color: #2b2420;
}

.gameshelf-heart-choice input:checked + span .material-icons {
    color: #DD3238;
}

.gameshelf-heart-choice input:focus-visible + span {
    outline: 2px solid #DD3238;
    outline-offset: 2px;
}

.gameshelf-heart-more {
    margin-top: 12px;
}

.gameshelf-heart-more > summary {
    cursor: pointer;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.gameshelf-heart-link {
    font-size: 0.9rem;
}

@media (max-width: 400px) {
    .gameshelf-heart-status {
        grid-template-columns: 1fr;
    }
    .gameshelf-heart-choice span {
        flex-direction: row;
        justify-content: flex-start;
        padding: 10px 12px;
    }
}

.gameshelf-gift-stock-warning {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff3cd;
    color: #7a5b00;
    font-size: 0.8rem;
    line-height: 1.4;
}

.gameshelf-gift-stock-warning .material-icons {
    font-size: 18px;
    flex-shrink: 0;
}

.gameshelf-gift-image-link {
    display: block;
    border-radius: 6px;
    overflow: hidden;
}

.gameshelf-gift-image-link .gameshelf-gift-image {
    transition: transform 0.2s ease;
}

.gameshelf-gift-image-link:hover .gameshelf-gift-image,
.gameshelf-gift-image-link:focus-visible .gameshelf-gift-image {
    transform: scale(1.04);
}

/* Encadré d'information aux couleurs de Kroma (beige, filet rouge) */
.gameshelf-kroma-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 18px;
    background: #f3ece1;
    border: 1px solid #e8ddcd;
    border-left: 4px solid #DD3238;
    border-radius: 8px;
    color: #2b2420;
}

.gameshelf-kroma-notice .material-icons {
    flex-shrink: 0;
    color: #DD3238;
    font-size: 22px;
    line-height: 1.2;
}

.gameshelf-kroma-notice strong {
    color: #DD3238;
}

/* Variante sans icône, pour un contenu libre (texte, formulaire...) */
.gameshelf-kroma-notice--block {
    display: block;
}

/* Vignette des cartes "Mes jeux" / vitrine publique (même style que la liste de cadeaux) */
.gameshelf-card .gameshelf-gift-image-link {
    margin-bottom: 10px;
}

.gameshelf-card .gameshelf-gift-image {
    margin-bottom: 0;
}

.gameshelf-card-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
    border-radius: 6px;
    background: #f3ece1;
    color: #b8a78e;
}

.gameshelf-card-noimage .material-icons {
    font-size: 48px;
}

/* "Non disponible" à la place de "Réserver et l'acheter sur Kroma" */
.gameshelf-gift-form .gameshelf-gift-unavailable,
.gameshelf-gift-form .gameshelf-gift-unavailable:disabled {
    background: #f3ece1;
    border-color: #e8ddcd;
    color: #8a8378;
    opacity: 1;
    cursor: not-allowed;
}

/* Coeur des vignettes produits (listes), à la place de celui de blockwishlist */
.js-product-miniature .thumbnail-container {
    position: relative;
}

.gameshelf-heart.gameshelf-heart--miniature {
    position: absolute;
    top: .635rem;
    left: .635rem;
    z-index: 10;
    margin: 0;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.gameshelf-heart.gameshelf-heart--miniature:hover,
.gameshelf-heart.gameshelf-heart--miniature:focus-visible {
    background: #fff;
}

.gameshelf-heart.gameshelf-heart--miniature .material-icons {
    font-size: 22px;
}

.gameshelf-card .gameshelf-card-image {
    margin-bottom: 10px;
    border-radius: 6px;
}
