/* =========================================================
   AGAPE SHOP
   FICHE PRODUIT
========================================================= */

.product-page {
    width: min(calc(100% - 40px), 1200px);
    margin: 0 auto;
    padding: 30px 0 70px;
}


/* =========================================================
   BREADCRUMB
========================================================= */

.product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    margin-bottom: 25px;

    color: #64748b;
    font-size: 0.8rem;
}

.product-breadcrumb a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 600;
}

.product-breadcrumb a:hover {
    text-decoration: underline;
}

.product-breadcrumb strong {
    color: #374151;
}


/* =========================================================
   CONTENEUR PRODUIT
========================================================= */

.product-detail {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(400px, 0.95fr);

    gap: 55px;

    padding: 30px;

    background: #ffffff;

    border: 1px solid #e5e7eb;

    border-radius: 18px;

    box-shadow:
        0 8px 30px rgba(
            15,
            23,
            42,
            0.07
        );
}


/* =========================================================
   GALERIE
========================================================= */

.product-gallery {
    min-width: 0;
}

.product-main-image {
    width: 100%;

    aspect-ratio: 1 / 1;

    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f8fafc;

    border-radius: 14px;

    border: 1px solid #e5e7eb;
}

.product-main-image img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    transition:
        transform 0.3s ease;
}

.product-main-image:hover img {
    transform: scale(1.025);
}


/* =========================================================
   PAS D'IMAGE
========================================================= */

.product-no-image {
    width: 100%;
    height: 100%;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    color: #94a3b8;
}

.product-no-image span {
    font-size: 4rem;
}

.product-no-image p {
    margin: 10px 0 0;

    font-size: 0.9rem;
}


/* =========================================================
   MINIATURES
========================================================= */

.product-thumbnails {
    display: flex;

    gap: 10px;

    margin-top: 14px;

    overflow-x: auto;

    padding-bottom: 4px;
}

.product-thumbnail {
    flex: 0 0 72px;

    width: 72px;
    height: 72px;

    padding: 3px;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;

    cursor: pointer;

    overflow: hidden;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    border-color: #2563eb;

    box-shadow:
        0 0 0 2px rgba(
            37,
            99,
            235,
            0.12
        );
}

.product-thumbnail img {
    width: 100%;
    height: 100%;

    object-fit: cover;

    border-radius: 6px;
}


/* =========================================================
   DÉTAILS
========================================================= */

.product-details {
    display: flex;

    flex-direction: column;

    min-width: 0;
}


/* =========================================================
   CATÉGORIE
========================================================= */

.product-category {
    display: inline-block;

    margin-bottom: 10px;

    color: #2563eb;

    font-size: 0.75rem;

    font-weight: 800;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    text-decoration: none;
}

.product-category:hover {
    text-decoration: underline;
}


/* =========================================================
   TITRE
========================================================= */

.product-details h1 {
    margin: 0 0 18px;

    color: #111827;

    font-size: clamp(
        1.7rem,
        3vw,
        2.35rem
    );

    line-height: 1.2;

    font-weight: 800;
}


/* =========================================================
   PRIX
========================================================= */

.product-detail-price {
    margin-bottom: 15px;

    color: #111827;

    font-size: 1.9rem;

    line-height: 1;

    font-weight: 850;
}

.product-detail-price span {
    font-size: 1.1rem;

    font-weight: 700;
}


/* =========================================================
   STOCK
========================================================= */

.product-stock-detail {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    width: fit-content;

    margin-bottom: 25px;

    padding: 8px 12px;

    border-radius: 8px;

    font-size: 0.82rem;

    font-weight: 700;
}

.product-stock-detail.available {
    background: #ecfdf5;

    color: #047857;

    border: 1px solid #a7f3d0;
}

.product-stock-detail.unavailable {
    background: #fef2f2;

    color: #b91c1c;

    border: 1px solid #fecaca;
}

.stock-dot {
    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: currentColor;
}

.product-stock-detail small {
    font-size: 0.75rem;
}


/* =========================================================
   DESCRIPTION
========================================================= */

.product-description-detail {
    padding: 22px 0;

    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;

    margin-bottom: 22px;
}

.product-description-detail h2,
.product-variants h2 {
    margin: 0 0 10px;

    color: #111827;

    font-size: 1rem;

    font-weight: 750;
}

.product-description-detail p {
    margin: 0;

    color: #64748b;

    font-size: 0.9rem;

    line-height: 1.75;
}


/* =========================================================
   VARIANTES
========================================================= */

.product-variants {
    margin-bottom: 22px;
}

.product-variant-list {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;
}

.product-variant {
    cursor: pointer;
}

.product-variant input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.product-variant span {
    display: block;

    padding: 9px 14px;

    border: 1px solid #d1d5db;

    border-radius: 8px;

    background: #ffffff;

    color: #374151;

    font-size: 0.82rem;

    font-weight: 600;
}

.product-variant input:checked + span {
    border-color: #2563eb;

    background: #eff6ff;

    color: #2563eb;
}


/* =========================================================
   ACHAT
========================================================= */

.product-buy-form {
    display: flex;

    align-items: flex-end;

    gap: 12px;

    margin-bottom: 25px;
}

.product-quantity {
    flex-shrink: 0;
}

.product-quantity label {
    display: block;

    margin-bottom: 7px;

    color: #374151;

    font-size: 0.78rem;

    font-weight: 700;
}

.quantity-control {
    height: 48px;

    display: flex;

    align-items: center;

    overflow: hidden;

    border: 1px solid #d1d5db;

    border-radius: 9px;

    background: #ffffff;
}

.quantity-button {
    width: 40px;
    height: 100%;

    border: none;

    background: #f8fafc;

    color: #374151;

    font-size: 1.2rem;

    cursor: pointer;
}

.quantity-button:hover {
    background: #eff6ff;

    color: #2563eb;
}

.quantity-control input {
    width: 45px;
    height: 100%;

    border: none;

    outline: none;

    text-align: center;

    color: #111827;

    font-weight: 700;

    background: #ffffff;
}

.product-add-cart {
    flex: 1;

    min-height: 48px;

    padding: 0 20px;

    border: none;

    border-radius: 9px;

    background: #2563eb;

    color: #ffffff;

    font-size: 0.9rem;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 5px 14px rgba(
            37,
            99,
            235,
            0.25
        );

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.product-add-cart:hover {
    background: #1d4ed8;

    transform: translateY(-2px);
}

.product-add-cart.disabled {
    background: #94a3b8;

    box-shadow: none;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   AVANTAGES
========================================================= */

.product-benefits {
    display: flex;

    flex-direction: column;

    gap: 10px;

    padding-top: 20px;

    border-top: 1px solid #e5e7eb;
}

.product-benefit {
    display: flex;

    align-items: center;

    gap: 10px;
}

.product-benefit > span {
    width: 25px;
    height: 25px;

    flex-shrink: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #ecfdf5;

    color: #047857;

    font-size: 0.75rem;

    font-weight: 800;
}

.product-benefit div {
    display: flex;

    flex-direction: column;

    gap: 2px;
}

.product-benefit strong {
    color: #374151;

    font-size: 0.78rem;
}

.product-benefit small {
    color: #94a3b8;

    font-size: 0.7rem;
}


/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 900px) {

    .product-detail {
        grid-template-columns: 1fr;

        gap: 35px;

        padding: 22px;
    }

    .product-main-image {
        max-height: 600px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .product-page {
        width: calc(100% - 24px);

        padding-top: 20px;
    }

    .product-breadcrumb {
        font-size: 0.7rem;

        margin-bottom: 15px;
    }

    .product-detail {
        gap: 25px;

        padding: 15px;

        border-radius: 13px;
    }

    .product-details h1 {
        font-size: 1.45rem;
    }

    .product-detail-price {
        font-size: 1.55rem;
    }

    .product-buy-form {
        align-items: stretch;

        flex-direction: column;
    }

    .quantity-control {
        width: 100%;
    }

    .quantity-button {
        width: 50px;
    }

    .quantity-control input {
        flex: 1;
    }

    .product-add-cart {
        width: 100%;
    }

}

/* =========================================================
   BOUTON FAVORI
========================================================= */

.product-card-image {
    position: relative;
}

.product-wishlist-form {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
    margin: 0;
}

.product-wishlist-button {
    width: 42px;
    height: 42px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #e5e7eb;
    border-radius: 50%;

    background: rgba(255, 255, 255, .96);

    color: #6b7280;

    font-size: 26px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 3px 12px rgba(0, 0, 0, .12);

    transition:
        transform .2s ease,
        color .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.product-wishlist-button:hover {
    transform: scale(1.08);

    color: #dc2626;

    border-color: #fecaca;

    background: #ffffff;
}

.product-wishlist-button.is-favorite {
    color: #dc2626;

    border-color: #fecaca;

    background: #fff5f5;
}

.product-wishlist-button.is-favorite:hover {
    color: #b91c1c;

    background: #ffffff;
}