.cpc-configurator-wrapper {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    font-family: sans-serif;
    margin-bottom: 30px;
    clear: both;
    display: block !important;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure no floats leak out */
.cpc-configurator-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.cpc-configurator-header { text-align: center; border-bottom: 2px solid #d4af37; margin-bottom: 20px; padding-bottom: 10px; }
.cpc-configurator-header h2 { margin: 0; color: #111; }
.cpc-step { border: 1px solid #eee; margin-bottom: 10px; border-radius: 5px; overflow: hidden; }
.cpc-step-title { padding: 15px; cursor: pointer; background: #f9f9f9; display: flex; justify-content: space-between; align-items: center; font-weight: bold; color: #111; }
.cpc-step-title-left { display: flex; align-items: center; }
.cpc-step-number { background: #d4af37; color: #fff; width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; margin-right: 10px; font-size: 12px; }
.cpc-step-content { padding: 20px; border-top: 1px solid #eee; display: none; color: #333; }
.cpc-step.open .cpc-step-content { display: block; }

/* Grid fixes for better compatibility */
.cpc-carousel-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; width: 100%; }
.cpc-boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; width: 100%; }
.cpc-boxes-three { grid-template-columns: repeat(3, 1fr); }

.cpc-box, .cpc-box-item, .cpc-list-item, .cpc-swatch { 
    border: 1px solid #ddd; 
    padding: 15px; 
    border-radius: 8px; 
    cursor: pointer; 
    text-align: center; 
    transition: 0.2s; 
    background: #fff; 
    color: #111; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    min-height: 120px;
    box-sizing: border-box;
}

.cpc-box-image, .cpc-box-color { background-size: contain !important; background-repeat: no-repeat !important; background-position: center !important; }
.cpc-box.active, .cpc-box-item.active, .cpc-list-item.active, .cpc-swatch.active { border-color: #d4af37; background: #fffcf5; box-shadow: 0 0 5px rgba(212,175,55,0.3); }
.cpc-box:hover, .cpc-box-item:hover, .cpc-list-item:hover, .cpc-swatch:hover { background: #fffcf5; border-color: #d4af37; color: #d4af37; }
.cpc-price { display: block; color: #d4af37; font-weight: bold; margin-top: 5px; }

.cpc-tabs { margin-top: 10px; }
.cpc-tab-nav { display: flex; gap: 10px; border-bottom: 1px solid #ddd; margin-bottom: 15px; }
.cpc-tab-btn { padding: 10px 20px; border: none; background: none; cursor: pointer; font-weight: bold; color: #555; }
.cpc-tab-btn.active { border-bottom: 3px solid #d4af37; color: #d4af37; }
.cpc-tab-btn:hover { color: #d4af37; }
.cpc-pane { display: none; }
.cpc-pane.active { display: block; }

.cpc-list-item { display: flex; justify-content: space-between; margin-bottom: 5px; padding: 10px 15px; align-items: center; flex-direction: row; min-height: auto; }

.cpc-horiz-selector { display: flex; border: 1px solid #ddd; border-radius: 5px; overflow: hidden; margin: 10px 0; }
.cpc-horiz-item { flex: 1; padding: 10px; text-align: center; cursor: pointer; border-right: 1px solid #ddd; font-size: 13px; color: #111; }
.cpc-horiz-item:last-child { border-right: none; }
.cpc-horiz-item.active { background: #d4af37; color: #fff; }

.cpc-swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; width: 100%; }
.cpc-swatch-box { height: 60px; background: #eee; margin-bottom: 5px; border-radius: 4px; border: 1px solid #ddd; }

.cpc-addon-row { background: #f9f9f9; padding: 10px; margin-bottom: 5px; border-radius: 5px; color: #111; border: 1px solid #ddd; }
.cpc-addon-main { display: flex; align-items: center; gap: 10px; }
.cpc-addon-fields { padding: 10px 0 0 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.cpc-field { margin-bottom: 10px; }
.cpc-field label { display: block; font-weight: bold; margin-bottom: 5px; color: #111; }
.cpc-field input, .cpc-field select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

.cpc-size-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cpc-size-field { margin-bottom: 15px; }
.cpc-size-field label { display: block; font-weight: bold; margin-bottom: 5px; }
.cpc-size-field select { width: 100%; padding: 8px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

.cpc-color-dropdown-section { margin-bottom: 20px; }
.cpc-dropdown-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cpc-dropdown-field { display: flex; flex-direction: column; }
.cpc-dropdown-field label { font-weight: bold; margin-bottom: 8px; color: #111; }
.cpc-dropdown-field select { padding: 10px; border: 1px solid #ddd; border-radius: 4px; box-sizing: border-box; }

.cpc-summary { margin-top: 30px; padding: 20px; background: #111; color: #fff; border-radius: 10px; clear: both; }
.cpc-summary h3 { color: #fff !important; margin-top: 0; }
.cpc-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; }
.cpc-sum-item strong { color: #d4af37; }
.cpc-total { margin-top: 20px; border-top: 1px solid #333; padding-top: 15px; display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: bold; color: #d4af37; }

.cpc-note { font-style: italic; color: #666; margin-top: 10px; }
.cpc-check-row { margin-top: 10px; }
.cpc-check-row input, .cpc-check-row label { margin-right: 5px; }

/* Responsive */
@media (max-width: 1024px) { 
    .cpc-carousel-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) { 
    .cpc-carousel-grid, .cpc-boxes { grid-template-columns: 1fr; } 
    .cpc-boxes-three { grid-template-columns: 1fr; }
    .cpc-summary-grid { grid-template-columns: 1fr; } 
    .cpc-dropdown-row { grid-template-columns: 1fr; }
    .cpc-size-grid { grid-template-columns: 1fr; }
    .cpc-addon-fields { grid-template-columns: 1fr; }
}
