#sbm-results-display-area, .sbm-results-display-area-local {
    width: 100%;
    max-width: 1200px;
    margin-top: 2rem;
}
.sbm-results-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(4px);
    border-radius: 8px;
}
.sbm-results-notification {
    background-color: #fffbe6;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}
.sbm-results-result-count {
    font-size: 0.9rem;
    color: #666;
}
.sbm-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .sbm-results-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}
.sbm-result-card {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.sbm-result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}
.sbm-result-card-image {
    display: block;
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}
.sbm-result-card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.sbm-result-card-title {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
    flex-grow: 1;
    font-family: inherit;
}
.sbm-result-card-price {
    min-height: 24px;
    color: #111;
    font-weight: 600;
}
.sbm-result-card-price .woocommerce-Price-amount {
    color: var(--sbm-primary-color);
    font-weight: bold;
}
.price { font-size: 1.8rem; margin: 1.5rem 0; color: #333; display: flex; align-items: center; flex-wrap: wrap; }
.price .sbm-discount-badge { margin-left: 1rem; }
.sbm-discount-badge { font-size: 0.8em; font-weight: normal; color: #fff; background-color: var(--sbm-primary-color); padding: 2px 6px; border-radius: 4px; margin-left: 8px; }
.sbm-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) {
    .sbm-skeleton-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}
.sbm-skeleton-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}
.sbm-skeleton {
    background-color: #e5e7eb;
    animation: sbm-pulse-bg 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.sbm-skeleton.image {
    width: 100%;
    height: 250px;
}
.sbm-skeleton-content {
    padding: 1rem;
}
.sbm-skeleton.title {
    height: 20px;
    border-radius: 4px;
    margin-bottom: 0.75rem;
}
.sbm-skeleton.title.short {
    width: 60%;
}
.sbm-skeleton.price {
    width: 40%;
    height: 24px;
    border-radius: 4px;
}
@keyframes sbm-pulse-bg {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* =================================================================
 * SEARCH BAR STYLES
 * ================================================================= */

.sbmalpha-search-container {
    width: 100%;
    max-width: 600px;
    margin-bottom: 2rem;
    position: relative;
    transition: max-width 0.4s ease-in-out;
}

.sbmalpha-container.is-searching .sbmalpha-search-container {
    max-width: 800px;
}

.sbmalpha-search-input {
    width: 100%;
    padding: 0 4.5rem 0 1.75rem;
    font-size: 1.125rem;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 9999px !important;
    transition: all 0.2s ease;
    box-sizing: border-box;
    height: 64px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    -webkit-appearance: none;
}

.sbmalpha-search-input:focus {
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.4), 0 4px 15px rgba(0,0,0,0.12);
    border-color: #4285F4;
    outline: none;
}

.sbmalpha-search-button {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    color: #6b7280;
}

.sbmalpha-search-button svg {
    width: 28px;
    height: 28px;
}

/* Định vị thẻ sản phẩm để nút con có thể định vị theo */
.sbm-result-card {
    position: relative;
}

/* Style cho nút "Thêm vào giỏ" */
.sbm-card-add-to-cart-btn {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: calc(100% - 2rem);

    background-color: var(--sbm-primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;

    /* Mặc định ẩn đi */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    pointer-events: none; /* Không cho phép click khi đang ẩn */
}

/* Khi di chuột vào thẻ sản phẩm, cho nút hiện ra */
.sbm-result-card:hover .sbm-card-add-to-cart-btn {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Cho phép click khi hiện ra */
}

/* Khi nút được nhấn */
.sbm-card-add-to-cart-btn:disabled {
    background-color: #22c55e; /* Chuyển sang màu xanh lá */
    cursor: not-allowed;
}

/* === [THÊM MỚI] CSS cho các nút trên thẻ sản phẩm === */
.sbm-card-actions-wrapper {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: calc(100% - 2rem);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    /* Mặc định ẩn đi */
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.2s ease-in-out;
    pointer-events: none;
}

/* Khi di chuột vào thẻ sản phẩm, cho các nút hiện ra */
.sbm-result-card:hover .sbm-card-actions-wrapper {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.sbm-card-add-to-cart-btn,
.sbm-card-quick-review-btn {
    width: 100%;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sbm-card-quick-review-btn {
    background-color: #fff;
    color: var(--sbm-primary-color);
    border: 1px solid var(--sbm-primary-color);
}
.sbm-card-quick-review-btn:hover {
    background-color: #fef2f2;
}

/* Ghi đè lại để nút Thêm vào giỏ không còn position absolute */
.sbm-card-add-to-cart-btn {
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

/* === Spinner dưới thanh tìm kiếm === */
.sbm-search-bar-spinner {
    display: none; /* Mặc định ẩn */
    justify-content: center;
    padding: 0.5rem 0;
    width: 100%;
    position: absolute; /* Định vị tuyệt đối để không đẩy nội dung bên dưới quá nhiều */
    top: 100%;
    left: 0;
    z-index: 10;
}

.sbm-search-bar-spinner.is-active {
    display: flex; /* Hiện khi có class is-active */
}

.sbm-search-bar-spinner .sbm-loading-spinner {
    width: 24px;
    height: 24px;
    border-width: 3px;
    margin: 0; /* Ghi đè margin mặc định của spinner to */
}

/* =================================================================
   SMART PAGINATION STYLES (CLEAN & RESET)
   ================================================================= */

/* 1. Container chính: Reset style để tránh bị ảnh hưởng bởi container cha */
.sbm-results-pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    
    /* Style kính mờ */
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Kích thước và viền */
    padding: 8px 16px !important;
    border-radius: 50px !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
    
    width: fit-content !important;
    margin: 3rem auto !important;
    
    /* Reset dòng text */
    line-height: 1 !important;
}

/* 2. Làm sạch các thẻ SPAN chữ (Trang, / 5) */
/* Quan trọng: Gỡ bỏ mọi background, border, padding cũ */
.sbm-pagination-input-wrapper span {
    display: inline-block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
    box-shadow: none !important;
    
    /* Font style mới */
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #6b7280 !important;
}

/* Wrapper bao quanh ô input và chữ */
.sbm-pagination-input-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: none !important;
    background: none !important;
    padding: 0 5px !important;
}

/* 3. Ô nhập liệu (Input) */
.sbm-pagination-input {
    width: 40px !important;
    height: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    
    text-align: center !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    color: var(--sbm-primary-color, #ef4444) !important;
    
    background: #fff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    outline: none !important;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05) !important;
    
    /* Ẩn mũi tên mặc định của trình duyệt */
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}
/* Ẩn mũi tên tăng giảm trên Chrome/Safari */
.sbm-pagination-input::-webkit-outer-spin-button,
.sbm-pagination-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* 4. Nút mũi tên (Prev/Next) */
.sbm-pagination-btn {
    /* Reset kích thước và hình dáng */
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    margin: 0 !important;
    
    /* Flex để căn giữa icon */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    /* Màu sắc */
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    color: #555 !important;
    
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05) !important;
}

/* Hover nút */
.sbm-pagination-btn:hover:not(.disabled) {
    background: var(--sbm-primary-color, #ef4444) !important;
    color: #fff !important;
    border-color: var(--sbm-primary-color, #ef4444) !important;
    transform: translateY(-2px);
}

/* Trạng thái Disabled */
.sbm-pagination-btn.disabled {
    opacity: 0.5 !important;
    cursor: default !important;
    background: #f3f4f6 !important;
    box-shadow: none !important;
    pointer-events: none !important;
}

/* Icon SVG bên trong nút */
.sbm-pagination-btn svg {
    width: 18px !important;
    height: 18px !important;
    stroke-width: 2.5px !important;
    display: block !important;
}