/* =====================================================
   ProductDetails.aspx — product-details.css
   Harmonisé avec Products.aspx (espacements, boutons, breakpoints)
   Paliers: <768px | 769–1199px | 1200px+
   ===================================================== */

/* ---------- Conteneur page ---------- */
.page--product-details{
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem; /* mobile: 1rem */
}

@media (min-width: 769px){
    .page--product-details{
        padding: 2rem 2rem 3rem; /* comme Products.aspx */
    }
}

/* ---------- Carte principale ---------- */
.page--product-details .product-card{
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.75rem;

    border-radius: 1rem;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 1.25rem;
}

/* 769–1199 : 2 colonnes */
@media (min-width: 769px) and (max-width: 1199px){
    .page--product-details .product-card{
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.35fr);
        align-items: start;
        gap: 2.25rem;
        padding: 2rem;
    }
}

/* 1200+ : un peu plus d’air */
@media (min-width: 1200px){
    .page--product-details .product-card{
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.55fr);
        padding: 2.25rem;
        gap: 2.75rem;
    }
}

/* ---------- Colonne image ---------- */
.page--product-details .product-card__media{
    display: flex;
    align-items: center;
    justify-content: center;
}

.page--product-details .product-card__media .image__container{
    width: 100%;
    max-width: 360px;
}

@media (min-width: 1200px){
    .page--product-details .product-card__media .image__container{
        max-width: 420px;
    }
}

.page--product-details .product-image{
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 0.75rem;
}

/* ---------- Colonne détails ---------- */
.page--product-details .product-card__details{
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

/* Rangée devise (CAD/USD) */
.page--product-details .product-details__price-row{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Harmonisé avec Products.aspx */
.page--product-details .currency-toggle{
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.page--product-details .currency-toggle__label{
    font-size: 0.95rem;
    color: #555;
}
.page--product-details .currency-toggle__btn{
    width: 70px;
    height: auto;
    border: none;
    padding: 0;
    margin: 0;
    background: none;
    cursor: pointer;
}

/* ---------- Titre + format ---------- */
.page--product-details .product__title{
    margin: 0.25rem 0 0;
    font-weight: 750;
    line-height: 1.15;
    color: var(--logoBlack, #111);
    font-size: clamp(1.35rem, 2.3vw, 1.75rem);
}

.page--product-details .product__format{
    margin: 0.1rem 0 0.35rem;
    font-size: 1rem;
    color: #555;
}
.page--product-details .product__format-label{
    font-weight: 700;
    margin-right: 0.25rem;
}
.page--product-details .product__format-value{
    font-weight: 500;
}

/* ---------- Bloc prix (sobre, moderne) ---------- */
.page--product-details .product-pricing{
    margin-top: 0.35rem;
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.08);
    font-variant-numeric: tabular-nums;
}

.page--product-details .product__price-line{
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
    line-height: 1.25;
}

.page--product-details .product__price-label{
    font-weight: 700;
}

.page--product-details .product__pricetag{
    font-weight: 800;
    font-size: 1.25rem;
}

.page--product-details .product__price-line--special .product__price-label,
.page--product-details .product__price--special{
    color: var(--logoRed, #d41f26);
}

.page--product-details .product__price--special{
    font-weight: 800;
    font-size: 1.2rem;
}

.page--product-details .product__price-line--dates{
    margin-top: 0.15rem;
    font-size: 0.95rem;
    color: #666;
}

.page--product-details .product__price--special-date{
    font-weight: 600;
}

/* ---------- Disponibilité (pills) ---------- */
.page--product-details .product-status{
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page--product-details .product__status{
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 750;
    font-size: 0.98rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(0,0,0,0.02);
}

.page--product-details .product__status--ok{
    color: #0a8a2a;
    border-color: rgba(10,138,42,0.25);
    background: rgba(10,138,42,0.06);
}

.page--product-details .product__status--na{
    color: #b00020;
    border-color: rgba(176,0,32,0.25);
    background: rgba(176,0,32,0.06);
}

/* ---------- Quantité + Ajouter au panier ---------- */
.page--product-details .product-actions{
    margin-top: 0.9rem;
    padding-top: 1.05rem;
    border-top: 1px solid rgba(0,0,0,0.08);
}

.page--product-details .product-actions__inner{
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.page--product-details .product-qty{
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.page--product-details .product-qty__label{
    font-weight: 700;
    color: #111;
    white-space: nowrap;
}

.page--product-details .product-qty__controls{
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.14);
    background: #fff;
    overflow: hidden;
}

.page--product-details .product-qty__btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    text-decoration: none !important;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.25rem;
    user-select: none;
    color: #111 !important;
}

@media (hover:hover){
    .page--product-details .product-qty__btn:hover{
        background: rgba(0,0,0,0.05);
    }
}

.page--product-details .product-qty__value{
    display: inline-block;
    min-width: 2.75rem;
    text-align: center;
    font-weight: 750;
    font-size: 1.05rem;
    padding: 0 0.55rem;
    color: #111;
}

/* Ring focus cohérent */
.page--product-details .product-qty__controls:focus-within{
    border-color: rgba(212,31,38,0.55);
    box-shadow: 0 0 0 3px rgba(212,31,38,0.18);
}

/* Bouton "Ajouter au panier" : on s'appuie sur site.css (.button--primary) mais on fixe la hauteur */
.page--product-details .product-actions .button.button--primary{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.65rem;
    padding-inline: 1.6rem;
    white-space: nowrap;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px){
    .page--product-details .product-details__price-row{
        flex-wrap: wrap;
        justify-content: flex-start;
    }
}

@media (max-width: 575.98px){
    .page--product-details .product-card{
        padding: 1.1rem;
    }

    .page--product-details .product-actions__inner{
        flex-direction: column;
        align-items: stretch;
    }

    .page--product-details .product-actions .button.button--primary{
        width: 100%;
        text-align: center;
    }
}

/* ---------- Accessibilité / motion ---------- */
.page--product-details a:focus-visible,
.page--product-details button:focus-visible,
.page--product-details input:focus-visible{
    outline: 3px solid rgba(212,31,38,0.45);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce){
    .page--product-details *{
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}

/* =========================
   Prix – harmoniser avec Products.aspx
   ========================= */

/* Prix régulier (desktop + variantes mobile si présentes) */
.product__price-line .product__pricetag,
.product-details__price-regular {
    color: #d41f26;
    font-weight: 700;
}

/* Libellé "Spécial" (si utilisé sur ProductDetails) */
.product-details__price-label {
    color: #d41f26;
    font-weight: 600;
}

/* Prix spécial */
.product-details__price-special {
    color: #d41f26;
    font-weight: 700;
}

/* Ancien prix barré (si spécial) */
.product-details__price-regular--old {
    color: #333;
    text-decoration: line-through;
    opacity: 0.7;
}

