:root {
    --pure-black: #0f172a;      /* Slate-900 */
    --dark-gray: #1e293b;       /* Slate-800 */
    --mid-gray: #64748b;        /* Slate-500 */
    --light-gray: #f8fafc;      /* Slate-50 */
    --border-color: #e2e8f0;    /* Slate-200 */
    --pure-white: #ffffff;      /* Solid white */
    --smooth-curve: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Premium Violet & Indigo theme colors */
    --vip-primary: #6366f1;     /* Royal Indigo */
    --vip-primary-hover: #4f46e5;
    --vip-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%); /* Gorgeous Indigo to Violet */
    --vip-gold-gradient: linear-gradient(135deg, #f59e0b 0%, #eab308 100%); /* Luxury Gold */
    --neon-cyan: #0ea5e9;
    --neon-emerald: #10b981;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-gray);
    background-image: radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
                      radial-gradient(at 50% 0%, rgba(168, 85, 247, 0.03) 0px, transparent 50%),
                      radial-gradient(at 100% 0%, rgba(6, 182, 212, 0.02) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--dark-gray);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
    touch-action: manipulation;
}

/* ================= HEADER & FOOTER ================= */
.vibrant-header {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--smooth-curve) 0.3s;
}

.logo-premium {
    text-shadow: 0 2px 8px rgba(99, 102, 241, 0.1);
    transition: all 0.3s ease;
}
.logo-premium:hover {
    color: var(--vip-primary) !important;
}
.logo-premium i {
    color: var(--vip-primary);
}

.vibrant-footer {
    background: var(--pure-black);
    color: #94a3b8;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mini-banner {
    background: var(--vip-gradient);
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.82rem;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    box-sizing: border-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-wrapper {
    display: inline-block;
    white-space: nowrap;
    animation: marquee-scroll 75s linear infinite;
    padding-left: 20px;
}

.marquee-item {
    display: inline-block;
    margin-right: 60px;
}

.marquee-item strong {
    font-weight: 700;
    color: #ffd700;
}

@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

/* ================= SEARCH BAR ================= */
.search-form .form-control {
    border-radius: 8px 0 0 8px;
    border: 1px solid var(--border-color);
    background: var(--pure-white);
    color: var(--pure-black);
    padding-left: 20px;
    box-shadow: none;
    transition: all 0.3s var(--smooth-curve);
}
.search-form .form-control::placeholder {
    color: var(--mid-gray);
}
.search-form .form-control:focus {
    background: var(--pure-white);
    border-color: var(--vip-primary);
}
.search-form .btn {
    border-radius: 0 8px 8px 0;
    background-color: var(--pure-black);
    color: #fff;
    border: 1px solid var(--pure-black);
    transition: all 0.3s;
}
.search-form .btn:hover {
    background-color: var(--vip-primary);
    border-color: var(--vip-primary);
}

/* ================= PRODUCTS CARD ================= */
.product-card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: transform 0.4s var(--smooth-curve), 
                box-shadow 0.4s var(--smooth-curve), 
                border-color 0.4s var(--smooth-curve);
    overflow: hidden;
    background: var(--pure-white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
    will-change: transform;
}
.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.25);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06), 0 0 20px rgba(99, 102, 241, 0.05);
}
.card-img-top {
    height: 180px;
    object-fit: cover;
    border-bottom: 1px solid var(--border-color);
    filter: brightness(98%) contrast(98%);
    transition: filter 0.5s ease, transform 0.5s ease;
}
.product-card:hover .card-img-top {
    filter: brightness(100%) contrast(100%);
    transform: scale(1.02);
}
.product-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 8px;
    line-height: 1.4;
}
.product-title a {
    color: var(--pure-black) !important;
}
.product-title a:hover {
    color: var(--vip-primary) !important;
}
.product-price {
    color: var(--pure-black);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}
.sold-text {
    color: var(--mid-gray) !important;
}
.product-card-features {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    line-height: 1.35;
}
.product-card-features li {
    display: flex;
    align-items: flex-start;
    min-width: 0;
}
.product-card-features i {
    color: #ec4899;
    font-size: 0.68rem;
    line-height: 1.35rem;
    flex: 0 0 auto;
}
@media (max-width: 575.98px) {
    .product-card-features {
        grid-template-columns: 1fr;
    }
}

/* Buttons */
.btn-buy {
    background: var(--vip-gradient);
    color: #fff;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    padding: 10px;
    transition: all 0.3s var(--smooth-curve);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}
.btn-buy:hover {
    background: var(--vip-gradient);
    filter: brightness(1.1);
    color: #fff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.btn-cart-icon {
    background: var(--pure-white);
    color: var(--pure-black);
    border: 1px solid var(--border-color);
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s var(--smooth-curve);
}
.btn-cart-icon:hover {
    border-color: var(--pure-black);
    background: var(--light-gray);
    color: var(--pure-black);
}

.product-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.product-actions .btn-buy {
    flex: 1;
}

.badge-hot {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--vip-gold-gradient);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

/* Links */
.header-link {
    color: var(--mid-gray);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}
.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}
.vibrant-header .header-link { color: var(--dark-gray); }
.vibrant-header .header-link:hover { color: var(--pure-black) !important; }

.account-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 220px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--pure-white);
    color: var(--mid-gray);
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.account-toggle:hover,
.account-toggle.show {
    background: var(--light-gray);
    border-color: #cbd5e1;
    color: var(--pure-black);
}

.account-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--vip-gradient);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    flex: 0 0 auto;
}

.account-greeting {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.account-chevron {
    font-size: 0.72rem;
    color: var(--mid-gray);
    flex: 0 0 auto;
}

.account-menu {
    background: var(--pure-white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.account-menu .dropdown-item {
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 500;
}
.account-menu .dropdown-item:hover {
    background: var(--light-gray);
    color: var(--pure-black);
}
.account-menu .dropdown-divider {
    border-color: var(--border-color);
}

.account-menu .dropdown-item i {
    width: 18px;
    text-align: center;
}
.footer-link:hover { color: #ffffff; }

/* Cart Button Header (Legacy / Desktop) */
.btn-cart-header {
    background: var(--pure-white);
    color: var(--pure-black);
    border: 1px solid var(--border-color);
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
}
.btn-cart-header:hover {
    border-color: var(--pure-black);
    background: var(--light-gray);
}

/* Circular Header Icons (Mobile/New) */
.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background-color: var(--light-gray);
    color: var(--pure-black);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}
.header-icon-btn:hover {
    background-color: var(--border-color);
}
.vibrant-header .header-icon-btn {
    background-color: rgba(0, 0, 0, 0.04);
}
.vibrant-header .header-icon-btn:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* ================= CATEGORY MENU ================= */
.category-menu {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 0;
    justify-content: center;
}
.category-btn {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    background: var(--pure-white);
    color: var(--mid-gray);
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s var(--smooth-curve);
}
.category-btn:hover {
    border-color: #cbd5e1;
    color: var(--pure-black);
}
.category-btn.active {
    background: var(--pure-black);
    color: #fff;
    border-color: var(--pure-black);
}

/* ================= TAB NAVIGATION ================= */
.tab-nav {
    display: flex;
    gap: 20px;
}
.tab-btn {
    padding: 10px 0;
    border: none;
    background: transparent;
    color: var(--mid-gray);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--vip-primary);
    transition: width 0.3s var(--smooth-curve);
}
.tab-btn:hover { color: var(--vip-primary); }
.tab-btn.active { color: var(--vip-primary); }
.tab-btn.active::after { width: 100%; }

/* ================= BLOG SECTION ================= */
.blog-card {
    background: var(--pure-white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.4s var(--smooth-curve), box-shadow 0.4s;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.01);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border-color: rgba(99, 102, 241, 0.15);
}
.blog-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s var(--smooth-curve);
}
.blog-card:hover .blog-img { transform: scale(1.04); }
.blog-content { padding: 24px; }
.blog-date {
    color: var(--vip-primary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    font-weight: 600;
}
.blog-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 12px;
}
.blog-desc {
    color: var(--mid-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}
.read-more {
    color: var(--pure-black);
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    margin-top: 15px;
    font-size: 0.9rem;
}
.read-more i { transition: transform 0.3s; margin-left: 5px; }
.read-more:hover i { transform: translateX(5px); color: var(--vip-primary); }

/* ================= PRODUCT DETAIL ================= */
.product-detail-container {
    background: var(--pure-white);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.02);
    animation: fadeIn 0.5s var(--smooth-curve);
}
.detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.detail-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--pure-black);
}
.detail-category {
    color: var(--vip-primary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.detail-price {
    font-size: 2rem;
    color: var(--pure-black) !important;
    font-weight: 800;
}
.detail-price-original {
    color: var(--mid-gray) !important;
    font-size: 1.4rem;
}
.option-item {
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    background: var(--pure-white);
    color: var(--dark-gray);
}
.option-item:hover { 
    border-color: #cbd5e1; 
    background: #fafafa;
}
.option-item.selected {
    border-color: var(--pure-black);
    border-width: 2px;
    background: #f8f8f8;
}
.disabled-option {
    cursor: not-allowed !important;
    opacity: 0.5;
    background-color: #fcfcfc !important;
    border-color: var(--border-color) !important;
}
.back-link {
    color: var(--mid-gray);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    transition: color 0.3s;
}
.back-link:hover { color: var(--pure-black) !important; }

/* ================= ANIMATIONS (No Lag) ================= */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-element {
    animation: fadeIn 0.6s var(--smooth-curve) forwards;
}

/* Modal Customization */
.modal-content {
    background: var(--pure-white);
    border: 1px solid var(--border-color);
    color: var(--dark-gray);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.05);
}
.modal-header, .modal-footer {
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
}
.modal-title {
    color: var(--pure-black);
}
.modal-body {
    color: var(--dark-gray);
}
.modal-content .form-control {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    color: var(--pure-black);
}
.modal-content .form-control:focus {
    background: #fff;
    border-color: var(--vip-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.modal-content .btn-close {
    filter: brightness(0.2);
}

/* Hide scrollbar for category menu */
.category-menu::-webkit-scrollbar { display: none; }
.category-menu { -ms-overflow-style: none; scrollbar-width: none; }

/* ================= FLOATING ACTION BUTTONS (FAB) ================= */
.fab-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.4rem;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    transition: all 0.3s var(--smooth-curve);
    border: none;
    cursor: pointer;
}

.fab-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
    color: #ffffff;
}

.fab-totop {
    background-color: var(--pure-white);
    border: 1px solid var(--border-color);
    color: var(--pure-black) !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}
.fab-totop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.fab-totop:hover {
    background-color: var(--vip-primary);
    color: #fff !important;
    border-color: transparent;
}

.fab-telegram {
    background-color: #2AABEE;
}

.fab-zalo {
    background-color: #0068FF;
}

.zalo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: -0.5px;
}
@media (max-width: 768px) {
    .zalo-text {
        font-size: 0.7rem;
    }
}

.fab-chat {
    background-color: var(--vip-primary);
}
.fab-chat:hover {
    background-color: var(--vip-primary-hover);
}

/* ================= PRODUCT INFO TABS ================= */
.custom-tab-btn {
    color: var(--mid-gray);
    font-weight: 600;
    border: none !important;
    background: transparent !important;
    padding: 10px 16px;
    border-bottom: 2px solid transparent !important;
    transition: all 0.3s ease;
}
.custom-tab-btn:hover {
    color: var(--pure-black);
}
.custom-tab-btn.active {
    color: var(--vip-primary) !important;
    border-bottom: 2px solid var(--vip-primary) !important;
}
#productTabs::-webkit-scrollbar {
    display: none;
}

/* ================= RECENT PURCHASE POPUP ================= */
.recent-purchase-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 320px;
    background: var(--pure-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    z-index: 1000;
    overflow: hidden;
    transform: translateY(100px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s var(--smooth-curve);
    border: 1px solid var(--border-color);
}
.recent-purchase-popup.show {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.progress-bar-container {
    height: 4px;
    background: #e9ecef;
    width: 100%;
}
.purchase-progress-bar {
    height: 100%;
    background: var(--neon-emerald);
    width: 100%;
}
.btn-close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: var(--mid-gray);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
}
.btn-close-popup:hover {
    color: var(--pure-black);
}
.avatar-circle {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: #a855f7;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 600;
}

/* ================= CATEGORY PILL MENU ================= */
.category-menu-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

.cat-pill {
    white-space: nowrap;
    padding: 8px 20px;
    border-radius: 50px;
    background: var(--pure-white);
    border: 1px solid var(--border-color);
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.cat-pill:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
    color: var(--pure-black);
}

.cat-pill.active {
    background: var(--pure-black);
    color: #fff;
    border-color: var(--pure-black);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Glowing Pro Pill */
.cat-pill.pro-glow {
    border: 2px solid transparent;
    padding: 7px 19px;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(90deg, #a855f7, #3b82f6, #06b6d4) border-box;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.15);
    color: var(--pure-black);
}
.cat-pill.pro-glow:hover {
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.25);
    transform: translateY(-2px);
}
.cat-pill.pro-glow.active {
    background: var(--vip-gradient) padding-box,
                linear-gradient(90deg, #a855f7, #3b82f6, #06b6d4) border-box;
    color: #fff;
}

/* ================= HEADER NAVIGATION ================= */
.header-nav-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.header-nav-btn {
    padding: 6px 14px;
    border-radius: 50px;
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s var(--smooth-curve);
    white-space: nowrap;
}

.header-nav-btn:hover {
    color: var(--vip-primary);
    background-color: rgba(99, 102, 241, 0.06);
}

.header-nav-btn.active {
    color: var(--vip-primary);
    background-color: rgba(99, 102, 241, 0.12);
}

.logo-dropdown .dropdown-toggle::after {
    display: none !important;
}

/* ================= MOBILE BOTTOM NAVIGATION ================= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--mid-gray);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    flex: 1;
    height: 100%;
    transition: all 0.2s var(--smooth-curve);
    gap: 3px;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    transition: transform 0.2s var(--smooth-curve);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--vip-primary);
}

.mobile-nav-item.active i {
    transform: translateY(-2px);
}

/* Add padding to body to prevent bottom nav from overlapping content on mobile */
@media (max-width: 991px) {
    body {
        padding-bottom: 70px !important;
    }
}

/* ================= MOBILE RESPONSIVENESS ================= */
@media (max-width: 768px) {
    /* Menu Categories */
    .category-menu-wrapper {
        flex-wrap: wrap;
        gap: 8px;
        margin-bottom: 20px;
        padding-bottom: 5px;
    }
    .cat-pill {
        padding: 6px 14px;
        font-size: 0.85rem;
    }
    .cat-pill.pro-glow {
        padding: 5px 13px;
    }
    
    /* Product Cards - 2 Column Compact Grid */
    .row.g-4 {
        --bs-gutter-x: 12px;
        --bs-gutter-y: 12px;
    }
    .card-body {
        padding: 12px !important;
    }
    .product-title {
        font-size: 0.85rem;
        margin-bottom: 6px;
        line-height: 1.35;
        height: 2.7em;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        white-space: normal;
    }
    .card-body .text-muted.small.mb-3 {
        font-size: 0.7rem;
        margin-bottom: 10px !important;
    }
    .product-price {
        font-size: 1rem;
        margin-bottom: 10px !important;
    }
    .card-img-top {
        height: 130px;
    }
    .product-actions {
        gap: 6px;
    }
    .btn-buy {
        padding: 6px 8px;
        font-size: 0.75rem;
        border-radius: 6px;
    }
    .btn-cart-icon {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        font-size: 0.8rem;
    }

    /* Tabs & Filters - Segmented Control Feel */
    #products-section > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: stretch !important;
        gap: 12px;
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 16px !important;
    }
    .tab-nav {
        display: flex;
        width: 100%;
        background: var(--border-color);
        padding: 4px;
        border-radius: 10px;
        gap: 0;
    }
    .tab-btn {
        flex: 1;
        text-align: center;
        font-size: 0.9rem;
        padding: 8px 0;
        border-radius: 8px;
        color: var(--mid-gray);
        font-weight: 600;
    }
    .tab-btn::after {
        display: none;
    }
    .tab-btn.active {
        background: var(--pure-white);
        color: var(--pure-black);
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    .form-select {
        width: 100% !important;
        background-color: var(--pure-white) !important;
        border-radius: 10px;
        padding: 10px 14px;
        font-size: 0.9rem;
        border: 1px solid var(--border-color) !important;
    }

    /* Floating Purchase Popup - Ultra Compact Mobile Version */
    .popup-notification {
        width: calc(100vw - 32px) !important;
        left: 16px !important;
        bottom: 85px !important;
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    }
    .popup-content.p-3 {
        padding: 10px 12px !important;
    }
    .popup-content > .d-flex.align-items-center:first-of-type,
    .popup-content > .small.text-muted:last-child {
        display: none !important;
    }
    
    /* Avatar & Name Row */
    .popup-content .d-flex.mb-3.align-items-center {
        margin-bottom: 8px !important;
    }
    .popup-content .avatar-circle {
        width: 32px !important;
        height: 32px !important;
        font-size: 0.9rem !important;
    }
    #popup-customer-name {
        font-size: 0.85rem !important;
        line-height: 1.2;
    }
    .popup-content .d-flex.mb-3.align-items-center .small.text-muted {
        font-size: 0.7rem !important;
        margin-top: 2px;
    }
    
    /* Product Box */
    .popup-content .bg-success.bg-opacity-10 {
        padding: 8px 10px !important;
        margin-bottom: 0 !important;
        border-radius: 8px !important;
    }
    #popup-product-name {
        font-size: 0.75rem !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 250px !important;
    }
    .popup-content .bg-success .small.mt-2 {
        margin-top: 4px !important;
        font-size: 0.75rem !important;
    }
    #popup-product-price {
        font-size: 0.85rem !important;
    }
    .popup-content .btn-close-popup {
        top: 6px;
        right: 8px;
        font-size: 0.85rem;
    }

    /* Floating Action Buttons */
    .fab-wrapper {
        bottom: calc(78px + env(safe-area-inset-bottom));
        right: 12px;
        gap: 8px;
        z-index: 1001;
    }
    .fab-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        box-shadow: 0 4px 10px rgba(0,0,0,0.12);
    }

    /* Detail Page */
    .product-detail-container {
        padding: 0 16px;
    }
    .detail-title {
        font-size: 1.4rem !important;
        margin-bottom: 12px !important;
        line-height: 1.35;
        letter-spacing: -0.5px;
    }
    .detail-price {
        font-size: 1.4rem !important;
    }
    .detail-category {
        font-size: 0.8rem;
        margin-bottom: 10px !important;
    }
    .col-lg-6.mb-4 {
        margin-bottom: 24px !important;
        padding: 0 16px;
    }
    .detail-image {
        border-radius: 12px !important;
        width: 100% !important;
        height: auto !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
        border: none !important;
    }
    .option-item {
        padding: 14px 16px;
        border-radius: 12px;
        margin-bottom: 12px;
        border: 1px solid var(--border-color);
        background: var(--pure-white);
    }
    .custom-tab-btn {
        padding: 8px 10px;
        font-size: 0.9rem;
    }
    .back-link {
        font-size: 0.95rem;
        margin-bottom: 20px !important;
        padding-left: 16px;
    }
    .detail-desc {
        font-size: 0.95rem !important;
        color: var(--mid-gray) !important;
    }
    
    /* Optimize detail page buttons on tablet */
    .product-detail-container .d-flex.gap-3.mt-4 {
        gap: 10px !important;
    }
    .product-detail-container .btn-buy {
        padding: 12px 16px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
    }
    .product-detail-container .btn-outline-dark {
        padding: 12px 14px !important;
        border-radius: 8px !important;
    }

    .profile-heading {
        gap: 14px;
        align-items: flex-start !important;
    }

    .profile-heading > div {
        min-width: 0;
        flex: 1;
    }

    .profile-home-btn {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        height: 44px;
        padding: 0 14px !important;
        white-space: nowrap;
        border-radius: 999px !important;
        font-size: 0.92rem;
        line-height: 1;
    }

    .profile-home-btn i {
        margin-right: 6px !important;
    }
}
/* ================= TRUST BADGES (Product Detail) ================= */
.trust-badges-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}
.trust-badge-card {
    background: var(--pure-white);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 10px;
    text-align: center;
    transition: all 0.3s ease;
}
.trust-badge-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04);
    border-color: var(--mid-gray);
}
.trust-icon-circle {
    width: 44px;
    height: 44px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.1rem;
    color: var(--dark-gray);
}
.trust-badge-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pure-black);
    margin-bottom: 4px;
}
.trust-badge-desc {
    font-size: 0.75rem;
    color: var(--mid-gray);
    line-height: 1.2;
}

@media (max-width: 576px) {
    .trust-badges-container {
        gap: 8px;
    }
    .trust-badge-card {
        padding: 15px 5px;
    }
    .trust-badge-title {
        font-size: 0.8rem;
    }
    .trust-badge-desc {
        font-size: 0.65rem;
    }
}

/* ================= CUSTOM RADIO BUTTONS ================= */
.custom-radio {
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s var(--smooth-curve);
    flex-shrink: 0;
}

.option-item.selected .custom-radio {
    border-color: var(--pure-black);
}

.radio-dot {
    width: 0;
    height: 0;
    background: var(--pure-black);
    border-radius: 50%;
    transition: all 0.2s var(--smooth-curve);
}

.option-item.selected .radio-dot {
    width: 10px;
    height: 10px;
}

.option-item {
    display: flex;
    align-items: center;
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--pure-white);
}

.option-item:hover:not(.disabled-option) {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.option-item.selected {
    border-color: var(--pure-black);
    border-width: 2px;
    background: #f8f8f8;
}

.option-item.disabled-option {
    opacity: 0.5;
    cursor: not-allowed;
    background: #fdfdfd;
}

/* ================= ABOUT & CONTACT SECTIONS ================= */
.about-container, .contact-container {
    animation: fadeIn 0.8s var(--smooth-curve);
}

.feature-icon-sm {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-icon-sm:hover {
    transform: scale(1.1);
    background-color: var(--border-color) !important;
}

.contact-info-card {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    border: 1px solid rgba(255,255,255,0.08);
}

.contact-icon {
    transition: all 0.3s ease;
}

.contact-info-card div:hover .contact-icon {
    background-color: rgba(255,255,255,0.2) !important;
    transform: translateX(5px);
}

#contact-form .form-control, #contact-form .form-select {
    border: 1px solid var(--border-color);
    background-color: #fcfcfc;
    transition: all 0.3s ease;
}

#contact-form .form-control:focus, #contact-form .form-select:focus {
    background-color: #fff;
    border-color: var(--vip-primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    .about-container h2 {
        font-size: 1.8rem !important;
    }
    .contact-info-card {
        padding: 30px !important;
    }
}

/* ================= USER CHAT WIDGET ================= */
.user-chatbox {
    position: fixed;
    right: 20px;
    bottom: 90px;
    width: 340px;
    max-width: calc(100vw - 24px);
    height: 480px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    flex-direction: column;
    z-index: 1080;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
}
.user-chatbox-header {
    background: var(--vip-gradient);
    color: #fff;
    padding: 12px 14px;
}
.online-status-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 10px;
    height: 10px;
    background-color: #22c55e;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 5px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}
.user-chat-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 14px;
    background: #f7f7f8;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-msg { display: flex; flex-direction: column; max-width: 80%; }
.chat-msg .bubble {
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-break: break-word;
    white-space: pre-wrap;
}
.chat-msg .meta { font-size: 0.7rem; color: #888; margin-top: 2px; }
.chat-msg.msg-me { align-self: flex-end; align-items: flex-end; }
.chat-msg.msg-me .bubble { background: var(--vip-primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.msg-them { align-self: flex-start; align-items: flex-start; }
.chat-msg.msg-them .bubble { background: #fff; color: #111; border: 1px solid var(--border-color); border-bottom-left-radius: 4px; }
.user-chat-form {
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}
.user-chat-form .btn { width: 36px; height: 36px; flex: 0 0 auto; padding: 0; }

/* Admin chat manager */
.chat-thread-item:hover { background: #f9fafb; }
.chat-thread-item.active { background: #f0f0f0; }
#chat-messages .chat-msg .bubble { font-size: 0.92rem; }

/* Chat textarea + attachments */
.chat-textarea {
    resize: none;
    line-height: 1.4;
    min-height: 36px;
    max-height: 120px;
    padding: 8px 12px;
    border-radius: 18px;
    background: #f4f4f4;
    border: 1px solid var(--border-color);
    color: var(--pure-black);
}
.user-chat-form .chat-textarea { max-height: 120px; }
.user-chat-form .chat-attach-btn { width: 36px; height: 36px; padding: 0; flex: 0 0 auto; border-radius: 50%; }
.user-chat-preview {
    padding: 8px 12px;
    border-top: 1px solid var(--border-color);
    background: #fafafa;
}
.bubble-att { padding: 6px !important; background: transparent !important; border: none !important; }
.chat-att-img img {
    max-width: 220px;
    max-height: 220px;
    border-radius: 10px;
    display: block;
}
.chat-att-file {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--pure-black);
    text-decoration: none;
    transition: background 0.2s;
}
.chat-msg.msg-me .chat-att-file { background: #1f1f1f; color: #fff; border-color: #1f1f1f; }
.chat-msg.msg-me .chat-att-file .text-muted { color: rgba(255,255,255,0.7) !important; }
.chat-att-file:hover { background: #f4f4f4; }
.chat-msg.msg-me .chat-att-file:hover { background: #2a2a2a; }

/* Product list pagination */
.product-item.is-hidden { display: none !important; }
.product-item { will-change: opacity, transform; }
@keyframes productFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.product-item:not(.is-hidden) { animation: productFadeIn 0.35s ease forwards; }
#btnLoadMoreProducts { transition: transform 0.15s ease; }
#btnLoadMoreProducts:hover { transform: translateY(-2px); }

/* =================== SEARCH ================== */
.search-results-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1080;
    display: none;
}
.search-results-panel.show { display: block; }
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #f1f1f1;
    transition: background 0.15s;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.active { background: #f7f7f8; }
.search-thumb {
    width: 44px; height: 44px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
}
.search-thumb-fallback {
    width: 44px; height: 44px;
    flex: 0 0 auto;
    border-radius: 8px;
    background: #f4f4f4;
    display: flex; align-items: center; justify-content: center;
    color: #999;
}
.search-item-body { min-width: 0; flex: 1 1 auto; }
.search-item-title {
    font-weight: 600;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-item mark {
    background: rgba(0, 0, 0, 0.08);
    padding: 0 2px;
    border-radius: 3px;
    color: inherit;
}
.search-price { color: var(--pure-black); white-space: nowrap; }

.mobile-search-overlay {
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 2000;
    display: none;
    flex-direction: column;
}
.mobile-search-overlay.show { display: flex; }
.mobile-search-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}
.mobile-search-bar #mobileSearchInput {
    background: #f4f4f4;
    border-radius: 999px;
    padding: 10px 16px;
    flex: 1 1 auto;
}
.mobile-search-results { flex: 1 1 auto; overflow-y: auto; }
.mobile-search-results .search-item { padding: 14px 16px; }

/* ================= GLOBAL NOTIFICATION TOAST SYSTEM ================= */
#app-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 380px;
    width: calc(100vw - 40px);
}

.app-toast {
    pointer-events: all;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.07);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255,255,255,0.8);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s var(--smooth-curve), box-shadow 0.2s;
    animation: toast-slide-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.app-toast:hover {
    transform: translateX(-4px) scale(1.01);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

.app-toast.toast-hiding {
    animation: toast-slide-out 0.35s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Left accent bar */
.app-toast::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
}

/* Progress bar */
.app-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    border-radius: 0 0 16px 16px;
    transition: transform linear;
}

/* Toast icon */
.app-toast-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-top: 1px;
}

.app-toast-body {
    flex: 1 1 auto;
    min-width: 0;
}

.app-toast-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 3px;
    letter-spacing: -0.01em;
}

.app-toast-message {
    font-size: 0.8rem;
    line-height: 1.5;
    color: #64748b;
    word-break: break-word;
}

.app-toast-close {
    flex: 0 0 auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 0;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: background 0.15s, color 0.15s;
    margin-top: 1px;
}

.app-toast-close:hover {
    background: rgba(0,0,0,0.08);
    color: #334155;
}

/* ---- Type: SUCCESS ---- */
.app-toast.toast-success::before   { background: linear-gradient(180deg, #22c55e, #16a34a); }
.app-toast.toast-success .app-toast-icon {
    background: rgba(34, 197, 94, 0.12);
    color: #16a34a;
}
.app-toast.toast-success .app-toast-title { color: #15803d; }
.app-toast.toast-success .app-toast-progress { background: linear-gradient(90deg, #22c55e, #16a34a); }

/* ---- Type: ERROR ---- */
.app-toast.toast-error::before   { background: linear-gradient(180deg, #ef4444, #dc2626); }
.app-toast.toast-error .app-toast-icon {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
}
.app-toast.toast-error .app-toast-title { color: #b91c1c; }
.app-toast.toast-error .app-toast-progress { background: linear-gradient(90deg, #ef4444, #dc2626); }

/* ---- Type: WARNING ---- */
.app-toast.toast-warning::before   { background: linear-gradient(180deg, #f59e0b, #d97706); }
.app-toast.toast-warning .app-toast-icon {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
}
.app-toast.toast-warning .app-toast-title { color: #b45309; }
.app-toast.toast-warning .app-toast-progress { background: linear-gradient(90deg, #f59e0b, #d97706); }

/* ---- Type: INFO ---- */
.app-toast.toast-info::before   { background: linear-gradient(180deg, #6366f1, #4f46e5); }
.app-toast.toast-info .app-toast-icon {
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
}
.app-toast.toast-info .app-toast-title { color: #3730a3; }
.app-toast.toast-info .app-toast-progress { background: linear-gradient(90deg, #6366f1, #4f46e5); }

/* ---- Type: LOADING ---- */
.app-toast.toast-loading::before   { background: linear-gradient(180deg, #64748b, #475569); }
.app-toast.toast-loading .app-toast-icon {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}
.app-toast.toast-loading .app-toast-title { color: #334155; }
.app-toast.toast-loading .app-toast-icon i {
    animation: spin-toast 1s linear infinite;
}

/* ---- Keyframes ---- */
@keyframes toast-slide-in {
    from {
        opacity: 0;
        transform: translateX(110%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toast-slide-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
        max-height: 200px;
        margin-bottom: 0;
    }
    to {
        opacity: 0;
        transform: translateX(110%) scale(0.9);
        max-height: 0;
        margin-bottom: -12px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

@keyframes spin-toast {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@media (max-width: 480px) {
    #app-toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
        width: auto;
    }

    /* Optimize product detail on mobile */
    .product-detail-container .d-flex.gap-3.mt-4 {
        gap: 8px !important;
    }

    .product-detail-container .btn-buy {
        padding: 10px 12px !important;
        font-size: 0.9rem !important;
        border-radius: 6px !important;
    }

    .product-detail-container .btn-outline-dark {
        padding: 10px 12px !important;
        border-radius: 6px !important;
        font-size: 1rem !important;
        min-width: auto;
    }

    .option-item {
        padding: 12px 14px !important;
        margin-bottom: 10px !important;
        border-radius: 12px !important;
    }

    .custom-radio {
        width: 18px !important;
        height: 18px !important;
        margin-right: 10px !important;
    }

    .option-item .d-flex:first-child {
        font-size: 0.95rem !important;
    }

    .option-item .text-end {
        font-size: 0.9rem !important;
    }

    .option-item .badge {
        padding: 2px 6px !important;
        font-size: 0.7rem !important;
    }
}
