/* ===========================================
   HOLDON - CSS CONFIGURATEUR
   =========================================== */

/* Variables */
.holdon-options,
.holdon-gallery,
.holdon-archive-cart {
    --holdon-primary: #2A3138;
    --holdon-accent: #8B6914;
    --holdon-border: #2A3138;
    --holdon-bg: #FDF9F3;
    --holdon-radius: 0px;
}

/* === STRUCTURE === */
.holdon-options { font-family: inherit; }
.holdon-option-group { margin-bottom: 1.5rem; }
.holdon-option-label {
    display: block;
    font-weight: 500;
    font-size: 1.1rem;
    color: var(--holdon-accent);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.holdon-option-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* === TAILLE (boutons carres) === */
.holdon-tailles { gap: 0.75rem; }
.holdon-taille-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--holdon-border);
    border-radius: var(--holdon-radius);
    background: var(--holdon-primary);
    color: var(--holdon-bg);
    cursor: pointer;
    transition: all 0.2s;
}
.holdon-taille-btn .holdon-btn-label {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
}
.holdon-taille-btn:hover {
    opacity: 0.85;
}
.holdon-taille-btn.active {
    background: var(--holdon-bg);
    color: var(--holdon-accent);
    border-color: var(--holdon-accent);
}

/* Ligne dimensions sous taille */
.holdon-dimensions-line {
    margin-top: 0.75rem;
    font-size: 1.4rem;
    color: #666;
}
.holdon-dimensions-label {
    color: var(--holdon-accent);
}
.holdon-dimensions-value {
    margin-left: 0.25rem;
}

/* === ENTRAXE === */
.holdon-entraxes { gap: 0.5rem; }
.holdon-entraxe-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    aspect-ratio: 1;
    padding: 0;
    border: 1px solid var(--holdon-border);
    border-radius: var(--holdon-radius);
    background: var(--holdon-primary);
    color: var(--holdon-bg);
    cursor: pointer;
    transition: all 0.2s;
}
.holdon-entraxe-btn .holdon-btn-label {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}
.holdon-entraxe-btn:hover:not(.disabled) {
    opacity: 0.85;
}
.holdon-entraxe-btn.active {
    background: var(--holdon-bg);
    color: var(--holdon-accent);
    border-color: var(--holdon-accent);
}
.holdon-entraxe-btn.disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

/* === MATIERE === */
.holdon-matieres {
    gap: 1rem;
}
.holdon-matiere-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.holdon-matiere-btn {
    display: block;
    width: 90px;
    height: 90px;
    padding: 0;
    border: none;
    border-radius: var(--holdon-radius);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.holdon-matiere-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.holdon-matiere-btn:hover img {
    transform: scale(1.15);
}
.holdon-matiere-btn.active {
    box-shadow: 0 0 0 2px var(--holdon-primary);
}
.holdon-matiere-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d4af37 0%, #967017 100%);
}
.holdon-matiere-label {
    font-size: 1.2rem;
    color: var(--holdon-primary);
    text-align: center;
    line-height: 1.4;
}
.holdon-matiere-description {
    margin-top: 1rem;
    font-size: 1.4rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    min-height: 1.2em;
}

/* === FINITION === */
.holdon-finitions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.holdon-finition-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.holdon-finition-item.filtered {
    display: none;
}
.holdon-finition-btn {
    display: block;
    width: 90px;
    height: 90px;
    padding: 0;
    border: none;
    border-radius: var(--holdon-radius);
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.holdon-finition-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.holdon-finition-btn:hover img {
    transform: scale(1.15);
}
.holdon-finition-btn.active {
    box-shadow: 0 0 0 2px var(--holdon-primary);
}
.holdon-finition-placeholder {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #b8860b 0%, #8B6914 100%);
}
.holdon-finition-label {
    font-size: 1.2rem;
    color: var(--holdon-primary);
    text-align: center;
    max-width: 100px;
    line-height: 1.4;
}
.holdon-finition-description {
    margin-top: 1rem;
    font-size: 1.4rem;
    color: #666;
    font-style: italic;
    line-height: 1.4;
    min-height: 1.2em;
}

/* === PRIX === */
.holdon-price-wrapper {
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #e5e5e5;
}
.holdon-price-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--holdon-primary);
}
.holdon-price-value.loading {
    opacity: 0.5;
}

/* === PANIER === */
.holdon-cart-wrapper {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}
.holdon-quantity {
    display: flex;
    align-items: center;
    gap: 0;
}
.holdon-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--holdon-accent);
    color: var(--holdon-bg);
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 1;
    text-align: center;
    transition: opacity 0.2s;
}
.holdon-qty-btn:hover {
    opacity: 0.85;
}
.holdon-qty-input {
    width: 50px;
    height: 36px;
    border: 1px solid var(--holdon-border);
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--holdon-accent);
    background: var(--holdon-bg);
    -moz-appearance: textfield;
}
.holdon-qty-input::-webkit-outer-spin-button,
.holdon-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.holdon-add-to-cart-btn {
    min-width: 200px;
    max-width: 280px;
    height: 36px;
    padding: 0 2rem;
    border: none;
    border-radius: 4px;
    background: var(--holdon-accent);
    color: #fff;
    font-weight: 600;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}
.holdon-add-to-cart-btn:hover:not(:disabled) {
    background: var(--holdon-primary);
}
.holdon-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}
.holdon-add-to-cart-btn.success {
    background: #27ae60;
}

/* Bouton voir panier */
.holdon-view-cart-btn {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--holdon-border);
    background: var(--holdon-bg);
    color: var(--holdon-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}
.holdon-view-cart-btn:hover {
    background: var(--holdon-primary);
    color: var(--holdon-bg);
}
.holdon-view-cart-btn svg {
    width: 18px;
    height: 18px;
}
.holdon-cart-count {
    background: var(--holdon-accent);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* === GALERIE === */
.holdon-gallery {
    position: relative;
}
.holdon-gallery-main {
    position: relative;
    background: var(--holdon-bg);
    overflow: hidden;
    margin-bottom: 0.75rem;
    cursor: pointer;
}
.holdon-gallery-main-img {
    width: 100%;
    height: auto;
    display: block;
}
.holdon-gallery-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: var(--holdon-accent);
    border-radius: 50%;
    animation: holdon-spin 0.8s linear infinite;
}
.holdon-gallery-loader.active {
    display: block;
}
@keyframes holdon-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}
.holdon-gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.holdon-gallery-thumb {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s;
}
.holdon-gallery-thumb:hover {
    border-color: var(--holdon-accent);
}
.holdon-gallery-thumb.active {
    border-color: var(--holdon-primary);
}
.holdon-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === LIGHTBOX === */
.holdon-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.holdon-lightbox.active {
    opacity: 1;
    visibility: visible;
}
.holdon-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}
.holdon-lightbox-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}
.holdon-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}
.holdon-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}
.holdon-lightbox-nav:hover {
    background: rgba(255,255,255,0.2);
}
.holdon-lightbox-prev {
    left: -70px;
}
.holdon-lightbox-next {
    right: -70px;
}
.holdon-lightbox-counter {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.9rem;
}

/* === SPECS === */
.holdon-spec { display: inline; }
.holdon-spec-label { font-weight: 600; color: var(--holdon-accent); }

/* === RESPONSIVE === */
@media (max-width: 600px) {
    .holdon-cart-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    .holdon-quantity {
        justify-content: center;
    }
    .holdon-add-to-cart-btn {
        max-width: none;
        width: 100%;
    }
    .holdon-view-cart-btn {
        justify-content: center;
    }
    .holdon-taille-btn {
        width: 50px;
        height: 50px;
    }
    .holdon-taille-btn .holdon-btn-label {
        font-size: 1.5rem;
    }
    .holdon-entraxe-btn {
        width: 48px;
        height: 48px;
    }
    .holdon-matiere-btn,
    .holdon-finition-btn {
        width: 65px;
        height: 65px;
    }
    .holdon-lightbox-nav {
        display: none;
    }
}