/* PAGE SHOP */
.shop-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    margin-top: var(--header-height);
}

/* HERO / SHOWCASE */
.game-showcase {
    background: var(--color-main);
    color: var(--color-second);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
}

.game-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.game-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--color-second);
}

.game-info h1 {
    font-size: 2.5em;
    color: var(--color-second);
    margin-bottom: 20px;
    font-weight: 700;
}

.game-description {
    font-size: 1.1em;
    color: var(--color-second);
    margin-bottom: 30px;
    line-height: 1.6;
}

/* DÉTAILS JEU */
.game-details {
    background: var(--color-body-bg);
    color: var(--color-main);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 2px solid var(--color-second);
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--color-main);
}

.detail-value {
    color: var(--color-text-gray);
    font-weight: 600;
}

/* SECTION ACHAT */
.game-buy-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 25px;
    background: var(--color-body-bg);
    border-radius: 8px;
    border: 2px solid var(--color-second);
}

.price-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
}

.price-label {
    color: var(--color-main);
    font-weight: 600;
}

.price {
    font-size: 2em;
    font-weight: 700;
    color: var(--color-text-gray);
}

.btn-add-cart {
    padding: 15px 40px;
    background: var(--color-orange-btn);
    color: var(--color-second);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
    flex-shrink: 0; 
    margin-left: auto;
}

.btn-add-cart:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

/* DLC SECTION */

.btn-secondary {
    padding: 15px 40px;
    background: var(--color-orange-btn);
    color: var(--color-second);
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-secondary:hover {
    opacity: 0.9;
    transform: scale(1.05);
}

.dlc-section {
    margin-bottom: 80px;
}

.dlc-section h2 {
    font-size: 2em;
    color: var(--color-dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

.dlc-subtitle {
    color: var(--color-text-gray);
    margin-bottom: 30px;
    font-size: 1.1em;
}

.dlc-card .dlc-description {
    color: var(--color-second);
}

.dlc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.dlc-card {
    background: var(--color-main);
    color: var(--color-second);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.dlc-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.dlc-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.dlc-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dlc-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.dlc-card h3 {
    font-size: 1.3em;
    color: var(--color-dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

.dlc-card p {
    color: var(--color-text-gray);
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
}

.dlc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.dlc-price {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-orange-btn);
    white-space: nowrap;
}

.dlc-card .btn-add-cart {
    padding: 10px 15px;
    font-size: 0.95em;
    white-space: nowrap;
    margin-left: 0;
    flex-shrink: 0;
}

/* AUTRES JEUX */
.other-games {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px solid var(--color-main);
    margin-bottom: 80px;
}

.other-games h2 {
    font-size: 2em;
    color: var(--color-dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

.other-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

/* Carte statique */
.other-games-card {
    background: var(--color-main);
    color: var(--color-second);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.other-games-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.other-games-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.other-games-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-games-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.other-games-card h3 {
    font-size: 1.3em;
    color: var(--color-dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

.other-games-description {
    color: var(--color-second);
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
    flex-grow: 1;
}

.other-games-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.other-games-price {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-orange-btn);
    white-space: nowrap;
}

.other-games-card .btn-secondary,
.other-games-card .btn-add-cart {
    padding: 10px 15px;
    font-size: 0.95em;
    white-space: nowrap;
}

/* Compatibilité avec les cartes injectées par circus-shop.js.
   Ces règles restent scoppées à .other-games et reproduisent le même rendu. */
.other-games .game-card {
    background: var(--color-main);
    color: var(--color-second);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.other-games .game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.other-games .game-card > img,
.other-games .game-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    object-fit: cover;
}

.other-games .game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.other-games .game-card > h3 {
    padding: 20px 20px 0;
    font-size: 1.3em;
    color: var(--color-dark-brown);
    margin-bottom: 10px;
    font-weight: 700;
}

.other-games .game-card > p {
    padding: 0 20px;
    color: var(--color-second);
    margin-bottom: 15px;
    font-size: 0.95em;
    line-height: 1.5;
    flex-grow: 1;
}

.other-games .game-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 0 20px 20px;
}

.other-games .game-card > .game-card-price,
.other-games .game-card-footer .game-card-price {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--color-orange-btn);
    white-space: nowrap;
}

.other-games .game-card-footer .btn-secondary,
.other-games .game-card-footer .btn-add-cart {
    padding: 10px 15px;
    font-size: 0.95em;
    white-space: nowrap;
}

/* NOTIFICATION PANIER */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 20px;
    background: var(--color-orange-btn);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 150;
    animation: slideIn 0.3s ease-in-out;
    max-width: 300px;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================
   MODAL DLC DÉTAILS
   ============================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--color-main);
    padding: 40px;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    color: var(--color-second);
    border: 2px solid var(--color-main);
}

#dlcDetailsContent {
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

#dlcDetailsContent > div {
    overflow: visible;
}

.modal-content h2 {
    font-size: 2em;
    color: var(--color-second);
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-content h3 {
    font-size: 1.3em;
    color: var(--color-second);
    margin-top: 25px;
    margin-bottom: 15px;
    font-weight: 700;
}

.modal-content p {
    line-height: 1.6;
    color: var(--color-text-gray);
    margin-bottom: 10px;
}

.modal-content strong {
    color: var(--color-main);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    color: var(--color-second);
    background: none;
    border: none;
    padding: 0;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--color-orange-btn);
}

/* IMAGE PRINCIPALE */
.dlc-main-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
    border: 2px solid var(--color-main);
}

/* GALERIE IMAGES */
.dlc-detail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 10px;
    scroll-behavior: smooth;
    /* Masquer la scrollbar sur Chrome/Safari */
    scrollbar-width: thin;
    scrollbar-color: var(--color-orange-btn) transparent;
}

/* Scrollbar personnalisée pour Chrome/Edge */
.dlc-detail-images::-webkit-scrollbar {
    height: 8px;
}

.dlc-detail-images::-webkit-scrollbar-track {
    background: transparent;
}

.dlc-detail-images::-webkit-scrollbar-thumb {
    background: var(--color-orange-btn);
    border-radius: 4px;
}

.dlc-detail-images::-webkit-scrollbar-thumb:hover {
    background: var(--color-dark-brown);
}

.detail-thumb {
    cursor: pointer;
    border-radius: 5px;
    height: 80px;
    min-width: 80px;
    width: 80px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.2s, border 0.2s;
    border: 2px solid transparent;
}

.detail-thumb:hover {
    transform: scale(1.05);
    border-color: var(--color-orange-btn);
}

.dlc-main-image {
    max-width: 100%;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* MODAL RESPONSIVE */
@media (max-width: 768px) {
    .dlc-detail-images {
        gap: 8px;
    }

    .detail-thumb {
        height: 70px;
        min-width: 70px;
        width: 70px;
    }
}

@media (max-width: 480px) {
    .detail-thumb {
        height: 60px;
        min-width: 60px;
        width: 60px;
    }
}

.detail-thumb {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s, opacity 0.3s;
}

.detail-thumb:hover {
    border-color: var(--color-orange-btn);
    opacity: 0.8;
}

/* BOUTON "VOIR PLUS" */
.btn-view-more {
    padding: 8px 16px;
    background: var(--color-main);
    color: var(--color-second);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 600;
    transition: opacity 0.3s, transform 0.3s;
    white-space: nowrap;
}

.btn-view-more:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

/* RESPONSIVE MODAL */
@media (max-width: 768px) {
    .modal-content {
        padding: 20px;
        border-radius: 8px;
    }

    .modal-content h2 {
        font-size: 1.6em;
    }

    .modal-content h3 {
        font-size: 1.1em;
    }

    .dlc-detail-images {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }

    .detail-thumb {
        height: 100px;
    }

    .dlc-main-image {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    .modal {
        padding: 10px;
    }

    .modal-content {
        padding: 15px;
    }

    .modal-content h2 {
        font-size: 1.4em;
    }

    .close-modal {
        font-size: 24px;
        top: 10px;
        right: 10px;
    }

    .dlc-detail-images {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .detail-thumb {
        height: 80px;
    }
}

/* MESSAGE CONNEXION REQUISE */
.login-required-message {
    background: linear-gradient(135deg, #621824 0%, #F2ECDF 100%);
    color: var(--color-second);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid var(--color-dark-brown);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-message-content {
    display: flex;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
}

.login-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.login-message-content p {
    margin: 0;
    font-weight: 600;
    flex-grow: 1;
}

.login-message-content .btn-secondary {
    flex-shrink: 0;
    background: var(--color-main);
    color: var(--color-second);
    font-weight: 700;
    border: none;
}

.login-message-content .btn-secondary:hover {
    opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
    .login-message-content {
        flex-direction: column;
        text-align: center;
    }

    .login-message-content .btn-secondary {
        width: 100%;
    }
}

/* CORRECTION FOOTER DLC - BOX AVEC BOUTONS */
.dlc-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    flex-wrap: wrap;
}

.dlc-footer > div {
    display: flex;
    gap: 8px;
}

.dlc-card .btn-add-cart {
    padding: 10px 12px;
    font-size: 1em;
    margin: 0;
}

.btn-view-more {
    padding: 10px 15px;
    font-size: 0.9em;
}

/* Sur mobile, empiler les boutons */
@media (max-width: 768px) {
    .dlc-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .dlc-footer > span {
        text-align: center;
        order: -1;
    }

    .dlc-footer > div {
        width: 100%;
    }

    .dlc-footer > div > button {
        flex: 1;
    }
}

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

/* DESKTOP -> TABLETTE (1000px) */
@media (max-width: 1000px) {
    .game-header {
        grid-template-columns: 1fr;
    }

    .game-buy-section {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-add-cart {
        width: 100%;
        margin-left: 0;
    }
}

/* TABLETTE (768px) */
@media (max-width: 768px) {
    .shop-container {
        padding: 20px 15px;
    }

    .game-showcase {
        padding: 25px;
    }

    .game-info h1 {
        font-size: 1.8em;
    }

    .game-description {
        font-size: 1em;
    }

    .dlc-grid,
    .other-games-grid {
        grid-template-columns: 1fr;
    }

    /* DLC Footer responsive */
    .dlc-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .dlc-price {
        text-align: center;
        margin-bottom: 0;
    }

    .dlc-card .btn-add-cart {
    padding: 10px 15px;
    font-size: 0.95em;
    white-space: nowrap;
    margin-left: 0;
    flex-shrink: 0;
    }

    .dlc-footer .dlc-price {
        flex-shrink: 0;
    }

    /* Other-games footer responsive */
    .other-games-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .other-games-price {
        text-align: center;
        margin-bottom: 0;
    }

    .other-games .game-card-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.other-games .game-card-footer .game-card-price,
.other-games .game-card > .game-card-price {
    text-align: center;
    margin-bottom: 0;
}

.other-games .game-card-footer .btn-secondary,
.other-games .game-card-footer .btn-add-cart,
.other-games .game-card > .btn-secondary,
.other-games .game-card > .btn-add-cart {
    width: 80%;
    padding: 12px;
    font-size: 1em;
    margin: 0;
    align-self: center;
}
}

/* MOBILE (480px) */
@media (max-width: 480px) {
    /* DLC Footer mobile */
    .dlc-footer {
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

    .dlc-price {
        text-align: center;
        margin-bottom: 0;
    }

    .dlc-card .btn-add-cart {
        width: 80%;
        padding: 12px;
        font-size: 0.95em;
        margin: 0;
    }

    /* Other-games footer mobile */
    .other-games-footer {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .other-games-price,
    .other-games .game-card > .game-card-price {
        text-align: center;
        font-size: 1.3em;
        margin-bottom: 0;
    }

    .other-games-card .btn-secondary,
    .other-games-card .btn-add-cart,
    .other-games .game-card > .btn-secondary,
    .other-games .game-card > .btn-add-cart {
        width: 80%;
        padding: 12px;
        font-size: 0.95em;
        margin: 0 0 20px;
        align-self: center;
    }
}