/* Site Layout - Theme Variables & Global Utilities */
:root {
    --about-bg: #ffffff;
    --about-text: #333333;
    --about-mute: #666666;
    --about-title: #000000;
    --about-accent: #f39c12;
    --about-quote-bg: #b00000;
    --about-card-shadow: rgba(0, 0, 0, 0.1);
}

.dark-theme {
    --about-bg: #121212;
    --about-text: #cccccc;
    --about-mute: #888888;
    --about-title: #ffffff;
    --about-accent: #ffc107;
    --about-quote-bg: #8b0000;
    --about-card-shadow: rgba(0, 0, 0, 0.5);
}

body.dark-theme {
    background-color: #121212 !important;
    color: var(--about-text);
}

/* Global Dark Mode Overrides */
.dark-theme h1,
.dark-theme h2,
.dark-theme h3,
.dark-theme h4,
.dark-theme h5,
.dark-theme h6 {
    color: var(--about-title) !important;
}

.dark-theme .text-dark {
    color: var(--about-text) !important;
}

.dark-theme .text-muted {
    color: var(--about-mute) !important;
}

.dark-theme .bg-white,
.dark-theme .bg-light {
    background-color: var(--about-bg) !important;
    color: var(--about-text) !important;
}

.dark-theme .card {
    background-color: #1e1e1e !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.dark-theme .border,
.dark-theme .border-bottom,
.dark-theme .border-top {
    border-color: rgba(255, 255, 255, 0.1) !important;
}


.theme-toggle-nav {
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

#google_translate_element {
    position: absolute;
    z-index: -1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* New Footer Styles */
.site-footer {
    background-color: #232731;
    color: #eee;
    border-top: 5px solid #0056b3;
}

.footer-heading {
    font-weight: 800;
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background-color: #0066cc;
}

.footer-link {
    display: block;
    color: #ccc;
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: all 0.3s ease;
    font-size: 14.5px;
}

.footer-link:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-contact-icon {
    font-size: 1.2rem;
    color: #ffc107;
    margin-right: 12px;
    width: 25px;
    text-align: center;
}

.footer-contact-item {
    font-size: 15px;
    color: #ddd;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.footer-social-title {
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 15px;
    color: #eee;
}

.footer-social-icons {
    display: flex;
    gap: 12px;
}

.footer-social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.footer-social-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

.icon-fb {
    background-color: #3b5998;
}

.icon-yt {
    background-color: #ff0000;
}

.icon-zalo {
    background-color: #fff;
    color: #0068ff !important;
    font-weight: 800;
    font-size: 0.7rem;
    border: 1px solid #0068ff;
    position: relative;
}

/* Tạo đuôi bong bóng nhỏ cho Zalo giống hình mẫu */
.icon-zalo::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 6px;
    border-width: 4px 4px 0 0;
    border-style: solid;
    border-color: #fff transparent transparent transparent;
    display: none;
    /* Ẩn nếu không cần thiết, nhưng để đây nếu muốn tinh chỉnh */
}

.icon-tiktok {
    background-color: #000;
}

.footer-logo-container {
    margin-top: 15px;
    display: inline-block;
}

.map-container {
    overflow: hidden;
}

/* Header & Search Bar */
.simigo-search {
    width: 320px;
    height: 42px;
}

.simigo-search .form-control {
    font-size: 14px;
    border-radius: 30px 0 0 30px !important;
}

.simigo-search .btn {
    border-radius: 0 30px 30px 0 !important;
    background: #004d99;
}

/* Hotline Block */
.hotline-block span {
    font-size: 9px;
}

.hotline-block a {
    font-size: 13px;
}

/* Auth Block */
.auth-block img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.auth-block .xin-chao {
    font-size: 11px;
}

.auth-block .user-name {
    font-size: 12px;
}

.auth-link span:first-child {
    font-size: 11px;
}

.auth-link span:last-child {
    font-size: 12px;
}

/* Cart Block */
.cart-block .badge {
    font-size: 10px;
}

.cart-block span.fw-bold {
    font-size: 13px;
}

/* Category Nav */
.category-nav-dropdown {
    width: var(--cat-width);
    flex-shrink: 0;
}

.category-nav-dropdown .btn {
    height: 52px;
    font-size: 15px;
    background-color: #0056b3;
    white-space: nowrap;
}

.category-nav-dropdown .dropdown-menu {
    width: 100%;
    background-color: #232731;
    border-radius: 0 0 15px 15px;
}

.category-nav-dropdown.show .dropdown-menu {
    overflow-y: auto;
    position: absolute;
    top: 100%;
}

/* Mobile Actions */
.mobile-category-list {
    width: 290px;
    background-color: #ffffff;
    border-radius: 15px;
    z-index: 1030;
}

.mobile-cat-collapse-toggle {
    cursor: pointer;
    font-size: 0.85rem;
}

/* Footer & Bottom */
.footer-logo-container img {
    max-height: 120px;
}

.footer-bottom {
    background: #000;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Translation Dropdown */
.translate-dropdown .dropdown-menu {
    min-width: 150px;
    border-radius: 12px;
    margin-right: 15px;
}

/* Consultation Popup & Mascots */
.consult-popup-container {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 500px;
    z-index: 10001;
}

.consult-popup-card {
    background: #fff;
    width: 480px;
    max-width: 95%;
    border-radius: 24px;
    overflow: visible !important;
    /* Forces mascots to be visible outside the card */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1001;
}

.popup-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10000;
}

.consult-popup-header {
    background: url('/images/floral_header.png') no-repeat center center;
    background-size: cover;
    padding: 35px 20px;
    position: relative;
    text-align: center;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    /* Keep header content clipped to radius */
    color: #fff;
}

.consult-popup-body {
    padding: 2rem;
    position: relative;
}

.cute-mascot {
    position: absolute;
    width: 65px;
    height: auto;
    z-index: 20;
    pointer-events: none;
}

.mascot-left {
    bottom: 0px;
    left: -15px;
    transform: rotate(-5deg);
}

.mascot-right {
    bottom: 0px;
    right: -15px;
    transform: rotate(5deg);
}

.peeking-cat {
    position: absolute;
    width: 60px;
    bottom: 47px;
    /* Positioned relative to popup body to peek behind the button */
    left: 20%;
    z-index: -1;
    /* Deep behind the form content and button */
    pointer-events: none;
    mix-blend-mode: multiply;
    clip-path: circle(44% at 50% 45%);
}

.submit-btn-wrapper {
    width: 65%;
    margin: 30px auto 0;
    position: relative;
    z-index: 5;
    isolation: isolate;
    /* Ensures z-index 1 remains behind z-index 10 */
}

.btn-consult-submit {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    box-shadow: 0 10px 20px rgba(21, 128, 61, .2);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: 12px 0;
    width: 100%;
    transition: all .3s;
    position: relative;
    z-index: 10;
    /* Definitely above the peeking-cat */
}

.btn-consult-submit:hover {
    background: linear-gradient(135deg, #15803d 0%, #14532d 100%);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(21, 128, 61, .3);
}

/* Floating decorations */
.leaf,
.heart {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.leaf {
    width: 15px;
    height: 15px;
    background: rgba(34, 197, 94, 0.1);
    border-radius: 0 100% 0 100%;
    animation: floatDecoration 8s infinite linear;
}

.heart {
    color: rgba(244, 63, 94, 0.15);
    font-size: 12px;
    animation: floatDecoration 6s infinite ease-in-out;
}

@keyframes floatDecoration {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 0;
    }

    20% {
        opacity: 0.6;
    }

    80% {
        opacity: 0.6;
    }

    100% {
        transform: translate(40px, -40px) rotate(360deg);
        opacity: 0;
    }
}

.leaf-1 {
    top: 15%;
    left: 10%;
}

.leaf-2 {
    bottom: 25%;
    right: 15%;
    animation-delay: 2s;
}

.leaf-3 {
    top: 55%;
    right: 8%;
    animation-delay: 4s;
}

.heart-1 {
    top: 25%;
    right: 25%;
}

.heart-2 {
    bottom: 15%;
    left: 15%;
    animation-delay: 3s;
}

.heart-3 {
    top: 65%;
    left: 10%;
    animation-delay: 5s;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .consult-popup-container {
        width: 95%;
    }

    .cute-mascot {
        height: 60px;
    }
}

.btn-consult-submit {
    background: #b00000;
    color: #fff;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 12px;
    width: 100%;
    transition: all 0.3s ease;
}

.btn-consult-submit:hover:not(:disabled) {
    background: #8b0000;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(176, 0, 0, 0.3);
}

.btn-consult-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.close-popup {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    opacity: 0.8;
}

.close-popup:hover {
    opacity: 1;
}

.consult-success {
    display: none;
    padding: 3rem 2rem;
    text-align: center;
}

.consult-success i {
    font-size: 4rem;
    color: #4caf50;
    display: block;
    margin-bottom: 1rem;
}

.error-msg {
    display: none !important;
    font-size: 0.85rem;
    margin-top: -5px;
    margin-bottom: 15px;
    font-weight: 500;
}

.product-price-badge {
    width: 120px;
    display: none;
    margin-bottom: 5px;
}

/* ==========================================================================
   Global Snowflakes & Hearts Animation
   ========================================================================== */
.snowflake {
    color: #fff;
    font-size: 1.2em;
    font-family: Arial, sans-serif;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    position: fixed;
    top: -10%;
    z-index: 9999;
    user-select: none;
    pointer-events: none;
    cursor: default;
    animation-name: snowflakes-fall, snowflakes-shake;
    animation-duration: 10s, 3s;
    animation-timing-function: linear, ease-in-out;
    animation-iteration-count: infinite, infinite;
    animation-play-state: running, running;
}

.snowflake:nth-of-type(0) {
    left: 1%;
    animation-delay: 0s, 0s;
}

.snowflake:nth-of-type(1) {
    left: 10%;
    animation-delay: -1s, -1s;
}

.snowflake:nth-of-type(2) {
    left: 20%;
    animation-delay: -6s, -0.5s;
}

.snowflake:nth-of-type(3) {
    left: 30%;
    animation-delay: -4s, -2s;
}

.snowflake:nth-of-type(4) {
    left: 40%;
    animation-delay: -2s, -2s;
}

.snowflake:nth-of-type(5) {
    left: 50%;
    animation-delay: -8s, -3s;
}

.snowflake:nth-of-type(6) {
    left: 60%;
    animation-delay: -6s, -2s;
}

.snowflake:nth-of-type(7) {
    left: 70%;
    animation-delay: -10s, -1.5s;
}

.snowflake:nth-of-type(8) {
    left: 80%;
    animation-delay: -1s, 0s;
}

.snowflake:nth-of-type(9) {
    left: 90%;
    animation-delay: -3s, -1.5s;
}

.snowflake:nth-of-type(10) {
    left: 25%;
    animation-delay: -2s, 0s;
}

.snowflake:nth-of-type(11) {
    left: 65%;
    animation-delay: -4s, -2.5s;
}

.snowflake:nth-of-type(12) {
    left: 15%;
    animation-delay: -5s, -1s;
}

.snowflake:nth-of-type(13) {
    left: 35%;
    animation-delay: -7s, -0.5s;
}

.snowflake:nth-of-type(14) {
    left: 75%;
    animation-delay: -9s, -2s;
}

.snowflake:nth-of-type(15) {
    left: 85%;
    animation-delay: -1.5s, -3s;
}

@keyframes snowflakes-fall {
    0% {
        top: -10%;
    }

    100% {
        top: 100%;
    }
}

@keyframes snowflakes-shake {

    0%,
    100% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(80px);
    }
}