/* Global Styles */
.hover-zoom {
    transition: transform 0.3s ease;
}

.hover-zoom:hover {
    transform: scale(1.03);
}

.form-control:focus {
    box-shadow: none;
    border-color: #0d6efd;
}

.badge-category {
    font-size: 0.8rem;
    padding: 0.4em 0.8em;
}

/* Language Switcher */
.floating-lang-switcher {
    position: fixed;
    right: 8px;
    bottom: 20px;
    z-index: 9999;
}

.floating-lang-switcher .btn {
    border-radius: 50px;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.floating-lang-switcher .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.floating-lang-switcher .dropdown-item {
    font-weight: 500;
    padding: 8px 15px;
}

/* Hide Google Translate UI */
#google_translate_element {
    position: absolute;
    z-index: -10;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.goog-logo-link,
.goog-te-gadget>span>a {
    display: none !important;
}

.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate {
    display: none !important;
}

iframe.skiptranslate {
    display: none !important;
    visibility: hidden !important;
}

.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf {
    display: none !important;
}

body,
html {
    top: 0px !important;
    position: static !important;
}

#goog-gt-tt,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

/* Floating Social Buttons */
.floating-social-buttons {
    position: fixed;
    right: 15px;
    bottom: 40px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none !important; /* Force clicks to pass through container */
}

/* Cho phép click vào toàn bộ khối dropdown (cả nút và menu thả xuống) */
.translate-dropdown, .dropdown-menu {
    pointer-events: auto !important;
}

.social-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    transition: all 0.25s ease;
    animation: shake 2.5s ease-in-out infinite;
    pointer-events: auto; /* Buttons remain clickable */
}

.social-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.35);
    color: #fff;
}

.social-tiktok {
    background: #010101;
}

.social-zalo {
    background: #0068ff;
}

.social-messenger {
    background: linear-gradient(135deg, #0695FF, #A334FA, #FF6968);
}

.social-phone {
    background: linear-gradient(135deg, #25D366, #128C7E);
    width: auto;
    border-radius: 50px;
    padding: 0 18px;
    gap: 6px;
}

.social-phone:hover {
    transform: scale(1.05);
}

.social-consult {
    background: #dc3545; /* Bootstrap Red */
    font-size: 1.4rem;
    cursor: pointer;
}

.social-translate {
    background: #6f42c1;
    /* Purple for translate */
    font-size: 1.2rem;
    cursor: pointer;
}

/* Consultation with Meaning Label */
.social-contact-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-right: -4px; /* Align button perfectly with others */
    user-select: none;
    -webkit-user-select: none;
    pointer-events: none !important; /* Forces clicks through to button below */
}

.contact-meaning-label {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    margin-right: 15px;
    white-space: normal;
    word-break: break-word;
    background: #fff;
    border: 1.8px solid #dc3545;
    padding: 10px 18px;
    border-radius: 20px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    max-width: 220px;
    min-width: 160px;
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.meaning-title, .meaning-desc {
    pointer-events: none !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Arrow pointing to the button */
.contact-meaning-label::after {
    content: "";
    position: absolute;
    right: -11px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 10px 0 10px 11px;
    border-style: solid;
    border-color: transparent transparent transparent #dc3545;
    z-index: 2;
}

.contact-meaning-label::before {
    content: "";
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 8px 0 8px 9px;
    border-style: solid;
    border-color: transparent transparent transparent #fff;
    z-index: 3;
}

.meaning-title {
    color: #dc3545;
    font-weight: 850;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    line-height: 1.25;
}

.meaning-desc {
    color: #444;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.25;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.social-translate {
    position: relative;
    z-index: 10;
}

.translate-dropdown .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #6f42c1;
}

@keyframes shake {
    0% {
        transform: rotate(0deg);
    }

    5% {
        transform: rotate(10deg);
    }

    10% {
        transform: rotate(-10deg);
    }

    15% {
        transform: rotate(10deg);
    }

    20% {
        transform: rotate(-10deg);
    }

    25% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

/* Footer & Other UI Elements */
.site-footer {
    background: #2d2d2d;
    color: #ccc;
}

.footer-heading {
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #fff;
    letter-spacing: 1px;
}

.footer-link {
    color: #e8a87c;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: #fff;
}

.footer-contact-icon {
    color: #e8a87c;
    margin-right: 0.5rem;
}

.copyright-bar {
    background: #222;
    border-top: 1px solid #444;
    color: #888;
    font-size: 0.875rem;
}

.hover-zoom {
    transition: transform 0.5s ease;
}

.hover-zoom:hover {
    transform: scale(1.05);
}

.category-showcase {
    transition: all 0.3s ease;
    border: 1px solid #eee !important;
}

.category-showcase:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08) !important;
    border-color: #ddd !important;
}

@media (min-width: 992px) {

    .category-showcase-banner img,
    .category-showcase-banner .bg-dark {
        min-height: 400px;
        object-fit: cover;
    }
}

.category-showcase .product-card {
    border: 1px solid #f0f0f0 !important;
    background-color: #ffffff !important;
    /* Slightly lighter than showcase bg */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-showcase .product-card:hover {
    transform: translateY(-8px);
    border-color: #ffc107 !important;
    background-color: #ffffff !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

.category-showcase .card-body {
    background-color: transparent !important;
    padding: 1rem !important;
}

.category-showcase .text-danger {
    color: #ff4d4d !important;
    /* Vibrant red for price */
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.transition-all {
    transition: all 0.3s ease;
}

.hover-opacity-100:hover {
    opacity: 1 !important;
}

/* Custom button for 'Hết hàng' to match screenshot */
.btn-outline-info {
    border-color: #31d2f2 !important;
    color: #31d2f2 !important;
}

.btn-outline-info:hover {
    background-color: #31d2f2 !important;
    color: #000 !important;
}

/* Product Components */
.product-card {
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: #fff;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 10;
    border-color: #0d6efd !important;
}

.product-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    display: block;
}

.product-actions-v2 {
    position: relative;
    z-index: 2;
    margin-top: auto;
    border-top: 1px solid #eee;
    padding-top: 0.5rem;
}

.category-sidebar-sticky {
    position: sticky;
    top: 20px;
}

/* Auth Pages Styling */
.auth-page-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.otp-input {
    letter-spacing: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
}

/* Category Mega Menu Sidebar */
.simigo-nav .dropdown-menu {
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.dropdown-submenu-parent {
    position: relative;
}

.dropdown-submenu-parent:hover>.mega-submenu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.mega-submenu {
    display: none;
    position: absolute;
    top: 0 !important;
    left: 100% !important;
    width: 320px;
    min-height: 100%;
    background-color: #1a1e26 !important;
    /* Very dark background for submenu */
    margin-top: 0 !important;
    padding: 25px !important;
    z-index: 1000;
    transition: all 0.3s ease;
    border-left: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.submenu-item {
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    opacity: 0.85;
}

.submenu-item:hover {
    opacity: 1;
    color: #ff4d4d !important;
    /* Red hover color */
    transform: translateX(5px);
}

.category-parent-link {
    transition: all 0.2s ease;
}

.category-parent-link:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #fff !important;
}

.category-parent-link:hover .arrow-icon {
    color: #ff4d4d !important;
    /* Red arrow on hover */
    transform: translateX(3px);
}

.category-parent-link .arrow-icon {
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.3);
}

.category-name {
    transition: all 0.2s ease;
}

.category-parent-link:hover .category-name {
    color: #ff4d4d !important;
}

/* Fix for mobile menu to reset mega menu behavior */
@media (max-width: 991.98px) {
    .mega-submenu {
        position: static !important;
        width: 100% !important;
        display: block !important;
        background-color: transparent !important;
        padding: 10px 20px !important;
        box-shadow: none !important;
    }

    .dropdown-submenu-parent:hover>.mega-submenu {
        transform: none;
    }
}

/* Home page scrollbar styles */
.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.product-scroll-item {
    flex: 0 0 auto;
    width: 220px;
}

@media (max-width: 768px) {
    .product-scroll-item {
        width: 180px;
    }
}

/* iPad Pro / Medium screens (992px - 1200px): shrink category dropdown */
@media (min-width: 992px) and (max-width: 1200px) {
    :root {
        --cat-width: 200px;
    }
    .category-nav-dropdown > button {
        width: var(--cat-width) !important;
        font-size: 13px !important;
        padding-left: 12px !important;
        padding-right: 12px !important;
        gap: 8px !important;
    }
    .category-nav-dropdown .dropdown-menu {
        width: var(--cat-width) !important;
    }
    body.home-page .category-nav-dropdown .dropdown-menu.show {
        width: var(--cat-width) !important;
    }
    /* Shrink home page spacer to match */
    .home-banner-spacer {
        width: var(--cat-width) !important;
    }
    .category-nav-dropdown .dropdown-item {
        font-size: 12px !important;
        padding: 10px 10px !important;
    }
}

/* Dark Theme Specific Adjustments */
.dark-theme .category-showcase {
    border-color: rgba(255, 255, 255, 0.1) !important;
    background-color: #1a1a1a !important;
}

.dark-theme .category-showcase .product-card {
    background-color: #242424 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.dark-theme .category-showcase .product-card:hover {
    border-color: #ffc107 !important;
    background-color: #2d2d2d !important;
}

.dark-theme .product-card {
    background-color: #1e1e1e !important;
}

.dark-theme .product-card a.text-body, 
.dark-theme .product-card h3,
.dark-theme .product-card h4,
.dark-theme .product-card .text-dark {
    color: var(--about-text) !important;
}

.dark-theme .category-showcase-banner {
    background: #1a1a1a !important;
}

.dark-theme .category-showcase-banner .bg-light {
    background: linear-gradient(135deg, #1a1a1a 0%, #242424 100%) !important;
}

/* Theme Toggle Styles */
.theme-toggle-icon {
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}
.theme-toggle-icon:hover {
    transform: rotate(15deg) scale(1.1);
}
.theme-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle-wrapper a {
    color: var(--about-text);
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}
.dark-theme .theme-toggle-wrapper a {
    color: var(--about-accent) !important;
}
.theme-toggle-wrapper .theme-toggle-icon {
    font-size: 1.5rem;
}
@media (min-width: 1400px) {
    .theme-toggle-wrapper {
        display: none !important;
    }
}

/* Mobile Category List Styling (Override Desktop) */
.mobile-category-list {
    padding-left: 0 !important;
}
.mobile-category-list a,
.mobile-category-list .submenu-item,
.mobile-category-list .category-parent-link {
    color: #333 !important; /* Force high contrast dark color */
    opacity: 1 !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    padding: 14px 10px !important;
    border-bottom: 1px solid rgba(0,0,0,0.08) !important;
    display: flex !important;
    align-items: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease;
}
.mobile-category-list i {
    color: #0d6efd !important; /* Force blue icons for visibility */
    opacity: 1 !important;
    margin-right: 10px;
}
.dark-theme .mobile-category-list a {
    color: #eee !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
}
.mobile-category-list a:hover,
.mobile-category-list a:active {
    background-color: rgba(13, 110, 253, 0.05) !important;
    color: #0d6efd !important;
}
.mobile-category-list .category-parent-link {
    background-color: transparent !important;
}

@media (max-width: 576px) {
    .contact-meaning-label {
        padding: 6px 12px;
    }
    .meaning-title {
        font-size: 0.75rem;
    }
    .meaning-desc {
        display: none;
    }
    .social-contact-wrapper {
        gap: 10px;
    }
}

/* Bottom Footer Payment Icons */
.payment-icon {
    background: #1a1a1a;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    border: 1px solid rgba(255, 255, 255, 0.2);
    letter-spacing: 0.8px;
    transition: all 0.2s ease;
    cursor: default;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.payment-icon:hover {
    background: #333;
    border-color: rgba(255, 255, 255, 0.4);
}