.build-pc-container {
    margin: 30px 0 60px 0
}

.title-page {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    padding: 15px 20px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    border-radius: 0 0 20px 20px;
}

.title-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.title-page::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #ffd700, #ffed4e, #ffd700);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

.build-pc-banner {
    margin-bottom: 30px;
}

.build-pc-banner img {
    width: 100%;
    height: auto;
}

.build-pc-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 30px;
}

.build-pc-tab {
    padding: 12px 25px;
    margin-right: 10px;
    background: #e9ecef;
    color: #333;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.build-pc-tab:first-child {
    background: #1e3799;
    color: #fff;
}

.build-pc-tab:hover {
    background: #1e3799;
    color: #fff;
}

.build-pc-content {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.build-pc-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.component-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.component-row:hover {
    background: #e9ecef;
}

.component-name {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    min-width: 170px;
}

.component-action {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-choose {
    background: #1e3799;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn-choose:hover {
    background: #0062cc;
}

.price-tag {
    color: #dc3545;
    font-weight: bold;
    font-size: 14px;
    padding: 5px 10px;
    background: #fff;
    border-radius: 3px;
    border: 1px solid #dc3545;
}

/* Phần tổng chi phí */
.total-section {
    background: #dc3545;
    padding: 10px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.total-cost {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.note-text {
    color: #fff;
    font-style: italic;
    font-size: 14px;
    text-align: center;
}

/* Phần nút chức năng */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 10px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    background: #1e3799;
    color: #fff;
}

.action-btn i {
    font-size: 16px;
}

.action-btn:hover {
    background: #0062cc;
}

.cart-btn {
    background: #28a745;
}

.cart-btn:hover {
    background: #218838;
}

.clear-btn {
    background: #dc3545;
}

.clear-btn:hover {
    background: #c82333;
}

/* Popup styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.product-search-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1000px;
    height: 90vh;
    min-height: 600px;
    max-height: 90vh;
    background: #fff;
    border-radius: 10px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.popup-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0; /* Không cho phép header bị co lại */
    background: #fff;
}

.popup-title {
    margin: 0;
    font-size: 20px;
    color: #1e3799;
}

.close-popup {
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
}

.close-popup:hover {
    color: #dc3545;
}

.search-section {
    padding: 20px;
    display: flex;
    gap: 20px;
    align-items: center;
    border-bottom: 1px solid #dee2e6;
    flex-shrink: 0; /* Không cho phép search section bị co lại */
    background: #fff;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .search-section {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .sort-box {
        width: 100%;
        min-width: auto;
    }

    .component-row {
        flex-direction: column;
        align-items: flex-start;
    }

}

.search-box {
    flex: 1;
    display: flex;
    gap: 10px;
}

.search-input-container {
    flex: 1;
    position: relative;
    display: flex;
    gap: 10px;
}

.search-box input {
    flex: 1;
    padding: 8px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #3d5afe;
    box-shadow: 0 0 0 2px rgba(61, 90, 254, 0.1);
}

.search-btn {
    background: #3d5afe;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #1e3799;
}

/* Livesearch Popup Styles */
.livesearch-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 60px; /* Trừ đi width của search button */
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.livesearch-popup.show {
    display: block;
}

.livesearch-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.livesearch-item:hover {
    background: #f8f9fa;
}

.livesearch-item:last-child {
    border-bottom: none;
}

.livesearch-img {
    width: 50px;
    height: 50px;
    margin-right: 12px;
    border-radius: 4px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
}

.livesearch-info {
    flex: 1;
}

.livesearch-name {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.livesearch-price {
    font-size: 14px;
    font-weight: 600;
    color: #dc3545;
}

.livesearch-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.livesearch-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.sort-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 280px;
}

.sort-box label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
}

.sort-box label i {
    color: #3d5afe;
    margin-right: 5px;
}

.sort-box select {
    padding: 8px 15px;
    border: 1px solid #ced4da;
    border-radius: 5px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
}

.sort-box select:focus {
    outline: none;
    border-color: #3d5afe;
    box-shadow: 0 0 0 2px rgba(61, 90, 254, 0.1);
}

.sort-box select:hover {
    border-color: #3d5afe;
}

.product-list {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    min-height: 0; /* Quan trọng để flex scroll hoạt động */
    height: 100%; /* Chiều cao cố định để tránh nhảy popup */
}

/* Loading States */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3d5afe;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

.error {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
    font-size: 16px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    margin: 20px;
}

/* Cập nhật layout cho product-info trong popup */
.product-item {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fff;
    transition: all 0.3s ease;
    gap: 15px;
}

.product-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #1e3799;
}

.product-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 5px;
}

.product-name {
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin: 0;
    line-height: 1.4;
    flex: 1;
    margin-right: 15px;
}

.product-price {
    font-weight: 700;
    font-size: 18px;
    color: #dc3545;
    margin: 0;
    white-space: nowrap;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.product-code {
    font-size: 13px;
    color: #666;
    margin: 0;
}

.product-warranty {
    font-size: 13px;
    color: #28a745;
    margin: 0;
}

.product-actions {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.add-product-btn {
    background: #1e3799;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.add-product-btn:hover {
    background: #152a6b;
    transform: translateY(-2px);
}

.add-product-btn i {
    font-size: 12px;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px;
    border-top: 1px solid #dee2e6;
    flex-shrink: 0; /* Không cho phép pagination bị co lại */
    background: #fff;
}

.page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn.active {
    background: #4285f4;
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.page-btn:hover:not(.active) {
    background: #e8e8e8;
    transform: translateY(-1px);
}

.page-btn.prev, .page-btn.next {
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
}

.page-btn.prev:hover, .page-btn.next:hover {
    background: #e8e8e8;
    color: #333;
}

.page-btn.dots {
    background: transparent;
    color: #666;
    cursor: default;
    font-weight: bold;
}

.page-btn.dots:hover {
    background: transparent;
    transform: none;
}

/* Hiệu ứng hiển thị */
.product-search-popup.show,
.popup-overlay.show {
    display: block;
}

/* Selected Product Styles */
.selected-product {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    width: calc(100% - 170px);
}

.selected-product .product-info {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    flex-direction: row;
}

@media (max-width: 768px) {
     /* Responsive cho selected product */
     .selected-product .product-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

.selected-product .product-image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid #ddd;
    flex-shrink: 0;
}

.selected-product .product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.selected-product .product-name {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.selected-product .product-code {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.selected-product .product-warranty {
    font-size: 12px;
    color: #28a745;
    margin: 0;
}

.selected-product .product-stock {
    font-size: 12px;
    color: #17a2b8;
    margin: 0;
}

.selected-product .product-price-section {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.selected-product .product-price {
    font-weight: 700;
    font-size: 16px;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.selected-product .quantity-section {
    display: flex;
    align-items: center;
    gap: 5px;
}

.selected-product .quantity-label {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.quantity-input {
    width: 60px;
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.quantity-input:focus {
    outline: none;
    border-color: #1e3799;
}

.selected-product .total-price {
    font-weight: 700;
    font-size: 16px;
    color: #dc3545;
    margin: 0;
    white-space: nowrap;
}

.product-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-left: 15px;
}

.btn-edit, .btn-delete {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-edit {
    background: #007bff;
    color: #fff;
}

.btn-edit:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-delete {
    background: #dc3545;
    color: #fff;
}

.btn-delete:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Component row khi đã chọn sản phẩm */
.component-row.has-product .btn-choose {
    display: none;
}

.component-row.has-product .selected-product {
    display: block !important;
}

/* Responsive for tablets */
@media (max-width: 768px) {
    .selected-product {
        width: calc(100% - 140px);
    }
}

/* Responsive for small tablets */
@media (max-width: 600px) {
    .selected-product {
        width: calc(100% - 120px);
    }
}

/* Responsive for mobile */
@media (max-width: 480px) {
    .selected-product {
        width: 100%;
        padding: 10px;
    }
    
    .selected-product .product-info {
        gap: 8px;
    }
    
    .selected-product .product-name {
        font-size: 13px;
    }
    
    .selected-product .product-price,
    .selected-product .total-price {
        font-size: 13px;
    }
    
    .selected-product .quantity-section {
        gap: 3px;
    }
    
    .quantity-input {
        width: 50px;
        padding: 4px 6px;
        font-size: 13px;
    }
    
    .btn-edit, .btn-delete {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}

/* Image Preview Popup */
.image-preview-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.image-preview-popup.show {
    display: flex;
}

.image-popup-content {
    background: white;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Khi tải ảnh, cho phép content mở rộng full */
.image-popup-content.full-content {
    max-height: none;
    height: auto;
}

.image-popup-header {
    background: #1e3799;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.image-popup-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-image-popup {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.close-image-popup:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: white;
}

/* Khi tải ảnh, cho phép content hiển thị full */
.image-popup-content.full-content .image-content {
    overflow: visible;
    max-height: none;
    height: auto;
}

.image-popup-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.download-image-btn {
    background: #28a745;
    color: white;
}

.download-image-btn:hover {
    background: #218838;
}

.print-image-btn {
    background: #6c757d;
    color: white;
}

.print-image-btn:hover {
    background: #5a6268;
}

/* Bảng báo giá trong popup */
.quote-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.quote-header {
    text-align: center;
    margin-bottom: 20px;
}

.company-info {
    text-align: right;
    margin-bottom: 10px;
    color: #0066CC;
    font-weight: bold;
}

.quote-title {
    font-size: 18px;
    font-weight: bold;
    color: #FF0000;
    margin: 20px 0;
    text-align: center;
}

.quote-date {
    text-align: left;
    margin: 10px 0;
    font-weight: bold;
}

.unit-info {
    text-align: right;
    margin: 10px 0;
    font-weight: bold;
}

.quote-table th {
    background: #4472C4;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    border: 1px solid #000;
}

.quote-table td {
    padding: 10px 8px;
    border: 1px solid #000;
    text-align: center;
}

.quote-table td:nth-child(3) {
    text-align: left;
    color: #0066CC;
}

.quote-table td:nth-child(6),
.quote-table td:nth-child(7) {
    text-align: right;
    font-weight: bold;
    color: #FF6600;
}

.quote-table tbody tr:nth-child(even) {
    background: #F8F9FA;
}

.summary-section {
    margin-top: 20px;
}

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

.summary-table td {
    padding: 8px;
    border: 1px solid #000;
    text-align: right;
    font-weight: bold;
    background: #FFF2CC;
}

.summary-table td:first-child {
    width: 70%;
}

.summary-table td:last-child {
    color: #FF6600;
}

.note-section {
    margin-top: 20px;
    text-align: center;
    padding: 15px;
    background: #FFEBEE;
    border: 1px solid #000;
    color: #FF0000;
    font-weight: bold;
}

.contact-section {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info {
    font-weight: bold;
    color: #333;
}

.thank-you {
    font-weight: bold;
    color: #FF0000;
    font-size: 16px;
}

@media (max-width: 768px) {
    .title-page {
        font-size: 20px;
        padding: 12px 15px;
        letter-spacing: 1px;
        border-radius: 0 0 15px 15px;
    }
    
    .title-page::after {
        width: 40px;
        height: 3px;
    }
    
    .image-popup-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .image-content {
        padding: 10px;
    }
    
    .quote-table {
        font-size: 12px;
    }
    
    .quote-table th,
    .quote-table td {
        padding: 8px 4px;
    }
    
    .image-popup-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .title-page {
        font-size: 16px;
        padding: 10px 10px;
        letter-spacing: 0.5px;
        border-radius: 0 0 10px 10px;
    }
    
    .title-page::after {
        width: 30px;
        height: 2px;
    }
}

/* === MOBILE RESPONSIVE FIXES === */
@media (max-width: 768px) {
    .build-pc-container {
        margin: 15px 0 30px 0;
        padding: 0 10px;
    }
    
    .build-pc-content {
        padding: 0;
    }
    
    .component-row {
        margin-bottom: 15px;
        padding: 15px 10px;
        border-radius: 8px;
    }
    
    .component-name {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .btn-choose {
        padding: 8px 15px;
        font-size: 13px;
        width: 100%;
        text-align: center;
    }
    
    .selected-product {
        margin-top: 10px;
    }
    
    .product-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .product-details {
        text-align: center;
    }
    
    .product-details div {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .product-price-section {
        align-items: center;
        gap: 8px;
    }
    
    .product-price {
        font-size: 14px;
        font-weight: bold;
    }
    
    .quantity-section {
        justify-content: center;
    }
    
    .quantity-input {
        width: 50px;
        padding: 4px;
        font-size: 12px;
    }
    
    .total-price {
        font-size: 14px;
        font-weight: bold;
        color: #e74c3c;
    }
    
    .product-actions {
        flex-direction: row;
        justify-content: center;
        gap: 10px;
        margin-top: 10px;
        width: 100%;
        padding-right: 20px;
    }
    
    .btn-edit,
    .btn-delete {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .total-section {
        padding: 15px 10px;
        margin: 20px 10px;
    }
    
    .total-cost {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .total-label {
        font-size: 14px;
    }
    
    .total-amount {
        font-size: 18px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 10px;
        padding: 0 10px;
    }
    
    .action-btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
        text-align: center;
    }
    
    .action-btn i {
        margin-right: 8px;
    }
}

@media (max-width: 480px) {
    .build-pc-container {
        margin: 10px 0 20px 0;
        padding: 0 5px;
    }
    
    .component-row {
        margin-bottom: 10px;
        padding: 10px 8px;
    }
    
    .component-name {
        font-size: 13px;
    }
    
    .btn-choose {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .product-details div {
        font-size: 11px;
    }
    
    .product-price,
    .total-price {
        font-size: 13px;
    }
    
    .total-amount {
        font-size: 16px;
    }
    
    .action-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Popup mobile fixes */
    .product-search-popup .popup-content {
        width: 95%;
        max-height: 90vh;
        margin: 5vh auto;
    }
    
    .popup-header {
        padding: 10px 15px;
    }
    
    .popup-title {
        font-size: 16px;
    }
    
    .search-section {
        padding: 10px 15px;
    }
    
    .product-list {
        padding: 0 15px;
        max-height: 50vh;
    }
    
    .product-item {
        padding: 10px;
        margin-bottom: 8px;
    }
    
    .product-item img {
        width: 40%;
        height: auto;
    }
    
    .product-item .product-name {
        font-size: 12px;
    }
    
    .product-item .product-price {
        font-size: 13px;
    }
    
    .product-item .btn-select {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Responsive cho mobile */
@media (max-width: 768px) {
    .product-search-popup {
        width: 95%;
        height: 90%;
        max-height: 90vh;
    }
    
    .product-list {
        max-height: 50vh;
    }
    
    .product-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .product-image {
        width: 60px;
        height: 60px;
        align-self: center;
    }
    
    .product-info {
        text-align: center;
    }
    
    .product-header {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }
    
    .product-name {
        font-size: 14px;
        margin-right: 0;
    }
    
    .product-code, .product-warranty {
        font-size: 12px;
    }
    
    .product-price {
        font-size: 16px;
    }
    
    .product-actions {
        margin-left: 0;
        justify-content: center;
    }
    
    .add-product-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .search-section {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-input-container {
        width: 100%;
    }
    
    .livesearch-popup {
        width: 100%;
        max-height: 200px;
    }
    
    .livesearch-item {
        padding: 8px;
        gap: 8px;
    }
    
    .livesearch-img {
        width: 40px;
        height: 40px;
    }
    
    .livesearch-name {
        font-size: 13px;
    }
    
    .livesearch-price {
        font-size: 12px;
    }
    
    .selected-product .product-image {
        width: 40%;
        height: auto;
        align-self: center;
    }
    
    .selected-product .product-details {
        text-align: center;
    }
    
    .selected-product .product-price-section {
        gap: 10px;
        margin-left: 0;
    }
    
    .selected-product .product-price,
    .selected-product .total-price {
        font-size: 14px;
    }
    
    .product-actions {
        justify-content: center;
        margin-left: 0;
    }
}



