
/* ==================================================
   FICHE PRODUIT
   L'Aurore Décoratif
================================================== */

/* BASE */

.product-page {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px;
    box-sizing: border-box;
}

.product-page *,
.product-page *::before,
.product-page *::after {
    box-sizing: border-box;
}

/* ==================================================
   TITRES
================================================== */

.product-page h1 {
    margin: 0 0 15px;
    color: #2B353F;
    font-family: "Montserrat", sans-serif;
    font-size: 2.2em;
    line-height: 1.2;
    text-align: left;
}

.product-page .desc h2 {
    margin-top: 20px;
    color: #6B5896;
    font-family: "Montserrat", sans-serif;
    font-size: 1.3em;
    font-weight: bold;
}

/* ==================================================
   IMAGES PRODUIT
================================================== */

.product-page .images {
    position: sticky;
    top: 120px;
    flex: 0 0 500px;
    width: 100%;
    max-width: 500px;
    min-width: 0;
}

.product-page .main-image {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: hidden;
}

.product-page .main-image img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto !important;
    object-fit: contain;
    border-radius: 10px;
    transition: transform .4s ease;
}

.product-page .main-image img:hover {
    transform: scale(1.02);
}

/* Miniatures */

.product-page .thumbnails {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.product-page .thumb {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border: 2px solid transparent;
    border-radius: 6px;
    opacity: .7;
    cursor: pointer;
    transition: .2s;
}

.product-page .thumb.active,
.product-page .thumb:hover {
    transform: scale(1.05);
    border-color: #d837be;
    opacity: 1;
}

/* ==================================================
   DESCRIPTION PRODUIT
================================================== */

.product-page .desc {
    flex: 1;
    min-width: 0;
    width: 50%;
    padding: 25px;
    border-radius: 15px;
    background: rgba(255,255,255,.1);
    color: #444;
    font-size: 1em;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
    backdrop-filter: blur(5px);
    animation: fadeProduct .5s ease;
}

.product-page .desc p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.product-page .desc ul {
    margin-bottom: 15px;
    padding-left: 20px;
    line-height: 1;
}

.product-page .desc li {
    margin-bottom: 8px;
}

.product-page .desc li p {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.product-page .desc strong {
    color: #6B5896;
}

.product-page .short_desc {
    margin: 20px 0;
    text-align: left;
}

/* ==================================================
   PRIX
================================================== */

.product-page p.prix {
    width: 100%;
    height: auto;
    margin: 0;
    padding: 0 1px;
    color: #d837be;
    font-family: "Libre Caslon Text", serif;
    font-size: 1.8em;
    font-weight: bold;
    transition: .5s;
}

.product-page .promo-badge {
    display: inline-block;
    margin-bottom: 10px;
    padding: 6px 12px;
    border-radius: 30px;
    background: #d837be;
    color: #fff;
    font-size: .8em;
    font-weight: bold;
    box-shadow: 0 5px 15px rgba(216,55,190,.25);
}

/* ==================================================
   FORMULAIRE
================================================== */

.product-page form {
    margin: 20px 0;
}

.product-page form p {
    margin: 15px 0;
}

.product-page form label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-family: "Montserrat", sans-serif;
    font-size: .95em;
}

/* Champs */

.product-page select,
.product-page input[type="text"],
.product-page textarea {
    width: 100%;
    max-width: 350px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: "Montserrat", sans-serif;
    font-size: .95em;
    outline: none;
    transition: .2s;
}

.product-page select,
.product-page input[type="text"] {
    height: 40px;
    padding: 0 10px;
}

.product-page textarea {
    min-height: 80px;
    padding: 10px;
    resize: vertical;
}

.product-page select:focus,
.product-page input[type="text"]:focus,
.product-page textarea:focus {
    border-color: #d837be;
    box-shadow: 0 0 0 2px rgba(216,55,190,.1);
}

.product-page select {
    background: #fff;
    cursor: pointer;
}

.product-page input::placeholder {
    color: #aaa;
    font-style: italic;
}

/* ==================================================
   BOUTON AJOUTER AU PANIER
================================================== */

.product-page input[type="submit"] {
    width: 100%;
    max-width: 300px;
    height: 50px;
    margin-top: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6B5896, #d837be);
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(216,55,190,.18);
    transition: transform .25s ease, box-shadow .25s ease;
}

.product-page input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(216,55,190,.28);
}

.product-page input[type="submit"]:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================================================
   QUANTITÉ
================================================== */

.product-page .qte-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
}

.product-page .qte-picker {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
}

.product-page .btn-qte {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 8px;
    background: #ccc;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    cursor: pointer;
    transition: .3s;
}

.product-page .btn-qte.plus {
    background: #d837be;
}

.product-page .btn-qte:hover {
    opacity: .8;
}

.product-page #qte_input {
    width: 70px;
    height: 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: 1.2em;
    text-align: center;
    -moz-appearance: textfield;
}

.product-page #qte_input::-webkit-outer-spin-button,
.product-page #qte_input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}

/* ==================================================
   PANIER
================================================== */

.product-page .cart-action-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    min-height: 100px;
    margin: 20px 0;
    border-radius: 15px;
}

.product-page .already-in-cart-mini {
    padding: 15px 0;
    text-align: left;
}

.product-page .already-in-cart-mini p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 15px;
    color: #555;
    font-family: "Montserrat", sans-serif;
    font-size: .95em;
    text-align: center;
}

.product-page .btn-delete-link {
    margin-top: 5px;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    background: #6B5896;
    color: #fff;
    font-family: "Montserrat", sans-serif;
    font-size: .9em;
    cursor: pointer;
    transition: .3s;
}

.product-page .btn-delete-link:hover {
    background: #000;
}

/* ==================================================
   TABLEAUX DANS LA DESCRIPTION
================================================== */

.product-page .desc table {
    width: 100%;
    margin: 25px 0;
    overflow: hidden;
    border: 1px solid rgba(107,88,150,.08);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    background: rgba(255,255,255,.65);
    font-family: "Montserrat", sans-serif;
    font-size: .95em;
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

.product-page .desc table thead {
    background: linear-gradient(
        to right,
        rgba(107,88,150,.08),
        rgba(216,55,190,.06)
    );
}

.product-page .desc table th {
    padding: 16px 18px;
    border-bottom: 1px solid rgba(107,88,150,.08);
    color: #6B5896;
    font-size: .88em;
    font-weight: 600;
    letter-spacing: .4px;
    text-align: left;
}

.product-page .desc table td {
    padding: 15px 18px;
    border-bottom: 1px solid rgba(0,0,0,.05);
    color: #555;
    line-height: 1.6;
}

.product-page .desc table tr:last-child td {
    border-bottom: none;
}

.product-page .desc table td:first-child {
    width: 35%;
    color: #6B5896;
    font-weight: 600;
}

.product-page .desc table tbody tr {
    transition: background .2s ease;
}

.product-page .desc table tbody tr:hover {
    background: rgba(216,55,190,.025);
}

/* ==================================================
   ANIMATION
================================================== */

@keyframes fadeProduct {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

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

/* ==================================================
   PRODUITS ASSOCIÉS
================================================== */

.related-products {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    padding-top: 30px;
    border-top: 1px solid rgba(0,0,0,.08);
}

.related-products h2 {
    margin-bottom: 20px;
    color: #d837be;
    font-family: "Montserrat", sans-serif;
    text-align: center;
}

.related-products .produits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.related-products .produit {
    min-width: 0;
    padding: 5px;
    border-radius: 10px;
    background: rgba(255,255,255,.6);
    transition: all .3s ease;
}

.related-products .produit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
}

.related-products .produit a.card {
    display: block;
    color: inherit;
    text-decoration: none;
}

.related-products .produit .image {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    background-position: center;
    background-size: cover;
}

.related-products .produit h3 {
    display: -webkit-box;
    margin: 8px 0 5px;
    overflow: hidden;
    color: #333;
    font-family: "Montserrat", sans-serif;
    font-size: .95em;
    line-height: 1.3em;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-products .produit .prix {
    color: #6B5896;
    font-family: "Libre Caslon Text", serif;
    font-size: .95em;
}

.related-products .voir-boutique {
    display: block;
    width: fit-content;
    margin: 20px auto;
    padding: 10px 20px;
    border-radius: 30px;
    background: #6B5896;
    color: #fff;
    text-decoration: none;
    transition: .3s;
}

.related-products .voir-boutique:hover {
    background: #d837be;
}

/* ==================================================
   RESPONSIVE - TABLETTES
================================================== */

@media screen and (max-width: 980px) {

    .product-page {
        gap: 25px;
    }

    .product-page .images {
        position: relative;
        top: auto;
        flex: 0 0 40%;
        max-width: 40%;
    }
}

/* ==================================================
   RESPONSIVE - MOBILES
================================================== */

@media screen and (max-width: 680px) {

    .product-page {
        display: block;
        padding: 10px;
    }

    .product-page .images {
        position: relative;
        top: auto;
        width: 100%;
        max-width: 100%;
        padding: 10px 0;
    }

    .product-page .main-image {
        width: 100%;
        padding: 0;
    }

    .product-page .main-image img {
        display: block;
        width: 100%;
        max-width: 500px;
        height: auto !important;
        object-fit: contain;
        margin: 0 auto;
    }

    .product-page .thumbnails {
        justify-content: center;
    }

    .product-page .desc {
        width: 100%;
        padding: 10px;
    }

    .product-page h1 {
        font-size: 1.7em;
    }

    .product-page select,
    .product-page input[type="text"],
    .product-page textarea,
    .product-page input[type="submit"] {
        width: 100%;
        max-width: 100%;
    }

    .product-page .desc table,
    .product-page .desc table tbody,
    .product-page .desc table tr,
    .product-page .desc table td {
        display: block;
        width: 100%;
    }

    .product-page .desc table thead {
        display: none;
    }

    .product-page .desc table {
        padding: 10px 15px;
    }

    .product-page .desc table tr {
        padding: 10px 0;
    }

    .product-page .desc table td {
        padding: 8px 0;
        border: none;
    }

    .product-page .desc table td:first-child {
        margin-top: 12px;
        color: #d837be;
        font-weight: bold;
    }

    .related-products {
        padding: 20px 10px;
    }

    .related-products .produits {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ==================================================
   RESPONSIVE - PETITS MOBILES
================================================== */

@media screen and (max-width: 500px) {

    .related-products .produits {
        grid-template-columns: 1fr;
    }
}

/* ==================================================
   ACCESSIBILITÉ
================================================== */

@media (prefers-reduced-motion: reduce) {

    .product-page *,
    .related-products * {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
