/* Styles spécifiques à la boutique */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
}


.view-cart-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    margin: 40px auto 20px;
    transition: background-color 0.3s;
    display: block;
    text-align: center;
    text-decoration: none;
    max-width: 500px;
    transition: all 0.3s ease;
}

.view-cart-btn:hover {
    text-decoration: none;
    color: white;
    transform: translateY(-10px);
}

.product-card {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Structure en colonne */
    background-color: white;
    /* Assure une couleur de fond cohérente */
}

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

.product-img-container {
    height: auto;
    min-height: 200px;
    max-height: 500px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    /* Élimine les marges potentielles */
    padding: 0;
    /* Élimine le padding potentiel */
}



.product-img {
    width: 100%;
    height: auto;
    max-height: 104%;
    object-fit: contain;
    /* change cover to contain */
    transition: transform 0.5s ease;
}

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

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.product-body {
    padding: 20px;
    background-color: white;
    flex-grow: 1;
    /* Prend tout l'espace disponible */
    display: flex;
    flex-direction: column;
    /* Structure en colonne */
    margin: 0;
    /* Élimine les marges potentielles */
}

.product-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.size-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.size-option {
    border: 1px solid #ddd;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.size-option:hover,
.size-option.selected {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.product-content {
    flex-grow: 1;
}

/* S'assurer que le bouton reste en bas */
.add-to-cart {
    width: 100%;
    background-color: var(--secondary-color);
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    color: white;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-top: auto;
    /* Pousse le bouton vers le bas */
}

.animate__pulse {
    animation: pulse 1s;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Transition pour les boutons */
.add-to-cart {
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.add-to-cart:hover:not(:disabled) {
    transform: translateY(-2px);
}

.add-to-cart:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
}

.add-to-cart:hover {
    background-color: #e67800;
    transform: translateY(-3px);
}

.cart-item-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 5px;
}

.d-flex {
    display: flex;
    align-items: center;
}

.cart-quantity {
    width: 60px;
    text-align: center;
}

.quantity-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background-color: white;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.quantity-btn:hover {
    background-color: #f5f5f5;
}

.checkout-btn {
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.checkout-btn:hover {
    background-color: #0e1340;
    transform: translateY(-3px);
}

.order-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
}

.order-number {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.payment-method {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-method:hover,
.payment-method.selected {
    border-color: var(--secondary-color);
    background-color: rgba(255, 132, 0, 0.05);
}

.titre {
    text-align: center;
}

#total {
    align-items: middle;
    text-align: center;
}

/* Ajustements pour mobile */
@media (max-width: 768px) {

    /* Ajustements pour le header des produits */
    .product-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .color-detail{
        text-align: center;
    }

    /* .product-card{
        width: 130px !important;
        
    } */

    /* .quantity-selector {
        margin-top: 15px;
    } */

    .add-to-cart {
        padding: 8px;
        font-size: 0.6rem;
    }

    .titre {
        text-align: left;
    }

    .row-products {
        margin: 0;
        width: 100%;
        justify-items: center;
    }

    .row-products .col-md-4 {
        width: 100%;
        padding: 0 7px;
        margin-bottom: 15px;
    }

    #total {
        text-align: left;
        align-items: normal;
    }

    .product-card {
        width: 100%;
        margin-bottom: 0;
        max-width: 300px;
        /* Largeur maximale cohérente */
        margin: 0 auto;
        /* Centrage horizontal */
    }

    .product-img-container {
        min-height: 150px;
        max-height: 300px;
    }


    .product-body {
        padding: 15px 10px;
    }

    .product-title {
        font-size: 1.3rem !important;
        white-space: normal;
        overflow: visible;
        margin-bottom: 5px;
    }

    .product-price {
        font-size: 0.85rem;
    }

    .color-option {
        width: 15px !important;
        height: 15px !important;
    }

    .size-option {
        padding: 5px 6px;
        font-size: 0.7rem;
    }

    .quantity-selector button {
        width: 20px !important;
        height: 20px !important;
        font-size: 14px !important;
    }

    .quantity-selector input {
        width: 30px !important;
        height: 20px !important;
    }

    .product-badge {
        padding: 2px 5px;
        font-size: 0.5rem;
    }

    .view-cart-btn {
        padding: 7px 10px;
        font-size: .85rem;
        max-width: 250px;
    }
}

@media (max-width: 320px) {
    .card-link {
        margin-top: 10px !important;
    }
}

/* Pour les très petits écrans */
@media (max-width: 480px) {


    .row {
        grid-template-columns: repeat(2, 1fr);
        /* Toujours 2 produits */
        gap: 10px;

    }

    .row-products {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .product-body {
        padding: 10px;
    }

    .color-selector {
        margin-bottom: 10px;
        gap: 5px;
    }

    .size-selector {
        gap: 5px;
        margin-bottom: 10px;
    }

    .product-img-container {
        min-height: 120px;
        max-height: 260px;
        max-height: 100%;
    }

    .row-products {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
}


@media (max-width: 768px) {

    /* Réorganisation du tableau en mode mobile */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Masquer les en-têtes du tableau */
    .table thead {
        display: none;
    }

    /* Afficher chaque ligne comme un bloc */
    .table tbody tr {
        display: block;
        margin-bottom: 20px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: white;
    }

    /* Ajustement des boutons quantité */
    .quantity-btn {
        width: 30px;
        height: 30px;
        padding: 0;
    }

    .cart-quantity {
        width: 40px;
        text-align: center;
    }

    /* Ajustement du bouton supprimer */
    .remove-item {
        margin-left: auto;
    }

    /* Réorganisation des colonnes */
    .col-md-8,
    .col-md-4 {
        width: 100%;
        padding: 0;
    }

    #paypal-button {
        margin-top: 2rem;
        gap: 2rem;
    }

    #paypal-button a {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
}

/* Ajoutez ces styles à la fin de votre fichier produits.css */

/* Styles améliorés pour mobile - Panier */
@media (max-width: 768px) {
    #cart {
        padding: 2rem 0;
    }

    #cart h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }

    .order-summary {
        margin-top: 2rem;
        padding: 1.5rem !important;
        border-radius: 12px;
    }

    .table tbody tr {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 12px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .table tbody td {
        padding: 0.5rem 0 !important;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #f0f0f0;
    }

    .table tbody td:last-child {
        border-bottom: none;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: bold;
        color: var(--primary-color);
        margin-right: 1rem;
        flex: 1;
    }

    .table tbody td>*:not(::before) {
        flex: 2;
        text-align: right;
    }

    .cart-item-img {
        width: 100px;
        height: 100px;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        align-self: center;
    }

    .cart-item-details {
        text-align: center;
    }

    .d-flex.align-items-center {
        flex-direction: row;
    }

    .quantity-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .cart-quantity {
        width: 40px !important;
        text-align: center;
    }

    .remove-item {
        background: #ff4444 !important;
        color: white;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
    }

    .color-selector-cart {
        margin: 0.5rem 0;
        justify-content: flex-start;
    }

    .color-circle {
        width: 24px !important;
        height: 24px !important;
    }

    .inscription-btn {
        display: block;
        width: 100%;
        padding: 12px;
        text-align: center;
        border-radius: 8px;
        font-weight: bold;
        transition: all 0.3s ease;
    }

    .inscription-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    #cart h2 {
        font-size: 1.5rem !important;
    }

    .table tbody tr {
        padding: 0.8rem;
    }

    .cart-item-img {
        width: 100px;
        height: 100px;
    }

    .quantity-btn {
        width: 28px !important;
        height: 28px !important;
    }
}

#paypal-button a {
    background: #ff9800;
    color: white;
    border-radius: 30px;
    padding: 15px 20px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

#paypal-button {
    gap: 1rem;
}

/* Styles améliorés pour mobile - Panier en format cartes */
@media (max-width: 768px) {
    #cart {
        padding: 2rem 0;
        background: #f5f5f5 !important;
    }

    #cart h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.5rem !important;
    }

    /* Masquer complètement le tableau sur mobile */
    .table-responsive,
    .table,
    .table thead,
    .table tbody {
        display: none !important;
    }

    /* Créer un conteneur de cartes pour mobile */
    .mobile-cart-container {
        display: block !important;
    }

    /* Style des cartes individuelles */
    .mobile-cart-item {
        background: white;
        border-radius: 16px;
        padding: 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
        position: relative;
    }

    /* Header de la carte avec image et titre */
    .mobile-item-header {
        display: flex;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .mobile-cart-img {
        width: 80px;
        height: 80px;
        border-radius: 12px;
        object-fit: cover;
        margin-right: 16px;
        flex-shrink: 0;
    }

    .mobile-item-info {
        flex: 1;
        min-width: 0;
    }

    .mobile-item-title {
        font-size: 1.1rem;
        font-weight: bold;
        color: var(--primary-color);
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .mobile-item-subtitle {
        font-size: 0.9rem;
        color: #666;
        margin-bottom: 8px;
    }

    /* Bouton de suppression en haut à droite */
    .mobile-remove-btn {
        position: absolute;
        top: 16px;
        right: 16px;
        background: #f0f0f0;
        border: none;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        font-size: 0.9rem;
    }

    /* Sélecteur de couleurs */
    .mobile-color-selector {
        display: flex;
        gap: 8px;
        margin-bottom: 16px;
    }

    .mobile-color-circle {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        border: 2px solid transparent;
        cursor: pointer;
        transition: transform 0.2s;
    }

    .mobile-color-circle.selected {
        border-color: var(--secondary-color);
        transform: scale(1.1);
    }

    /* Footer de la carte avec quantité et prix */
    .mobile-item-footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Contrôles de quantité */
    .mobile-quantity-controls {
        display: flex;
        align-items: center;
        background: #f8f8f8;
        border-radius: 20px;
        padding: 10px;
    }

    .mobile-qty-btn {
        background: transparent;
        border: none;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: var(--primary-color);
        font-weight: bold;
    }

    .mobile-qty-btn:active {
        background: #e0e0e0;
    }

    .mobile-qty-input {
        background: transparent;
        border: none;
        width: 40px;
        text-align: center;
        font-size: 1.1rem;
        font-weight: bold;
        color: var(--primary-color);
    }

    /* Prix */
    .mobile-item-price {
        font-size: 1.3rem;
        font-weight: bold;
        color: var(--secondary-color);
    }

    /* Couleurs spécifiques pour mobile */
    .mobile-color-red {
        background-color: #e74c3c;
    }

    .mobile-color-blue {
        background-color: #2E4080;
    }

    .mobile-color-green {
        background-color: #2ecc71;
    }

    .mobile-color-greyish-green {
        background-color: #90ab9e;
    }

    .mobile-color-brown {
        background-color: #b67164;
    }

    .mobile-color-black {
        background-color: #000;
    }

    .mobile-color-white {
        background-color: #fff;
        border: 1px solid #ddd;
    }

    .mobile-color-light-ivory {
        background-color: #f2f1e8
    }

    .mobile-color-purple {
        background-color: #9b59b6;
    }

    .mobile-color-yellow {
        background-color: #f1c40f;
    }

    .mobile-color-orange {
        background-color: #BB3A00
    }

    .mobile-color-pink {
        background-color: #e84393;
    }

    .mobile-color-grey {
        background-color: #95a5a6;
    }

    .mobile-color-dark-grey {
        background-color: #37343b;
    }

    /* Ajustements du résumé de commande */
    .order-summary {
        margin-top: 2rem;
        padding: 1.5rem !important;
        border-radius: 16px;
    }

    /* Réorganisation des colonnes */
    .col-md-8,
    .col-md-4 {
        width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    #cart h2 {
        font-size: 1.5rem !important;
    }

    .mobile-cart-item {
        padding: 16px;
        margin-bottom: 12px;
    }

    .mobile-cart-img {
        width: 70px;
        height: 70px;
    }

    .mobile-item-title {
        font-size: 1rem;
    }

    .mobile-qty-btn {
        width: 28px;
        height: 28px;
    }

    .mobile-qty-input {
        width: 35px;
    }
}

@media (max-width: 330px) {
    .mobile-item-title {
        font-size: 0.8rem;
    }

    .mobile-item-subtitle {
        font-size: 0.7rem;
        color: #666;
        margin-bottom: 5px;
    }

    .mobile-remove-btn {
        top: 10px;
        right: 10px;
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }
}


.cart-item-mobile {
    display: flex;
    flex-direction: column;
    padding: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    margin-bottom: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.cart-item-mobile .cart-item-details {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.9rem;
    opacity: 0.9;
    color: white;
    text-align: left;
}

.cart-item-name {
    font-weight: bold;
    flex: 1;
    font-size: 1rem;
}

.cart-item-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: var(--secondary-color);
}

.cart-item-size,
.cart-item-color {
    color: white;
    font-style: italic;
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-item-mobile {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .cart-item-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .cart-item-name {
        font-size: 0.9rem;
    }
    
    .cart-item-price {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cart-item-mobile {
        padding: 10px;
    }
    
    .cart-item-header {
        align-items: flex-start;
        gap: 5px;
    }
}