/* =======================================================
   FICHIER : shop-detail.css
   PROJET : HelloColis Shopping - Page Détail Produit
   ======================================================= */

:root {
    --neon-blue: #3BD0FF;
    --night-blue: #0A1C30;
    --deep-black: #061120;
    --ice-white: #EAF6FF;
    --muted-blue: #cfe4ef;
    --panel-dark: rgba(10, 28, 48, 0.9);
    --header-height: 70px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Permettre le scroll */
html, body {
    overflow-y: auto !important;
    height: auto !important;
}

/* Footer version relative */
.shop-footer {
    position: relative;
    margin-top: 40px;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, var(--deep-black) 0%, var(--night-blue) 100%);
    color: var(--ice-white);
    min-height: 100vh;
}

/* SCENE PRINCIPALE */
.detail-scene {
    padding-top: calc(var(--header-height) + 40px);
    padding-bottom: 60px;
    min-height: 100vh;
}

.detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* CARTE PRODUIT */
.product-card {
    display: flex;
    gap: 48px;
    background: var(--panel-dark);
    border-radius: 24px;
    border: 1px solid rgba(59, 208, 255, 0.2);
    padding: 32px;
    backdrop-filter: blur(10px);
    margin-bottom: 48px;
}

/* GALLERIE */
.product-gallery {
    flex: 1;
}

.main-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, rgba(59, 208, 255, 0.1), rgba(59, 208, 255, 0.05));
    border-radius: 20px;
    border: 1px solid rgba(59, 208, 255, 0.2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--muted-blue);
}

/* INFOS PRODUIT */
.product-info-detail {
    flex: 1;
}

.product-badge {
    display: inline-block;
    background: rgba(59, 208, 255, 0.15);
    color: var(--neon-blue);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
}

.product-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--ice-white);
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.stars {
    color: #FFD700;
    font-size: 18px;
    letter-spacing: 2px;
}

.rating-count {
    color: var(--muted-blue);
    font-size: 14px;
}

.product-price-detail {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 24px;
}

.price-amount {
    font-size: 32px;
    font-weight: 700;
    color: var(--neon-blue);
}

.price-old {
    font-size: 20px;
    color: var(--muted-blue);
    text-decoration: line-through;
}

.price-discount {
    background: #FF4757;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.product-description {
    margin-bottom: 24px;
}

.product-description h3,
.product-features h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--neon-blue);
}

.product-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--muted-blue);
}

.product-features {
    margin-bottom: 24px;
}

.product-features ul {
    list-style: none;
    padding-left: 0;
}

.product-features li {
    font-size: 14px;
    color: var(--ice-white);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.product-features li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: var(--neon-blue);
}

/* ACTIONS */
.product-actions-detail {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.quantity-selector {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(59, 208, 255, 0.2);
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--neon-blue);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.qty-btn:hover {
    background: rgba(59, 208, 255, 0.1);
}

#productQty {
    width: 50px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--ice-white);
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

#productQty:focus {
    outline: none;
}

.btn-add-cart {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(90deg, var(--neon-blue), #2ab8e0);
    color: var(--deep-black);
    border: none;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 208, 255, 0.4);
}

/* LIVRAISON */
.delivery-info {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    padding-top: 16px;
    border-top: 1px solid rgba(59, 208, 255, 0.1);
}

.delivery-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted-blue);
}

.delivery-icon {
    font-size: 18px;
}

/* PRODUITS RECOMMANDÉS */
.related-products {
    margin-bottom: 48px;
}

.section-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--neon-blue);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.related-card {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 16px;
    border: 1px solid rgba(59, 208, 255, 0.1);
    padding: 16px;
    text-align: center;
    transition: all 0.3s;
}

.related-card:hover {
    transform: translateY(-4px);
    border-color: var(--neon-blue);
    background: rgba(59, 208, 255, 0.05);
}

.related-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: rgba(59, 208, 255, 0.05);
}

.related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--ice-white);
}

.related-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--neon-blue);
    margin-bottom: 12px;
}

.related-link {
    display: inline-block;
    color: var(--muted-blue);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.3s;
}

.related-link:hover {
    color: var(--neon-blue);
}

/* BOUTON RETOUR */
.back-button {
    text-align: center;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid rgba(59, 208, 255, 0.3);
    color: var(--muted-blue);
    padding: 10px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-back:hover {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
    transform: translateX(-4px);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .detail-scene {
        padding-top: calc(60px + 30px);
    }

    .product-card {
        flex-direction: column;
        padding: 24px;
        gap: 24px;
    }

    .product-title {
        font-size: 24px;
    }

    .price-amount {
        font-size: 28px;
    }
}

@media (max-width: 600px) {
    .detail-container {
        padding: 0 16px;
    }

    .product-card {
        padding: 20px;
    }

    .product-title {
        font-size: 20px;
    }

    .price-amount {
        font-size: 24px;
    }

    .product-actions-detail {
        flex-direction: column;
        align-items: stretch;
    }

    .quantity-selector {
        justify-content: center;
    }

    .btn-add-cart {
        justify-content: center;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

}

@media (max-width: 400px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
}