/* ===========================
    RESET & BASE STYLES
=========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ===========================
    HEADER
=========================== */

.site-header {
    width: 100%;
}

.top-header {
    background: linear-gradient(135deg, #f7941d 0%, #ff6b00 100%);
    padding: 12px 0;
    box-shadow: 0 4px 15px rgba(247, 148, 29, 0.2);
}

.top-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 100px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.4));
    margin-top: -20px;
    margin-bottom: -20px;
    position: relative;
    z-index: 100;
}

.brand-name {
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.search {
    flex: 1;
    max-width: 480px;
    display: flex;
    position: relative;
    border-radius: 25px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.search input {
    width: 100%;
    height: 42px;
    border: none;
    outline: none;
    padding: 0 20px;
    font-size: 14px;
    background: transparent;
    color: #1e293b;
}

.search input::placeholder {
    color: #94a3b8;
}

.search button {
    width: 52px;
    border: none;
    background: #243746;
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search button:hover {
    background: #0f172a;
}

.header-right {
    display: flex;
    gap: 24px;
    align-items: center;
}

.info {
    display: flex;
    align-items: center;
    color: #ffffff;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
}

.info i {
    font-size: 16px;
    background: #22c55e;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25);
}

.info div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

/* ===========================
    HERO / MENU
=========================== */

.menu {
    margin-top: 20px;
}

.menu .container {
    display: flex;
    gap: 24px;
}

.sidebar {
    width: 260px;
    flex-shrink: 0;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    border: 1px solid #e2e8f0;
}

.sidebar-title {
    background: #243746;
    color: #ffffff;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.sidebar-title i {
    margin-right: 12px;
}

.sidebar ul li {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    transition: all 0.2s ease;
}

.sidebar ul li:last-child {
    border-bottom: none;
}

.sidebar ul li:hover {
    color: #ff6b00;
    padding-left: 26px;
    background: #fff7ed;
}

.sidebar ul li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

/* Sidebar Category Icon */
.sidebar-cat-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #ffaa00;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    color: #ff6b00;
    font-size: 12px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(255, 170, 0, 0.12);
    flex-shrink: 0;
}

.sidebar ul li:hover .sidebar-cat-icon {
    background: linear-gradient(135deg, #ff6b00, #ffb800);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 3px 6px rgba(255, 107, 0, 0.25);
    transform: scale(1.08);
}

.banner {
    flex: 1;
    min-width: 0;
}

.slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    background: #e2e8f0;
}

.slider img {
    width: 100%;
    height: 380px;
    object-fit: contain;
    background: #f8fafc;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.prev {
    left: 16px;
}

.next {
    right: 16px;
}

.prev:hover,
.next:hover {
    background: #ff6b00;
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
}

.small-banner {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.small-banner img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.small-banner img:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* ===========================
    CATEGORY
=========================== */

.category {
    margin-top: 50px;
}

.category h2 {
    margin-bottom: 30px;
    font-size: 22px;
    font-weight: 800;
    color: #1e293b;
    text-align: center;
}

.category-list {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 20px;
    text-align: center;
}

.item {
    cursor: pointer;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.circle {
    width: 110px;
    height: 110px;
    border: 2px solid #ff6b00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.08);
    padding: 15px;
}

.circle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.circle i {
    font-size: 36px;
    color: #ff6b00;
    transition: all 0.3s ease;
}

.item:hover .circle {
    background: #ff6b00;
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.25);
}

.item:hover .circle img {
    filter: brightness(0) invert(1);
}

.item:hover .circle i {
    color: #ffffff;
}

.item p {
    margin-top: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #334155;
    transition: color 0.2s ease;
}

.item:hover p {
    color: #ff6b00;
}

/* ===========================
    PRODUCTS
=========================== */

.products {
    margin-top: 50px;
    margin-bottom: 60px;
}

.toolbar {
    margin: 20px 0 24px;
}

.toolbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .04);
    border: 1px solid #e2e8f0;
}

.toolbar h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 4px;
}

.toolbar p {
    color: #64748b;
    font-size: 14px;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: #ff6b00;
    color: #ffffff;
    border-color: #ff6b00;
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2);
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.product {
    position: relative;
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .03);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, .08);
    border-color: #ffd8b5;
    z-index: 50;
}

.product-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    z-index: 2;
}

.fav-btn,
.quick-view {
    border: none;
    background: #f1f5f9;
    color: #ff6b00;
    border-radius: 999px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.fav-btn.active {
    background: #ef4444;
    color: #ffffff;
}

.quick-view {
    width: auto;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 700;
}

.quick-view:hover,
.fav-btn:hover {
    background: #ff6b00;
    color: #ffffff;
}

.product img {
    height: 200px;
    width: 100%;
    object-fit: contain;
    margin: 10px auto;
    transition: transform 0.3s ease;
}

.product:hover img {
    transform: scale(1.04);
}

.product .tag {
    display: inline-block;
    align-self: center;
    padding: 4px 12px;
    background: #fff7ed;
    color: #ea580c;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0;
}

.product h3 {
    margin: 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.4;
}

.price {
    color: #dc2626;
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 16px;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.buy-btn {
    display: none !important;
    background: linear-gradient(135deg, #f7941d 0%, #ff6b00 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.18);
}

.buy-btn:hover {
    background: #243746;
    box-shadow: 0 4px 12px rgba(36, 55, 70, 0.25);
}

.product.hidden {
    display: none !important;
}

/* ===========================
    MODAL & TOAST
=========================== */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: #ffffff;
    width: min(850px, 95%);
    border-radius: 18px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #ef4444;
    color: #ffffff;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: center;
}

.modal-body img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background: #f8fafc;
    border-radius: 12px;
    padding: 10px;
}

.modal-body h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 10px;
}

.modal-body p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
}

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #243746;
    color: #ffffff;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    opacity: 0;
    pointer-events: none;
    transform: translateY(16px);
    transition: all 0.3s ease;
    z-index: 1100;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ===========================
    FOOTER
=========================== */

.site-footer {
    background: #1e293b;
    color: #f8fafc;
    padding: 45px 0;
    margin-top: auto;
}

.site-footer h3 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
}

.site-footer p {
    margin: 8px 0;
    color: #94a3b8;
    font-size: 14px;
}

/* ===========================
    RESPONSIVE (MOBILE & TABLET)
=========================== */

@media (max-width: 1024px) {
    .container {
        width: 94%;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }

    .slider img {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .top-header {
        padding: 10px 0 12px 0;
    }

    .top-header .container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: center;
    }

    .logo {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .logo img {
        height: 60px;
        margin-top: -10px;
        margin-bottom: -10px;
    }

    .brand-name {
        font-size: 16px;
    }

    .header-right {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 12px;
        border-top: 1px dashed rgba(255, 255, 255, 0.2);
        padding-top: 10px;
    }

    .info {
        font-size: 11px;
        gap: 4px;
        white-space: nowrap;
    }

    .info i {
        width: 26px;
        height: 26px;
        font-size: 12px;
    }

    .tiktok-btn-header {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        padding: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0;
        box-shadow: none;
    }

    .facebook-btn-header,
    .zalo-btn-header {
        width: 32px;
        height: 32px;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .facebook-btn-header span,
    .tiktok-btn-header span,
    .zalo-btn-header span {
        display: none;
    }

    .facebook-btn-header img {
        width: 32px !important;
        height: 32px !important;
        object-fit: contain;
    }

    .zalo-btn-header img {
        width: 32px !important;
        height: 32px !important;
        object-fit: contain;
        transform: scale(1.7);
        /* Phóng to logo Zalo để bù phần viền trống của file ảnh */
    }

    .tiktok-btn-header i {
        font-size: 15px;
        color: #ffffff;
        /* Icon TikTok màu trắng */
    }

    .search {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 100%;
        height: 38px;
    }

    .search input {
        height: 38px;
        font-size: 13px;
        padding: 0 16px;
    }

    .search button {
        width: 44px;
        font-size: 14px;
    }

    .menu .container {
        flex-direction: column;
        gap: 16px;
    }

    .sidebar {
        width: 100%;
    }

    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 6px;
        white-space: nowrap;
    }

    .sidebar ul li {
        border-bottom: none;
        border-right: 1px solid #f1f5f9;
        padding: 10px 14px;
        font-size: 13px;
    }

    .sidebar ul li:hover {
        padding-left: 14px;
    }

    .slider img {
        height: 230px;
    }

    .small-banner {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .small-banner img {
        height: 85px;
    }

    .category-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .circle {
        width: 80px;
        height: 80px;
    }

    .circle i {
        font-size: 28px;
    }

    .item p {
        font-size: 13px;
        margin-top: 8px;
    }

    .toolbar .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 16px;
    }

    .filter-group {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .product {
        padding: 12px;
        border-radius: 12px;
    }

    .product img,
    .category-product-card .product-img {
        height: 130px;
        object-fit: contain;
    }

    .product h3,
    .product-title {
        font-size: 13px;
        height: 36px;
        line-height: 1.3;
        margin: 8px 0 4px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .price {
        font-size: 16px;
        margin-bottom: 10px;
    }

    .buy-btn {
        height: 38px;
        font-size: 13px;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .modal-body img {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .category-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .circle {
        width: 70px;
        height: 70px;
        padding: 10px;
    }

    .circle i {
        font-size: 24px;
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==================================
    CATEGORY PAGE STYLES
================================== */
.breadcrumb-container {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 0;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.breadcrumbs li {
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.breadcrumbs li a {
    color: #64748b;
    transition: color 0.2s ease;
}

.breadcrumbs li a:hover {
    color: #ff6b00;
}

.breadcrumbs .separator {
    font-size: 10px;
    color: #cbd5e1;
}

#breadcrumb-current {
    color: #1e293b;
    font-weight: 600;
}

.category-page-section {
    padding: 35px 0 60px;
}

.page-layout {
    display: flex;
    gap: 30px;
}

.filter-sidebar {
    width: 270px;
    flex-shrink: 0;
}

.filter-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.filter-title {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #ff6b00;
    display: inline-block;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Custom Checkbox styles */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    user-select: none;
    transition: color 0.2s ease;
}

.checkbox-container:hover {
    color: #ff6b00;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    transition: all 0.25s ease;
}

.checkbox-container:hover input~.checkmark {
    border-color: #ff6b00;
    background-color: #fff7ed;
}

.checkbox-container input:checked~.checkmark {
    background-color: #ff6b00;
    border-color: #ff6b00;
    box-shadow: 0 2px 6px rgba(255, 107, 0, 0.2);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.product-list-content {
    flex: 1;
    min-width: 0;
}

.category-header {
    margin-bottom: 24px;
}

.category-header h1 {
    font-size: 26px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 16px;
}

.sort-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ffffff;
    padding: 14px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.sort-label {
    font-size: 14px;
    font-weight: 700;
    color: #64748b;
    white-space: nowrap;
}

.sort-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.sort-btn {
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    padding: 7px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.sort-btn:hover,
.sort-btn.active {
    background: #ff6b00;
    color: #ffffff;
    border-color: #ff6b00;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.15);
}

/* Category Product Card modifications */
.category-product-card {
    position: relative;
}

.best-seller-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc2626;
    color: #ffffff;
    font-size: 9px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 4px;
    z-index: 5;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.discount-percent {
    background: #fef08a;
    color: #854d0e;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
}

.price-old {
    color: #94a3b8;
    text-decoration: line-through;
    font-size: 13px;
}

.category-product-card .product-img {
    height: 180px;
    transition: transform 0.3s ease;
}

.category-product-card:hover .product-img {
    transform: scale(1.05);
}

.product-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    margin: 12px 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 42px;
    line-height: 1.4;
}

/* Category Specific Responsive design */
@media (max-width: 992px) {
    .page-layout {
        flex-direction: column;
        gap: 24px;
    }

    .filter-sidebar {
        width: 100%;
    }

    .filter-box {
        padding: 16px;
    }

    .filter-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .filter-list {
        grid-template-columns: 1fr;
    }

    .sort-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
    }

    .sort-options {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }

    .sort-btn {
        padding: 5px 10px;
        font-size: 12px;
    }

    .category-header h1 {
        font-size: 20px;
        margin-bottom: 12px;
    }
}

/* ==================================
    PAGINATION & SPECS POPOVER STYLES
================================== */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 20px;
    width: 100%;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
}

.page-btn:hover {
    color: #ff6b00;
    border-color: #ff6b00;
    background: #fff7ed;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 107, 0, 0.1);
}

.page-btn.active {
    background: #ff6b00;
    border-color: #ff6b00;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.25);
}

.page-btn.active:hover {
    color: #ffffff;
    transform: none;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

/* Specs Popover (Hover Tooltip) Styling */
.product-popover {
    position: absolute;
    left: 102%;
    top: 0;
    width: 330px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.product:hover .product-popover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* Positioning tooltips on right side columns to avoid offscreen clipping */
@media (min-width: 1025px) {
    .product:nth-child(4n) .product-popover {
        left: auto;
        right: 102%;
        transform: translateX(-10px);
    }

    .product:nth-child(4n):hover .product-popover {
        transform: translateX(0);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .product:nth-child(3n) .product-popover {
        left: auto;
        right: 102%;
        transform: translateX(-10px);
    }

    .product:nth-child(3n):hover .product-popover {
        transform: translateX(0);
    }
}

@media (max-width: 768px) {
    .product-popover {
        display: none !important;
    }
}

/* Admin switch label styling */
.admin-switch-label {
    color: #ffffff;
    transition: all 0.2s ease-in-out;
}

.admin-switch-label:hover {
    color: #ff6b00;
    /* Highlight to theme orange */
}

/* Khi Chế độ Admin được bật (checked) */
.admin-switch-label:has(input[type="checkbox"]:checked) {
    color: #ff6b00;
}

/* Ẩn ô vuông checkbox mặc định của trình duyệt */
.admin-switch-label input[type="checkbox"] {
    display: none;
}

/* Social Buttons in Header */
.facebook-btn-header {
    background: #1840f2;
    border-color: #1877f2;
}

.tiktok-btn-header {
    background: #010101;
    border-color: #010101;
}

.zalo-btn-header {
    background: #0099ff;
    border-color: #0068ff;
}

.facebook-btn-header:hover,
.tiktok-btn-header:hover,
.zalo-btn-header:hover {
    transform: translateY(-2px);
    filter: brightness(1.15);
    color: #ffffff;
}

@media (min-width: 769px) {

    .facebook-btn-header,
    .tiktok-btn-header,
    .zalo-btn-header {
        width: 120px;
        padding: 6px 0;
        justify-content: center;
        border-radius: 20px;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 13px;
        font-weight: 600;
        color: #ffffff;
        transition: all 0.25s ease;
        cursor: pointer;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
        border: 1px solid transparent;
        text-decoration: none;
    }

    .facebook-btn-header:hover,
    .tiktok-btn-header:hover,
    .zalo-btn-header:hover {
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    }

    .facebook-btn-header img,
    .tiktok-btn-header img,
    .zalo-btn-header img {
        width: 16px;
        height: 16px;
        object-fit: contain;
    }

    /* Tăng size icon Zalo do ảnh gốc có khoảng viền trắng bên trong */
    .zalo-btn-header img {
        width: auto;
        height: 18px;
    }

    .tiktok-btn-header i {
        font-size: 15px;
    }
}

/* ===========================
    BLOG STYLES
=========================== */

.admin-blogger-container {
            padding: 40px 20px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .admin-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .admin-header h1 {
            font-size: 24px;
            color: #333;
        }

        .btn-add {
            background-color: #ff6b00;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
        }

        .blogs-table {
            width: 100%;
            border-collapse: collapse;
            background: white;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border-radius: 8px;
            overflow: hidden;
        }

        .blogs-table th,
        .blogs-table td {
            padding: 15px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }

        .blogs-table th {
            background-color: #f8f9fa;
            font-weight: bold;
            color: #333;
        }

        .blogs-table img {
            width: 80px;
            height: 50px;
            object-fit: cover;
            border-radius: 4px;
        }

        .action-btns button {
            background: none;
            border: none;
            cursor: pointer;
            margin-right: 10px;
            font-size: 16px;
        }

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

        .btn-delete {
            color: #dc3545;
        }

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

        #blogModal.modal.show {
            display: flex;
        }

        #blogModal .modal-content {
            background-color: #fff;
            padding: 20px 30px;
            border-radius: 8px;
            width: 90%;
            max-width: 700px;
            max-height: 90vh;
            overflow-y: auto;
            position: relative;
        }

        #blogModal .close-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 24px;
            cursor: pointer;
            color: #666;
        }

        .form-group {
            margin-bottom: 15px;
        }

        .form-group label {
            display: block;
            margin-bottom: 5px;
            font-weight: bold;
            color: #333;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-family: inherit;
        }

        .form-group textarea {
            resize: vertical;
            min-height: 100px;
        }
        
        .form-group textarea#blogContent {
            min-height: 300px;
        }

        .modal-footer {
            text-align: right;
            margin-top: 20px;
        }

        .btn-save {
            background-color: #28a745;
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: bold;
        }

.blog-detail-container {
            max-width: 800px;
            margin: 40px auto;
            padding: 20px;
            background: #fff;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        }

        .blog-header {
            margin-bottom: 30px;
            text-align: center;
        }

        .blog-title {
            font-size: 32px;
            color: #333;
            margin-bottom: 10px;
            line-height: 1.4;
        }

        .blog-meta {
            color: #777;
            font-size: 14px;
        }

        .blog-cover {
            width: 100%;
            max-height: 400px;
            object-fit: cover;
            border-radius: 8px;
            margin-bottom: 30px;
            display: none;
        }

        .blog-content {
            font-size: 16px;
            line-height: 1.8;
            color: #444;
        }

        .blog-content h2, .blog-content h3 {
            color: #333;
            margin-top: 25px;
            margin-bottom: 15px;
        }

        .blog-content p {
            margin-bottom: 15px;
        }

        .blog-content img {
            max-width: 100%;
            border-radius: 8px;
            margin: 20px 0;
        }

        .back-to-home {
            display: inline-block;
            margin-top: 30px;
            color: #ff6b00;
            text-decoration: none;
            font-weight: bold;
        }

        .back-to-home:hover {
            text-decoration: underline;
        }

        .loading-state {
            text-align: center;
            padding: 50px;
            color: #777;
        }

        /* CKEditor Custom Styling */
        .ck-editor__editable_inline {
            min-height: 250px;
            max-height: 450px;
            overflow-y: auto;
        }
