/* =====================================================
   SHOP.CSS - STYLES POUR LA BOUTIQUE
   ===================================================== */

/* Section boutique */
.shop-section {
    padding: 8rem 0 4rem 0;
    background: linear-gradient(135deg, var(--primary-lighter) 0%, #fff 100%);
}

/* Grille des guides */
.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Carte de guide */
.guide-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    max-width: 380px;
    margin: 0 auto;
}

.guide-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--primary);
}

.guide-card.available {
    border-color: var(--success);
}

.guide-card.available::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success), var(--primary));
}

/* Badge de statut */
.guide-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.guide-badge.available {
    background: var(--success);
    color: white;
}

.guide-badge.coming-soon {
    background: var(--gray-300);
    color: var(--gray-700);
}

/* Icône du guide */
.guide-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Contenu de la carte */
.guide-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.guide-niveau {
    font-size: 2rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
    text-align: center;
}

.guide-titre {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    text-align: center;
}

.guide-description {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
    flex: 1;
}

/* Prix */
.guide-prix {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Liste des fonctionnalités */
.guide-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.guide-features li {
    padding: 0.5rem 0;
    color: var(--gray-700);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-features li i {
    color: var(--success);
    font-size: 1rem;
}

/* Bouton d'achat */
.guide-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.guide-btn.btn-buy {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.guide-btn.btn-buy:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.guide-btn.btn-disabled {
    background: var(--gray-300);
    color: var(--gray-600);
    cursor: not-allowed;
}

.guide-btn.btn-disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Bouton de prévisualisation */
.guide-btn.btn-preview {
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    margin-top: 0.75rem;
}

.guide-btn.btn-preview:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

/* Modal de prévisualisation */
.preview-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.preview-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.preview-modal-header {
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.preview-modal-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 700;
}

.preview-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.preview-close:hover {
    background: var(--gray-200);
    color: var(--primary);
}

.preview-modal-body {
    flex: 1;
    padding: 0.25rem;
    overflow: hidden;
    display: flex;
    min-height: 0;
}

.preview-modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

.preview-modal-footer {
    padding: 0.5rem 1rem;
    border-top: 2px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0;
}

.preview-modal-footer p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-modal-footer i {
    color: var(--primary);
}

/* Section d'information */
.shop-info {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    margin-top: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.shop-info h3 {
    color: var(--primary);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.shop-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shop-info ul li {
    padding: 0.75rem 0;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.shop-info ul li:last-child {
    border-bottom: none;
}

.shop-info ul li i {
    color: var(--primary);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .guides-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .shop-section {
        padding: 2rem 0;
    }

    .guide-prix {
        font-size: 2rem;
    }

    .preview-modal {
        padding: 0;
    }

    .preview-modal-content {
        max-width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .preview-modal-header {
        padding: 1rem;
    }

    .preview-modal-header h2 {
        font-size: 1.25rem;
    }

    .preview-modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* =====================================================
   THEME CARDS
   ===================================================== */

.themes-section {
    margin-top: 4rem;
}

.themes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.theme-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid var(--gray-200);
}

.theme-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.theme-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.theme-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.theme-titre {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.theme-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.theme-info {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.theme-info i {
    color: var(--primary);
}

.theme-prix {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
}

.theme-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-add-cart {
    background: linear-gradient(135deg, var(--success), #27ae60);
    color: white;
}

.btn-add-cart:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
}

/* =====================================================
   CART BUTTON & MODAL
   =================================================== */

.cart-button-fixed {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center
}

.cart-button-fixed:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.3)
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    border: 2px solid white
}

.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.3s ease
}

.cart-modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease
}

.cart-modal-header {
    padding: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0
}

.cart-modal-header h2 {
    margin: 0;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: .5rem
}

.cart-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-600);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease
}

.cart-close:hover {
    background: var(--gray-200);
    color: var(--primary)
}

.cart-modal-body {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    min-height: 200px
}

.cart-loading,
.cart-empty {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500)
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.cart-item {
    background: var(--gray-50);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem
}

.cart-item-info {
    flex: 1
}

.cart-item-name {
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: .25rem
}

.cart-item-price {
    font-size: .875rem;
    color: var(--gray-600)
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: .75rem
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: .5rem;
    background: white;
    border-radius: 8px;
    padding: .25rem;
    border: 1px solid var(--gray-300)
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: .875rem;
    transition: all 0.2s ease
}

.qty-btn:hover {
    background: var(--primary-dark)
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600
}

.btn-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: .5rem .75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: .875rem;
    transition: all 0.2s ease
}

.btn-remove:hover {
    background: #c0392b
}

.cart-modal-footer {
    padding: 1.5rem;
    border-top: 2px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 16px 16px;
    flex-shrink: 0
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 700
}

.cart-total-amount {
    color: var(--primary);
    font-size: 1.5rem
}

.btn-checkout {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem
}

.btn-checkout:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2)
}

.btn-checkout:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
    opacity: 0.6
}

.theme-number {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

/* Force titles to be exactly 2 lines */
.theme-titre {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
    min-height: 2.4em;
    line-height: 1.2em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Force description to be uniform */
.theme-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
    min-height: 1.25em;
    line-height: 1.25em;
}

/* Ensure all cards have the same height */
.theme-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem 1.5rem 0.75rem 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-align: center;
    border: 2px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.theme-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}