@import url("https://fonts.cdnfonts.com/css/garamond");
@import url("https://fonts.cdnfonts.com/css/br-sonoma");

body {
    font-family: "Montserrat", serif;
}

h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 500;
    line-height: 1.2;
}

/* Tối ưu responsive font-size - giảm độ chênh lệch */
h1, .h1 { font-size: clamp(1.75rem, 4vw, 2.25rem); }   /* 28px -> 36px */
h2, .h2 { font-size: clamp(1.5rem, 3vw, 1.875rem); }   /* 24px -> 30px */
h3, .h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }  /* 20px -> 24px */
h4, .h4 { font-size: clamp(1.125rem, 2vw, 1.25rem); }  /* 18px -> 20px */
h5, .h5 { font-size: 1.125rem; }                       /* 18px cố định */
h6, .h6 { font-size: 1rem; }                           /* 16px cố định */

.content-font {
    font-family: "Br Sonoma", serif;
    font-weight: 300;
}

.nav-item,
.hover-item,
.menu-item {
    position: relative;
}

.nav-item::after,
.menu-item::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease-in-out;
}

.hover-item:hover::after {
    width: 100%;
}

.hover-item::after {
    content: "";
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: white;
    transition: width 0.3s ease-in-out;
}

.nav-item:hover::after,
.nav-item:hover.active,
.menu-item:hover::after,
.menu-item:hover.active::after,
.menu-item.active::after {
    width: 100%;
}


.logo {
    letter-spacing: 4px;
    font-family: "Montserrat", serif;
}

/* Gucci-style navbar */
.gucci-navbar {
    border-bottom: 1px solid #e5e5e5;
    background: white;
}

.menu-btn {
    font-family: "Montserrat", serif;
    font-weight: 300;
    letter-spacing: 1px;
    font-size: 14px;
    text-transform: uppercase;
    border: none;
    background: transparent;
    padding: 0;
}

.menu-btn:hover {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.icon-btn {
    transition: opacity 0.3s ease;
}

.icon-btn:hover {
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.25rem;
        letter-spacing: 1px;
    }
}

.drawer::before {
    width: 284px;
    height: 300000px;
}

/* Custom styles for Glide arrows and bullets */
.glide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    padding: 1rem;
    border-radius: 50%;
    background: transparent;
    color: #000;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
}

.glide__arrow:hover {}

.glide__arrow--left {
    display: none;
}

.glide__arrow--right {
    display: none;
}

.glide__bullets {
    position: relative;
    bottom: -1rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.glide__bullet {
    width: 8px;
    height: 8px;
    background-color: #d1d5db;
    border-radius: 50%;
    border: none;
    padding: 0;
    transition: all 0.3s ease;
    display: none;
}

.glide__bullet--active {
    background-color: #4b5563;
}

/* Hero slider specific styles */
.glide-hero .glide__arrow {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.glide-hero .glide__arrow:hover {
    background: rgba(255, 255, 255, 0.3);
}

.glide-hero .glide__arrow--left {
    display: block;
    left: 1rem;
}

.glide-hero .glide__arrow--right {
    display: block;
    right: 1rem;
}

.glide-hero .glide__bullets {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.glide-hero .glide__bullet {
    display: block;
    width: 8px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
}

.glide-hero .glide__bullet--active {
    background-color: white;
    transform: scale(1.2);
}

/* Responsive adjustments for hero slider */
@media (max-width: 768px) {
    .glide-hero .glide__slide div[style*="margin-left: 25%"] {
        margin-left: 15% !important;
    }
}

@media (max-width: 480px) {
    .glide-hero .glide__slide div[style*="margin-left: 25%"] {
        margin-left: 5% !important;
        max-width: 90% !important;
    }
}

.ac {
    overflow: hidden;
}

.ac-header {
    padding: 16px 0;
    border-top: 1px solid #b9a188;
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.ac-trigger {
    margin: 0 !important;
}

.ac-panel {}

.ac .close-icon {
    display: none;
}

.ac.is-active .close-icon {
    display: block;
}

.ac.is-active .open-icon {
    display: none;
}

/* macOS Style Search Interface */
.search-overlay {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Search Box Animation */
.search-box {
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.3s ease-out;
}

.search-overlay.show .search-box {
    transform: scale(1);
    opacity: 1;
}

/* Force visibility */
.search-overlay .search-box input {
    color: #1f2937 !important;
    font-size: 18px !important;
    padding: 4px 0 !important;
}

/* Dropdown Animation */
#searchDropdown {
    transform: translateY(-5px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent;
}

#searchDropdown.show {
    transform: translateY(0);
    opacity: 1;
}

#searchDropdown::-webkit-scrollbar {
    width: 6px;
}

#searchDropdown::-webkit-scrollbar-track {
    background: transparent;
}

#searchDropdown::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.3);
    border-radius: 3px;
}

#searchDropdown::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.5);
}

/* Search Result Items */
.search-item {
    display: flex;
    align-items: center;
    padding: 12px 8px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    margin: 2px 0;
}

.search-item:hover {
    background-color: rgba(59, 130, 246, 0.08);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-item:active {
    transform: translateX(4px) scale(0.98);
}

/* Search Item Icons */
.search-item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-suggestion .search-item-icon {
    background: rgba(99, 102, 241, 0.1);
    color: rgba(99, 102, 241, 0.8);
}

.search-category .search-item-icon {
    background: rgba(16, 185, 129, 0.1);
    color: rgba(16, 185, 129, 0.8);
}

.search-product .search-item-icon {
    background: rgba(245, 158, 11, 0.1);
    color: rgba(245, 158, 11, 0.8);
}

/* Product Result Card */
.search-product-card {
    display: flex;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.search-product-card:hover {
    background-color: rgba(59, 130, 246, 0.05);
    transform: translateX(2px);
}

.search-product-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
    background: #f3f4f6;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Keyboard Navigation */
.search-item.keyboard-selected {
    background-color: rgba(59, 130, 246, 0.15);
    transform: translateX(4px);
}

/* Fade-in Animation for Results */
.search-result-item {
    opacity: 0;
    transform: translateY(10px);
    animation: fadeInUp 0.3s ease forwards;
}

.search-result-item:nth-child(1) { animation-delay: 0.05s; }
.search-result-item:nth-child(2) { animation-delay: 0.1s; }
.search-result-item:nth-child(3) { animation-delay: 0.15s; }
.search-result-item:nth-child(4) { animation-delay: 0.2s; }
.search-result-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* macOS Style Backdrop */
.search-overlay {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Focus Ring */
.search-box:focus-within {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Keyboard Shortcuts */
kbd {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Text truncation utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Center search properly */
.search-container {
    margin: 0 auto;
}

#searchOverlay .search-box {
    margin-left: auto;
    margin-right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-container {
        width: 100%;
        max-width: none;
        padding: 0;
        margin: 0;
    }
    
    #searchOverlay {
        padding-top: 0;
        padding: 0;
    }
    
    #searchOverlay > div {
        padding-top: 0;
        padding: 0;
        height: 100vh;
        justify-content: flex-start;
        align-items: stretch;
    }
    
    .search-container {
        height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    .search-box {
        margin-bottom: 0;
        border-radius: 0;
        flex-shrink: 0;
        border: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    #searchDropdown {
        border-radius: 0;
        max-height: none;
        flex: 1;
        height: calc(100vh - 80px);
        border: none;
    }
    
    /* Add close button for mobile */
    #searchOverlay::before {
        content: "×";
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 30px;
        color: white;
        cursor: pointer;
        z-index: 100;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0, 0, 0, 0.3);
        border-radius: 50%;
    }
}

/* Sticky Header CSS */
.sticky-header {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 40 !important;
    transition: all 0.3s ease;
    width: 100% !important;
}

/* Override any Tailwind conflicts */
header.sticky-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
}

/* Add shadow when scrolling */
.sticky-header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1) !important;
    backdrop-filter: blur(10px);
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Force sticky on body and setup proper footer positioning */
html, body {
    height: 100%;
    position: relative;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
    min-height: 0;
}

footer {
    flex-shrink: 0;
    margin-top: auto;
}

/* Ensure modals and popups are above sticky header */
.modal,
.popup,
.dropdown,
.variant-popup,
.product-quick-view,
[data-modal],
[class*="modal"],
[class*="popup"],
[class*="dropdown"] {
    z-index: 60 !important;
}

/* Search overlay should be above everything */
#searchOverlay {
    z-index: 70 !important;
}

/* Category slider smooth animations */
.glide-category-slider .glide__track {
    transition: transform 0.4s cubic-bezier(0.165, 0.840, 0.440, 1.000);
}

.glide-category-slider .glide__slide {
    transition: all 0.3s ease;
}

.glide-category-slider .glide__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.glide-category-slider .glide__arrow:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: translateY(-50%) scale(1.05);
}

.glide-category-slider .glide__arrow--left {
    /* left: -24px; */
    display: none;
}

.glide-category-slider .glide__arrow--right {
    /* right: -24px; */
    display: none;
}

.glide-category-slider .glide__arrow i {
    color: #4b5563;
    font-size: 18px;
}

/* Enhanced Menu Animations */
.menu-slide-in {
    animation: slideInFromLeft 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.menu-slide-out {
    animation: slideOutToLeft 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.submenu-slide-in {
    animation: slideInFromRight 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.submenu-slide-out {
    animation: slideOutToRight 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

.overlay-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.overlay-fade-out {
    animation: fadeOut 0.2s ease-in forwards;
}

/* Keyframe Animations */
@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Menu Content Animation */
.menu-content {
    animation: menuContentFadeIn 0.5s ease-out 0.1s both;
}

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

/* Staggered Menu Items Animation */
.menu-item-animated {
    opacity: 0;
    transform: translateX(-20px);
    animation: menuItemSlideIn 0.3s ease-out forwards;
}

.menu-item-animated:nth-child(1) { animation-delay: 0.1s; }
.menu-item-animated:nth-child(2) { animation-delay: 0.15s; }
.menu-item-animated:nth-child(3) { animation-delay: 0.2s; }
.menu-item-animated:nth-child(4) { animation-delay: 0.25s; }
.menu-item-animated:nth-child(5) { animation-delay: 0.3s; }
.menu-item-animated:nth-child(6) { animation-delay: 0.35s; }

@keyframes menuItemSlideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced Drawer Transitions */
.drawer {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

/* Mobile Menu Animations */
.mobile-menu-slide-in {
    animation: mobileSlideIn 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.mobile-menu-slide-out {
    animation: mobileSlideOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes mobileSlideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes mobileSlideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* Cart Animation */
.cart-slide-in {
    animation: cartSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.cart-slide-out {
    animation: cartSlideOut 0.3s cubic-bezier(0.55, 0.085, 0.68, 0.53) forwards;
}

@keyframes cartSlideIn {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes cartSlideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Smooth backdrop filter transitions */
.backdrop-blur-smooth {
    backdrop-filter: blur(0px);
    transition: backdrop-filter 0.3s ease-out;
}

.backdrop-blur-smooth.active {
    backdrop-filter: blur(12px);
}

/* Menu button hover animation */
.menu-btn {
    transition: all 0.2s ease;
}

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

.menu-btn:active {
    transform: scale(0.95);
}

/* Admin Bar Styles */
.admin-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: #1a1a1a;
    color: white;
    z-index: 9999;
    height: 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    font-size: 14px;
    font-family: "Montserrat", serif;
}

.admin-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.admin-bar-left,
.admin-bar-right {
    display: flex;
    align-items: center;
    gap: 0;
}

.admin-bar-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #cccccc;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 400;
    border-right: 1px solid #333;
}

.admin-bar-link:last-child {
    border-right: none;
}

.admin-bar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.admin-bar-link i {
    font-size: 12px;
    width: 14px;
    text-align: center;
}

.admin-bar-text {
    color: #888;
    font-size: 12px;
    margin-right: 15px;
    font-weight: 300;
}

/* Adjust main content to account for admin bar */
body.has-admin-bar {
    padding-top: 40px;
}

body.has-admin-bar .sticky-header {
    top: 40px !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .admin-bar {
        height: 35px;
        font-size: 12px;
    }
    
    .admin-bar-content {
        padding: 0 10px;
    }
    
    .admin-bar-link {
        padding: 6px 8px;
    }
    
    .admin-bar-link span {
        display: none;
    }
    
    .admin-bar-link i {
        font-size: 14px;
    }
    
    .admin-bar-text {
        font-size: 11px;
        margin-right: 8px;
    }
    
    body.has-admin-bar {
        padding-top: 35px;
    }
    
    body.has-admin-bar .sticky-header {
        top: 35px !important;
    }
}

@media (max-width: 480px) {
    .admin-bar-text {
        display: none;
    }
}

.footer-mobile-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 70px;
    background-color: #fff;
    /*border-top: 2px solid #007bff;*/
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    justify-content: space-around;
    align-items: center;
    /* Tối ưu cho iOS Safari/Chrome */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    /* Đảm bảo menu luôn ở dưới cùng */
    bottom: env(safe-area-inset-bottom, 0);
    /* Tăng độ ưu tiên hiển thị */
    will-change: transform;
    /* Ngăn chặn scroll bounce */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
}

.footer-mobile-menu a, .footer-mobile-menu button {
    display: inline-block;
    text-align: center;
    padding: 10px 0;
    flex-grow: 1;
    text-decoration: none;
    color: #000000!important;
    transition: background-color 0.3s;
}

.footer-mobile-menu a:hover, .footer-mobile-menu button:hover {
    background-color: #e4f0db;
}

/* .footer-mobile-menu a.active {
    color: #007bff;
    border-top: 2px solid #007bff;
} */

.footer-mobile-menu a i {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
}

.footer-mobile-menu a span {
    display: block;
    font-size: 12px;
}

@media screen and (max-width: 768px) {
    .footer-mobile-menu {
        display: flex !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 70px !important;
        z-index: 9999 !important;
        /* Tối ưu cho iOS */
        -webkit-transform: translate3d(0, 0, 0) !important;
        transform: translate3d(0, 0, 0) !important;
        /* Ngăn chặn việc menu bị ẩn khi scroll */
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: none;
        /* Đảm bảo menu luôn ở dưới cùng */
        bottom: env(safe-area-inset-bottom, 0) !important;
    }
    /* Chừa không gian cho footer/accordion để không bị menu cố định che mất */
    footer .footer-accordion-container {
        padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
    }
    
    /* Đảm bảo body có đủ padding để không bị che bởi menu */
    body {
        padding-bottom: 70px !important;
    }
    
    /* Tối ưu cho iPhone X trở lên */
    @supports (padding: max(0px)) {
        body {
            padding-bottom: max(70px, env(safe-area-inset-bottom)) !important;
        }
    }
    
    /* Đảm bảo menu không bị ảnh hưởng bởi viewport changes */
    @media screen and (max-height: 500px) {
        .footer-mobile-menu {
            position: fixed !important;
            bottom: 0 !important;
            height: 60px !important;
        }
        
        body {
            padding-bottom: 60px !important;
        }
    }
    
    /* Đảm bảo menu luôn ở dưới cùng trên tất cả thiết bị iOS */
    @supports (-webkit-touch-callout: none) {
        .footer-mobile-menu {
            position: fixed !important;
            bottom: 0 !important;
            -webkit-transform: translate3d(0, 0, 0) !important;
            transform: translate3d(0, 0, 0) !important;
        }
    }
    
    /* Xử lý cho iPhone với notch */
    @media screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3),
           screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 2),
           screen and (device-width: 414px) and (device-height: 896px) and (-webkit-device-pixel-ratio: 3),
           screen and (device-width: 390px) and (device-height: 844px) and (-webkit-device-pixel-ratio: 3),
           screen and (device-width: 428px) and (device-height: 926px) and (-webkit-device-pixel-ratio: 3) {
        .footer-mobile-menu {
            bottom: env(safe-area-inset-bottom, 0) !important;
        }
    }
}

/* CSS Variables cho safe area */
:root {
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);
}

/* Đảm bảo menu luôn ở dưới cùng - override mọi CSS khác */
@media screen and (max-width: 768px) {
    .footer-mobile-menu {
        position: fixed !important;
        bottom: var(--safe-area-inset-bottom) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 70px !important;
        z-index: 9999 !important;
        display: flex !important;
        transform: translate3d(0, 0, 0) !important;
        -webkit-transform: translate3d(0, 0, 0) !important;
    }
}

/* Horizontal Scroll Styles for Certificates */
.certificates-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    /* Hiển thị thanh cuộn ngang */
    overflow-x: auto;
    overflow-y: hidden;
}

/* Custom scrollbar cho certificates */
.certificates-scroll::-webkit-scrollbar {
    height: 8px;
}

.certificates-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    margin: 0 16px;
}

.certificates-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.certificates-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.certificates-scroll::-webkit-scrollbar-thumb:active {
    background: rgba(0, 0, 0, 0.6);
}

/* Firefox scrollbar */
.certificates-scroll {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) rgba(0, 0, 0, 0.05);
}