/* ============================================
   Produit Detail Page - Volyma
   ============================================ */

/* Breadcrumb */
.produit-breadcrumb {
    padding: 120px 0 0;
}

.produit-breadcrumb .container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.produit-breadcrumb a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.2s;
}

.produit-breadcrumb a:hover {
    color: var(--primary);
}

.produit-breadcrumb svg {
    opacity: 0.4;
    flex-shrink: 0;
}

.produit-breadcrumb span {
    color: var(--text);
    font-weight: 500;
}

/* Product Detail Section */
.produit-detail {
    padding: 40px 0 60px;
}

.produit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

/* Gallery */
.produit-gallery {
    position: sticky;
    top: 100px;
    max-width: 480px;
}

.gallery-main {
    background: var(--surface);
    border-radius: 20px;
    aspect-ratio: 1;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(30, 66, 148, 0.06);
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    transition: transform 0.3s ease, opacity 0.15s ease;
}

.gallery-main:hover img {
    transform: scale(1.03);
}

/* Thumbnails */
.gallery-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.gallery-thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    flex-shrink: 0;
    opacity: 0.6;
}

.gallery-thumb:hover {
    opacity: 0.9;
    border-color: rgba(30, 66, 148, 0.2);
}

.gallery-thumb.active {
    border-color: var(--primary);
    opacity: 1;
    box-shadow: 0 2px 8px rgba(30, 66, 148, 0.15);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--primary);
    opacity: 0.4;
}

.gallery-placeholder span {
    font-size: 1rem;
    font-weight: 500;
}

.produit-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    z-index: 2;
}

/* Product Info */
.produit-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.produit-category-link {
    display: inline-block;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
    transition: opacity 0.2s;
}

.produit-category-link:hover {
    opacity: 0.7;
}

.produit-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Price Block */
.produit-price-block {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 16px;
}

.produit-price-block .produit-price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.produit-tva {
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Stock Status */
.produit-stock {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 28px;
    padding: 10px 16px;
    border-radius: 10px;
    width: fit-content;
}

.stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.stock-ok {
    background: rgba(34, 197, 94, 0.08);
    color: #16a34a;
}

.stock-ok .stock-dot {
    background: #22c55e;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

.stock-low {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}

.stock-low .stock-dot {
    background: #f59e0b;
    box-shadow: 0 0 6px rgba(245, 158, 11, 0.4);
}

.stock-out {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.stock-out .stock-dot {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.4);
}

/* Description */
.produit-description {
    margin-bottom: 28px;
}

.produit-description h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 10px;
}

.produit-description p {
    color: var(--text-light);
    line-height: 1.75;
    font-size: 0.95rem;
}

/* Specs */
.produit-specs {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid rgba(30, 66, 148, 0.06);
    margin-bottom: 28px;
}

.spec {
    display: flex;
    align-items: center;
    gap: 14px;
}

.spec svg {
    color: var(--primary);
    flex-shrink: 0;
    opacity: 0.7;
}

.spec strong {
    display: block;
    font-size: 0.9rem;
    color: var(--text);
    font-weight: 600;
}

.spec span {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Action Buttons */
.produit-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-commander {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Lexend', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-commander:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 66, 148, 0.25);
}

.btn-commander.disabled {
    background: #94a3b8;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-devis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    background: transparent;
    color: var(--primary);
    border: 2px solid rgba(30, 66, 148, 0.2);
    border-radius: 12px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-devis:hover {
    border-color: var(--primary);
    background: rgba(30, 66, 148, 0.04);
    transform: translateY(-1px);
}

/* Produits Similaires */
.produit-similaires {
    padding: 60px 0;
    background: var(--surface);
}

.produit-similaires h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 32px;
}

.similaires-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.sim-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sim-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(30, 66, 148, 0.12);
}

.sim-card .product-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
}

.sim-card .product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: auto;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 1024px) {
    .produit-grid {
        gap: 40px;
    }

    .produit-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .produit-breadcrumb {
        padding: 100px 0 0;
    }

    .produit-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .produit-gallery {
        position: static;
    }

    .gallery-main {
        aspect-ratio: 4/3;
    }

    .produit-title {
        font-size: 1.6rem;
    }

    .produit-price-block .produit-price {
        font-size: 1.6rem;
    }

    .similaires-grid {
        grid-template-columns: 1fr;
    }

    .produit-similaires h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .produit-detail {
        padding: 24px 0 40px;
    }

    .produit-title {
        font-size: 1.4rem;
    }

    .produit-specs {
        padding: 16px;
    }
}

/* ============================================
   Avis Clients - Product Page
   ============================================ */

/* Rating link under title */
.produit-rating-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 16px;
    transition: color 0.2s;
}
.produit-rating-link:hover { color: var(--primary); }

/* Stars display */
.avis-stars-display { display: flex; gap: 2px; }
.avis-stars-display .star { font-size: 1.2rem; line-height: 1; }
.avis-stars-display.avis-stars-sm .star { font-size: 1rem; }
.star-filled { color: #f59e0b; }
.star-empty { color: #d1d5db; }

/* Section */
.produit-avis {
    padding: 60px 0;
    background: white;
}

.avis-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 12px;
}

.avis-section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text);
}

.avis-count {
    color: var(--text-light);
    font-weight: 400;
    font-size: 1.2rem;
}

.avis-moyenne {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avis-moyenne-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

/* Empty state */
.avis-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}

.avis-empty svg {
    margin-bottom: 16px;
    opacity: 0.3;
}

.avis-empty p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Avis list */
.avis-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 720px;
}

.avis-item {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(30, 66, 148, 0.06);
    transition: box-shadow 0.2s;
}

.avis-item:hover {
    box-shadow: 0 4px 20px rgba(30, 66, 148, 0.06);
}

.avis-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

.avis-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avis-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1e4294, #2d5ac4);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.avis-name {
    display: block;
    font-size: 0.95rem;
    color: var(--text);
}

.avis-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 2px;
}

.avis-comment {
    color: var(--text-light);
    line-height: 1.75;
    font-size: 0.9rem;
    margin: 0;
}

/* ============================================
   Alerte retour en stock
   ============================================ */

.alerte-stock-box {
    background: linear-gradient(135deg, #f0f4ff 0%, #eef1f8 100%);
    border: 1px solid rgba(30, 66, 148, 0.12);
    border-radius: 16px;
    padding: 24px;
}

.alerte-stock-icon {
    width: 44px;
    height: 44px;
    background: rgba(30, 66, 148, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 14px;
}

.alerte-stock-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.alerte-stock-form {
    display: flex;
    gap: 8px;
}

.alerte-stock-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(30, 66, 148, 0.15);
    border-radius: 10px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background: white;
    outline: none;
    transition: border-color 0.2s;
}

.alerte-stock-form input[type="email"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 66, 148, 0.08);
}

.alerte-stock-form button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: 'Lexend', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.alerte-stock-form button:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 66, 148, 0.2);
}

.alerte-stock-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.alerte-stock-msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alerte-stock-msg.alerte-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.alerte-stock-msg.alerte-error {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.15);
}

@media (max-width: 480px) {
    .alerte-stock-form {
        flex-direction: column;
    }

    .alerte-stock-form button {
        justify-content: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .produit-container {
        grid-template-columns: 1fr;
        padding-top: 90px;
        gap: 28px;
    }

    .produit-images {
        order: 1;
    }

    .produit-info {
        order: 2;
    }

    .produit-title {
        font-size: 24px;
    }

    .produit-price {
        font-size: 26px;
    }

    .produit-avis {
        padding: 36px 0;
    }

    .avis-section-header h2 {
        font-size: 1.3rem;
    }

    .avis-item {
        padding: 20px 16px;
    }

    .avis-item-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cta-card {
        padding: 36px 24px;
    }

    .cta-card h2 {
        font-size: 24px;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 12px;
    }

    .cta-buttons .btn-primary,
    .cta-buttons .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .produit-container {
        padding-top: 80px;
        gap: 20px;
    }

    .produit-title {
        font-size: 22px;
    }

    .produit-price {
        font-size: 26px;
    }

    .produit-description {
        font-size: 14px;
    }

    .produit-meta {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .produit-option label {
        font-size: 13px;
    }

    .produit-option select {
        padding: 10px 12px;
        font-size: 14px;
    }

    .quantite-selector button {
        width: 32px;
        height: 32px;
    }

    .quantite-selector input {
        font-size: 14px;
    }

    .btn-add-to-cart {
        padding: 14px 24px;
        font-size: 14px;
    }

    .produit-info-toggle {
        display: block;
        width: 100%;
        padding: 14px;
        background: var(--surface);
        border: none;
        border-radius: 12px;
        text-align: left;
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 8px;
    }

    .produit-specs,
    .produit-garanties {
        padding: 16px;
    }

    .produit-specs h3,
    .produit-garanties h3 {
        font-size: 16px;
    }

    .cta-card {
        padding: 28px 20px;
    }

    .cta-card h2 {
        font-size: 20px;
    }

    .cta-card p {
        font-size: 13px;
    }

    .avis-item {
        padding: 16px 12px;
    }

    .avis-item-text {
        font-size: 14px;
    }

    .avis-form {
        padding: 24px 20px;
    }

    .avis-form h3 {
        font-size: 18px;
    }
}
