/**
 * CSS cho giao diện frontend của WooQuote123
 */

/* Nút báo giá */
.wooquote123-button-wrapper {
    margin: 15px 0;
    text-align: center;
}

/* Layout cho 2 nút trong trang chi tiết sản phẩm */
.wooquote123-buttons-wrapper {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wooquote123-quantity-wrapper {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    height: 40px;
}

.wooquote123-quantity-wrapper .wooquote123-qty-btn {
    background: #f8f9fa;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    transition: background-color 0.2s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wooquote123-quantity-wrapper .wooquote123-qty-btn:hover {
    background: #e9ecef;
}

.wooquote123-quantity-wrapper .wooquote123-single-qty {
    border: none;
    padding: 0;
    text-align: center;
    font-size: 14px;
    min-width: 60px;
    width: 60px;
    height: 40px;
    outline: none;
    background: white;
}

/* Nút "Thêm vào giỏ hàng" */
.wooquote123-add-to-cart-button {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    padding: 0 4px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: background-color 0.2s;
    text-decoration: none !important;
    height: 40px;   
    min-width: 185px;
    min-height: unset !important;
}

.wooquote123-add-to-cart-button:hover {
    background: #c82333 !important;
    color: white !important;
}

.wooquote123-add-to-cart-button .wooquote123-svg-icon {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);
    order: 2;
}

/* Nút "Yêu cầu báo giá" */
.wooquote123-quote-button {
    background: white !important;
    color: #dc3545 !important;
    border: 1px solid #dc3545 !important;
    padding: 12px 20px !important;
    border-radius: 4px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    transition: all 0.2s;
    text-decoration: none !important;
    height: 40px;
    min-width: 160px;
}

.wooquote123-quote-button:hover {
    background: #dc3545 !important;
    color: white !important;
}

.wooquote123-quote-button:hover .wooquote123-svg-icon {
    filter: brightness(0) invert(1);
}

.wooquote123-quote-button .wooquote123-svg-icon {
    width: 16px;
    height: 16px;
    filter: none;
    order: 2;
}

.wooquote123-quote-button .wooquote123-text {
    order: 1;
}

/* Thông báo thành công */
.wooquote123-success-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    animation: wooquote123-slideInRight 0.3s ease-out;
    z-index: 9999;
    max-width: 400px;
    min-width: 300px;
}

.wooquote123-notification-content {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.wooquote123-notification-icon {
    font-size: 18px;
    font-weight: bold;
    margin-top: 2px;
    flex-shrink: 0;
}

.wooquote123-notification-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 5px;
}

.wooquote123-notification-link {
    color: white;
    text-decoration: underline;
    font-weight: 500;
    font-size: 14px;
    margin-left: auto;
    flex-shrink: 0;
}

.wooquote123-notification-link:hover {
    color: #f8f9fa;
}

.wooquote123-notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wooquote123-notification-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

@keyframes wooquote123-slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Nút báo giá cho danh sách sản phẩm */
.wooquote123-loop-button {
    margin: 10px 0;
    text-align: center;
}

.wooquote123-loop-button .wooquote123-quote-button {
    padding: 3px 3px !important;
    width: 100%;
    border-radius: 3px !important;
    font-weight: 600 !important;
    min-width: auto !important;
}

.wooquote123-loop-button .wooquote123-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 4px;
    margin: 2px;
    z-index: 1;
}

.wooquote123-loop-button .wooquote123-quote-button .wooquote123-icon {
    position: relative;
    z-index: 3;
    color: #dc3545;
    margin-left: 6px;
    order: 2 !important;
}

/* Nút báo giá cho widget */
.wooquote123-widget-button {
    margin: 8px 0;
    text-align: center;
}


.wooquote123-widget-button .wooquote123-quote-button {
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 600;
    width: 100%;
    justify-content: center;
    border-radius: 6px;
    min-width: auto;
    position: relative;
    overflow: hidden;
    display: inline-flex !important;
    flex-direction: row !important;
}

.wooquote123-widget-button .wooquote123-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 4px;
    margin: 2px;
    z-index: 1;
}

.wooquote123-widget-button .wooquote123-quote-button .wooquote123-icon {
    position: relative;
    z-index: 3;
    color: #dc3545;
    margin-left: 4px;
    order: 2 !important;
}

.wooquote123-widget-button .wooquote123-quote-button .wooquote123-text {
    position: relative;
    z-index: 3;
    color: #dc3545;
    font-weight: 600;
    order: 1 !important;
}

/* Nút báo giá cho shortcode */
.wooquote123-shortcode-button {
    margin: 10px 0;
    text-align: center;
}

.wooquote123-shortcode-button .wooquote123-quote-button {
    min-width: 140px;
    font-size: 14px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    display: inline-flex !important;
    flex-direction: row !important;
}

.wooquote123-shortcode-button .wooquote123-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 4px;
    margin: 2px;
    z-index: 1;
}

.wooquote123-shortcode-button .wooquote123-quote-button .wooquote123-icon {
    position: relative;
    z-index: 3;
    color: #dc3545;
    margin-left: 8px;
    order: 2 !important;
}

.wooquote123-shortcode-button .wooquote123-quote-button .wooquote123-text {
    position: relative;
    z-index: 3;
    color: #dc3545;
    font-weight: 600;
    order: 1 !important;
}

.wooquote123-quote-button {
    gap: 3px;
}

.wooquote123-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 4px;
    margin: 2px;
    z-index: 1;
}

.wooquote123-quote-button .wooquote123-icon {
    position: relative;
    z-index: 3;
    color: #dc3545;
    font-size: 16px;
    margin-left: 8px;
    order: 2 !important;
}



.wooquote123-quote-button:hover {
    background: #c82333;
    transform: translateY(-2px);
    text-decoration: none;
}

.wooquote123-quote-button:hover::before {
    background: #fff;
}

.wooquote123-quote-button:hover .wooquote123-icon,
.wooquote123-quote-button:hover .wooquote123-text {
    color: #c82333;
}

.wooquote123-quote-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.2);
}

.wooquote123-quote-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Icon styling được định nghĩa trong từng loại nút cụ thể */

/* Class riêng cho text "Yêu cầu báo giá" */
.wooquote123-text {
    /* Có thể thêm styling riêng cho text ở đây */
    /* Ví dụ: font-size, font-weight, letter-spacing, etc. */
    display: inline-block;
}

/* SVG Icon styling */
.wooquote123-svg-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.wooquote123-icon .wooquote123-svg-icon {
    width: 26px;
    height: 26px;
}

/* SVG icon trong trạng thái "đã thêm" */
.wooquote123-in-cart .wooquote123-svg-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

/* Checkmark icon styling */
.wooquote123-check-icon {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%);
}

/* Đảm bảo nút hiển thị đúng trên tất cả theme */
.woocommerce .wooquote123-quote-button,
.woocommerce-page .wooquote123-quote-button {
    background: #dc3545 !important;
    border: none !important;
    text-decoration: none !important;
    position: relative !important;
    overflow: hidden !important;
    display: inline-flex !important;
    flex-direction: row !important;
    min-height: unset !important;
    border-radius: 3px !important;
    padding: 3px 3px !important;
}

span.wooquote123-text:hover {
    color: #dc3545;
}

.woocommerce .wooquote123-quote-button::before,
.woocommerce-page .wooquote123-quote-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 4px;
    margin: 2px;
    z-index: 1;
}

.woocommerce .wooquote123-quote-button .wooquote123-icon,
.woocommerce-page .wooquote123-quote-button .wooquote123-icon {
    position: relative;
    z-index: 3;
    color: #dc3545;
    margin-left: 0;
    order: 2 !important;
}

.woocommerce .wooquote123-quote-button .wooquote123-text,
.woocommerce-page .wooquote123-quote-button .wooquote123-text {
    position: relative;
    z-index: 3;
    color: #212121;
    font-weight: 600;
    order: 1 !important;
}

/* .woocommerce .wooquote123-quote-button:hover,
.woocommerce-page .wooquote123-quote-button:hover {
    background: #c82333 !important;
    text-decoration: none !important;
} */

/* .woocommerce .wooquote123-quote-button:hover::before,
.woocommerce-page .wooquote123-quote-button:hover::before {
    background: #fff;
} */

.woocommerce .wooquote123-quote-button:hover .wooquote123-icon,
.woocommerce-page .wooquote123-quote-button:hover .wooquote123-icon,
.woocommerce .wooquote123-quote-button:hover .wooquote123-text,
.woocommerce-page .wooquote123-quote-button:hover .wooquote123-text {
    color: #c82333;
}

/* Responsive cho nút báo giá */
@media (max-width: 768px) {
    .wooquote123-quote-button {
        padding: 10px 18px;
        font-size: 13px;
    }
    
    .wooquote123-loop-button .wooquote123-quote-button {
        padding: 8px 14px;
        font-size: 12px;
    }
    
    .wooquote123-widget-button .wooquote123-quote-button {
        padding: 6px 10px;
        font-size: 11px;
    }
}

/* Modal */
.wooquote123-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wooquote123-modal-content {
    background-color: #fff;
    margin: auto;
    padding: 0;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: wooquote123-modal-fade-in 0.3s ease;
}

@keyframes wooquote123-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wooquote123-modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.wooquote123-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

.wooquote123-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.wooquote123-close:hover,
.wooquote123-close:focus {
    color: #000;
}

.wooquote123-modal-body {
    padding: 20px;
}

/* Form */
.wooquote123-form {
    max-width: 100%;
}

.wooquote123-product-info {
    background: #f8f9fa;    
    border-radius: 4px;
}

.wooquote123-product-info h4 {
    margin: 0 0 5px 0;
    color: #333;
}

.wooquote123-form-row {
    margin-bottom: 20px;
}

.wooquote123-form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.wooquote123-form-row input,
.wooquote123-form-row textarea,
.wooquote123-form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.wooquote123-form-row input:focus,
.wooquote123-form-row textarea:focus,
.wooquote123-form-row select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.wooquote123-form-row input[type="number"] {
    max-width: 120px;
}

.wooquote123-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.wooquote123-form-actions .button {
    padding: 10px 20px;
    font-size: 14px;
}

.wooquote123-cancel {
    background: #f1f1f1;
    color: #333;
    border: 1px solid #ccc;
}

.wooquote123-cancel:hover {
    background: #e1e1e1;
}

.wooquote123-submit {
    background: #0073aa;
    color: #fff;
    border: none;
}

.wooquote123-submit:hover {
    background: #005a87;
}

/* Shortcode form */
.wooquote123-shortcode-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .wooquote123-modal-content {
        width: 95%;
        margin: 20px;
    }
    
    .wooquote123-form-actions {
        flex-direction: column;
    }
    
    .wooquote123-form-actions .button {
        width: 100%;
    }
}

/* Loading state */
.wooquote123-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wooquote123-loading .wooquote123-submit {
    position: relative;
}

.wooquote123-loading .wooquote123-submit:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #fff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: wooquote123-spin 1s linear infinite;
}

/* Loading spinner cho ô nhập SKU khi đang tìm kiếm */
.wooquote123-sku-input.wooquote123-loading {
    position: relative;
    background-image: linear-gradient(transparent, transparent), url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" stroke="%230073aa" stroke-width="5" fill="none" stroke-linecap="round"><animateTransform attributeName="transform" type="rotate" dur="1s" from="0 25 25" to="360 25 25" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px 16px;
}

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

/* Success/Error messages */
.wooquote123-message {
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
    font-weight: 500;
}

.wooquote123-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wooquote123-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Toast: hiển thị nổi, không đẩy layout */
.wooquote123-toast {
    position: fixed;
    right: 20px;
    top: 20px;
    z-index: 99999;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== GIỎ HÀNG ===== */

/* Trang giỏ hàng */
.wooquote123-cart-page {
    max-width: 100%;
    margin: 0 auto;
    border-radius: 8px;
}

.wooquote123-cart-header {
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.wooquote123-cart-header h2 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 28px;
    text-align: center;
}

.wooquote123-cart-summary {
    color: #666;
    font-size: 16px;
}

/* Thông tin khách hàng */
.wooquote123-customer-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wooquote123-customer-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.wooquote123-customer-section .wooquote123-form-row {
    margin-bottom: 20px;
}

.wooquote123-customer-section .wooquote123-form-row:last-child {
    margin-bottom: 0;
}

/* Grid 2 cột cho thông tin khách hàng */
.wooquote123-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 30px;
}

.wooquote123-grid-2 .wooquote123-col {
    display: block;
}

/* Sản phẩm yêu cầu báo giá */
.wooquote123-products-section h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

/* Tìm kiếm sản phẩm */
.wooquote123-product-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.wooquote123-product-search input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.wooquote123-product-search button {
    padding: 10px 20px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.wooquote123-product-search button:hover {
    background: #005a87;
}

/* Bảng giỏ hàng */
.wooquote123-cart-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
    transition: min-height 0.2s ease;
}

.wooquote123-cart-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

/* Cột 2: Mã sản phẩm (SKU) - thu hẹp lại */
.wooquote123-cart-table th:nth-child(2),
.wooquote123-cart-table td:nth-child(2) {
    width: 180px;
    max-width: 180px;
}

/* Input SKU full chiều rộng ô */
.wooquote123-cart-table td:nth-child(2) .wooquote123-sku-input {
    width: 100%;
}

/* Thu nhỏ cột số lượng */
.wooquote123-cart-table th:nth-child(4),
.wooquote123-cart-table td:nth-child(4) {
    width: 120px;
}

.wooquote123-cart-table thead {
    background: #f1f1f1;
}

.wooquote123-cart-table th {
    padding: 15px 10px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
    white-space: nowrap;
}

.wooquote123-cart-table td {
    padding: 15px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.wooquote123-cart-table tbody tr:hover {
    background: #f8f9fa;
}

.wooquote123-cart-table tbody tr:last-child td {
    border-bottom: none;
}

.wooquote123-empty-cart td {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
}

/* Điều khiển số lượng */
.wooquote123-quantity-controls {
    display: flex;
    align-items: center;
    gap: 3px;
}

.wooquote123-qty-btn {
    width: 40px;
    height: 30px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

.wooquote123-qty-btn:hover {
    background: #e9ecef;
}

.wooquote123-qty-input {
    width: 40px;
    height: 26px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px !important;
    font-size: 14px;
    padding: 0px !important;
}

/* Bo tròn nhẹ cho các input nhập trực tiếp trong bảng */
#wooquote123-inline-sku,
#wooquote123-inline-name,
#wooquote123-inline-qty {
    border-radius: 10px;
}

.wooquote123-qty-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

/* Giá tiền */
.wooquote123-price,
.wooquote123-price-excl-vat,
.wooquote123-subtotal {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* Tổng tiền */
.wooquote123-cart-totals {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 30px;
}

.wooquote123-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.wooquote123-total-row:last-child {
    border-bottom: none;
}

.wooquote123-total-final {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
    border-top: 2px solid #0073aa;
    margin-top: 10px;
    padding-top: 15px;
}

.wooquote123-total-label {
    font-weight: 600;
    color: #333;
}

.wooquote123-total-amount {
    font-weight: 600;
    color: #333;
}

/* Hành động giỏ hàng */
.wooquote123-cart-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    align-items: center;
}

/* Trang thành công */
.wooquote123-success-page {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    text-align: center;
}
.wooquote123-success-icon {
    width: 70px;
    height: 70px;
    line-height: 70px;
    margin: 0 auto 15px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    font-size: 34px;
    font-weight: bold;
}
.wooquote123-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.wooquote123-success-actions .button {
    padding: 10px 18px;
}
.wooquote123-cart-actions .button {
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wooquote123-cart-actions .button-primary {
    background: #ed3237;
    color: #fff;
    border: none;
    font-weight: 600;
}

.wooquote123-cart-actions .button-primary:hover {
    background: #218838;
    color: #fff;
}

.wooquote123-cart-actions .button-primary:before {
    content: "→";
    font-size: 18px;
}

/* Nút đã thêm vào giỏ */
.wooquote123-in-cart {
    background: #323232 !important;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2) !important;
}

.wooquote123-in-cart::before {
    background: #fff !important;
}

.wooquote123-in-cart .wooquote123-icon {
    color: #fff !important;
    order: 2 !important;
}

.wooquote123-in-cart .wooquote123-check-icon {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(0%) hue-rotate(93deg) brightness(103%) contrast(103%) !important;
}

/* Nút "Xem giỏ hàng" - trạng thái đã thêm */
.wooquote123-in-cart {
    cursor: pointer !important;
}

.wooquote123-in-cart:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3) !important;
}

.wooquote123-in-cart .wooquote123-text {
    color: #212121 !important;
    order: 1 !important;
}

.single-product .wooquote123-button-wrapper {
    margin: 15px 0;
    text-align: left;
}

.wooquote123-in-cart:hover::before {
    background: #fff !important;
}

.wooquote123-in-cart:hover .wooquote123-icon {
    color: #218838 !important;
    order: 2 !important;
}

.wooquote123-in-cart:hover .wooquote123-text {
    color: #dc3545 !important;
    order: 1 !important;
}

/* Responsive cho giỏ hàng */
@media (max-width: 768px) {
    .wooquote123-cart-page {
        padding: 0;
    }
    
    .wooquote123-grid-2 {
        grid-template-columns: 1fr;
    }
    
    .wooquote123-cart-table {
        font-size: 14px;
    }
    
    .wooquote123-cart-table th,
    .wooquote123-cart-table td {
        padding: 10px 5px;
    }
    
    .wooquote123-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .wooquote123-cart-actions .button {
        width: 100%;
        justify-content: center;
    }
    
    .wooquote123-product-search {
        flex-direction: column;
    }
    
    .wooquote123-product-search input,
    .wooquote123-product-search button {
        width: 100%;
    }
}

/* Autocomplete tối ưu - Giới hạn 5 kết quả với hình ảnh */
.wooquote123-autocomplete-dropdown {
    max-height: 300px; /* Tăng để chứa hình ảnh */
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    z-index: 9999 !important;
    background: #fff;
}

.wooquote123-autocomplete-dropdown .ui-menu-item {
    border-bottom: 1px solid #f0f0f0;
}

.wooquote123-autocomplete-dropdown .ui-menu-item:last-child {
    border-bottom: none;
}

.wooquote123-autocomplete-dropdown .ui-menu-item-wrapper {
    padding: 0;
    transition: background-color 0.2s;
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

.wooquote123-autocomplete-dropdown .ui-menu-item-wrapper:hover,
.wooquote123-autocomplete-dropdown .ui-menu-item-wrapper.ui-state-active {
    background-color: #f8f9fa;
}

/* Styling cho product item trong dropdown */
.wooquote123-product-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    gap: 10px;
}

.wooquote123-product-image {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 3px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wooquote123-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Đảm bảo hình ảnh hiển thị trong jQuery UI Autocomplete */
.ui-autocomplete .wooquote123-product-item {
    display: flex !important;
    align-items: center;
    padding: 2px 10px;
    gap: 10px;
}

.ui-autocomplete .wooquote123-product-image {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 3px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ui-autocomplete .wooquote123-product-image img {
    width: 40px !important;
    height: 40px !important;
    object-fit: cover;
    border-radius: 3px;
    display: block !important;
}

.ui-autocomplete .wooquote123-product-info {
    flex: 1;
    min-width: 250px;
}

.ui-autocomplete .wooquote123-product-sku {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.ui-autocomplete .wooquote123-product-name {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
    font-weight: 400;
}

/* Hover state cho dropdown items */
.ui-autocomplete .wooquote123-dropdown-item:hover,
.ui-autocomplete .wooquote123-dropdown-item.ui-state-hover {
    background-color: #f8f9fa;
}

/* No results styling */
.ui-autocomplete .wooquote123-no-results {
    padding: 12px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.wooquote123-product-info {
    flex: 1;
    min-width: 0;
}

.wooquote123-product-sku {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.wooquote123-product-name {
    font-size: 13px;
    color: #333;
    line-height: 1.3;
    font-weight: 400;
}

/* Loading state cho autocomplete và row */
.wooquote123-loading {
    position: relative;
}

.wooquote123-loading::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wooquote123-spin 1s linear infinite;
}

/* Loading state cho row */
tr.wooquote123-loading {
    opacity: 0.7;
    background-color: #f8f9fa;
}

tr.wooquote123-loading::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: wooquote123-spin 1s linear infinite;
}


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

/* Dòng mới để thêm sản phẩm */
.wooquote123-new-row {
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
}

.wooquote123-new-row td {
    padding: 12px 8px;
}

.wooquote123-new-row input[type="text"] {
    border: 2px solid #0073aa;
    background-color: #fff;
    font-weight: 500;
    border-radius: 4px;
}

.wooquote123-new-row input[type="text"]:focus {
    border-color: #005a87;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

/* Dòng sản phẩm đã thêm */
.wooquote123-existing-item {
    background-color: #fff;
    border: 1px solid #e9ecef;
}

.wooquote123-existing-item td {
    padding: 10px 8px;
}

.wooquote123-existing-item input[type="text"] {
    border: 1px solid #ced4da;
    background-color: #f8f9fa;
    font-size: 14px;
    border-radius: 4px;
}

.wooquote123-existing-item input[type="text"]:focus {
    border-color: #0073aa;
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(0, 115, 170, 0.2);
}

/* Nút thêm cho dòng mới */
.wooquote123-new-row #wooquote123-add-manual-item {
    background: #28a745;
    border-color: #28a745;
    color: #fff;
    font-weight: 600;
}

.wooquote123-new-row #wooquote123-add-manual-item:hover {
    background: #218838;
    border-color: #1e7e34;
}

/* Nút xóa cho dòng đã thêm */
.wooquote123-existing-item .wooquote123-remove-item {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.wooquote123-existing-item .wooquote123-remove-item:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Responsive cho autocomplete */
@media (max-width: 768px) {
    .wooquote123-autocomplete-dropdown {
        max-height: 250px;
    }
    
    .wooquote123-product-item {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .wooquote123-product-image {
        width: 40px;
        height: 40px;
    }
    
    .wooquote123-product-name {
        font-size: 13px;
    }
    
    .wooquote123-product-sku {
        font-size: 11px;
    }
    
    .wooquote123-product-price {
        font-size: 12px;
    }
    
    .wooquote123-new-row td,
    .wooquote123-existing-item td {
        padding: 8px 4px;
    }
}

/* ===== CART COUNTER ===== */
.wooquote123-cart-counter {
    position: relative;
    display: inline-block;
}

.wooquote123-cart-counter-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wooquote123-cart-counter-link:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.wooquote123-cart-icon {
    font-size: 16px;
}

.wooquote123-cart-text {
    font-size: 14px;
}

.wooquote123-cart-count {
    background: #ED3237;
    color: #fff;
    padding: 2px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
    position: absolute;
    top: 0;
    right: 0;
}

/* Cart Dropdown */
.wooquote123-cart-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 350px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0px;
}

/* Bridge để duy trì hover state */
.wooquote123-cart-dropdown::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.wooquote123-cart-counter:hover .wooquote123-cart-dropdown,
.wooquote123-cart-dropdown:hover {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    display: block !important;
}

.wooquote123-cart-dropdown-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.wooquote123-cart-dropdown-header h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.wooquote123-cart-total {
    font-size: 18px;
    font-weight: bold;
    color: #0073aa;
}

.wooquote123-cart-dropdown-items {
    max-height: 300px;
    overflow-y: auto;
}

.wooquote123-cart-dropdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.wooquote123-cart-dropdown-item:hover {
    background: #f8f9fa;
}

.wooquote123-cart-dropdown-item:last-child {
    border-bottom: none;
}

.wooquote123-cart-item-info {
    flex: 1;
    min-width: 0;
}

.wooquote123-cart-item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wooquote123-cart-item-sku {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wooquote123-cart-item-details {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.wooquote123-cart-item-qty {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.wooquote123-cart-item-price {
    font-weight: 600;
    color: #0073aa;
    font-size: 14px;
}

/* Nút xóa sản phẩm trong mini cart */
.wooquote123-cart-item-remove {
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.wooquote123-cart-item-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.wooquote123-cart-item-remove:active {
    transform: scale(0.95);
}

.wooquote123-remove-icon {
    display: block;
    line-height: 1;
}

.wooquote123-cart-dropdown-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.wooquote123-cart-view-button {
    width: 100%;
    text-align: center;
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.3s ease;
}

.wooquote123-cart-view-button:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
}

/* Empty cart state - chỉ ẩn khi không hover vào counter và không hover vào dropdown */
.wooquote123-cart-counter:not(:hover) .wooquote123-cart-dropdown:not(:hover) {
    display: none;
}

/* Đảm bảo dropdown hiển thị khi hover vào counter hoặc dropdown */
.wooquote123-cart-counter:hover .wooquote123-cart-dropdown,
.wooquote123-cart-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Đảm bảo dropdown hiển thị khi hover vào counter hoặc dropdown */
.wooquote123-cart-counter.wooquote123-has-items:hover .wooquote123-cart-dropdown,
.wooquote123-cart-counter.wooquote123-has-items .wooquote123-cart-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Đảm bảo dropdown hiển thị khi hover vào counter hoặc dropdown */
.wooquote123-cart-counter.wooquote123-has-items:hover .wooquote123-cart-dropdown,
.wooquote123-cart-counter.wooquote123-has-items .wooquote123-cart-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

/* Chỉ hiển thị dropdown khi có sản phẩm */
.wooquote123-cart-counter:not(.wooquote123-has-items) .wooquote123-cart-dropdown {
    display: none !important;
}

/* Đảm bảo dropdown có thể hover được khi có sản phẩm */
.wooquote123-cart-counter.wooquote123-has-items .wooquote123-cart-dropdown {
    display: block;
}

/* Đảm bảo dropdown hiển thị khi hover vào counter hoặc dropdown */
.wooquote123-cart-counter.wooquote123-has-items:hover .wooquote123-cart-dropdown,
.wooquote123-cart-counter.wooquote123-has-items .wooquote123-cart-dropdown:hover {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    margin-top: 6px;
}

/* Cart counter variants */
.wooquote123-cart-counter.wooquote123-minimal .wooquote123-cart-counter-link {
    background: transparent;
    color: #333;
    padding: 5px 10px;
    box-shadow: none;
}

.wooquote123-cart-counter.wooquote123-minimal .wooquote123-cart-counter-link:hover {
    background: #f8f9fa;
    transform: none;
    box-shadow: none;
}

.wooquote123-cart-counter.wooquote123-minimal .wooquote123-cart-count {
    background: #ff6b6b;
    color: #fff;
}

span.wooquote123-text {
    background: #fff;
    padding: 6px 10px;
    border-radius: 3px;
    color: #212121;
}

/* Responsive cho cart counter */
@media (max-width: 768px) {
    .wooquote123-cart-dropdown {
        width: 300px;
        right: -50px;
    }
    
    .wooquote123-cart-counter-link {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .wooquote123-cart-dropdown-item {
        padding: 10px 15px;
    }
    
    .wooquote123-cart-item-name {
        font-size: 13px;
    }
    
    .wooquote123-cart-item-sku {
        font-size: 11px;
    }
}
