/**
 * HATI SOLUTIONS - TRANG SẢN PHẨM & THIẾT BỊ AN NINH
 * File: src/assets/css/client/products.css
 * Tuân thủ nghiêm ngặt quy tắc GEMINI.md:
 * - 100% CSS thuần, không utility spam
 * - Toàn bộ nút bấm border-radius <= 12px
 * - Hỗ trợ đầy đủ Light & Dark Mode
 * - Layout 2 cột Shop chuyên nghiệp: Left Sidebar Filter + Products Grid + Pagination < 1 2 ... 5 >
 */

/* ==========================================================
   1. GLOBAL TOKENS CHO TRANG PRODUCTS
   ========================================================== */
:root {
    --pd-bg-base: #f8fafc;
    --pd-bg-card: #ffffff;
    --pd-bg-card-sub: #f1f5f9;
    --pd-text-primary: #0f172a;
    --pd-text-secondary: #475569;
    --pd-text-muted: #64748b;
    --pd-border: #e2e8f0;
    --pd-border-hover: #cbd5e1;
    --pd-brand-red: #dc2626;
    --pd-brand-red-hover: #b91c1c;
    --pd-brand-red-light: #fef2f2;
    --pd-brand-blue: #1e40af;
    --pd-brand-blue-light: #eff6ff;
    --pd-shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
    --pd-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --pd-shadow-lg: 0 12px 30px rgba(15, 23, 42, 0.12);
    --pd-radius-sm: 8px;
    --pd-radius-md: 12px;
    --pd-transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
    --pd-bg-base: #0b1120;
    --pd-bg-card: #131d33;
    --pd-bg-card-sub: #1a2744;
    --pd-text-primary: #f8fafc;
    --pd-text-secondary: #cbd5e1;
    --pd-text-muted: #94a3b8;
    --pd-border: #223254;
    --pd-border-hover: #334876;
    --pd-brand-red: #f87171;
    --pd-brand-red-hover: #ef4444;
    --pd-brand-red-light: rgba(239, 68, 68, 0.12);
    --pd-brand-blue: #3b82f6;
    --pd-brand-blue-light: rgba(59, 130, 246, 0.12);
    --pd-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.25);
    --pd-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.35);
    --pd-shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.app-products-page-container,
.app-products-page-container {
    width: 100%;
    background-color: var(--pd-bg-base);
    color: var(--pd-text-primary);
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    min-height: 85vh;
    padding-bottom: 5rem;
}

/* ==========================================================
   2. HERO SUBPAGE BANNER (CHỐNG LẸM HEADER, BREADCRUMB, BỀ THẾ)
   ========================================================== */
.products-hero-section {
    background: linear-gradient(135deg, #090d16 0%, #151828 50%, #201017 100%);
    color: #ffffff;
    padding-top: 115px;
    padding-bottom: 50px;
    padding-left: 20px;
    padding-right: 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.products-hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.15) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, rgba(30, 64, 175, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.products-hero-wrap {
    max-width: 1320px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}


.products-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(220, 38, 38, 0.2);
    border: 1px solid rgba(220, 38, 38, 0.45);
    padding: 0.4rem 1.1rem;
    border-radius: 9999px;
    font-size: 0.76rem;
    font-weight: 700;
    color: #fca5a5;
    margin-bottom: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* THẺ H1 DUY NHẤT CỦA TRANG */
.products-hero-h1 {
    font-size: 2.35rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 auto 1rem;
    letter-spacing: -0.02em;
    max-width: 960px;
}

.products-hero-desc {
    font-size: 1rem;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 900px;
    margin: 0 auto 2rem;
}

/* THANH CAM KẾT NHANH (FAST SPECS STRIP TRONG HERO) */
.products-hero-specs-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pd-radius-md);
    padding: 1.25rem 1.75rem;
}

.products-hero-spec-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.products-hero-spec-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--pd-radius-sm);
    background: rgba(220, 38, 38, 0.2);
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.products-hero-spec-content {
    display: flex;
    flex-direction: column;
}

.products-hero-spec-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.products-hero-spec-sub {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ==========================================================
   3. CATALOG & MAIN 2-COLUMN LAYOUT (H2 #1)
   ========================================================== */
.products-catalog-section {
    padding-top: 2.5rem;
    padding-bottom: 4rem;
}

.products-catalog-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

.products-catalog-head {
    text-align: center;
    margin-bottom: 2rem;
}

/* THẺ H2 THỨ NHẤT CỦA TRANG */
.products-section-h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--pd-text-primary);
    margin: 0 auto 0.5rem;
    text-align: center;
    letter-spacing: -0.015em;
}

.products-section-desc {
    font-size: 0.95rem;
    color: var(--pd-text-secondary);
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
}

.products-main-layout {
    display: grid;
    grid-template-columns: 290px 1fr;
    gap: 2rem;
    align-items: start;
}

.products-sidebar {
    background: var(--pd-bg-card);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-md);
    box-shadow: var(--pd-shadow-sm);
    padding: 0 1.25rem 1.25rem;
    position: sticky;
    top: 95px;
}

.products-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    padding: 0 1.25rem;
    margin: 0 -1.25rem 1.25rem;
    border-bottom: 1px solid var(--pd-border);
    box-sizing: border-box;
    background: var(--pd-bg-card);
    position: sticky;
    top: 0;
    z-index: 20;
}

.products-sidebar-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.products-sidebar-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--pd-bg-card-sub);
    border: 1px solid var(--pd-border);
    color: var(--pd-text-secondary);
    cursor: pointer;
    transition: var(--pd-transition);
}

.products-sidebar-close-btn:hover {
    background: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
    border-color: var(--pd-brand-red);
}

.products-sidebar-h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--pd-text-primary);
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1;
}

.products-sidebar-reset-btn {
    font-size: 0.78rem;
    color: var(--pd-brand-red);
    background: transparent;
    border: none;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pd-transition);
    line-height: 1;
}

.products-sidebar-reset-btn:hover {
    text-decoration: underline;
}

/* KHỐI LỌC: DANH MỤC */
.products-filter-block {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px dashed var(--pd-border);
}

.products-filter-block:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.products-filter-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--pd-text-muted);
    margin-bottom: 0.85rem;
}

.products-cat-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.products-cat-tree-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--pd-radius-sm);
    color: var(--pd-text-secondary);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    transition: var(--pd-transition);
    white-space: nowrap;
}

.products-cat-tree-link-left {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.products-cat-tree-link-left svg {
    flex-shrink: 0;
}

.products-cat-tree-link-left span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.products-cat-tree-count {
    font-size: 0.75rem;
    color: var(--pd-text-muted);
    background: var(--pd-bg-card-sub);
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.products-cat-tree-link:hover {
    background: var(--pd-bg-card-sub);
    color: var(--pd-brand-red);
}

.products-cat-tree-link.active {
    background: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
    font-weight: 700;
}

.products-cat-tree-link.active .products-cat-tree-count {
    background: var(--pd-brand-red);
    color: #ffffff;
}

/* KHỐI LỌC KHOẢNG GIÁ & THƯƠNG HIỆU & TRẠNG THÁI */
.products-filter-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.products-filter-option-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: var(--pd-radius-sm);
    color: var(--pd-text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    transition: var(--pd-transition);
    white-space: nowrap;
}

.products-filter-option-link > span {
    display: inline-flex;
    align-items: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.products-filter-option-link:hover {
    background: var(--pd-bg-card-sub);
    color: var(--pd-brand-red);
}

.products-filter-option-link.active {
    background: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
    font-weight: 700;
}

.products-filter-check-indicator {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid var(--pd-border-hover);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.products-filter-option-link.active .products-filter-check-indicator {
    border-color: var(--pd-brand-red);
    background: var(--pd-brand-red);
    color: #ffffff;
}

/* SIDEBAR HOTLINE SUPPORT BOX */
.products-sidebar-support-box {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: var(--pd-radius-sm);
    color: #ffffff;
    text-align: center;
}

.products-sidebar-support-title {
    font-size: 0.875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.products-sidebar-support-desc {
    font-size: 0.76rem;
    color: #94a3b8;
    margin-bottom: 0.75rem;
}

.products-sidebar-support-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.55rem;
    background: var(--pd-brand-red);
    color: #ffffff;
    border-radius: var(--pd-radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--pd-transition);
}

.products-sidebar-support-btn:hover {
    background: var(--pd-brand-red-hover);
    color: #ffffff;
}

.products-sidebar-support-btn-sub {
    margin-top: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}

.products-sidebar-support-btn-sub:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

/* ==========================================================
   5. CONTENT AREA HEADER (SORT DROPDOWN, SEARCH STATUS, MOBILE TOGGLE)
   ========================================================== */
.products-content-col {
    display: flex;
    flex-direction: column;
}

.products-top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    min-height: 60px;
    height: auto;
    background: var(--pd-bg-card);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-md);
    padding: 0 1.25rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--pd-shadow-sm);
    box-sizing: border-box;
}

.products-results-count {
    font-size: 0.88rem;
    color: var(--pd-text-secondary);
    line-height: 1;
}

.products-results-count strong {
    color: var(--pd-text-primary);
}

.products-count-mobile {
    display: none;
}

.products-count-desktop {
    display: inline;
}

.products-toolbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.products-mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.875rem;
    background: var(--pd-bg-card-sub);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    color: var(--pd-text-primary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pd-transition);
}

.products-mobile-filter-btn:hover {
    background: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
    border-color: var(--pd-brand-red);
}

.products-sidebar-backdrop {
    display: none;
}

body.products-sidebar-locked {
    overflow: hidden;
    touch-action: none;
}

/* SORT DROPDOWN THIẾT KẾ CUSTOM CHUẨN MỰC */
.products-sort-control {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

/* ==========================================================
   CUSTOM SORT DROPDOWN (THAY THẾ SELECT NATIVE TRÌNH DUYỆT)
   ========================================================== */
.products-sort-control {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    position: relative;
}

.products-sort-label {
    font-size: 0.84rem;
    color: var(--pd-text-muted);
    font-weight: 600;
    white-space: nowrap;
    line-height: 1;
}

.products-custom-dropdown {
    position: relative;
    user-select: none;
}

.products-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    height: 38px;
    padding: 0 0.85rem;
    border-radius: var(--pd-radius-sm);
    border: 1.5px solid var(--pd-border);
    background-color: var(--pd-bg-card);
    color: var(--pd-text-primary);
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--pd-transition);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    white-space: nowrap;
    min-width: 175px;
}

.products-dropdown-trigger:hover {
    border-color: var(--pd-border-hover);
    background-color: var(--pd-bg-card-sub);
}

.products-custom-dropdown.is-open .products-dropdown-trigger,
.products-dropdown-trigger:focus-visible {
    border-color: var(--pd-brand-red);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.products-dropdown-chevron {
    color: var(--pd-text-muted);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}

.products-custom-dropdown.is-open .products-dropdown-chevron {
    transform: rotate(180deg);
    color: var(--pd-brand-red);
}

/* MENU POPUP CUSTOM */
.products-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 195px;
    background: var(--pd-bg-card);
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);
    padding: 0.35rem;
    list-style: none;
    margin: 0;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

[data-theme="dark"] .products-dropdown-menu {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
}

.products-custom-dropdown.is-open .products-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.products-dropdown-item {
    margin: 0;
    padding: 0;
}

.products-dropdown-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.75rem;
    border-radius: 6px;
    color: var(--pd-text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--pd-transition);
}

.products-dropdown-link:hover {
    background-color: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
}

.products-dropdown-item.is-selected .products-dropdown-link {
    background-color: var(--pd-brand-red-light);
    color: var(--pd-brand-red);
    font-weight: 700;
}

.products-dropdown-check-icon {
    color: var(--pd-brand-red);
    flex-shrink: 0;
}

/* THANH THÔNG BÁO TÌM KIẾM HOẶC LỌC ĐANG ÁP DỤNG */
.products-active-filters-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.625rem;
    background: #ffffff;
    border: 1px solid var(--pd-border);
    border-radius: var(--pd-radius-sm);
    padding: 0.75rem 1.15rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .products-active-filters-bar {
    background: var(--pd-bg-card);
    border-color: var(--pd-border);
}

.products-active-filter-label {
    font-size: 0.82rem;
    color: var(--pd-text-secondary);
    font-weight: 700;
}

[data-theme="dark"] .products-active-filter-label {
    color: var(--pd-text-secondary);
}

.products-active-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: var(--pd-bg-card-sub);
    border: 1px solid var(--pd-border);
    color: var(--pd-text-primary);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    text-decoration: none;
    transition: var(--pd-transition);
}

.products-active-tag:hover {
    border-color: var(--pd-brand-red);
    color: var(--pd-brand-red);
    background: #ffffff;
}

[data-theme="dark"] .products-active-tag {
    background: var(--pd-bg-card-sub);
    border-color: var(--pd-border);
    color: var(--pd-text-primary);
}

[data-theme="dark"] .products-active-tag:hover {
    border-color: var(--pd-brand-red);
    color: var(--pd-brand-red);
    background: #1e293b;
}

/* ==========================================================
   6. PRODUCTS GRID & CARD DESIGN (BOOKMARK % RIBBON & STATUS BADGE)
   ========================================================== */
.products-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.product-item-card {
    background: var(--pd-bg-card);
    border-radius: var(--pd-radius-md);
    border: 1px solid var(--pd-border);
    overflow: hidden;
    box-shadow: var(--pd-shadow-sm);
    transition: var(--pd-transition);
    display: flex;
    flex-direction: column;
    position: relative;
}

.product-item-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pd-shadow-md);
    border-color: var(--pd-border-hover);
}

.product-item-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--pd-bg-card-sub);
    overflow: hidden;
    display: block;
    padding: 0;
}

.product-item-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.35s ease;
}

.product-item-card:hover .product-item-img {
    transform: scale(1.06);
}

/* 1. BOOKMARK RIBBON (% GIẢM GIÁ Ở GÓC PHẢI DẠNG BOOKMARK RUY BĂNG - MÀU ĐƠN SẮC & CĂN GIỮA HOÀN HẢO) */
.product-bookmark-ribbon {
    position: absolute;
    top: 0;
    right: 14px;
    width: 42px;
    height: 48px;
    background-color: #dc2626;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 9px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 10px), 0 100%);
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.35);
    z-index: 3;
    pointer-events: none;
}

.product-bookmark-ribbon span {
    display: block;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    letter-spacing: -0.02em;
}

/* 2. STATUS BADGE (GÓC TRÁI ẢNH: MỚI, HOT, SALE, CHÍNH HÃNG - MÀU ĐƠN SẮC FLAT) */
.product-item-status-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 0.6875rem;
    font-weight: 800;
    padding: 0.28rem 0.65rem;
    border-radius: var(--pd-radius-sm);
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.product-status-hot {
    background-color: #ea580c;
    color: #ffffff;
}

.product-status-new {
    background-color: #0284c7;
    color: #ffffff;
}

.product-status-sale {
    background-color: #dc2626;
    color: #ffffff;
}

.product-status-official,
.product-status-warranty {
    background-color: #16a34a;
    color: #ffffff;
}

/* BODY CỦA CARD */
.product-item-body {
    padding: 1.125rem 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-item-cat-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.product-item-cat-label {
    font-size: 0.75rem;
    color: var(--pd-text-muted);
    font-weight: 600;
}

.product-item-brand-tag {
    font-size: 0.72rem;
    background: var(--pd-bg-card-sub);
    color: var(--pd-text-primary);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid var(--pd-border);
}

a.product-item-thumb-box {
    display: block;
    text-decoration: none;
}

.product-item-title,
a.product-item-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pd-text-primary);
    line-height: 1.4;
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    max-height: 2.8em;
    text-decoration: none !important;
    transition: var(--pd-transition);
}

a.product-item-title:hover,
a.product-item-title:focus {
    color: var(--pd-brand-red);
    text-decoration: none !important;
}

.product-item-price-bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.875rem;
    border-top: 1px solid var(--pd-border);
}

.product-item-pricing {
    display: flex;
    flex-direction: column;
}

.product-current-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--pd-brand-red);
    line-height: 1.2;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* KHI SẢN PHẨM KHÔNG CÓ KHUYẾN MÃI (CHỈ CÓ 1 SỐ GIÁ DUY NHẤT): TĂNG 20% SIZE (1.1rem * 1.2 = 1.32rem) */
.product-current-price.product-price-single {
    font-size: 1.32rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.product-old-price {
    font-size: 0.78rem;
    color: var(--pd-text-muted);
    text-decoration: line-through;
    margin-top: 0.15rem;
}

.product-btn-quote {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background-color: #dc2626;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.55rem 0.95rem;
    border-radius: var(--pd-radius-sm);
    transition: var(--pd-transition);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
    white-space: nowrap;
}

.product-btn-quote:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

/* EMPTY STATE */
.products-empty-card {
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--pd-bg-card);
    border-radius: var(--pd-radius-md);
    border: 1px dashed var(--pd-border);
    margin-bottom: 2rem;
}

.products-empty-icon {
    color: var(--pd-brand-red);
    margin-bottom: 1rem;
}

.products-empty-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pd-text-primary);
    margin-bottom: 0.5rem;
}

.products-empty-desc {
    font-size: 0.9rem;
    color: var(--pd-text-secondary);
    max-width: 520px;
    margin: 0 auto 1.5rem;
}

.products-empty-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    background: var(--pd-brand-red);
    color: #ffffff;
    border-radius: var(--pd-radius-sm);
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--pd-transition);
}

.products-empty-btn:hover {
    background: var(--pd-brand-red-hover);
    color: #ffffff;
}

/* ==========================================================
   7. PAGINATION BỐ CỤC CHUẨN THƯƠNG MẠI ĐIỆN TỬ < 1 2 ... 5 >
   ========================================================== */
.products-pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    margin-bottom: 2.5rem;
}

.products-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-bg-card);
    border: 1px solid var(--pd-border);
    color: var(--pd-text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--pd-transition);
    cursor: pointer;
}

.products-page-btn:hover:not(.disabled):not(.active) {
    border-color: var(--pd-brand-red);
    color: var(--pd-brand-red);
    background: var(--pd-bg-card-sub);
}

.products-page-btn.active {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-color: #b91c1c;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.25);
    cursor: default;
}

.products-page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.products-page-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 40px;
    color: var(--pd-text-muted);
    font-weight: 700;
}

/* ==========================================================
   8. SECTION CTA TƯ VẤN & KHẢO SÁT LẮP ĐẶT (SEO H2 #2 & 3 H3 CHUẨN GEMINI.MD)
   ========================================================== */
.products-cta-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

.products-cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
    background: linear-gradient(135deg, #090d16 0%, #151828 50%, #201017 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--pd-radius-md);
    padding: 2.25rem 2.5rem;
    color: #ffffff;
    box-shadow: var(--pd-shadow-md);
    position: relative;
    overflow: hidden;
}

.products-cta-banner::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(220, 38, 38, 0.18) 0%, transparent 60%),
                radial-gradient(circle at 10% 80%, rgba(30, 64, 175, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.products-cta-content {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}

.products-cta-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 0.4rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.products-cta-desc {
    font-size: 0.88rem;
    color: #cbd5e1;
    line-height: 1.6;
    margin: 0;
}

.products-cta-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.products-cta-btn-call {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #dc2626;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.7rem 1.25rem;
    border-radius: var(--pd-radius-sm);
    transition: var(--pd-transition);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    white-space: nowrap;
}

.products-cta-btn-call:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.products-cta-btn-book {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 0.7rem 1.15rem;
    border-radius: var(--pd-radius-sm);
    transition: var(--pd-transition);
    white-space: nowrap;
}

.products-cta-btn-book:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* ==========================================================
   9. RESPONSIVE DESIGN (TABLET & MOBILE)
   ========================================================== */
@media (max-width: 1199px) {
    .products-main-layout {
        grid-template-columns: 260px 1fr;
        gap: 1.5rem;
    }

    .products-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .products-hero-specs-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 991px) {
    .products-main-layout {
        grid-template-columns: 1fr;
    }

    .products-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.6);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1055;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
        pointer-events: none;
    }

    .products-sidebar-backdrop.is-open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .products-sidebar {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 320px;
        max-width: 86vw;
        height: 100vh;
        z-index: 1060;
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-radius: 0;
        border: none;
        border-right: 1px solid var(--pd-border);
        box-shadow: 0 0 32px rgba(0, 0, 0, 0.35);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s ease;
    }

    .products-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .products-sidebar-header {
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--pd-bg-card);
        margin: 0 -1.25rem 1.25rem;
        padding: 0 1.25rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    }

    .products-mobile-filter-btn {
        display: inline-flex;
    }

    .products-sidebar-close-btn {
        display: inline-flex;
    }

    .products-cta-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.75rem 1.5rem;
        gap: 1.25rem;
    }

    .products-cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .products-cta-btn-call,
    .products-cta-btn-book {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .products-hero-section {
        padding-top: 24px;
        padding-bottom: 28px;
    }

    .products-hero-h1 {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .products-hero-desc {
        font-size: 0.9rem;
    }

    .products-hero-specs-strip {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .products-section-h2 {
        font-size: 1.32rem;
        line-height: 1.32;
    }

    .products-top-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
        padding: 6px 12px;
        min-height: 48px;
        height: auto;
        gap: 8px;
        margin-bottom: 1rem;
        box-sizing: border-box;
    }

    .products-results-count {
        flex: 0 0 auto;
        min-width: 0;
    }

    .products-count-desktop {
        display: none;
    }

    .products-count-mobile {
        display: inline;
        font-size: 0.84rem;
        font-weight: 600;
        color: var(--pd-text-secondary);
        white-space: nowrap;
    }

    .products-toolbar-right {
        display: flex;
        align-items: center;
        width: auto;
        justify-content: flex-end;
        gap: 6px;
        flex: 0 0 auto;
        min-width: 0;
    }

    .products-mobile-filter-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .products-mobile-filter-text {
        display: none;
    }

    .products-sort-control {
        min-width: 0;
    }

    .products-sort-label {
        display: none;
    }

    .products-custom-dropdown {
        min-width: 0;
    }

    .products-dropdown-trigger {
        height: 36px;
        min-height: 36px;
        min-width: 0;
        width: auto;
        padding: 0 8px 0 10px;
        font-size: 0.82rem;
        border-radius: 8px;
        gap: 6px;
    }

    .products-dropdown-selected-text {
        max-width: 95px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .products-grid-container {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .products-pagination-container {
        gap: 0.25rem;
    }

    .products-hero-h1 {
        font-size: 1.32rem;
        line-height: 1.25;
    }

    .products-section-h2 {
        font-size: 1.15rem;
        line-height: 1.32;
    }

    .products-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .products-top-toolbar {
        padding: 5px 10px;
        min-height: 44px;
        gap: 6px;
    }

    .products-count-mobile {
        font-size: 0.8rem;
    }

    .products-mobile-filter-btn {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 7px;
    }

    .products-dropdown-trigger {
        height: 34px;
        min-height: 34px;
        padding: 0 8px;
        font-size: 0.78rem;
        border-radius: 7px;
        gap: 4px;
    }

    .products-dropdown-selected-text {
        max-width: 82px;
    }
}
