/* ===============================================================
   Styles pour le configurateur PC
   =============================================================== */

/* ---------- grille de produits -------------------------------- */
.pc-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 40px;
}

.pc-item {
    flex: 1 1 calc(25% - 20px);
    max-width: calc(25% - 20px);
    background: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    position: relative;
    /* pour ancre full-size */
}

@media (max-width:991px) {
    .pc-item {
        flex-basis: calc(33.333% - 20px);
        max-width: calc(33.333% - 20px);
    }
}

@media (max-width:640px) {
    .pc-item {
        flex-basis: calc(50% - 20px);
        max-width: calc(50% - 20px);
    }
}

.pc-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .08);
}

.pc-item.selected {
    border-color: #314cc8;
    box-shadow: 0 0 0 3px #314cc880;
}

/* ancre couvrant 100 % de la carte ----------------------------- */
.pc-item .pc-select {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 10px;
    text-decoration: none;
}

.pc-item img {
    max-width: 100%;
    margin-bottom: 12px
}

.pc-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #222;
    text-align: center
}

.pc-price {
    color: #314cc8;
    font-weight: 700;
    text-align: center
}

/* ---------- options “Aucune / Sans / Watercooling” ------------- */
.pc-item.none-option {
    background: #f7f8ff;
    border: 2px dashed #bfc4ff;
}

.pc-item.none-option .pc-select {
    padding: 32px 10px;
}

.pc-item.none-option .pc-name {
    font-size: 24px !important;
    /* plus gros + priorité */
    font-weight: 700;
    margin: 0;
}

/* Masquer la navigation à facettes (utilisée par JS mais inesthétique ici) */
.pcconfigurator-index-index .c-filters, 
.pcconfigurator-index-index .block-layered-nav, 
.pcconfigurator-index-index #layered-navigation {
    position: absolute !important;
    left: -9999px !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

.pc-item.none-option:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .08);
}

/* ---------- titres d’étape + sélecteur de tri ------------------ */
.step-title {
    margin: 30px 0 15px;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#sort-by {
    font-size: 14px;
    padding: 4px 6px
}

/* ---------- total fixe à droite -------------------------------- */
#total-box {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    background: #fff;
    border: 2px solid #314cc8;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 18px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
}

/* ---------- loader overlay + spinner --------------------------- */
#pc-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, .6);
    display: flex;
    align-items: center;
    justify-content: center;
}

#pc-loader .spinner {
    width: 48px;
    height: 48px;
    border: 5px solid #314cc8;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- bouton “Ajouter au panier” ------------------------- */
#add-to-cart {
    margin-top: 20px;
    font-size: 16px;
    padding: 10px 22px;
    background: #000;
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: background .2s;
}

#add-to-cart:hover {
    background: #293170;
}

#add-to-cart:disabled {
    opacity: .5;
    cursor: not-allowed;
}