/**
 * biXci "Arma tu Bici" - Modern Interactive Builder CSS
 */

:root {
    --bixci-primary: #ff5500;
    --bixci-primary-hover: #e04b00;
    --bixci-primary-light: #fff7ed;
    --bixci-slate-900: #0f172a;
    --bixci-slate-800: #1e293b;
    --bixci-slate-700: #334155;
    --bixci-slate-600: #475569;
    --bixci-slate-200: #e2e8f0;
    --bixci-slate-100: #f8fafc;
    --bixci-success: #10b981;
    --bixci-danger: #ef4444;
    --bixci-radius: 12px;
    --bixci-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
}

.bixci-builder-container {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--bixci-slate-800);
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 15px;
    box-sizing: border-box;
}

/* HEADER HERO */
.bixci-builder-header {
    text-align: center;
    margin-bottom: 30px;
}

.bixci-builder-header .header-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bixci-primary-light);
    color: var(--bixci-primary);
    border: 1px solid #ffedd5;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.bixci-builder-header .header-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--bixci-slate-900);
    margin: 0 0 10px 0;
    letter-spacing: -0.5px;
}

.bixci-builder-header .header-title span {
    color: var(--bixci-primary);
}

.bixci-builder-header .header-subtitle {
    font-size: 16px;
    color: var(--bixci-slate-600);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.6;
}

/* STEP PROGRESS BAR */
.bixci-progress-bar-wrap {
    background: #ffffff;
    border: 1px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    padding: 20px;
    margin-bottom: 35px;
    box-shadow: var(--bixci-shadow);
}

.steps-nav {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
}

.step-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--bixci-slate-600);
    font-weight: 600;
    font-size: 14px;
}

.step-nav-item.active {
    color: var(--bixci-primary);
}

.step-nav-item .step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bixci-slate-100);
    border: 2px solid var(--bixci-slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.step-nav-item.active .step-num {
    background: var(--bixci-primary);
    border-color: var(--bixci-primary);
    color: white;
}

.progress-track {
    height: 8px;
    background: var(--bixci-slate-100);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff5500 0%, #ff8800 100%);
    transition: width 0.4s ease;
}

/* STEP SECTIONS */
.bixci-step-section {
    display: none;
}

.bixci-step-section.active {
    display: block;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-card {
    background: #ffffff;
    border: 1px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    padding: 30px;
    box-shadow: var(--bixci-shadow);
}

.step-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    color: var(--bixci-slate-900);
    margin: 0 0 8px 0;
}

.step-desc {
    color: var(--bixci-slate-600);
    margin: 0 0 25px 0;
}

/* STEP 1 MODALITY GRID */
.form-group-block {
    margin-bottom: 25px;
}

.block-label {
    display: block;
    font-weight: 700;
    font-size: 15px;
    color: var(--bixci-slate-900);
    margin-bottom: 12px;
}

.modality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.modality-card {
    background: var(--bixci-slate-100);
    border: 2px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.modality-card:hover {
    border-color: var(--bixci-primary);
    transform: translateY(-3px);
}

.modality-card.active {
    background: var(--bixci-primary-light);
    border-color: var(--bixci-primary);
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.15);
}

.modality-card .icon {
    font-size: 36px;
    color: var(--bixci-primary);
    margin-bottom: 8px;
}

.modality-card h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--bixci-slate-900);
}

.modality-card p {
    margin: 0;
    font-size: 12px;
    color: var(--bixci-slate-600);
}

.form-group-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.bixci-select, .bixci-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--bixci-slate-200);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    background: #ffffff;
    box-sizing: border-box;
}

.bixci-select:focus, .bixci-input:focus {
    outline: none;
    border-color: var(--bixci-primary);
    box-shadow: 0 0 0 3px rgba(255, 85, 0, 0.15);
}

/* BUTTONS */
.step-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.step-actions.split-actions {
    justify-content: space-between;
    margin-top: 30px;
}

.btn-bixci {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
}

.btn-primary {
    background: var(--bixci-primary);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--bixci-primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--bixci-slate-100);
    color: var(--bixci-slate-800);
    border: 1px solid var(--bixci-slate-200);
}

.btn-secondary:hover {
    background: var(--bixci-slate-200);
}

/* STEP 2 LAYOUT & SIDEBAR */
.builder-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
}

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

.category-sidebar {
    background: #ffffff;
    border: 1px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    padding: 20px;
    box-shadow: var(--bixci-shadow);
    height: fit-content;
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 16px;
    color: var(--bixci-slate-900);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bixci-slate-100);
}

.category-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--bixci-slate-700);
    transition: all 0.2s ease;
}

.category-nav-item:hover {
    background: var(--bixci-slate-100);
}

.category-nav-item.active {
    background: var(--bixci-primary-light);
    color: var(--bixci-primary);
    font-weight: 700;
}

.category-nav-item .badge-check {
    color: var(--bixci-success);
    font-size: 18px;
}

/* PREVIEW CANVAS */
.bike-preview-box {
    background: #ffffff;
    border: 1px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--bixci-shadow);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.preview-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 14px;
    color: var(--bixci-slate-900);
}

.live-weight-badge {
    background: var(--bixci-slate-100);
    border: 1px solid var(--bixci-slate-200);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: var(--bixci-slate-800);
}

.visualizer-stage {
    position: relative;
    width: 100%;
    height: 320px;
    background: radial-gradient(circle, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bike-main-img {
    max-width: 90%;
    max-height: 280px;
    object-fit: contain;
    transition: all 0.3s ease;
}

/* PRODUCTS GRID */
.category-grid-header {
    margin-bottom: 20px;
}

.category-grid-header h3 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 800;
    color: var(--bixci-slate-900);
}

.cat-desc {
    margin: 0;
    font-size: 13px;
    color: var(--bixci-slate-600);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.product-card {
    background: #ffffff;
    border: 1px solid var(--bixci-slate-200);
    border-radius: var(--bixci-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    position: relative;
}

.product-card:hover {
    border-color: var(--bixci-primary);
    transform: translateY(-4px);
    box-shadow: var(--bixci-shadow);
}

.product-card.selected {
    border: 2px solid var(--bixci-primary);
    box-shadow: 0 0 0 4px rgba(255, 85, 0, 0.15);
}

/* DISABLED INCOMPATIBLE PRODUCT CARD */
.product-card.incompatible {
    opacity: 0.55;
    background: #fdf2f2;
    border-color: #fca5a5;
}

.product-card.incompatible:hover {
    transform: none;
    border-color: #ef4444;
}

.incompatible-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.95);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
    text-align: center;
}

.card-img-wrap {
    width: 100%;
    height: 160px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}

.card-img-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--bixci-slate-900);
    margin: 0 0 8px 0;
    line-height: 1.4;
    height: 38px;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 12px;
}

.card-price {
    font-weight: 800;
    color: var(--bixci-primary);
    font-size: 15px;
}

.card-weight {
    color: var(--bixci-slate-600);
}

.btn-select-item {
    width: 100%;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    background: var(--bixci-slate-100);
    color: var(--bixci-slate-800);
    transition: all 0.2s ease;
}

.product-card.selected .btn-select-item {
    background: var(--bixci-primary);
    color: white;
}

/* STEP 3 SUMMARY */
.summary-card {
    max-width: 1000px;
    margin: 0 auto;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--bixci-slate-100);
    padding-bottom: 15px;
    margin-bottom: 25px;
}

.summary-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--bixci-slate-900);
    display: flex;
    align-items: center;
    gap: 10px;
}

.build-code-chip {
    background: var(--bixci-slate-100);
    border: 1px solid var(--bixci-slate-200);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
    color: var(--bixci-slate-700);
}

/* FREE SHIPPING BAR */
.free-shipping-box {
    background: var(--bixci-primary-light);
    border: 1px solid #ffedd5;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 25px;
}

.free-shipping-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #c2410c;
    margin-bottom: 8px;
}

.free-shipping-bar {
    height: 10px;
    background: #ffedd5;
    border-radius: 10px;
    overflow: hidden;
}

.free-shipping-fill {
    height: 100%;
    background: linear-gradient(90deg, #f97316 0%, #10b981 100%);
    transition: width 0.5s ease;
}

/* SUMMARY TABLE */
.breakdown-table-wrap {
    overflow-x: auto;
    margin-bottom: 30px;
}

.bixci-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.bixci-summary-table th {
    background: var(--bixci-slate-100);
    color: var(--bixci-slate-700);
    text-align: left;
    padding: 12px;
    font-size: 13px;
    font-weight: 700;
}

.bixci-summary-table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--bixci-slate-200);
    font-size: 14px;
}

.bixci-summary-table .text-right {
    text-align: right;
}

.bixci-summary-table .font-bold { font-weight: 700; }
.bixci-summary-table .font-black { font-weight: 800; font-size: 16px; }
.bixci-summary-table .price-accent { color: var(--bixci-primary); font-size: 20px; }

.labor-row {
    background: #fdfaedd1;
}

.total-weight-box {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--bixci-slate-700);
}

/* ACTION BUTTONS BAR */
.action-buttons-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.btn-cart { background: #10b981; color: white; }
.btn-cart:hover { background: #059669; }

.btn-pdf { background: #0284c7; color: white; }
.btn-pdf:hover { background: #0369a1; }

.btn-share { background: #8b5cf6; color: white; }
.btn-share:hover { background: #7c3aed; }

.btn-garage { background: var(--bixci-primary); color: white; }
.btn-garage:hover { background: var(--bixci-primary-hover); }

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {
    .bixci-builder-header .header-title { font-size: 26px; }
    .steps-nav .step-label { display: none; }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .action-buttons-bar { grid-template-columns: 1fr; }
}
