/* ================================================
   ALHIDAYA — Styles Fiche Produit
   ================================================ */

/* ================================================
   LAYOUT
   ================================================ */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding: 40px 0 60px;
    align-items: start;
}

/* ================================================
   IMAGES
   ================================================ */
.detail-images {
    position: sticky;
    top: 90px;
}

.main-img-frame {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 20px;
    height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    margin-bottom: 14px;
    padding: 20px;
}

.main-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform 0.3s;
}

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

.main-img-placeholder {
    font-size: 80px;
    color: var(--border);
}

.detail-tag {
    position: absolute;
    top: 14px; left: 14px;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
}

.tag-promo { background: #e53e3e; color: white; }
.tag-vedette { background: var(--gold); color: white; }

.thumbnails {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.thumb {
    width: 72px;
    height: 72px;
    border: 2px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    background: #fafafa;
    transition: border-color 0.15s;
}

.thumb:hover { border-color: var(--teal-mid); }
.thumb.active { border-color: var(--teal); }

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* ================================================
   INFOS PRODUIT
   ================================================ */
.detail-infos {
    display: flex;
    flex-direction: column;
}

.detail-cat {
    font-size: 12px;
    color: var(--teal);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    display: block;
    margin-bottom: 8px;
}

.detail-cat:hover { color: var(--teal-dark); }

.detail-titre {
    font-family: 'Cormorant Garamond', serif;
    font-size: 34px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 14px;
}

.detail-prix {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 12px;
}

.detail-prix-now {
    font-size: 30px;
    font-weight: 700;
    color: var(--teal-dark);
}

.detail-prix-old {
    font-size: 18px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.detail-prix-badge {
    background: #e53e3e;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

.detail-stock { margin-bottom: 16px; }

.stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 20px;
}

.stock-ok { background: #eafde8; color: #1a6b1a; }
.stock-low { background: #fff3e0; color: #e65100; }
.stock-out { background: #fde8e8; color: #e53e3e; }

.detail-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

/* Infos livre */
.detail-livre-infos {
    background: var(--warm-gray);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 18px;
}

.livre-info-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.livre-infos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.livre-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.livre-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.livre-info-val {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}

/* Variantes */
.detail-variantes { margin-bottom: 18px; }

.variante-groupe { margin-bottom: 14px; }

.variante-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 8px;
}

.variante-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.variante-btn {
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: white;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.variante-btn:hover { border-color: var(--teal); color: var(--teal); }
.variante-btn.active {
    border-color: var(--teal);
    color: var(--teal);
    background: var(--teal-light);
    font-weight: 500;
}

/* Quantité */
.detail-qty {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.qty-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.qty-ctrl {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: var(--warm-gray);
    border: none;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    font-family: inherit;
}

.qty-btn:hover { background: var(--teal-light); color: var(--teal); }

.qty-val {
    width: 52px;
    height: 40px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    border: none;
    outline: none;
    font-family: inherit;
}

/* Actions */
.detail-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-panier {
    flex: 1;
    background: linear-gradient(135deg, var(--teal), var(--teal-dark));
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-panier:hover { opacity: 0.88; }
.btn-panier:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 1;
}

.btn-wishlist {
    width: 52px;
    height: 52px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: white;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}

.btn-wishlist:hover {
    border-color: #e53e3e;
    color: #e53e3e;
}

/* Garanties */
.detail-garanties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 18px;
    background: var(--warm-gray);
    border-radius: 14px;
}

.garantie-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.garantie-item i {
    font-size: 20px;
    color: var(--teal);
    flex-shrink: 0;
}

.garantie-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text);
}

.garantie-sub {
    font-size: 11px;
    color: var(--text-muted);
}

/* ================================================
   PRODUITS SIMILAIRES
   ================================================ */
.similaires-section {
    padding: 40px 0 60px;
    border-top: 1px solid var(--border);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 30px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

.text-teal { color: var(--teal); }

.see-all-link {
    font-size: 13px;
    color: var(--teal);
    text-decoration: none;
    font-weight: 500;
}

.see-all-link:hover { text-decoration: underline; }

/* ================================================
   TOAST NOTIFICATION
   ================================================ */
.toast-notif {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--blue-dark);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(26,143,130,0.4);
    z-index: 9999;
    opacity: 0;
    transition: transform 0.35s, opacity 0.35s;
    white-space: nowrap;
}

.toast-notif.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 991px) {
    .detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 30px 0 40px;
    }
    .detail-images { position: static; }
    .main-img-frame { height: 300px; }
    .detail-titre { font-size: 26px; }
    .detail-prix-now { font-size: 24px; }
}

@media (max-width: 576px) {
    .detail-garanties { grid-template-columns: 1fr; }
    .livre-infos-grid { grid-template-columns: 1fr; }
    .main-img-frame { height: 240px; }
}