:root {
    --bg-main: #F5F7FB;
    --bg-card: #FFFFFF;
    --text-main: #111827;
    --accent: #1D4ED8;
    --accent-dark: #1E3A8A;
    --accent-yellow: #FACC15;
    --border-soft: #E5E7EB;
    --radius-l: 18px;
    --radius-m: 12px;
    --shadow-soft: 0 8px 20px rgba(15,23,42,0.06);
    --transition-fast: 0.2s ease;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.breadcrumb {
    font-size: 11px;
    color: #6B7280;
    margin-bottom: 16px;
}

.breadcrumb a {
    text-decoration: underline;
    text-underline-offset: 2px;
    color: #2563EB;
}

.breadcrumb a:hover {
    color: var(--accent-dark);
}

/* Layout produit */
.product-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

/* === GALERIE D'IMAGES === */
.product-gallery {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}

.main-image {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-m);
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid var(--border-soft);
}

.main-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
}

.thumbnail {
    aspect-ratio: 4/3;
    border-radius: 8px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.thumbnail:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.thumbnail.active {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.thumbnail img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.no-images {
    padding: 40px;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

/* === INFOS PRODUIT === */
.product-info {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #6B7280;
    margin-bottom: 8px;
}

.product-title {
    margin: 0 0 16px;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.product-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 8px;
}

.price-note {
    font-size: 12px;
    color: #6B7280;
    margin-bottom: 24px;
}

/* === SÉLECTEUR DE VARIANTES === */
.variants-section {
    margin-bottom: 24px;
    padding: 16px;
    background: #F9FAFB;
    border-radius: var(--radius-m);
    border: 1px solid var(--border-soft);
}

.variants-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
    display: block;
}

.variants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.variant-option {
    padding: 12px 16px;
    border: 2px solid var(--border-soft);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    position: relative;
}

.variant-option:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(29, 78, 216, 0.1);
}

.variant-option.active {
    border-color: var(--accent);
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.1);
}

.variant-option.active::after {
    content: "✓";
    position: absolute;
    top: 4px;
    right: 6px;
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
}

.variant-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.variant-price {
    font-size: 12px;
    color: #6B7280;
}

.variant-option.active .variant-name {
    color: var(--accent);
}

/* === ACTIONS === */
.product-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-add-cart {
    width: 100%;
    padding: 16px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-soft);
}

.btn-add-cart:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(29, 78, 216, 0.2);
}

.btn-quote {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-quote:hover {
    background: var(--accent);
    color: white;
}

/* === CARACTÉRISTIQUES === */
.characteristics-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
}

.characteristics-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 16px;
}

.characteristics-table {
    width: 100%;
    border-collapse: collapse;
}

.characteristics-table th,
.characteristics-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
}

.characteristics-table th {
    background: #F9FAFB;
    font-weight: 600;
    color: #6B7280;
    font-size: 13px;
    width: 35%;
}

.characteristics-table td {
    color: var(--text-main);
    font-size: 14px;
}

.characteristics-table tr:last-child th,
.characteristics-table tr:last-child td {
    border-bottom: none;
}

.no-characteristics {
    padding: 16px;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}
/* ✅ Bouton produit indisponible */
.btn-unavailable {
    width: 100%;
    padding: 16px 24px;
    background-color: #9ca3af;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.8;
    text-align: center;
}

.btn-unavailable:hover {
    background-color: #9ca3af;
    transform: none;
}


/* === RESPONSIVE === */
@media (max-width: 768px) {
    .product-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .product-title {
        font-size: 22px;
    }
    
    .product-price {
        font-size: 26px;
    }
    
    .variants-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }
    
    .thumbnails {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Skeleton loader pour le chargement AJAX */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}