/* ==========================================
   WEBNEW - CSS Gộp chung
   Tông màu: cam chủ đạo, trắng, xám nhạt
   Phong cách sàn thương mại điện tử hiện đại
   ========================================== */

/* === CSS Variables === */
:root {
    --primary: #f26522;
    --primary-light: #ff8a50;
    --primary-dark: #d94f0f;
    --secondary: #6c757d;
    --accent: #2d8cf0;
    --accent-warm: #f26522;
    --accent-amber: #d97706;
    --price-color: #16a34a;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --text-dark: #222222;
    --text-muted: #6c757d;
    --text-light: #95a5a6;
    --bg-white: #ffffff;
    --bg-light: #f8f9fa;
    --bg-warm: #f5f6f7;
    --bg-gray: #e9ecef;
    --border-color: #e8e8e8;
    --shadow-sm: 0 1px 4px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 32px rgba(0,0,0,0.12);
    --radius: 10px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;

    /* Override Bootstrap primary colors để dùng cam thay xanh */
    --bs-primary: #f26522;
    --bs-primary-rgb: 242, 101, 34;
    --bs-link-color: #f26522;
    --bs-link-hover-color: #d94f0f;
}

/* Override Bootstrap utility classes sang cam */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.btn-primary { background-color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-primary:hover { background-color: var(--primary-dark) !important; border-color: var(--primary-dark) !important; }
.btn-outline-primary { color: var(--primary) !important; border-color: var(--primary) !important; }
.btn-outline-primary:hover { background-color: var(--primary) !important; border-color: var(--primary) !important; color: #fff !important; }
.border-primary { border-color: var(--primary) !important; }

/* === Reset & Base === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-warm);
}

a {
    color: #e05a1a;
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* === Frontend Header === */
.main-header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .navbar {
    position: relative;
}

.top-bar {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 6px 0;
    font-size: 13px;
}

.top-bar a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}

.top-bar a:hover {
    color: white;
}

.header-main {
    padding: 12px 0;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.logo:hover {
    color: var(--primary-dark);
}

.logo-image {
    display: block;
    height: 44px;
    width: auto;
}

/* === Navigation === */
.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark);
    padding: 8px 14px;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 14px;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary);
    background: rgba(242,101,34,0.08);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 6px 10px;
    font-size: 1.1rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(242,101,34,0.15);
}

.dropdown-menu {
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    padding: 8px 0;
}

/* Mobile: dropdown flat (không nổi khối riêng) */
@media (max-width: 991.98px) {
    .navbar-collapse .dropdown-menu {
        box-shadow: none;
        border: none;
        border-left: 3px solid var(--primary);
        border-radius: 0;
        background: rgba(242,101,34,0.04);
        padding: 2px 0 4px 8px;
        margin: 0 0 4px 8px;
    }
    .navbar-collapse .dropdown-item {
        font-size: 13px;
        padding: 5px 12px;
        border-radius: 4px;
    }
    /* User dropdown mobile: styled box */
    .navbar-collapse .user-nav-btn + .dropdown-menu {
        border-left: none;
        background: var(--bg-white);
        padding: 4px 0;
        margin: 0;
        border: 1px solid var(--border-color);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
    }
    /* Logout wrapper: user dropdown bên trái, logout bên phải */
    .user-logout-wrapper {
        width: 100%;
        justify-content: space-between;
    }
}

.dropdown-item {
    padding: 8px 16px;
    font-size: 14px;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--bg-light);
    color: var(--primary);
}

/* === Buttons === */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 11px 28px;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: .3px;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(242,101,34,.25);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #b83d00 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(242,101,34,.4);
    text-decoration: none;
}

.btn-outline-custom {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 9px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.btn-outline-custom:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(242,101,34,.2);
    text-decoration: none;
}

.btn-post {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn-post:hover {
    background: #218838;
    color: white;
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, #cc4400 0%, #e85d04 30%, #f26522 65%, #ff8a50 100%);
    color: white;
    padding: 90px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
/* Họa tiết nền: dot grid + glow ellipse */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 15% 80%, rgba(255,255,255,0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(255,200,100,0.06) 0%, transparent 65%),
        radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none;
    z-index: 0;
}
/* Vòng tròn sáng lớn bottom-right */
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -130px;
    right: -90px;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.09) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}
/* Container nổi trên decorations */
.hero-section .container { position: relative; z-index: 1; }

/* ── Bong bóng trang trí nổi trong hero ─────────────────────── */
.hero-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.20);
    pointer-events: none;
    z-index: 0;
    animation: hero-bubble-float 8s ease-in-out infinite;
}
.hero-bubble-1 { width: 85px;  height: 85px;  top: 10%;    left: 5%;    animation-delay: 0s;    animation-duration: 8s; }
.hero-bubble-2 { width: 140px; height: 140px; top: 6%;     right: 7%;   animation-delay: 1.5s;  animation-duration: 10s; }
.hero-bubble-3 { width: 55px;  height: 55px;  bottom: 22%; left: 10%;   animation-delay: 0.8s;  animation-duration: 7s; }
.hero-bubble-4 { width: 105px; height: 105px; bottom: 10%; right: 14%;  animation-delay: 2.5s;  animation-duration: 9s; }
.hero-bubble-5 { width: 42px;  height: 42px;  top: 45%;    left: 2%;    animation-delay: 1.2s;  animation-duration: 6.5s; }
.hero-bubble-6 { width: 70px;  height: 70px;  top: 28%;    right: 3%;   animation-delay: 0.4s;  animation-duration: 8.5s; }
.hero-bubble-7 { width: 32px;  height: 32px;  top: 65%;    right: 25%;  animation-delay: 3s;    animation-duration: 7.5s; }
.hero-bubble-8 { width: 50px;  height: 50px;  top: 20%;    left: 25%;   animation-delay: 1.8s;  animation-duration: 9.5s; }
@keyframes hero-bubble-float {
    0%, 100% { transform: translateY(0)   scale(1);    opacity: 0.85; }
    33%       { transform: translateY(-18px) scale(1.05); opacity: 1; }
    66%       { transform: translateY(-8px)  scale(0.96); opacity: 0.75; }
}

.hero-title {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.hero-feature i {
    color: var(--warning);
}
/* Màu riêng cho từng icon hero feature */
.hero-feat-shield { color: #6ee7b7 !important; }  /* xanh mint */
.hero-feat-bolt   { color: #fde047 !important; }  /* vàng sáng */
.hero-feat-users  { color: #93c5fd !important; }  /* xanh dương nhạt */
.hero-feat-check  { color: #86efac !important; }  /* xanh lá nhạt */

/* === Cards === */
.card-custom {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.card-custom:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* === Product Card === */
.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    position: relative; /* cần cho badge */
    box-shadow: var(--shadow-sm);
}

/* Badge tim (lượt thích) - góc trên phải */
.product-card .badge-like {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(255,255,255,0.92);
    color: #e53e3e;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 7px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
    z-index: 2;
    pointer-events: none;
}

/* Badge quảng cáo - góc trên trái */
.product-card .badge-ads {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #ffb347 0%, #ff9800 55%, #ff7b00 100%);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    z-index: 3;
    pointer-events: none;
    letter-spacing: .35px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255,255,255,.46);
    box-shadow:
        0 10px 18px rgba(255, 149, 0, 0.28),
        0 2px 8px rgba(255, 115, 0, 0.35),
        inset 0 1px 0 rgba(255,255,255,.42);
    overflow: hidden;
    text-transform: uppercase;
    backdrop-filter: blur(1px);
}

.product-card .badge-ads i {
    font-size: 10px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.22));
}

.product-card .badge-ads::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -55%;
    width: 42%;
    height: 200%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.72) 52%, rgba(255,255,255,0) 100%);
    transform: rotate(18deg);
    animation: ads-badge-shine 2.6s ease-in-out infinite;
}

@keyframes ads-badge-shine {
    0%   { left: -65%; opacity: 0; }
    20%  { opacity: .95; }
    55%  { left: 120%; opacity: .9; }
    100% { left: 135%; opacity: 0; }
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.14);
    border-color: rgba(242,101,34,0.3);
}

.product-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.product-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 15px;
}

.product-card .product-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .product-price {
    color: var(--price-color);
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 6px;
}

.product-card .product-location {
    font-size: 12px;
    color: var(--text-muted);
}

.product-card .product-location i {
    color: #0891b2;
    margin-right: 4px;
}

/* === Blog Card === */
.blog-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.12);
    border-color: rgba(242,101,34,0.25);
}

.blog-card .card-img-wrapper {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.blog-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.blog-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.blog-card .card-body {
    padding: 15px;
}

.blog-card .blog-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .blog-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* === Section Headers === */
.section-header {
    margin-bottom: 30px;
    text-align: center;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.section-header p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.section-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    margin: 10px auto 0;
    border-radius: 3px;
}

/* === Stats Section === */
.stats-section {
    background: var(--bg-white);
    padding: 44px 0;
}

.stat-item {
    text-align: center;
    padding: 20px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}
.stat-item:hover {
    background: var(--bg-light);
    transform: translateY(-2px);
}

.stat-item .stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.stat-item .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

/* === Benefit Cards (Homepage) === */
.benefit-card {
    padding: 32px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-white);
    transition: var(--transition);
    height: 100%;
    box-shadow: var(--shadow-sm);
}
.benefit-card:hover {
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(242,101,34,0.14);
    transform: translateY(-5px);
}
.benefit-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(242,101,34,0.12) 0%, rgba(242,101,34,0.04) 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    transition: var(--transition);
}
.benefit-card:hover .benefit-icon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    transform: scale(1.08);
}

/* === Step Cards (How it works) === */
.step-card {
    padding: 28px 20px;
    border-radius: var(--radius);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    position: relative;
    transition: var(--transition);
    height: 100%;
}
.step-card:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(242,101,34,0.1);
}
.step-number {
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(242,101,34,0.3);
}
.step-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-top: 8px;
}

/* === Category Section === */
.category-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-align: left;
}

.category-item:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 14px rgba(242,101,34,0.12);
    color: var(--primary-dark);
    transform: translateY(-3px);
    background: var(--bg-white);
}

.category-item i {
    font-size: 1.2rem;
    color: #0891b2;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(8,145,178,0.14) 0%, rgba(8,145,178,0.05) 100%);
    border-radius: 8px;
}
/* Nhiều màu lạnh xoay vòng cho icon danh mục */
.row > [class*="col-"]:nth-child(4n+2) .category-item i { color: #7c3aed; background: linear-gradient(135deg,rgba(124,58,237,.14),rgba(124,58,237,.05)); }
.row > [class*="col-"]:nth-child(4n+3) .category-item i { color: #0369a1; background: linear-gradient(135deg,rgba(3,105,161,.14),rgba(3,105,161,.05)); }
.row > [class*="col-"]:nth-child(4n+4) .category-item i { color: #0f766e; background: linear-gradient(135deg,rgba(15,118,110,.14),rgba(15,118,110,.05)); }

/* === Search / Filter === */
.search-box {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.search-box .form-control,
.search-box .form-select {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.search-box .form-control:focus,
.search-box .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(242,101,34,0.12);
}

/* === Footer === */
.main-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.85);
    padding: 50px 0 20px;
    margin-top: 60px;
    border-top: 3px solid var(--primary);
}

/* Footer user panel */
.user-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 16px 0;
    margin-top: 40px;
    font-size: .875rem;
}

/* User avatar nav button */
.user-nav-btn {
    padding: 4px 8px;
    border-radius: 6px;
    transition: background .15s;
}
.user-nav-btn:hover { background: rgba(0,0,0,.05); }

/* Logout icon button */
.logout-btn {
    border-radius: 6px;
    transition: background .15s, color .15s;
    display: flex;
    align-items: center;
}
.logout-btn:hover { background: rgba(220,53,69,.08); }

.main-footer h5 {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.main-footer a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.main-footer a:hover {
    color: white;
}

.main-footer .footer-links li {
    margin-bottom: 8px;
}

.main-footer .footer-links li i {
    width: 20px;
    margin-right: 6px;
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    margin-top: 30px;
    font-size: 13px;
    color: rgba(255,255,255,0.6);
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-right: 8px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--accent-warm);
}

/* === Detail Page === */
.detail-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.detail-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--danger);
}

.detail-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 14px;
    color: var(--text-muted);
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 15px 0;
}

.detail-meta span i {
    margin-right: 4px;
    color: var(--primary-light);
}

.detail-gallery img {
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

/* Thumbnail gallery: 4/hàng mobile, 8/hàng PC */
.col-md-thumb {
    flex: 0 0 25%;
    max-width: 25%;
}
@media (min-width: 768px) {
    .col-md-thumb {
        flex: 0 0 12.5%;
        max-width: 12.5%;
    }
}

/* Thumbnail active state */
.thumb-active {
    border-color: var(--primary) !important;
    border-width: 2px !important;
    box-shadow: 0 0 0 2px rgba(242,101,34,0.3) !important;
    opacity: 1 !important;
}

/* Gallery chính - cố định kích thước tránh vỡ layout */
.detail-gallery > img,
.detail-gallery > video {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #f0f0f0;
    border-radius: var(--radius);
}

.detail-gallery img:hover {
    opacity: 0.9;
}

/* === User Info Card === */
.user-info-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.user-info-card .user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-light);
    margin-bottom: 12px;
}

.user-info-card .user-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
}

.user-info-card .user-contact {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Seller rating stars */
.seller-rating {
    font-size: 0.88rem;
    line-height: 1;
}

/* === Comment Section === */
.comment-section {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.comment-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--bg-gray);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-item .comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-item .comment-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.comment-item .comment-time {
    font-size: 12px;
    color: var(--text-light);
}

.comment-item .comment-content {
    font-size: 14px;
    color: var(--text-dark);
    margin-top: 4px;
}

.comment-reply {
    margin-left: 50px;
    padding-left: 15px;
    border-left: 2px solid var(--bg-gray);
}

/* === Profile Page === */
.profile-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 40px 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    margin-bottom: 30px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow);
}

/* === Auth Pages (Login/Register) === */
.auth-container,
.auth-wrapper {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-light);
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 440px;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.auth-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 0;
}

.auth-card .auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    text-align: center;
    margin-bottom: 8px;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 30px;
}

/* Auth Divider (hoặc) */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
    padding: 0 12px;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Google Login Button */
.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    background: var(--bg-white);
    transition: var(--transition);
    font-size: 14px;
}
.btn-google:hover {
    background: #f8f9fa;
    border-color: #dc3545;
    color: #dc3545;
    box-shadow: var(--shadow-sm);
}
.btn-google svg {
    flex-shrink: 0;
}

.auth-card .form-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

.auth-card .form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 14px;
}

.auth-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(242,101,34,0.12);
}

/* ============================================
   ADMIN STYLES
   ============================================ */

/* Admin Sidebar */
.admin-sidebar {
    background: #1e293b;
    /* dvh = Dynamic Viewport Height: tự điều chỉnh khi browser UI hiện/ẩn */
    height: 100dvh;
    min-height: 100dvh;
    width: 250px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 999;
    overflow-y: auto;
    transition: var(--transition);
}

.admin-sidebar .sidebar-brand {
    padding: 14px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.admin-sidebar .sidebar-brand a {
    color: white;
    font-size: 18px;
    font-weight: 700;
}

.admin-sidebar .sidebar-brand .admin-brand-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    text-decoration: none;
}

.admin-sidebar .sidebar-brand .admin-brand-logo {
    max-width: 74px;
    width: 74px;
    height: auto;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
    padding: 2px;
}

.admin-sidebar .sidebar-brand .admin-brand-name {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.admin-sidebar .sidebar-nav {
    padding: 15px 0;
    list-style: none;
}

.admin-sidebar .sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: var(--transition);
    gap: 10px;
}

.admin-sidebar .sidebar-nav li a:hover,
.admin-sidebar .sidebar-nav li a.active {
    color: white;
    background: rgba(255,255,255,0.1);
}

.admin-sidebar .sidebar-nav li a i {
    width: 20px;
    text-align: center;
}

.admin-sidebar .sidebar-nav .nav-header {
    padding: 15px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
}

/* === Admin Footer === */
.admin-footer {
    margin-top: 32px;
    padding: 14px 0;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 12.5px;
    color: #94a3b8;
    /* đẩy khỏi vùng browser nav bar trên mobile */
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}
.admin-footer-copy { font-weight: 500; }
.admin-footer-info { opacity: .8; }

/* Admin Content */
.admin-content {
    margin-left: 250px;
    padding: 20px;
    /* dvh = Dynamic Viewport Height: tự thu/giãn theo browser UI (address bar, tab bar) */
    min-height: 100dvh;
    background: var(--bg-light);
    /* Safe area cho notch/home indicator trên thiết bị mobile */
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.admin-topbar {
    background: var(--bg-white);
    padding: 12px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Admin Table */
.admin-table {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.admin-table .table {
    margin-bottom: 0;
}

.admin-table .table th {
    background: var(--bg-light);
    border-bottom: 2px solid var(--border-color);
    font-weight: 600;
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 15px;
}

.admin-table .table td {
    padding: 12px 15px;
    font-size: 14px;
    vertical-align: middle;
    border-bottom: 1px solid var(--bg-gray);
}

.admin-table .table tr:hover {
    background: var(--bg-light);
}

/* Admin Form Card */
.admin-form-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 25px;
}

/* Admin Stat Cards */
.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 12px;
}
/* Fix: khi dùng bg-primary (cam) + text-primary (cam) → icon vô hình.
   Override để luôn có icon trắng trên nền đậm */
.stat-card .stat-icon.bg-primary {
    background-color: var(--primary) !important;
    color: white !important;
}
.stat-card .stat-icon.bg-info {
    background-color: #0ea5e9 !important;
    color: white !important;
}
.stat-card .stat-icon.bg-success {
    background-color: #16a34a !important;
    color: white !important;
}
.stat-card .stat-icon.bg-warning {
    background-color: #d97706 !important;
    color: white !important;
}

.stat-card .stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Admin CRUD helper styles */
.crud-list-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.crud-list-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.crud-list-header h5 {
    margin: 0;
    font-weight: 700;
}

/* ============================================
   USER PANEL STYLES
   ============================================ */

.user-sidebar {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.user-sidebar .sidebar-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.user-sidebar .sidebar-nav {
    list-style: none;
    padding: 10px 0;
    margin: 0;
}

.user-sidebar .sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--transition);
}

.user-sidebar .sidebar-nav li a:hover,
.user-sidebar .sidebar-nav li a.active {
    background: var(--bg-light);
    color: var(--primary);
}

.user-sidebar .sidebar-nav li a i {
    width: 20px;
    text-align: center;
    color: var(--text-muted);
}

.user-sidebar .sidebar-nav li a:hover i {
    color: var(--primary);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Admin Sidebar responsive */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
        width: 260px;
        z-index: 1050;
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        padding: 15px;
        /* Safe area: tránh bị browser bottom nav (Safari, Chrome Android) che khuất */
        padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px));
    }
    
    .admin-topbar {
        flex-direction: row;
        gap: 10px;
    }
    
    /* Overlay khi sidebar mở */
    .admin-sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1040;
    }
    
    .admin-sidebar-overlay.show {
        display: block;
    }
}

/* Frontend mobile */
@media (max-width: 991px) {
    .top-bar {
        display: none;
    }
    
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-features {
        gap: 15px;
    }
    
    .section-header h2 {
        font-size: 1.4rem;
    }
    
    .navbar-collapse {
        background: var(--bg-white);
        padding: 15px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        margin-top: 10px;
        border: 1px solid var(--border-color);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    
    .navbar-nav .nav-link {
        padding: 10px 12px;
    }
    
    .btn-post {
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    /* Mobile auth nav */
    .mobile-auth-nav {
        list-style: none;
    }
    
    .mobile-auth-nav hr {
        border-color: var(--border-color);
    }
}

@media (max-width: 767px) {
    .main-footer {
        padding: 30px 0 15px;
    }
    
    .footer-bottom {
        text-align: center;
    }
    
    .footer-bottom .text-end {
        text-align: center !important;
        margin-top: 10px;
    }
    
    /* Admin table responsive */
    .admin-table {
        overflow-x: auto;
    }
    
    .admin-table .table {
        min-width: 600px;
    }
    
    .crud-list-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Stat cards */
    .stat-card .stat-number {
        font-size: 1.4rem;
    }
    
    .detail-title {
        font-size: 1.2rem;
    }
    
    .detail-price {
        font-size: 1.2rem;
    }
    
    .detail-meta {
        gap: 10px;
        font-size: 13px;
    }
    
    /* Auth card mobile */
    .auth-card {
        padding: 25px;
    }
    
    /* User sidebar mobile */
    .user-sidebar {
        margin-bottom: 20px;
    }
    
    .user-sidebar .sidebar-header {
        padding: 15px;
    }
    
    /* Admin form card */
    .admin-form-card {
        padding: 15px;
    }
    
    /* Product card mobile */
    .product-card .card-body {
        padding: 10px;
    }
    
    .product-card .product-title {
        font-size: 13px;
    }
    
    .product-card .product-price {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .header-main {
        padding: 8px 0;
    }
    
    .logo {
        font-size: 18px;
    }

    .logo-image {
        height: 36px;
    }
    
    .hero-section {
        padding: 35px 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-feature {
        font-size: 0.85rem;
    }
    
    .section-header h2 {
        font-size: 1.2rem;
    }
    
    .category-item {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    .category-item i {
        font-size: 1.1rem;
        width: 32px;
        height: 32px;
    }
    
    .comment-reply {
        margin-left: 20px;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Admin Sidebar scrollbar */
.admin-sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}

.admin-sidebar::-webkit-scrollbar {
    width: 4px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 2px;
}

/* Animation */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form switch larger */
.form-switch .form-check-input {
    width: 3em;
    height: 1.5em;
}

.form-switch .form-check-input:checked {
    background-color: var(--success);
    border-color: var(--success);
}

/* Badge spacing */
.badge {
    font-weight: 500;
    padding: 5px 10px;
}

/* Table action buttons */
.btn-group-sm .btn {
    padding: 4px 8px;
    font-size: 12px;
}

/* Print hidden */
@media print {
    .admin-sidebar,
    .admin-topbar,
    .top-bar,
    .main-header,
    .main-footer {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 0 !important;
    }
}

.admin-table .table td {
    padding: 12px 15px;
    vertical-align: middle;
    font-size: 14px;
}

/* Admin Form */
.admin-form {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 30px;
}

.admin-form .form-label {
    font-weight: 500;
    font-size: 14px;
    color: var(--text-dark);
}

/* Admin Stats Cards */
.admin-stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary);
}

.admin-stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* ============================================
   USER DASHBOARD STYLES
   ============================================ */

.user-sidebar {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0;
    overflow: hidden;
}

.user-sidebar .sidebar-header {
    background: var(--primary);
    color: white;
    padding: 20px;
    text-align: center;
}

.user-sidebar .sidebar-nav {
    list-style: none;
    padding: 10px 0;
}

.user-sidebar .sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-dark);
    font-size: 14px;
    transition: var(--transition);
    gap: 10px;
}

.user-sidebar .sidebar-nav li a:hover,
.user-sidebar .sidebar-nav li a.active {
    background: rgba(242,101,34,0.08);
    color: var(--primary);
}

.user-sidebar .sidebar-nav li a i {
    width: 18px;
    text-align: center;
    color: var(--text-muted);
}

.user-sidebar .sidebar-nav li a:hover i,
.user-sidebar .sidebar-nav li a.active i {
    color: var(--primary);
}

/* === Responsive === */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-content {
        margin-left: 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 50px 0;
    }

    .hero-title {
        font-size: 1.6rem;
    }

    .hero-features {
        gap: 15px;
    }

    .detail-meta {
        flex-direction: column;
        gap: 8px;
    }

    .auth-card {
        padding: 25px;
    }

    .stat-item .stat-number {
        font-size: 1.5rem;
    }
}

/* ============================================
   MEDIA UPLOAD ZONE
   ============================================ */

.media-upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-light);
    transition: var(--transition);
}

.media-upload-dropzone {
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.media-upload-dropzone.dragover {
    border-color: var(--primary);
    background: rgba(242,101,34,0.05);
}

.media-upload-zone:hover {
    border-color: var(--primary-light);
}

.media-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px;
}

.media-preview-list:empty {
    padding: 0;
}

.media-preview-item {
    position: relative;
    width: 110px;
    height: 90px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-gray);
}

.media-preview-item img,
.media-preview-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.media-preview-item .media-preview-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    transition: var(--transition);
    z-index: 2;
}

.media-preview-item:hover .media-preview-remove {
    opacity: 1;
}

/* Trạng thái đã chọn (để bulk delete) */
.media-preview-item.selected {
    outline: 3px solid var(--primary);
    outline-offset: 1px;
    border-radius: 6px;
}

.media-preview-item.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    bottom: 3px;
    left: 3px;
    background: var(--primary);
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

/* Thanh hành động bulk (hiển thị khi có ảnh được chọn) */
.media-bulk-bar {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 13px;
}
.media-bulk-bar.show {
    display: flex;
}

.media-preview-video {
    position: relative;
    width: 100%;
    height: 100%;
}

.media-video-badge,
.media-video-overlay {
    position: absolute;
    bottom: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    z-index: 1;
}

.media-video-overlay {
    top: 50%;
    left: 50%;
    bottom: auto;
    transform: translate(-50%, -50%);
    font-size: 16px;
    padding: 6px 10px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 8px;
}

.upload-progress {
    width: 100%;
    height: 3px;
    background: var(--bg-gray);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
}

.upload-progress-bar {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.2s;
    border-radius: 2px;
}

/* Media thumb trong product detail */
.media-thumb-video {
    background: #000;
}

.media-thumb-video video {
    pointer-events: none;
}

/* Bulk action bar */
.bg-warning-subtle {
    background-color: #fff3cd !important;
}

/* === User Search Dropdown === */
.user-search-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 250px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.user-search-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    transition: background 0.15s;
}

.user-search-item:last-child {
    border-bottom: none;
}

.user-search-item:hover {
    background: #f0f4ff;
}

.user-search-item.text-muted {
    cursor: default;
    color: #999 !important;
}

.user-search-item.text-muted:hover {
    background: transparent;
}

@media (max-width: 576px) {
    .media-preview-item {
        width: 80px;
        height: 65px;
    }
    
    .media-upload-dropzone {
        padding: 20px 15px;
    }
    
    .media-upload-dropzone p {
        font-size: 12px;
    }
}

/* === Gallery Main - Cố định kích thước slider === */
.detail-gallery-main {
    width: 100%;
    height: 400px;
    object-fit: contain;
    background: #f5f5f5;
    border-radius: var(--radius);
    display: block;
}

/* Wrapper cho main media + prev/next arrows */
.gallery-main-wrapper {
    position: relative;
    display: block;
    background: #f5f5f5;
    border-radius: var(--radius);
    overflow: hidden;
}
.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0,0,0,0.42);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background 0.2s;
    font-size: 15px;
}
.gallery-nav-btn:hover { background: rgba(0,0,0,0.72); }
.gallery-nav-prev { left: 10px; }
.gallery-nav-next { right: 10px; }
/* Counter badge */
.gallery-counter {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,0.50);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 9px;
    border-radius: 20px;
    z-index: 5;
    pointer-events: none;
}
/* Video overlay play icon trên thumbnail */
.media-thumb-video .media-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.35);
    color: white;
    font-size: 18px;
    border-radius: 4px;
}

/* Responsive gallery */
@media (max-width: 767px) {
    .detail-gallery-main {
        height: 220px;
    }
    
    .detail-gallery .media-thumb-video,
    .detail-gallery .row img {
        height: 55px !important;
    }
}

@media (max-width: 576px) {
    .detail-gallery-main {
        height: 180px;
    }
}

/* === User sidebar mobile hamburger === */
@media (max-width: 767.98px) {
    .user-sidebar .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
    }
    
    .user-sidebar .sidebar-nav li {
        flex: 0 0 50%;
    }
    
    .user-sidebar .sidebar-nav li a {
        padding: 8px 12px;
        font-size: 13px;
    }
}

@media (max-width: 767.98px) {
    /* User sidebar collapse trên mobile */
    .col-md-3 .user-sidebar {
        display: none;
    }
    
    .col-md-3 .user-sidebar.sidebar-open {
        display: block;
        margin-bottom: 15px;
    }
}

/* === Responsive card layout cho bảng trong user dashboard (mobile) === */
@media (max-width: 767.98px) {
    /* Tắt cuộn ngang */
    .col-md-9 .table-responsive,
    .admin-form-card .table-responsive {
        overflow-x: visible !important;
    }

    .col-md-9 .table-responsive .admin-table,
    .col-md-9 .admin-form-card .user-vote-table {
        display: block;
        width: 100%;
    }

    .col-md-9 .table-responsive .admin-table thead,
    .col-md-9 .admin-form-card .user-vote-table thead {
        display: none;
    }

    /* tbody: block thẳng đứng */
    .col-md-9 .table-responsive .admin-table tbody,
    .col-md-9 .admin-form-card .user-vote-table tbody {
        display: block;
        width: 100%;
    }

    /* Card = tr, bên trong grid 2 cột cho các cặp label/value */
    .col-md-9 .table-responsive .admin-table tr,
    .col-md-9 .admin-form-card .user-vote-table tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        border: 1px solid #e0e6ef;
        border-radius: 12px;
        margin-bottom: 12px;
        padding: 12px 14px 8px;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,.07);
        gap: 6px 12px;
        column-gap: 16px;
    }

    /* td: label nhỏ trên, value to dưới (stacked) */
    .col-md-9 .table-responsive .admin-table td,
    .col-md-9 .admin-form-card .user-vote-table td {
        display: flex;
        flex-direction: column;
        border: none !important;
        padding: 2px 0;
        font-size: 13.5px;
        font-weight: 500;
        color: #212529;
        word-break: break-word;
        min-width: 0;
        gap: 2px;
    }

    /* Label nhỏ màu muted ở trên */
    .col-md-9 .table-responsive .admin-table td[data-label]::before,
    .col-md-9 .admin-form-card .user-vote-table td[data-label]::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 10.5px;
        color: #6c757d;
        text-transform: uppercase;
        letter-spacing: .5px;
        line-height: 1.2;
        display: block;
        margin-bottom: 2px;
    }

    /* Ô "Thao tác": full width, badge trái, nút phải */
    .col-md-9 .table-responsive .admin-table td[data-label="Thao tác"],
    .col-md-9 .admin-form-card .user-vote-table td[data-label="Thao tác"] {
        grid-column: 1 / -1;
        padding-top: 6px;
        border-top: 1px dashed #f0f0f0 !important;
        margin-top: 2px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 6px;
    }
    .col-md-9 .table-responsive .admin-table td[data-label="Thao tác"]::before,
    .col-md-9 .admin-form-card .user-vote-table td[data-label="Thao tác"]::before {
        display: none;
    }
    /* Ô checkbox (không có data-label): gọn, checkbox bên phải */
    .col-md-9 .table-responsive .admin-table td:not([data-label]) {
        grid-column: 1 / -1;
        padding: 0;
        flex-direction: row;
        align-items: center;
        justify-content: flex-end;
        border: none !important;
        gap: 6px;
        min-height: 0;
    }

    /* Ô nội dung, bỏ giới hạn max-width trên mobile */
    .col-md-9 .admin-form-card .user-vote-table td[data-label="Nội dung"] div {
        max-width: none !important;
        white-space: normal !important;
        overflow: visible !important;
    }

    /* Cột được đánh dấu ẩn trên mobile (vd: status hiện inline ở Thao tác) */
    .col-md-9 .table-responsive .admin-table .admin-col-mobile-hidden {
        display: none !important;
    }

    /* Text dài trong ô: truncate với ellipsis, không xuống dòng */
    .col-md-9 .table-responsive .admin-table td .admin-cell-text {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
}

/* === Mobile check-all bar (ẩn trên desktop, hiện trên mobile khi có bulk) === */
.mobile-checkall-bar {
    display: none;
}
@media (max-width: 767.98px) {
    .mobile-checkall-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 8px;
        padding: 6px 10px;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e0e6ef;
    }
}

/* === Back to top button === */
#backToTop {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9990;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(242,101,34,0.40);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}
#backToTop.btt-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#backToTop:hover {
    background: linear-gradient(135deg, var(--primary-dark), #b33300);
    box-shadow: 0 6px 20px rgba(242,101,34,0.55);
    transform: translateY(-2px);
}

/* === Global lightbox overlay (dùng cho toàn site) === */
#sibLightboxOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0,0,0,.92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
#sibLightboxOverlay.sib-show {
    display: flex;
}
#sibLightboxImg {
    max-width: 94vw;
    max-height: 92vh;
    border-radius: 6px;
    box-shadow: 0 4px 40px rgba(0,0,0,.6);
    object-fit: contain;
    cursor: default;
    transition: opacity .15s;
}
#sibLightboxClose {
    position: fixed;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
    z-index: 1000000;
    opacity: .85;
}
#sibLightboxClose:hover { opacity: 1; }
.sib-preview-img {
    cursor: zoom-in !important;
    transition: opacity .15s;
}
.sib-preview-img:hover { opacity: .88; }

/* ===================================================================
   MARKETPLACE UI UPGRADE — Homepage sections & improved components
   =================================================================== */

/* --- Section header row (flex với link Xem tất cả) --- */
.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
}
.section-header-row > div {
    flex: 1;
    min-width: 0;
}
/* Divider bên trái trong section-header-row */
.section-header-row .section-divider {
    margin: 8px 0 0;
}

/* --- Tiêu đề section mới --- */
.section-h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}
.section-h2 i {
    font-size: 1.25rem;
}
/* Màu vàng/nâu cho section nổi bật */
.section-h2-featured {
    color: #92400e;
}
.section-h2-featured i {
    color: #f59e0b;
}
/* Màu đỏ/hồng cho section yêu thích */
.section-h2-liked {
    color: #c0392b;
}
.section-h2-liked i {
    color: #e53e3e;
}

/* --- Gradient divider variants --- */
.section-divider-featured {
    background: linear-gradient(90deg, #f59e0b, #d97706) !important;
}
.section-divider-liked {
    background: linear-gradient(90deg, #e53e3e, #f56565) !important;
}

/* --- Nền section nổi bật (cam hero đậm) --- */
.section-featured-bg {
    background: linear-gradient(135deg, #cc4400 0%, #e85d04 30%, #f26522 65%, #ff8a50 100%);
    position: relative;
    overflow: hidden;
}
.section-featured-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 15% 80%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 85% 15%, rgba(255,255,255,0.08) 0%, transparent 45%),
        radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none;
    z-index: 0;
}
.section-featured-bg::after {
    content: '';
    position: absolute;
    bottom: -80px; right: -80px;
    width: 280px; height: 280px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none; z-index: 0;
}
.section-featured-bg .container { position: relative; z-index: 1; }
/* --- Nền section mới nhất (cam nhạt hơn) --- */
.section-new-bg {
    background: linear-gradient(135deg, #e85d04 0%, #f26522 40%, #ff8a50 80%, #f5904a 100%);
    position: relative;
    overflow: hidden;
}
.section-new-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 15% 85%, rgba(255,255,255,0.07) 0%, transparent 45%),
        radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none; z-index: 0;
}
.section-new-bg::after {
    content: '';
    position: absolute;
    top: -60px; left: -60px;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none; z-index: 0;
}
.section-new-bg .container { position: relative; z-index: 1; }
/* --- Nền section yêu thích (cam đậm nhất) --- */
.section-liked-bg {
    background: linear-gradient(135deg, #b33300 0%, #cc4400 35%, #e85d04 65%, #f26522 100%);
    position: relative;
    overflow: hidden;
}
.section-liked-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 20% 80%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 80% 20%, rgba(255,255,255,0.08) 0%, transparent 45%),
        radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none; z-index: 0;
}
.section-liked-bg::after {
    content: '';
    position: absolute;
    bottom: -60px; left: -60px;
    width: 240px; height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,0.07);
    pointer-events: none; z-index: 0;
}
.section-liked-bg .container { position: relative; z-index: 1; }

/* ================================================================
   WRAPPER CHUNG 3 SECTION SẢN PHẨM — nền cam liên tục như hero
   ================================================================ */
.section-products-bg {
    background: linear-gradient(160deg, #cc4400 0%, #e85d04 25%, #f26522 55%, #ff8a50 80%, #e85d04 100%);
    position: relative;
    overflow: hidden;
}
/* Họa tiết: dot grid trắng + glow ellipses (giống hero) */
.section-products-deco {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 10% 15%, rgba(255,255,255,0.10) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 85%, rgba(255,255,255,0.08) 0%, transparent 45%),
        radial-gradient(ellipse at 50% 50%, rgba(255,200,100,0.06) 0%, transparent 65%),
        radial-gradient(circle, rgba(255,255,255,0.055) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 22px 22px;
    pointer-events: none;
    z-index: 0;
}
/* Vòng tròn sáng trang trí */
.section-products-bg::before {
    content: '';
    position: absolute;
    top: -100px; left: -100px;
    width: 350px; height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
.section-products-bg::after {
    content: '';
    position: absolute;
    bottom: -120px; right: -100px;
    width: 420px; height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.07) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
/* Mỗi khối sub-section */
.section-products-block {
    position: relative;
    z-index: 1;
    padding: 50px 0;
}
/* KHÔNG border giữa các blocks — nền liền mạch */

/* Bong bóng động rải đều toàn wrapper — y hệt hero-bubble */
.prod-bubble {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(255,255,255,0.20);
    pointer-events: none;
    z-index: 0;
    animation: hero-bubble-float 8s ease-in-out infinite;
}
/* Phân bố rải đều theo chiều dọc của wrapper */
.prod-bubble-1  { width: 90px;  height: 90px;  top: 3%;   left: 3%;    animation-delay: 0s;   animation-duration: 8s;   }
.prod-bubble-2  { width: 140px; height: 140px; top: 2%;   right: 5%;   animation-delay: 1.5s; animation-duration: 10s;  }
.prod-bubble-3  { width: 55px;  height: 55px;  top: 12%;  left: 12%;   animation-delay: 0.8s; animation-duration: 7s;   }
.prod-bubble-4  { width: 70px;  height: 70px;  top: 18%;  right: 2%;   animation-delay: 2s;   animation-duration: 9s;   }
.prod-bubble-5  { width: 42px;  height: 42px;  top: 28%;  left: 1%;    animation-delay: 1.2s; animation-duration: 6.5s; }
.prod-bubble-6  { width: 110px; height: 110px; top: 33%;  right: 8%;   animation-delay: 0.4s; animation-duration: 11s;  }
.prod-bubble-7  { width: 35px;  height: 35px;  top: 42%;  left: 20%;   animation-delay: 3s;   animation-duration: 7.5s; }
.prod-bubble-8  { width: 80px;  height: 80px;  top: 52%;  left: 4%;    animation-delay: 1.8s; animation-duration: 9.5s; }
.prod-bubble-9  { width: 60px;  height: 60px;  top: 58%;  right: 3%;   animation-delay: 0.6s; animation-duration: 8.5s; }
.prod-bubble-10 { width: 45px;  height: 45px;  top: 67%;  left: 8%;    animation-delay: 2.5s; animation-duration: 7s;   }
.prod-bubble-11 { width: 120px; height: 120px; top: 72%;  right: 6%;   animation-delay: 1s;   animation-duration: 10.5s;}
.prod-bubble-12 { width: 50px;  height: 50px;  top: 82%;  left: 2%;    animation-delay: 3.5s; animation-duration: 8s;   }
.prod-bubble-13 { width: 75px;  height: 75px;  top: 88%;  right: 15%;  animation-delay: 0.2s; animation-duration: 9s;   }
.prod-bubble-14 { width: 38px;  height: 38px;  top: 95%;  left: 18%;   animation-delay: 2.2s; animation-duration: 7s;   }

/* --- Text trắng cho section heading trên nền cam --- */
.section-products-bg .section-h2,
.section-featured-bg .section-h2,
.section-new-bg .section-h2,
.section-liked-bg .section-h2 {
    color: white !important;
}
.section-featured-bg .section-header-row .text-muted,
.section-new-bg .section-header-row .text-muted,
.section-liked-bg .section-header-row .text-muted,
.section-products-bg .section-header-row .text-muted {
    color: rgba(255,255,255,0.80) !important;
}
.section-featured-bg .section-divider,
.section-new-bg .section-divider,
.section-liked-bg .section-divider,
.section-products-bg .section-divider {
    background: rgba(255,255,255,0.55);
    margin: 8px 0 0;
}
/* Icon trong heading trên nền cam → trắng */
.section-featured-bg .section-h2 i,
.section-new-bg .section-h2 i,
.section-liked-bg .section-h2 i,
.section-products-bg .section-h2 i {
    color: white !important;
}

/* --- Nút pill "Xem tất cả" — xanh lá gradient tương phản --- */
.btn-view-all {
    display: inline-flex;
    align-items: center;
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 18px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border: none;
    border-radius: 20px;
    text-decoration: none;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    box-shadow: 0 2px 10px rgba(22,163,74,0.30);
}
.btn-view-all:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(22,163,74,0.42);
}
/* Tất cả variants đều dùng green (tương phản với nền cam) */
.btn-view-all-featured,
.btn-view-all-liked {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border: none;
}
.btn-view-all-featured:hover,
.btn-view-all-liked:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

/* --- Badge vương miện (nổi bật) — góc trên trái card --- */
.product-card .badge-featured {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 10.5px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 0 0 10px 0;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(245, 158, 11, .35);
    letter-spacing: .3px;
    pointer-events: none;
}

/* --- Card variant cho sản phẩm nổi bật --- */
.product-card-featured {
    border-top: 2px solid #fde68a;
}
.product-card-featured:hover {
    border-top-color: #f59e0b;
    border-color: #f59e0b;
}

/* --- Top accent bar khi hover card (không gây layout shift) --- */
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 1;
    border-radius: var(--radius) var(--radius) 0 0;
}
.product-card:hover::before {
    opacity: 1;
}
/* Không override featured card top border bằng pseudo-element */
.product-card-featured::before {
    background: #f59e0b;
}

/* --- Hero section buttons nâng cấp --- */
.btn-hero {
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}
.hero-section .btn-light.btn-hero {
    box-shadow: 0 4px 15px rgba(0, 0, 0, .18);
    font-weight: 700;
    color: var(--primary-dark);
    border: none;
}
.hero-section .btn-light.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
    color: var(--primary-dark);
    background: white;
}
.hero-section .btn-outline-light.btn-hero {
    border-width: 2px;
}
.hero-section .btn-outline-light.btn-hero:hover {
    transform: translateY(-2px);
}

/* --- Icon thống kê trên trang chủ --- */
.stat-item .stat-icon {
    font-size: 1.75rem;
    color: var(--primary);
    margin-bottom: 8px;
    opacity: .85;
}

/* ================================================================
   UI UPGRADE v3 — E-commerce Polished Design
   Soft, modern, synchronized — không lòe loẹt
   ================================================================ */

/* ── Subtle dot pattern trên body background ─────────────────── */
body {
    background-image: radial-gradient(circle, rgba(0,0,0,0.018) 1px, transparent 1px);
    background-size: 30px 30px;
    background-attachment: fixed;
}

/* ── Buttons nâng cấp: pill-shape, clean shadow ─────────────── */
.btn-primary-custom {
    border-radius: 50px !important;
    box-shadow: 0 4px 16px rgba(242,101,34,.28) !important;
    letter-spacing: .5px;
    padding: 11px 30px !important;
}
.btn-primary-custom:hover {
    box-shadow: 0 6px 22px rgba(242,101,34,.42) !important;
}

/* Nút Đăng tin header: green gradient pill */
.btn-post {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    border: none !important;
    border-radius: 50px !important;
    box-shadow: 0 3px 10px rgba(22,163,74,.28) !important;
    font-weight: 600 !important;
    transition: all 0.25s ease !important;
}
.btn-post:hover {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
    color: white !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 14px rgba(22,163,74,.38) !important;
}

/* Header Bootstrap buttons: pill */
.main-header .btn-outline-primary,
.main-header .btn-primary {
    border-radius: 50px;
    font-size: 13px;
    padding: 5px 16px;
    font-weight: 600;
}

/* ── Hero section: bigger, richer ───────────────────────────── */
.hero-section {
    padding: 100px 0 90px !important;
}
.hero-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.5px !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.15);
}
.hero-subtitle {
    font-size: 1.15rem !important;
    opacity: 0.93 !important;
}

/* ── User Role Badges — animated, modern ────────────────────── */
.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    vertical-align: middle;
    line-height: 1.5;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    cursor: default;
}
/* Khách: subtle gray */
.badge-guest {
    background: #f0f2f5;
    color: #6b7280;
    border: 1px solid #e2e8f0;
}
/* ADMIN: purple→pink animated gradient */
.badge-admin {
    color: white;
    background: linear-gradient(90deg, #7c3aed, #db2777, #7c3aed);
    background-size: 200% 100%;
    box-shadow: 0 2px 10px rgba(124,58,237,.35);
    animation: badge-flow 3s linear infinite;
}
/* CTV: sky blue với shine sweep */
.badge-ctv {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: white;
    box-shadow: 0 2px 8px rgba(14,165,233,.32);
}
.badge-ctv::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.38), transparent);
    animation: badge-shine 2.8s ease infinite;
}
/* MALL: golden animated gradient */
.badge-mall {
    color: white;
    background: linear-gradient(90deg, #d97706, #fbbf24, #d97706);
    background-size: 200% 100%;
    box-shadow: 0 2px 10px rgba(217,119,6,.38);
    animation: badge-flow 2.5s linear infinite;
}
@keyframes badge-flow {
    0%   { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}
@keyframes badge-shine {
    0%        { left: -100%; }
    60%, 100% { left: 200%; }
}

/* ── Stat item color variants ────────────────────────────────── */
.stat-item-blue  .stat-icon,
.stat-item-blue  .stat-number { color: #4a90d9; }
.stat-item-green .stat-icon,
.stat-item-green .stat-number { color: #16a34a; }
.stat-item-amber .stat-icon,
.stat-item-amber .stat-number { color: #d97706; }
.stat-item-rose  .stat-icon,
.stat-item-rose  .stat-number { color: #e11d48; }

/* ── Benefit card color variants ─────────────────────────────── */
.benefit-card-green  .benefit-icon {
    background: linear-gradient(135deg,rgba(22,163,74,.14),rgba(22,163,74,.05));
    color: #16a34a;
}
.benefit-card-green:hover .benefit-icon {
    background: linear-gradient(135deg,#16a34a,#15803d);
    color: white;
}
.benefit-card-orange .benefit-icon {
    background: linear-gradient(135deg,rgba(234,88,12,.14),rgba(234,88,12,.05));
    color: #ea580c;
}
.benefit-card-orange:hover .benefit-icon {
    background: linear-gradient(135deg,#ea580c,#c2410c);
    color: white;
}
.benefit-card-teal   .benefit-icon {
    background: linear-gradient(135deg,rgba(8,145,178,.14),rgba(8,145,178,.05));
    color: #0891b2;
}
.benefit-card-teal:hover .benefit-icon {
    background: linear-gradient(135deg,#0891b2,#0e7490);
    color: white;
}
.benefit-card-purple .benefit-icon {
    background: linear-gradient(135deg,rgba(124,58,237,.14),rgba(124,58,237,.05));
    color: #7c3aed;
}
.benefit-card-purple:hover .benefit-icon {
    background: linear-gradient(135deg,#7c3aed,#6d28d9);
    color: white;
}

/* ── Category item: nhẹ hơn, tinh tế hơn ───────────────────── */
.category-item {
    border-radius: 12px !important;
}
.category-item span {
    font-size: 13.5px;
    font-weight: 500;
    color: var(--text-dark);
    transition: color 0.2s;
}
.category-item:hover span {
    color: var(--primary);
}

/* ── Detail page: giá nổi bật ────────────────────────────────── */
.detail-price {
    color: var(--price-color) !important;
    font-size: 1.65rem !important;
    font-weight: 800 !important;
}

/* ── User info card in detail page ──────────────────────────── */
.user-info-card {
    border-radius: var(--radius-lg) !important;
    border-color: rgba(0,0,0,0.07) !important;
    box-shadow: 0 4px 18px rgba(0,0,0,0.07) !important;
}
.user-info-card .user-avatar {
    border: 3px solid white !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

/* ── Contact buttons: pill-shape ────────────────────────────── */
.user-info-card .btn-outline-success,
.profile-section .btn-outline-success {
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
}
.user-info-card .btn-sm[style*="background:#0068ff"],
.profile-section .btn-sm[style*="background:#0068ff"],
.user-info-card .btn-sm[style*="background:#1877f2"],
.profile-section .btn-sm[style*="background:#1877f2"] {
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
}

/* ── Profile page card ───────────────────────────────────────── */
.detail-section.profile-card-top {
    background: var(--bg-white);
    border-top: 3px solid var(--primary);
    border-color: var(--border-color);
}

/* ── Breadcrumb ──────────────────────────────────────────────── */
.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 13px;
}
.breadcrumb-item + .breadcrumb-item::before { color: #b0bac9; }
.breadcrumb-item a { color: var(--primary); font-weight: 500; }
.breadcrumb-item.active { color: var(--text-muted); }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { gap: 3px; }
.page-link {
    border-radius: 8px !important;
    border: 1.5px solid var(--border-color) !important;
    color: var(--text-dark);
    font-size: 13.5px;
    padding: 6px 13px !important;
    font-weight: 500;
    transition: all 0.2s ease;
}
.page-link:hover {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: white !important;
}
.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 2px 8px rgba(242,101,34,.32) !important;
}
.page-item.disabled .page-link {
    opacity: .5;
}

/* ── Form inputs: slightly more refined ─────────────────────── */
.form-control,
.form-select {
    border-radius: 8px !important;
    border: 1.5px solid var(--border-color) !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(242,101,34,.1) !important;
}

/* ── Search box button ───────────────────────────────────────── */
.search-box .btn {
    border-radius: 8px;
    font-weight: 600;
}
/* Search form: nút tìm kiếm compact không dùng pill */
.search-box .btn-search-submit {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 18px;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: var(--transition);
    cursor: pointer;
}
.search-box .btn-search-submit:hover {
    background: var(--primary-dark);
    color: white;
}
.search-box .btn-reset-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}
.search-box .btn-reset-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}
/* Khi btn-primary-custom nằm trong flex container (search form), đảm bảo text + icon căn giữa */
.d-flex > .btn-primary-custom,
.d-flex .btn-primary-custom.flex-fill {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

/* ── Like button pill ───────────────────────────────────────── */
#likeBtn { border-radius: 50px; font-weight: 600; }

/* ── Share buttons pill ─────────────────────────────────────── */
.d-flex .btn[href*="facebook.com"],
.d-flex .btn[href*="zalo.me"],
.d-flex .btn[href*="twitter.com"],
.d-flex .btn[href*="t.me"],
.d-flex .btn-outline-secondary {
    border-radius: 50px;
    font-size: 13px;
    padding: 6px 14px;
    font-weight: 500;
}

/* ── Section header typography ──────────────────────────────── */
.section-h2 {
    letter-spacing: -0.3px;
}

/* ── Product card: slightly rounder ─────────────────────────── */
.product-card {
    border-radius: 14px !important;
}
.blog-card {
    border-radius: 14px !important;
}

/* ── Mobile responsive ───────────────────────────────────────── */
@media (max-width: 576px) {
    .user-badge { font-size: 10px; padding: 2px 8px; }
    .hero-title  { font-size: 1.75rem !important; }
    .hero-section { padding: 55px 0 45px !important; }
    /* 2 nút hero luôn nằm ngang hàng trên mobile */
    .hero-btn-row { flex-wrap: nowrap !important; }
    .hero-btn-row .btn-hero {
        font-size: 13px !important;
        padding: 9px 14px !important;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 0;
        text-align: center;
    }
}
