/* ========================================
   QUOTE BUILDER - MAIN WRAPPER
   ======================================== */
.eqg-quote-builder-wrapper {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.eqg-quote-header {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.eqg-quote-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    color: #111827;
}

.eqg-quote-header p {
    margin: 0;
    font-size: 16px;
    color: #6b7280;
}

/* ========================================
   SECTIONS
   ======================================== */
.eqg-section {
    padding: 30px;
    border-bottom: 1px solid #e5e7eb;
}

.eqg-section h3 {
    margin: 0 0 25px 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

/* ========================================
   CUSTOMER INFORMATION
   ======================================== */
.eqg-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.eqg-form-row {
    margin-bottom: 0;
}

.eqg-form-row label {
    display: block;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
    margin-bottom: 8px;
}

.eqg-form-row .required {
    color: #ef4444;
}

.eqg-form-row input[type="text"],
.eqg-form-row input[type="email"],
.eqg-form-row textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.eqg-form-row input:focus,
.eqg-form-row textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========================================
   BUILDER CONTAINER - SIDE BY SIDE
   ======================================== */
.eqg-builder-container {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 0;
    min-height: 600px;
}

/* ========================================
   PRODUCTS SIDEBAR (LEFT)
   ======================================== */
.eqg-products-sidebar {
    background: #f9fafb;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    max-height: 700px;
}

.eqg-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

.eqg-sidebar-header h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.eqg-search-box {
    position: relative;
}

.eqg-search-box .dashicons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.eqg-search-box input {
    width: 100%;
    padding: 10px 10px 10px 38px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.eqg-search-box input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.eqg-products-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.eqg-category-group {
    margin-bottom: 25px;
}

.eqg-category-title {
    margin: 0 0 10px 0;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-left: 5px;
}

.eqg-product-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: grab;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.eqg-product-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.eqg-product-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.eqg-product-card.product-added {
    background: #ecfdf5;
    border-color: #10b981;
}

.eqg-product-info {
    flex: 1;
    min-width: 0;
}

.eqg-product-name {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.eqg-product-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 6px;
    line-height: 1.4;
}

.eqg-product-price {
    font-size: 15px;
    font-weight: 700;
    color: #10b981;
}

.eqg-add-product-btn {
    flex-shrink: 0;
    background: #3b82f6;
    color: #fff;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.eqg-add-product-btn:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.eqg-add-product-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.eqg-request-custom-btn {
    margin: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.eqg-request-custom-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.eqg-request-custom-btn .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* ========================================
   SELECTED PRODUCTS (RIGHT) - TABLE STYLE
   ======================================== */
.eqg-selected-products {
    background: #fff;
    display: flex;
    flex-direction: column;
}

.eqg-cart-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
}

.eqg-cart-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.eqg-cart-table-container {
    flex: 1;
    overflow-x: auto;
}

.eqg-cart-table {
    width: 100%;
    border-collapse: collapse;
}

.eqg-cart-table thead th {
    background: #f9fafb;
    padding: 16px 20px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e5e7eb;
}

.eqg-cart-table thead .col-drag {
    width: 40px;
}

.eqg-cart-table thead .col-qty {
    width: 140px;
}

.eqg-cart-table thead .col-price {
    width: 140px;
    text-align: right;
}

.eqg-cart-table thead .col-total {
    width: 140px;
    text-align: right;
}

.eqg-cart-table thead .col-remove {
    width: 60px;
    text-align: center;
}

.eqg-empty-cart-row .eqg-empty-cart {
    text-align: center;
    padding: 80px 20px;
    color: #9ca3af;
}

.eqg-empty-cart .dashicons {
    width: 64px;
    height: 64px;
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.eqg-empty-cart p {
    font-size: 15px;
    margin: 0;
}

/* Cart Item Rows */
.eqg-cart-item {
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.2s;
}

.eqg-cart-item:hover {
    background: #f9fafb;
}

.eqg-cart-item td {
    padding: 20px;
    vertical-align: middle;
}

.eqg-cart-item-drag {
    cursor: move;
    color: #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eqg-cart-item-drag:hover {
    color: #9ca3af;
}

.eqg-cart-item-drag .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.eqg-cart-item-info .eqg-cart-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.eqg-cart-item-info .eqg-cart-item-category {
    font-size: 12px;
    color: #6b7280;
}

.eqg-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eqg-qty-btn {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
}

.eqg-qty-btn:hover {
    background: #3b82f6;
    border-color: #3b82f6;
    color: #fff;
}

.eqg-qty-input {
    width: 60px;
    text-align: center;
    padding: 8px 6px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    color: #111827;
}

.eqg-cart-item-price,
.eqg-cart-item-total {
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.eqg-cart-item-total {
    color: #10b981;
}

.eqg-cart-item-remove {
    background: transparent;
    color: #ef4444;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.2s;
}

.eqg-cart-item-remove:hover {
    background: #fee2e2;
    transform: scale(1.1);
}

.eqg-cart-item-remove .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* ========================================
   QUOTE SUMMARY
   ======================================== */
.eqg-quote-summary {
    background: #f9fafb;
    padding: 30px;
    border-top: 2px solid #e5e7eb;
}

.eqg-summary-rows {
    max-width: 400px;
    margin: 0 0 25px auto;
}

.eqg-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    font-size: 15px;
    color: #6b7280;
}

.eqg-total-row {
    border-top: 2px solid #d1d5db;
    margin-top: 10px;
    padding-top: 20px;
    font-size: 24px;
    color: #111827;
}

.eqg-total-row strong {
    color: #10b981;
}

.eqg-submit-btn {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.eqg-submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.eqg-submit-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
    transform: none;
}

.eqg-submit-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.eqg-quote-validity {
    text-align: center;
    margin: 15px 0 0 0;
    font-size: 13px;
    color: #9ca3af;
}

/* ========================================
   MESSAGES
   ======================================== */
.eqg-message {
    margin: 30px;
    padding: 20px;
    border-radius: 8px;
    font-size: 15px;
}

.eqg-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.eqg-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.eqg-download-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 15px;
    padding: 12px 24px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.eqg-download-link:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ========================================
   MODAL
   ======================================== */
.eqg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.eqg-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.eqg-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #9ca3af;
    line-height: 1;
    transition: color 0.2s;
}

.eqg-modal-close:hover {
    color: #111827;
}

.eqg-modal-content h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #111827;
}

.eqg-modal-content p {
    margin: 0 0 25px 0;
    color: #6b7280;
}

.eqg-modal-content .eqg-form-row {
    margin-bottom: 20px;
}

.eqg-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.eqg-btn-secondary {
    flex: 1;
    padding: 12px 24px;
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.eqg-btn-secondary:hover {
    background: #f3f4f6;
}

.eqg-modal-actions .eqg-submit-btn {
    flex: 1;
    max-width: none;
}

/* ========================================
   POPUP OVERLAY
   ======================================== */
.eqg-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}

.eqg-popup-container {
    background: #fff;
    border-radius: 12px;
    max-width: 1400px;
    width: 100%;
    max-height: 95vh;
    overflow-y: auto;
    position: relative;
}

.eqg-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: #9ca3af;
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    background: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.eqg-popup-close:hover {
    color: #111827;
    background: #f3f4f6;
}

.eqg-popup-container .eqg-quote-builder-wrapper {
    margin: 0;
}

.eqg-open-popup-btn {
    padding: 16px 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.eqg-open-popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* ========================================
   NO PRODUCTS MESSAGE
   ======================================== */
.eqg-no-products-message {
    text-align: center;
    padding: 80px 20px;
    background: #f9fafb;
    border-radius: 12px;
    margin: 40px auto;
    max-width: 600px;
}

.eqg-no-products-message p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .eqg-builder-container {
        grid-template-columns: 1fr;
    }
    
    .eqg-products-sidebar {
        max-height: 400px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .eqg-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .eqg-quote-builder-wrapper {
        margin: 20px auto;
    }
    
    .eqg-section {
        padding: 20px 15px;
    }
    
    .eqg-cart-table thead {
        display: none;
    }
    
    .eqg-cart-item {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
}

/* No Products State */
.eqg-no-products {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.eqg-no-products .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #d1d5db;
    margin-bottom: 20px;
}

.eqg-no-products h3 {
    margin: 0 0 10px 0;
    color: #374151;
}

.eqg-no-products p {
    margin: 0 0 20px 0;
}

.eqg-btn-add-product {
    display: inline-block;
    padding: 10px 20px;
    background: #3b82f6;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
}

.eqg-btn-add-product:hover {
    background: #2563eb;
    color: #fff;
}

/* Secondary Button */
.eqg-btn-secondary {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #374151;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    transition: all 0.2s;
}

.eqg-btn-secondary:hover {
    background: #f9fafb;
    border-color: #3b82f6;
    color: #3b82f6;
}

/* Custom Badge */
.eqg-custom-badge {
    display: inline-block;
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Modal Styles */
.eqg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.eqg-modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.eqg-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #9ca3af;
}

.eqg-modal-close:hover {
    color: #374151;
}

.eqg-modal-content h3 {
    margin: 0 0 20px 0;
}

.eqg-form-row {
    margin-bottom: 15px;
}

.eqg-form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #374151;
}

.eqg-form-row input {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}