/* ==========================================================================
   PIXELRIG INTERACTIVE RIG CONFIGURATOR - BUILDER CSS
   ========================================================================== */

.pixelrig-builder-page {
    padding: 50px 0 100px;
    background: radial-gradient(circle at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
}

.builder-header {
    margin-bottom: 40px;
}

.builder-pill {
    display: inline-block;
    background: rgba(0, 240, 255, 0.15);
    border: 1px solid rgba(0, 240, 255, 0.3);
    color: var(--cyan);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 9999px;
    margin-bottom: 12px;
}

.builder-title {
    font-family: var(--font-heading);
    font-size: 44px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 10px;
}

.builder-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    max-width: 650px;
}

/* Builder Grid Layout */
.builder-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

/* Steps */
.builder-steps-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.builder-step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.builder-step-card.active {
    border-color: var(--border-highlight);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(124, 58, 237, 0.15);
}

.builder-step-card.completed {
    border-color: rgba(16, 185, 129, 0.4);
}

.step-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
}

.step-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    transition: var(--transition);
}

.builder-step-card.active .step-badge {
    background: var(--primary);
    box-shadow: 0 0 12px var(--primary-glow);
}

.builder-step-card.completed .step-badge {
    background: var(--green);
}

.step-title-wrap {
    flex: 1;
}

.step-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.step-status {
    font-size: 12px;
    color: var(--text-muted);
}

.step-toggle-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.builder-step-card.active .step-toggle-btn {
    transform: rotate(180deg);
}

.step-body {
    display: none;
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 11, 16, 0.8);
}

.builder-step-card.active .step-body {
    display: block;
}

/* Component Grid */
.component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.component-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: var(--transition);
}

.component-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    transform: translateY(-3px);
}

.component-card.selected {
    border-color: var(--cyan);
    background: rgba(0, 240, 255, 0.08);
    box-shadow: 0 0 15px var(--cyan-glow);
}

.comp-img {
    height: 120px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
}

.comp-badge-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comp-wattage {
    font-size: 10px;
    font-weight: 700;
    color: var(--cyan);
    background: rgba(0, 240, 255, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.comp-title {
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    line-height: 1.25;
}

.comp-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
    flex: 1;
}

.comp-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.comp-price {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 800;
    color: #fff;
}

.btn-select-comp {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #cbd5e1;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.component-card.selected .btn-select-comp {
    background: var(--cyan);
    color: #090a0f;
    font-weight: 700;
}

/* Sidebar Rig Summary */
.builder-sidebar-wrapper {
    position: sticky;
    top: 90px;
}

.builder-sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(124, 58, 237, 0.15);
}

.sidebar-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.selected-summary-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 320px;
    overflow-y: auto;
}

.summary-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
}

.summary-item-name {
    color: #cbd5e1;
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-price {
    font-weight: 700;
    color: #fff;
}

.summary-item-remove {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}

.summary-empty {
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    padding: 10px 0;
}

/* Wattage Meter */
.wattage-meter-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-bottom: 16px;
}

.wattage-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 8px;
}

.wattage-number {
    font-weight: 800;
    color: var(--cyan);
}

.wattage-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wattage-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #06b6d4, #8b5cf6);
    transition: width 0.4s ease;
}

.wattage-rec {
    font-size: 11px;
    color: #94a3b8;
}

/* Compatibility */
.compatibility-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    color: #34d399;
    margin-bottom: 20px;
}

/* Pricing */
.sidebar-pricing {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
    margin-bottom: 20px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.free-tag {
    color: #10b981;
    font-weight: 700;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
}

.total-label {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.total-amount {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
}

/* Add to Cart Button */
.btn-builder-add-cart {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    box-shadow: 0 0 20px var(--primary-glow);
    transition: var(--transition);
}

.btn-builder-add-cart:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.8);
}

.btn-builder-add-cart:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.builder-guarantee {
    font-size: 11px;
    color: var(--text-darker);
    text-align: center;
    margin-top: 12px;
}

@media (max-width: 992px) {
    .builder-layout {
        grid-template-columns: 1fr;
    }
    .builder-sidebar-wrapper {
        position: static;
    }
}
