/* =========================================
   DARK MODE HOÀN CHỈNH – PHIÊN BẢN CUỐI (FIX BLOG + TẤT CẢ)
   Theme: Hồng Tím Cute cho Pangiftie Shop
========================================= */

/* ===== BIẾN MÀU CHÍNH ===== */
:root {
    --dark-bg-main: #1a0f2e;      /* Nền chính toàn site */
    --dark-bg-card: #2d1b3a;      /* Card, product, blog item */
    --dark-text: #f8d7fa;        /* Chữ chính */
    --dark-muted: #d8b4e2;       /* Chữ phụ */
    --dark-accent: #ff9ecf;      /* Link */
    --dark-pink-gradient: linear-gradient(90deg, #c71585, #da3e9c);
    --dark-border: #4a2e5c;
}

/* ===== BODY & HTML ===== */
html.dark-bg,
body.dark-bg {
    background-color: var(--dark-bg-main) !important;
    color: var(--dark-text) !important;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* ===== FIX TẤT CẢ NỀN (QUAN TRỌNG NHẤT – FIX BLOG) ===== */
body.dark-bg #main-site,
body.dark-bg main,
body.dark-bg section,
body.dark-bg .container,
body.dark-bg .container-fluid,
body.dark-bg .row,
body.dark-bg .col- *,
body.dark-bg .owl-stage-outer,
body.dark-bg .owl-stage,
body.dark-bg .owl-item,
body.dark-bg .grid,
body.dark-bg .grid-item,
body.dark-bg .blog-section,     /* Thêm nếu có class riêng cho blog */
body.dark-bg .blog-item,
body.dark-bg .promo-bar,
body.dark-bg .top-bar {
    background-color: transparent !important;
    background-image: none !important;
}

/* ===== HEADER & NAVBAR ===== */
body.dark-bg .custom-navbar,
body.dark-bg nav.navbar {
    background: var(--dark-pink-gradient) !important;
}
body.dark-bg .top-bar {
    background-color: #2d1b3a !important;
    border-bottom: 1px solid var(--dark-border) !important;
}
body.dark-bg .top-bar *,
body.dark-bg .nav-link,
body.dark-bg .top-link,
body.dark-bg .top-left a {
    color: #fff !important;
}
body.dark-bg .nav-link:hover,
body.dark-bg .top-left a:hover {
    color: #ffb3ff !important;
}

/* ===== CARD / PRODUCT / BLOG ITEM ===== */
body.dark-bg .card,
body.dark-bg .product,
body.dark-bg .item,
body.dark-bg .box,
body.dark-bg .blog-item,        /* Fix chính phần blog */
body.dark-bg .blog-card,
body.dark-bg .owl-item > div,
body.dark-bg .grid-item {
    background-color: var(--dark-bg-card) !important;
    border: 1px solid var(--dark-border) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    color: var(--dark-text) !important;
}

/* ===== TEXT CHUNG ===== */
body.dark-bg h1, body.dark-bg h2, body.dark-bg h3,
body.dark-bg h4, body.dark-bg h5, body.dark-bg h6,
body.dark-bg p, body.dark-bg span, body.dark-bg li,
body.dark-bg .font-baloo, body.dark-bg .font-rale {
    color: var(--dark-text) !important;
}

/* ===== LINK ===== */
body.dark-bg a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--dark-accent) !important;
}
body.dark-bg a:hover {
    color: #ffb3ff !important;
}

/* ===== FORM & INPUT ===== */
body.dark-bg .form-control,
body.dark-bg input,
body.dark-bg textarea {
    background-color: rgba(255,255,255,0.1) !important;
    color: #fff !important;
    border: 1px solid var(--dark-border) !important;
}
body.dark-bg .form-control::placeholder {
    color: var(--dark-muted) !important;
}

/* ===== BUTTON ===== */
body.dark-bg .btn-search,
body.dark-bg .cart-btn,
body.dark-bg .btn-login,
body.dark-bg .btn-register {
    background: #ff69b4 !important;
    color: #fff !important;
}
body.dark-bg .btn-search:hover,
body.dark-bg .cart-btn:hover {
    background: #ff1493 !important;
}

/* ===== FOOTER ===== */
body.dark-bg .footer-beautiful {
    background: linear-gradient(135deg, #2d173a, #4a1e5e, #6a2e7a) !important;
}
body.dark-bg .footer-beautiful::before {
    background: rgba(0,0,0,0.5) !important;
}
body.dark-bg .newsletter-form .form-control {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
}
body.dark-bg .newsletter-form .btn {
    background: #ff69b4 !important;
    color: #fff !important;
}
body.dark-bg .newsletter-form .btn:hover {
    background: #ff1493 !important;
}

/* ===== NÚT TOGGLE ===== */
body.dark-bg .theme-btn {
    background: #ff69b4 !important;
    color: #fff !important;
}

/* ===== SCROLLBAR ===== */
body.dark-bg::-webkit-scrollbar { width: 10px; }
body.dark-bg::-webkit-scrollbar-track { background: var(--dark-bg-main); }
body.dark-bg::-webkit-scrollbar-thumb { background: #6a2e7a; border-radius: 10px; }
body.dark-bg::-webkit-scrollbar-thumb:hover { background: #8a4e9e; }

/* ===== FIX CUỐI CÙNG – MỌI THỨ CÒN SÓT ===== */
body.dark-bg [style*="background"],
body.dark-bg [style*="white"],
body.dark-bg [style*="#fff"],
body.dark-bg [style*="pink"] {
    background-color: transparent !important;
    background-image: none !important;
}