/* ============================================
   CONFIGURADOR DE PRODUCTE
   ============================================ */

.configurator-page {
    padding: 3rem 0;
}

.configurator-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
}

@media ( max-width: 900px ) {
    .configurator-layout {
        grid-template-columns: 1fr;
    }
}

/* GALLERY */
.configurator-gallery {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.config-img {
    display: none;
    border-radius: .8rem;
    overflow: hidden;
    background: #fff;
}

.config-img.active {
    display: block;
}

.config-img img {
    width: 100%;
    height: auto;
    display: block;
}

.config-thumbnails {
    display: flex;
    gap: .8rem;
    margin-top: 1.2rem;
    overflow-x: auto;
    padding-bottom: .4rem;
}

.config-thumb {
    flex: 0 0 6rem;
    height: 6rem;
    border-radius: .4rem;
    overflow: hidden;
    cursor: pointer;
    opacity: .5;
    transition: opacity .15s;
    border: 2px solid transparent;
}

.config-thumb.active,
.config-thumb:hover {
    opacity: 1;
    border-color: #4B555F;
}

.config-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* HEADER */
.configurator-header {
    margin-bottom: 2rem;
}

.configurator-title {
    font-size: 2.8rem;
    margin: 0 0 .5rem;
}

.configurator-desc {
    color: #4B555F;
    font-size: 1.6rem;
    margin-bottom: .5rem;
}

.configurator-full-desc {
    color: #68717b;
    font-size: 1.4rem;
    line-height: 1.5;
}

/* SECTIONS NAV - HORIZONTAL SCROLL */
.configurator-sections-nav {
    display: flex;
    gap: .6rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: .6rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.configurator-sections-nav::-webkit-scrollbar {
    height: 4px;
}

.configurator-sections-nav::-webkit-scrollbar-thumb {
    background: #DCDFE2;
    border-radius: 4px;
}

.config-section-btn {
    flex: 0 0 auto;
    padding: .8rem 1.6rem;
    border: 1px solid #DCDFE2;
    border-radius: 2rem;
    background: #fff;
    color: #4B555F;
    font-size: 1.3rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all .15s;
}

.config-section-btn:hover {
    border-color: #9BA5AF;
}

.config-section-btn.active {
    background: #232D37;
    color: #fff;
    border-color: #232D37;
}

/* OPTIONS SECTIONS */
.config-section {
    margin-bottom: 2rem;
}

.config-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.config-section-header h3 {
    font-size: 1.8rem;
    margin: 0;
}

.required-badge {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: #e74c3c;
    padding: .2rem .8rem;
    border-radius: 1rem;
    text-transform: uppercase;
}

.config-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: .8rem;
}

.config-option {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1.2rem 1.4rem;
    background: #fff;
    border: 2px solid #E6E9EC;
    border-radius: .6rem;
    cursor: pointer;
    transition: all .15s;
    position: relative;
}

.config-option:hover {
    border-color: #9BA5AF;
}

.config-option.selected {
    border-color: #232D37;
    background: #f8f9fa;
}

.config-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.config-option .option-label {
    font-size: 1.4rem;
    font-weight: 500;
    flex: 1;
}

.config-option .option-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #232D37;
    white-space: nowrap;
}

.config-option .option-price.included {
    color: #27ae60;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
}

.config-option::before {
    content: '';
    width: 1.8rem;
    height: 1.8rem;
    border: 2px solid #DCDFE2;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.config-option input[type="checkbox"] ~ .option-label,
.config-option input[type="checkbox"] ~ .option-price,
.config-option input[type="checkbox"] ~ .option-price.included {
    /* checkbox uses same style but square */
}

.config-option input[type="checkbox"] ~ &::before {
    border-radius: .3rem;
}

.config-option.selected::before {
    border-color: #232D37;
    background: #232D37;
    content: '✓';
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
}

/* FOOTER - PRICE + ADD TO CART */
.configurator-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: #fff;
    border-radius: .8rem;
    box-shadow: 0 .2rem 1rem rgba(0,0,0,.08);
    margin-top: 2rem;
    position: sticky;
    bottom: 1rem;
}

.configurator-total {
    display: flex;
    align-items: baseline;
    gap: 1rem;
}

.total-label {
    font-size: 1.6rem;
    color: #68717b;
    font-weight: 500;
}

.total-price {
    font-size: 2.8rem;
    font-weight: 700;
    color: #232D37;
}

.configurator-add-to-cart {
    padding: 1.4rem 3rem;
    background: #232D37;
    color: #fff;
    border: none;
    border-radius: .4rem;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s;
}

.configurator-add-to-cart:hover {
    opacity: .85;
}

/* ============================================
   CART SCROLL
   ============================================ */

/* Mini cart widget scroll */
.widget_shopping_cart .cart_list {
    max-height: 40vh;
    overflow-y: auto;
}

.widget_shopping_cart .cart_list::-webkit-scrollbar {
    width: 4px;
}

.widget_shopping_cart .cart_list::-webkit-scrollbar-thumb {
    background: #DCDFE2;
    border-radius: 4px;
}

/* Cart page scroll */
.woocommerce-cart .woocommerce-cart-form .shop_table {
    max-height: 60vh;
    overflow-y: auto;
    display: block;
}

.woocommerce-cart .woocommerce-cart-form .shop_table::-webkit-scrollbar {
    width: 4px;
}

.woocommerce-cart .woocommerce-cart-form .shop_table::-webkit-scrollbar-thumb {
    background: #DCDFE2;
    border-radius: 4px;
}

.woocommerce-cart .woocommerce-cart-form .shop_table tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media ( max-width: 600px ) {
    .configurator-footer {
        flex-direction: column;
        text-align: center;
    }

    .config-options-grid {
        grid-template-columns: 1fr;
    }

    .configurator-sections-nav {
        gap: .4rem;
    }

    .config-section-btn {
        font-size: 1.2rem;
        padding: .6rem 1.2rem;
    }
}
