:root {
    /* Primary Colors */
    --primary-color: #ec9005;
    --primary-light: #fdac31;
    --primary-dark: #e68a00;
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, #e68a00 100%);
}
/* ============================================================================
   RESET & BASE STYLES
   ============================================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Arial', sans-serif, Times, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.fs-7 {
    font-size: 0.85rem;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 9999 !important;
    max-width: 350px;
    pointer-events: none;
}

.toast {
    background: white;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease;
}

.toast.show {
    display: block !important;
}

.toast-header {
    border-bottom: 1px solid #e9ecef;
    padding: 12px 15px;
    background: transparent;
    border-radius: 8px 8px 0 0;
}

.toast-body {
    padding: 15px;
    border-radius: 0 0 8px 8px;
}

/* Toast Colors */
.toast.bg-success {
    background: #00a331 !important;
    color: white !important;
}

.toast.bg-error,
.toast.bg-danger {
    background: #da1c2f !important;
    color: white !important;
}

.toast.bg-warning {
    background: #c0a302 !important;
    color: white !important;
}

.toast.bg-info {
    background: #0862b6 !important;
    color: white !important;
}

/* Toast Animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Toast */
@media (max-width: 576px) {
    .toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
        max-width: none;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }
}

.dropdown-item {
    padding: 6px 24px !important;
}

.dropdown-item:hover {
    color: #e48901 !important;
}

/* Chrome, Safari, Edge, Opera */
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.skiptranslate {
    display: none !important;
}

.flash-toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(100%);
    animation: slideInToast 0.3s ease-out forwards;
    border-left: 4px solid;
    overflow: hidden;
}

.flash-success {
    border-left-color: #28a745;
}

.flash-error,
.flash-danger {
    border-left-color: #dc3545;
}

.flash-warning {
    border-left-color: #ffc107;
}

.flash-info {
    border-left-color: #17a2b8;
}

.toast-content {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    gap: 12px;
    z-index: 9999;
}

.toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.flash-success .toast-icon {
    color: #28a745;
}

.flash-error .toast-icon,
.flash-danger .toast-icon {
    color: #dc3545;
}

.flash-warning .toast-icon {
    color: #ffc107;
}

.flash-info .toast-icon {
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close:hover {
    background: #f5f5f5;
    color: #666;
}

@keyframes slideInToast {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToast {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.flash-toast.removing {
    animation: slideOutToast 0.3s ease-in forwards;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #flash-messages-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .flash-toast {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
    color: #fff;
}

/* Button Primary Global Styling */
.btn-primary-custom {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus,
.btn-primary-custom:active {
    background-color: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 162, 26, 0.3);
}

/* Button Outline Custom Styling */
.btn-outline-custom {
    background-color: transparent !important;
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover,
.btn-outline-custom:focus,
.btn-outline-custom:active {
    background-color: var(--primary-color) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(255, 162, 26, 0.3);
    transform: translateY(-2px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: #333;
}

h1.main-title,
h2.main-title,
.main-title {
    color: var(--primary-color) !important;
}

.truncate-1 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
    min-width: 0;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 2;
    -webkit-line-clamp: 2;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-clamp: 3;
    -webkit-line-clamp: 3;
}

.modal-header .logo-image {
    height: 60px;
    width: auto;
    margin-bottom: 10px;
}

.modal-title {
    font-weight: 600;
    font-size: 1.25rem;
}

.modal-content {
    border-radius: 12px;
    animation: fadeInUp 0.3s ease;
}

/* Input khi focus */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 162, 26, 0.25);
}

.btn-login,
.btn.btn-warning {
    background-color: var(--primary-color);
    border: none;
    font-weight: 600;
    color: white;
}

.btn-login:hover,
.btn.btn-warning:hover {
    background-color: #e08701;
}

.input-group .btn {
    border-left: none;
}

.modal-footer {
    font-size: 0.9rem;
    color: #555;
}

.modal-footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
}
.modal-footer a:hover {
    text-decoration: underline;
}

@keyframes fadeInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}
/* Header */
header {
    transition: all 0.3s ease;
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    z-index: 8888;
    background: #fff;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar {
    padding: 0.6rem 0;
    border-bottom: 1px solid #fff;
    background: var(--primary-color);
    transition: all 0.3s ease;
    min-height: 65px;
    display: flex;
    align-items: center;
}

.navbar-brand-container {
    flex-shrink: 0;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: bold;
    color: white !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
}

.navbar-brand:hover .logo-text {
    color: #fff !important;
}

.navbar-logo {
    max-height: 50px;
    height: auto;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: white !important;
    text-decoration: none !important;
}

/* Form Input Styles */
.header-input {
    height: 32px !important;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 20px;
    margin: 0 5px;
}

.header-input::placeholder {
    color: #666;
    font-size: 0.85rem;
}

.header-input:focus {
    background: white;
    border-color: var(--primary-color);
    color: #333;
    box-shadow: 0 0 0 0.2rem rgba(255, 162, 26, 0.25);
}

/* Google Translate Container */
.google-translate-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 10px;
}

/* Language Selector Styles */
.language-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    cursor: pointer;
    min-width: 80px;
}

.selected-language {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.selected-language:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    min-width: 150px;
    margin-top: 5px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.language-selector.active .language-options {
    display: block !important;
    animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide Google Translate default UI */
.goog-te-banner-frame,
.goog-te-menu-frame,
.goog-te-gadget-simple,
.goog-te-gadget-icon,
.goog-logo-link,
iframe.goog-te-menu-frame,
iframe.goog-te-banner-frame {
    display: none !important;
}

#google_translate_hidden {
    display: none !important;
}

/* Ensure translated content looks good */
.goog-te-menu-value span {
    color: transparent !important;
}

/* Hide Google Translate attribution */
.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    display: none !important;
}

.language-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    border-radius: 2px;
}

.form-select-language-mobile {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    border-radius: 15px;
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    height: 35px;
}

.form-select-language-mobile option {
    color: #333;
    background: white;
}

/* Mobile Layout */
.navbar-logo-mobile {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text-mobile {
    font-size: 1rem;
    font-weight: bold;
    color: white !important;
    text-decoration: none !important;
}

.mobile-form {
    padding: 1rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.mobile-input {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 25px;
    margin-bottom: 0.5rem;
    height: 32px !important;
}

.mobile-input::placeholder {
    color: #666;
}

.mobile-input:focus {
    background: white;
    border-color: var(--primary-color);
    color: #333;
    box-shadow: 0 0 0 0.2rem rgba(255, 162, 26, 0.25);
}
.btn-register,
.btn-member {
    background: #2d5a3d;
}
.btn-register:hover,
.btn-member:hover {
    background: #1e3f2a;
}

.btn-category {
    background: #3b4ca1;
}
.btn-category:hover {
    background: #2a3680;
}

.btn-login {
    background: #3b4ca1;
}
.btn-login:hover {
    background: #2a3680;
}

.btn-register,
.btn-category,
.btn-login,
.btn-member {
    text-transform: uppercase;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.btn-register:hover,
.btn-category:hover,
.btn-login:hover,
.btn-member:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* User dropdown styles */
.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    padding: 8px 0;
    margin-top: 5px;
}

.dropdown-item {
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: transparent;
    color: #3b4ca1;
    transform: translateX(1px);
}

.dropdown-item i {
    width: 16px;
    text-align: center;
}

.dropdown-divider {
    margin: 8px 0;
    border-color: #e9ecef;
}

/* User dropdown button specific styles */
.btn-login.dropdown-toggle::after {
    margin-left: 8px;
    vertical-align: middle;
}

.btn-login.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Mobile Language Selector */
@media (max-width: 768px) {
    .google-translate-container {
        padding: 0 5px;
    }

    .language-selector {
        min-width: 60px;
        background: rgba(255, 255, 255, 0.15);
    }

    .selected-language {
        padding: 4px 8px;
        gap: 4px;
    }

    .selected-language span {
        font-size: 0.75rem;
    }

    .language-options {
        right: -10px;
        min-width: 120px;
    }

    .language-option {
        padding: 8px 12px;
        gap: 8px;
    }

    .language-option span {
        font-size: 0.85rem;
    }

    .flag-icon {
        width: 16px;
        height: 12px;
    }

    /* Responsive dropdown styles */
    .dropdown-menu {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 90% !important;
        max-width: 300px;
        margin: 0 !important;
        border-radius: 15px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    }

    .dropdown-item {
        padding: 15px 20px;
    }

    /* Mobile specific styles */
    .mobile-form .btn-login {
        height: 40px;
        font-size: 0.9rem;
        font-weight: 600;
    }

    .mobile-form .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100% !important;
        max-width: none;
        margin-top: 5px !important;
        border-radius: 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }

    .mobile-form .dropdown-item {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
}

/* Footer */
.footer-section {
    margin-top: 0;
    background-color: var(--primary-color);
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #eee !important;
}

.footer-contact h5 {
    font-weight: bold;
    font-size: 1.3rem;
}

.footer-contact p {
    line-height: 1.5;
}

.footer-tags {
    padding: 10px 0;
    background: #5b5b5b;
}

.footer-tag {
    display: inline-block;
    padding: 1px 4px;
    color: #ccc;
    text-decoration: none;
    border: 1px solid #ccc;
    font-size: 0.8rem;
    border-radius: 2px;
    margin: 2px 1px;
    align-items: center;
}

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

/* Floating-button */

.floating-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
}

.btn-floating {
    position: relative;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.btn-floating:hover {
    transform: scale(1.1);
}

.btn-floating::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: pulse-ring 1.5s ease-out infinite;
    z-index: -1;
}

.btn-floating .icon {
    width: 32px;
    height: 32px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: wiggle 0.9s ease-in-out infinite;
}

.btn-floating.viber {
    background: #665cac;
}

.btn-floating.viber:hover {
    background: #5a4f9a;
}

.btn-floating.zalo {
    background: #0068ff;
}

.btn-floating.zalo:hover {
    background: #0056d6;
}

.btn-floating.whatsapp {
    background: #25d366;
}

.btn-floating.whatsapp:hover {
    background: #1ebb56;
}

.btn-floating.phone {
    background: #e74c3c;
}

.btn-floating.phone:hover {
    background: #c0392b;
}

.btn-floating.viber .icon {
    background-image: url('/static/images/viber.png');
}

.btn-floating.zalo .icon {
    background-image: url('/static/images/zalo.png');
}

.btn-floating.whatsapp .icon {
    background-image: url('/static/images/whatsapp.png');
}

.btn-floating.phone .icon {
    background-image: url('/static/images/phone.png');
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }
    15% {
        transform: rotate(-16deg);
    }
    30% {
        transform: rotate(16deg);
    }
    45% {
        transform: rotate(-12deg);
    }
    60% {
        transform: rotate(12deg);
    }
    75% {
        transform: rotate(-6deg);
    }
    90% {
        transform: rotate(6deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* ============================================================================
   MOBILE HEADER STYLES
   ============================================================================ */

/* Mobile Header Layout */
@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 0;
    }

    /* Mobile Header Bar */
    .d-flex.d-lg-none {
        min-height: 60px;
        align-items: center;
    }

    /* Mobile Logo */
    .d-flex.d-lg-none .navbar-logo {
        max-height: 40px;
        width: auto;
    }

    /* Mobile Title */
    .d-flex.d-lg-none h5 {
        font-size: 1rem;
        font-weight: 600;
        margin: 0;
    }

    /* Mobile Menu Button */
    .d-flex.d-lg-none .btn-link {
        border: none;
        background: none;
        padding: 8px;
        border-radius: 4px;
        transition: background-color 0.2s;
    }

    .d-flex.d-lg-none .btn-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .d-flex.d-lg-none .btn-link:focus {
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    }

    /* Mobile Collapsible Content */
    #mobileHeader {
        width: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #mobileHeader .py-3 {
        padding: 1rem 0 !important;
    }

    /* Mobile Form Styles */
    #mobileHeader .form-control {
        border-radius: 6px;
        border: 1px solid #ddd;
        padding: 10px 12px;
        font-size: 14px;
    }

    #mobileHeader .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 2px rgba(236, 144, 5, 0.2);
    }

    /* Mobile Button Styles */

    /* Mobile Dropdown Styles */
    #mobileHeader .dropdown-menu {
        width: 100% !important;
        margin-top: 0.5rem;
        border-radius: 6px;
        border: 1px solid #ddd;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

    #mobileHeader .dropdown-item {
        padding: 10px 16px;
        font-size: 14px;
    }

    #mobileHeader .dropdown-item:hover {
        background-color: #f8f9fa;
        color: var(--primary-color);
    }

    #mobileHeader .selected-language {
        display: none;
    }

    /* Animation for mobile header */
    #mobileHeader.collapse {
        transition: all 0.3s ease;
    }

    #mobileHeader.collapsing {
        transition: all 0.3s ease;
    }

    #mobileHeader.show {
        animation: slideDown 0.3s ease;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure desktop layout is hidden on mobile */
@media (max-width: 991.98px) {
    .d-none.d-lg-flex {
        display: none !important;
    }
}
