/* Quotation Builder Styles - Unique Class Names */
.qb-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: Arial, sans-serif;
}

.qb-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.qb-header h2 {
    color: white;
    margin-bottom: 10px;
    font-size: 2em;
}

.qb-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.1em;
}

.qb-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Sidebar Styles */
.qb-sidebar {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 20px;
    border: 1px solid #e0e0e0;
}

.qb-category-filter h3 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid #007cba;
    padding-bottom: 10px;
    font-size: 1.2em;
}

.qb-category-search {
    margin-bottom: 15px;
}

.qb-search-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.qb-search-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.qb-category-tree {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.qb-category-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.qb-category-item {
    margin-bottom: 5px;
}

.qb-category-label {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.qb-category-label:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

.qb-category-radio {
    margin-right: 10px;
    transform: scale(1.1);
}

.qb-category-name {
    font-size: 14px;
    font-weight: 500;
}

.qb-category-list ul {
    margin-left: 20px;
    margin-top: 5px;
    border-left: 2px solid #dee2e6;
    padding-left: 10px;
}

.qb-category-actions {
    display: flex;
    gap: 10px;
}

/* Main Content Styles */
.qb-main {
    min-height: 500px;
}

.qb-product-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.qb-product-filters .qb-search-input {
    flex: 1;
}

.qb-filter-actions {
    display: flex;
    gap: 10px;
}

.qb-product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.qb-product-card {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    background: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.qb-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #007cba;
}

.qb-product-image {
    text-align: center;
    margin-bottom: 15px;
}

.qb-product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.qb-no-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.qb-product-info {
    text-align: center;
}

.qb-product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
    min-height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb-product-price {
    font-size: 20px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 15px;
}

/* Product Quantity Selector Styles */
.qb-product-quantity-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.qb-product-quantity-selector .qb-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.qb-product-quantity-selector .qb-quantity-btn {
    width: 35px;
    height: 35px;
    border: 2px solid #333;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
    color: #333;
}

.qb-product-quantity-selector .qb-quantity-btn:hover {
    background: #333;
    color: white;
    transform: scale(1.1);
}

.qb-product-quantity-selector .qb-quantity-input {
    width: 60px;
    height: 35px;
    text-align: center;
    border: 2px solid #333;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
}

.qb-product-quantity-selector .qb-quantity-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.qb-product-quantity-selector .qb-add-to-quote {
    width: 100%;
    padding: 12px;
}

/* Quotation Section Styles */
.qb-quotation-section {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.qb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #007cba;
}

.qb-section-header h3 {
    color: #333;
    margin: 0;
    font-size: 1.5em;
}

.qb-section-actions {
    display: flex;
    gap: 10px;
}

.qb-quotation-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.qb-quotation-table th,
.qb-quotation-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.qb-quotation-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.qb-product-image-cell {
    width: 80px;
}

.qb-product-thumbnail {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.qb-no-thumbnail {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border-radius: 6px;
    font-size: 11px;
    border: 1px dashed #ddd;
}

.qb-quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qb-quantity-btn {
    width: 35px;
    height: 35px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.2s;
}

.qb-quantity-btn:hover {
    background: #f8f9fa;
    border-color: #007cba;
    color: #007cba;
}

.qb-quantity-input {
    width: 70px;
    height: 35px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.qb-quantity-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.1);
}

.qb-quote-total {
    background-color: #f8f9fa;
    font-weight: bold;
}

.qb-total-label {
    text-align: right;
    padding-right: 30px;
    font-size: 16px;
}

.qb-total-amount {
    color: #28a745;
    font-size: 18px;
}

.qb-no-items {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
}

/* Form Styles */
.qb-customer-info-form {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.qb-customer-info-form .qb-form-group {
    margin-bottom: 25px;
}

.qb-customer-info-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

.qb-customer-info-form input,
.qb-customer-info-form textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.qb-customer-info-form input:focus,
.qb-customer-info-form textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.qb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.qb-form-group {
    display: flex;
    flex-direction: column;
}

.qb-form-actions {
    text-align: center;
    margin-top: 30px;
}

/* Button Styles */
.qb-btn-primary {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.qb-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 124, 186, 0.3);
}

.qb-btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.qb-btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.qb-btn-secondary:hover {
    background: #545b62;
    transform: translateY(-1px);
}

.qb-btn-secondary:disabled {
    background: #a0a4a8;
    cursor: not-allowed;
    transform: none;
}

.qb-btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.qb-btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

.qb-add-to-quote {
    width: 100%;
    padding: 12px;
}

/* Message Styles */
.qb-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: 600;
    border-left: 4px solid;
}

.qb-message-success {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.qb-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.qb-message-info {
    background-color: #cce7ff;
    color: #004085;
    border-left-color: #007cba;
}

/* Step Navigation Styles */
.qb-step {
    display: none;
}

.qb-step.qb-active {
    display: block;
}

/* Brand and Category Radio Options */
.qb-brand-filter {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.qb-brand-filter h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 1.2em;
}

.qb-brand-option,
.qb-category-option {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.qb-brand-option:hover,
.qb-category-option:hover {
    background-color: #f8f9fa;
}

.qb-brand-option input[type="radio"],
.qb-category-option input[type="radio"] {
    margin-right: 10px;
}

.qb-brand-option label,
.qb-category-option label {
    cursor: pointer;
    font-weight: 500;
}

/* Products Header */
.qb-products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#qb-products-count {
    font-weight: 600;
    color: #333;
}

/* Pagination */
.qb-pagination {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

/* Customer Info Review */
.qb-customer-info-review {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

.qb-customer-info-review h4 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.qb-customer-info-review p {
    margin: 8px 0;
    font-size: 15px;
}

/* Quotation Actions */
.qb-quotation-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e0e0e0;
}

/* Loading spinner for PDF generation */
.qb-loading-spinner {
    display: inline-block;
    margin-right: 8px;
    animation: qb-spin 1s linear infinite;
}

@keyframes qb-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loading and error states */
.qb-loading-products, .qb-error-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
    grid-column: 1 / -1;
}

.qb-loading-products {
    color: #007cba;
}

.qb-error-loading {
    color: #dc3545;
}

.qb-add-to-quote:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .qb-layout {
        grid-template-columns: 280px 1fr;
        gap: 20px;
    }
}

@media (max-width: 1024px) {
    .qb-layout {
        grid-template-columns: 1fr;
    }
    
    .qb-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .qb-container {
        padding: 15px;
    }
    
    .qb-form-row {
        grid-template-columns: 1fr;
    }
    
    .qb-product-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qb-filter-actions {
        justify-content: center;
    }
    
    .qb-product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .qb-quotation-table {
        font-size: 14px;
    }
    
    .qb-quotation-table th,
    .qb-quotation-table td {
        padding: 10px 8px;
    }
    
    .qb-section-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .qb-products-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .qb-quotation-actions {
        flex-direction: column;
    }
    
    /* Product quantity selector responsive */
    .qb-product-quantity-selector {
        flex-direction: column;
    }
    
    .qb-product-quantity-selector .qb-quantity-controls {
        margin-bottom: 10px;
    }
    
    /* Stacked table for mobile */
    .qb-quotation-table {
        min-width: auto !important;
        display: block;
        overflow: visible;
    }
    
    .qb-quotation-table thead {
        display: none;
    }
    
    .qb-quotation-table tbody,
    .qb-quotation-table tr,
    .qb-quotation-table td {
        display: block;
        width: 100%;
    }
    
    .qb-quotation-table tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
        background: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }
    
    .qb-quotation-table td {
        border: none;
        padding: 8px 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .qb-quotation-table td::before {
        content: attr(data-label);
        font-weight: bold;
        color: #333;
        text-transform: uppercase;
        font-size: 12px;
    }
    
    .qb-quotation-table td.qb-product-image-cell::before {
        content: "Image";
    }
    
    .qb-quotation-table td.qb-product-name::before {
        content: "Product";
    }
    
    .qb-quotation-table td.qb-product-price::before {
        content: "Price";
    }
    
    .qb-quotation-table td.qb-product-quantity::before {
        content: "Quantity";
    }
    
    .qb-quotation-table td.qb-product-subtotal::before {
        content: "Subtotal";
    }
    
    .qb-quotation-table td.qb-product-action::before {
        content: "Action";
    }
    
    .qb-quantity-controls {
        justify-content: flex-end;
    }
    
    .qb-quote-total {
        display: flex;
        justify-content: space-between;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 8px;
        font-size: 16px;
    }
    
    .qb-quote-total td {
        display: inline !important;
        padding: 0 !important;
    }
    
    .qb-total-label {
        text-align: left !important;
    }
}

@media (max-width: 480px) {
    .qb-product-grid {
        grid-template-columns: 1fr;
    }
    
    .qb-quantity-controls {
        flex-direction: column;
        gap: 5px;
    }
    
    .qb-quantity-input {
        width: 60px;
    }
    
    .qb-customer-info-form {
        padding: 25px;
        margin: 0 15px;
    }
    
    .qb-product-quantity-selector .qb-quantity-controls {
        flex-direction: row;
    }
    
    .qb-quotation-actions .qb-btn-primary,
    .qb-quotation-actions .qb-btn-secondary {
        width: 100%;
    }
}