/* Styles pour la Boutique */

body > .page-header,
body > .shop-section,
body > footer {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.shop-section {
    padding: 4rem 5%;
    background: var(--light);
    min-height: 60vh;
}

.shop-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Message vide */
.empty-message {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.empty-message h3 {
    font-family: 'Righteous', cursive;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.empty-message p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* Grille de produits */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Carte produit */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(233, 30, 99, 0.2);
}

.product-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

/* Placeholder pendant le chargement */
.image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--gray);
}

.loading-spinner {
    font-size: 3rem;
    animation: bounce 1.5s ease-in-out infinite;
    margin-bottom: 0.5rem;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.image-placeholder p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: var(--gray);
    font-size: 2rem;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-family: 'Righteous', cursive;
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.product-description {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.product-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-btn:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Modale produit */
.product-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 20px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
}

.modal-image {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

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

.modal-info {
    display: flex;
    flex-direction: column;
}

.modal-info h2 {
    font-family: 'Righteous', cursive;
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.modal-description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.modal-contact {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 10px;
}

.modal-contact p {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.modal-contact .cta-button {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .page-header {
        width: auto !important;
        max-width: none !important;
        padding: 7rem 1rem 2.5rem;
    }

    .shop-section {
        width: auto !important;
        max-width: none !important;
        padding: 2rem 1rem;
    }

    .shop-container {
        width: 100% !important;
        max-width: none !important;
        margin: 0;
    }

    #productsGrid.products-grid {
        width: 100% !important;
        max-width: none !important;
        margin-top: 1.5rem;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .product-card {
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        margin: 0;
        display: block;
    }

    .product-info {
        width: 100%;
        max-width: none;
        padding: 1.25rem;
    }

    .page-header h1,
    .page-header p,
    .product-info h3,
    .product-description,
    .product-price,
    .product-btn {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .modal-image {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .product-btn {
        white-space: normal;
        text-align: center;
    }
    
    .product-image {
        height: 250px;
    }
}
