/* 5-Step Quote Builder - Complete Styling */

.ssci-quote-builder-5step {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    background: #f8f7f5;
    border-radius: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ==================== PROGRESS BAR ==================== */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #e0e0e0 0%, #e0e0e0 100%);
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #A0523D 0%, #C17456 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.progress-step {
    flex: 1;
    text-align: center;
    transparency: 0.5;
    transition: all 0.3s ease;
}

.progress-step.active {
    opacity: 1;
}

.progress-step.active .step-number {
    background: #A0523D;
    color: white;
    box-shadow: 0 4px 12px rgba(160, 82, 61, 0.3);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 50%;
    font-weight: bold;
    color: #666;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.active .step-label {
    color: #A0523D;
}

/* ==================== FORM MESSAGES ==================== */
#form-message {
    display: none;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

#form-message.error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

#form-message.success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== FORM STEPS ==================== */
.form-step {
    display: none;
    opacity: 0;
    animation: fadeIn 0.3s ease;
}

.form-step.active {
    display: block;
    opacity: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    font-size: 28px;
    color: #333;
    margin: 0 0 10px 0;
    font-weight: 600;
}

.step-header p {
    color: #888;
    font-size: 16px;
    margin: 0;
}

/* ==================== CATEGORIES GRID ==================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
}

.category-card:hover {
    border-color: #A0523D;
    box-shadow: 0 4px 15px rgba(160, 82, 61, 0.15);
    transform: translateY(-2px);
}

.category-card.selected {
    background: #f5e6e1;
    border-color: #A0523D;
    box-shadow: 0 4px 15px rgba(160, 82, 61, 0.25);
}

.category-card input {
    display: none;
}

.card-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.card-name {
    font-weight: 600;
    color: #333;
    text-align: center;
    font-size: 14px;
    margin-bottom: 5px;
}

.card-count {
    font-size: 12px;
    color: #999;
}

.card-check {
    display: none;
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #A0523D;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.category-card.selected .card-check {
    display: flex;
}

/* ==================== SERVICES GRID ==================== */
.services-search {
    margin-bottom: 25px;
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #A0523D;
    box-shadow: 0 0 0 3px rgba(160, 82, 61, 0.1);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.service-card {
    background: white;
    border: 2px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.service-card:hover {
    border-color: #A0523D;
    box-shadow: 0 8px 20px rgba(160, 82, 61, 0.15);
    transform: translateY(-4px);
}

.service-card.selected {
    border-color: #A0523D;
    background: #f5e6e1;
    box-shadow: 0 8px 20px rgba(160, 82, 61, 0.25);
}

.card-image {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-image .card-icon {
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 32px;
    background: white;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.card-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.card-code {
    font-size: 12px;
    color: #A0523D;
    font-weight: 600;
    margin-bottom: 8px;
}

.card-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    flex: 1;
}

.card-price {
    font-size: 18px;
    font-weight: 700;
    color: #A0523D;
    margin: 12px 0 12px 0;
}

.card-actions {
    display: flex;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #eee;
}

.checkbox-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.checkbox-wrapper input {
    display: none;
}

.checkbox-custom {
    width: 24px;
    height: 24px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-wrapper input:checked + .checkbox-custom {
    background: #A0523D;
    border-color: #A0523D;
    color: white;
}

.checkbox-wrapper input:checked + .checkbox-custom::after {
    content: '✓';
    font-weight: bold;
}

.product-details-btn {
    flex: 1;
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
}

.product-details-btn:hover {
    background: #A0523D;
    color: white;
    border-color: #A0523D;
}

/* ==================== ADD-ONS SECTION ==================== */
.addons-section {
    margin-bottom: 30px;
}

.addons-section h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.addon-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.addon-card:hover {
    border-color: #A0523D;
    box-shadow: 0 4px 12px rgba(160, 82, 61, 0.1);
}

.addon-card.selected {
    background: #f5e6e1;
    border-color: #A0523D;
}

.addon-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.addon-content {
    flex: 1;
}

.addon-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
}

.addon-content p {
    font-size: 12px;
    color: #888;
    margin: 0 0 6px 0;
}

.addon-price {
    font-size: 14px;
    font-weight: 700;
    color: #A0523D;
}

/* ==================== FORM INPUTS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #A0523D;
    box-shadow: 0 0 0 3px rgba(160, 82, 61, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==================== RISK SLIDER ==================== */
.risk-section {
    background: linear-gradient(135deg, rgba(160, 82, 61, 0.05), rgba(160, 82, 61, 0.02));
    padding: 25px;
    border-radius: 10px;
    margin-top: 20px;
}

.risk-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
}

.risk-description {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px 0;
}

.risk-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.risk-label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    min-width: 70px;
    text-align: center;
}

.risk-slider {
    flex: 1;
    height: 8px;
    border-radius: 5px;
    background: linear-gradient(90deg, #4CAF50 0%, #FFC107 50%, #F44336 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.risk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #A0523D;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.risk-slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: white;
    border: 3px solid #A0523D;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.risk-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.risk-value {
    font-size: 32px;
    font-weight: 700;
    color: #A0523D;
}

.risk-text {
    font-size: 16px;
    font-weight: 600;
    color: #666;
}

/* ==================== REVIEW SECTION ==================== */
.review-sections {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.review-section {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #eee;
}

.review-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px 0;
}

.review-section h3 i {
    color: #A0523D;
    margin-right: 8px;
}

.review-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #666;
}

.review-item:last-child {
    border-bottom: none;
}

.price-amount {
    font-weight: 600;
    color: #A0523D;
}

.price-summary {
    background: linear-gradient(135deg, rgba(160, 82, 61, 0.08), rgba(160, 82, 61, 0.03));
    border-color: #A0523D;
}

.price-breakdown {
    display: grid;
    gap: 12px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 600;
    color: #666;
}

.price-item.total {
    border-top: 2px solid #A0523D;
    padding-top: 12px;
    font-size: 18px;
    color: #333;
}

/* ==================== BUTTONS ==================== */
.step-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    justify-content: center;
}

.btn {
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    background: #f0f0f0;
    color: #666;
    border: 2px solid #ddd;
}

.btn-secondary:hover:not(:disabled) {
    background: #e8e8e8;
    border-color: #ccc;
}

.btn-primary {
    background: #A0523D;
    color: white;
    border: 2px solid #A0523D;
}

.btn-primary:hover:not(:disabled) {
    background: #8a4631;
    box-shadow: 0 4px 12px rgba(160, 82, 61, 0.3);
    transform: translateY(-2px);
}

.btn-success {
    background: #4CAF50;
    color: white;
    border: 2px solid #4CAF50;
}

.btn-success:hover:not(:disabled) {
    background: #45a049;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transform: translateY(-2px);
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #A0523D;
}

.modal-body {
    padding: 30px;
}

.modal-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info h2 {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 10px 0;
}

.modal-code {
    font-size: 12px;
    color: #A0523D;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.modal-price {
    font-size: 18px;
    font-weight: 700;
    color: #A0523D;
    margin-bottom: 20px;
}

.modal-price .label {
    color: #666;
    font-weight: 600;
    margin-right: 8px;
}

.modal-description {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.modal-description h4 {
    color: #333;
    font-weight: 600;
    margin: 15px 0 8px 0;
    font-size: 14px;
}

.modal-details {
    background: #f8f7f5;
    padding: 15px;
    border-radius: 8px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 13px;
    color: #666;
}

/* ==================== UTILITIES ==================== */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.loading i {
    margin-right: 8px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 14px;
}

.empty-state i {
    margin-right: 8px;
    font-size: 24px;
}

.error {
    color: #c33;
    background: #fee;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #c33;
}

.service-badge {
    display: inline-block;
    background: #A0523D;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    margin: 5px;
    font-size: 13px;
    font-weight: 600;
}

.summary-services {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .ssci-quote-builder-5step {
        padding: 20px 15px;
    }

    .progress-steps {
        gap: 10px;
    }

    .step-number {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .step-label {
        font-size: 10px;
    }

    .categories-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }

    .category-card {
        min-height: 120px;
        padding: 15px 10px;
    }

    .card-icon {
        font-size: 32px;
    }

    .services-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 15px;
    }

    .card-image {
        height: 150px;
    }

    .addons-grid {
        grid-template-columns: 1fr;
    }

    .step-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .progress-steps {
        gap: 5px;
    }

    .step-header h2 {
        font-size: 22px;
    }
}
