/* === SHOP 3D PAGE SPECIFIC STYLES === */

.shop-page {
    overflow: hidden;
}

.shop-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    position: relative;
}

#shop-3d-view {
    flex: 1;
    position: relative;
    background-color: #1a1a1a;
}

#shop-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

/* Cart button in 3D view */
.cart-icon-3d {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #000000;
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-weight: bold;
    border: 2px solid #000000;
    transition: all 0.3s;
    z-index: 10;
}

.cart-icon-3d:hover {
    background-color: #000000;
    color: #ffffff;
}

.cart-icon-3d span {
    display: inline-block;
    background-color: #000000;
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    font-size: 0.9rem;
    min-width: 25px;
    text-align: center;
}

/* Navigation arrows */
.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    color: #000000;
    border: 2px solid #000000;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    font-family: Arial, sans-serif;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-arrow:hover {
    background-color: #000000;
    color: #ffffff;
}

.nav-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.nav-arrow-left {
    left: 20px;
}

.nav-arrow-right {
    right: 20px;
}

/* Product info panel */
.product-info-panel {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.95);
    border: 2px solid #000000;
    padding: 1.5rem 2rem;
    min-width: 300px;
    text-align: center;
    z-index: 10;
}

.product-info-panel.hidden {
    display: none;
}

.product-info-panel h3 {
    margin: 0 0 0.5rem 0;
    color: #000000;
    font-size: 1.2rem;
    letter-spacing: 1px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #000000;
    margin: 0.5rem 0 1rem 0;
}

.btn-add-cart {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 0.8rem 2rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-add-cart:hover {
    background-color: #333333;
}

.btn-add-cart:active {
    transform: scale(0.95);
}

/* === SHOP INFO === */
.shop-info {
    background-color: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    text-align: center;
    color: var(--text-color);
}

.shop-info p {
    margin: 0;
    font-size: 1rem;
}



/* === SHOPPING CART PANEL === */
.cart-panel {
    position: fixed;
    right: 0;
    top: 60px;
    width: 400px;
    height: calc(100vh - 60px);
    background-color: #ffffff;
    border-left: 2px solid #000000;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.cart-panel.visible {
    transform: translateX(0);
}

.cart-panel.hidden {
    transform: translateX(100%);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    letter-spacing: 2px;
}

#close-cart {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

#close-cart:hover {
    color: #666666;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.cart-item-preview {
    flex-shrink: 0;
}

.cart-item-3d {
    width: 80px;
    height: 80px;
    background-color: #ffffff;
    border: 1px solid #000000;
}

.cart-quantity {
    width: 50px;
    padding: 0.25rem;
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
    font-family: inherit;
    text-align: center;
}

.cart-item-subtotal {
    font-weight: bold;
    margin-top: 0.25rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
}

.cart-item-remove:hover {
    color: #f55;
}

.cart-item-info h4 {
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
    color: #000000;
}

.cart-item-info p {
    color: #666666;
    font-size: 0.9rem;
}

.cart-item-remove {
    background: none;
    border: 1px solid #000000;
    color: #000000;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-family: inherit;
}

.cart-item-remove:hover {
    background-color: #000000;
    color: #ffffff;
}

.cart-footer {
    border-top: 2px solid #000000;
    padding: 1.5rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.cart-footer .btn {
    width: 100%;
}

/* === RESPONSIVE SHOP === */
@media (max-width: 768px) {
    .controls-desktop {
        display: none;
    }

    .controls-mobile {
        display: block;
    }

    .cart-panel {
        width: 100%;
        max-width: 350px;
    }

    .shop-controls {
        padding: 1rem;
    }
    
    /* Flèches de navigation plus grandes sur mobile */
    .nav-arrow {
        width: 50px;
        height: 50px;
        font-size: 2rem;
    }
    
    .nav-arrow-left {
        left: 10px;
    }
    
    .nav-arrow-right {
        right: 10px;
    }
    
    /* Panneau d'info produit adapté mobile */
    .product-info-panel {
        bottom: 100px;
        min-width: calc(100% - 40px);
        max-width: calc(100% - 40px);
        padding: 1rem 1.5rem;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .product-info-panel h3 {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.2rem;
    }
    
    .btn-add-cart {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
    }
    
    /* Bouton panier adapté mobile */
    .cart-icon-3d {
        top: 10px;
        right: 10px;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .cart-icon-3d span {
        font-size: 0.8rem;
        min-width: 20px;
        padding: 0.1rem 0.4rem;
    }
    
    /* Panier panel mobile */
    .cart-items {
        max-height: 40vh;
    }
    
    .cart-footer {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-joystick {
        grid-template-columns: repeat(3, 50px);
        grid-template-rows: repeat(3, 50px);
    }

    .btn-move {
        font-size: 1.2rem;
    }
    
    /* Navigation encore plus compacte sur petits écrans */
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .product-info-panel {
        bottom: 80px;
        padding: 0.8rem 1rem;
    }
    
    .product-info-panel h3 {
        font-size: 0.9rem;
        margin-bottom: 0.3rem;
    }
    
    .product-price {
        font-size: 1rem;
        margin: 0.3rem 0 0.8rem 0;
    }
    
    .btn-add-cart {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .cart-icon-3d {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}
