:root {
    --fh-primary: #ff3333;
    --fh-primary-dark: #e62e5c;
    --fh-dark: #1e1e26;
    --fh-light-gray: #f8f9fa;
    --fh-text-gray: #6c757d;
    --fh-white: #ffffff;
    --fh-container-width: 1400px;
    --fh-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --fh-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --fh-font: 'Kanit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    --fh-topbar-h: 34px;
    --fh-nav-h-desktop: 85px;
    --fh-nav-h-tablet: 75px;
    --fh-nav-h-mobile: 64px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin-top: calc(var(--fh-topbar-h) + var(--fh-nav-h-desktop));
    max-width: 100%;
    overflow-x: hidden;
    font-family: var(--fh-font);
}

@media (max-width: 1199px) {
    body {
        margin-top: var(--fh-nav-h-tablet);
    }
}

@media (max-width: 767px) {
    body {
        margin-top: var(--fh-nav-h-mobile);
    }
}

.fh-navbar a:focus-visible,
.fh-navbar button:focus-visible,
.fh-navbar input:focus-visible {
    outline: 2px solid var(--fh-primary);
    outline-offset: 2px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .fh-navbar, .fh-navbar * {
        transition: none !important;
        animation: none !important;
    }
}

.fh-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: var(--fh-white);
    box-shadow: var(--fh-shadow);
    transition: var(--fh-transition);
    font-family: var(--fh-font);
}

.fh-container {
    max-width: var(--fh-container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.desktop-only {
    display: flex;
}

@media (max-width: 1199px) {
    .desktop-only {
        display: none !important;
    }
}

.fh-top-bar {
    height: var(--fh-topbar-h);
    display: flex;
    align-items: center;
    background: var(--fh-dark);
    color: var(--fh-white);
    font-size: 13px;
    transition: var(--fh-transition);
}

.fh-top-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.fh-top-left,
.fh-top-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fh-top-bar a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--fh-transition);
    display: flex;
    align-items: center;
    gap: 5px;
}

.fh-top-bar a:hover {
    color: var(--fh-primary);
}

.fh-separator {
    color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1199px) {
    .fh-top-bar {
        display: none;
    }
}

.fh-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: var(--fh-nav-h-desktop);
    transition: var(--fh-transition);
}

@media (max-width: 1199px) {
    .fh-nav-content {
        height: var(--fh-nav-h-tablet);
    }
}

@media (max-width: 767px) {
    .fh-nav-content {
        height: var(--fh-nav-h-mobile);
    }
}


.fh-logo-section {
    display: flex;
    align-items: center;
    min-width: 0; 
}

.fh-brand {
    text-decoration: none;
}

.fh-brand-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.fh-brand img {
    height: 55px;
    width: 55px;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.fh-brand:hover img {
    transform: scale(1.05);
}

.fh-brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.fh-brand-title {
    margin: 0;
    padding: 0;
    font-size: 1.4rem;
    font-weight: 800;
    color: #333;
    line-height: 1.1;
    letter-spacing: -0.5px;
    text-transform: uppercase;
    font-family: var(--fh-font);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fh-brand-subtitle {
    font-size: 0.75rem;
    color: var(--fh-primary);
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
    white-space: nowrap;
}

@media (max-width: 1199px) {
    .fh-brand img {
        width: 50px;
        height: 50px;
    }

    .fh-brand-title {
        font-size: 1.15rem;
    }

    .fh-brand-subtitle {
        font-size: 0.7rem;
    }
}

@media (max-width: 767px) {
    .fh-brand-wrapper {
        gap: 10px;
    }

    .fh-brand img {
        height: 42px;
        width: 42px;
    }

    .fh-brand-title {
        font-size: 0.95rem;
        max-width: 45vw;
    }

    .fh-brand-subtitle {
        display: none;
    }
}

@media (max-width: 360px) {
    .fh-brand-title {
        font-size: 0.85rem;
        max-width: 38vw;
    }
}


.fh-nav-links {
    display: flex;
    list-style: none;
    gap: 35px;
    margin: 0;
    padding: 0;
}

.fh-nav-links a {
    text-decoration: none;
    color: var(--fh-dark);
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
    position: relative;
    transition: var(--fh-transition);
    white-space: nowrap;
}

.fh-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--fh-primary);
    border-radius: 10px;
    transition: var(--fh-transition);
}

.fh-nav-links a:hover,
.fh-nav-links a.active {
    color: var(--fh-primary);
}

.fh-nav-links a:hover::after,
.fh-nav-links a.active::after {
    width: 25px;
}


.fh-dropdown {
    position: relative;
}

.fh-dropdown-trigger i {
    font-size: 10px;
    margin-left: 5px;
    transition: var(--fh-transition);
}

.fh-dropdown-menu {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--fh-white);
    min-width: 220px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 10px;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--fh-transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 10;
}

.fh-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid var(--fh-white);
}

.fh-dropdown:hover .fh-dropdown-menu,
.fh-dropdown:focus-within .fh-dropdown-menu {
    opacity: 1;
    visibility: visible;
    top: 100%;
    transform: translateX(-50%) translateY(0);
}

.fh-dropdown:hover .fh-dropdown-trigger i,
.fh-dropdown:focus-within .fh-dropdown-trigger i {
    transform: rotate(180deg);
    color: var(--fh-primary);
}

.fh-dropdown-menu li a {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 12px 15px !important;
    border-radius: 10px;
    color: var(--fh-dark) !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    white-space: nowrap;
    transition: var(--fh-transition);
}

.fh-dropdown-menu li a i,
.fh-dropdown-menu li img {
    width: 20px;
    color: var(--fh-primary);
    font-size: 16px;
}

.fh-dropdown-menu li a:hover {
    background: var(--fh-light-gray);
    color: var(--fh-primary) !important;
    padding-left: 20px !important;
}

.fh-dropdown-menu li a::after {
    display: none;
}


.fh-action-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fh-search-container {
    position: relative;
    width: 260px;
}

.fh-search-wrapper {
    background: var(--fh-light-gray);
    padding: 8px 15px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    transition: var(--fh-transition);
}

.fh-search-wrapper:focus-within {
    background: var(--fh-white);
    border-color: var(--fh-primary);
    box-shadow: 0 4px 15px rgba(255, 51, 102, 0.1);
}

.fh-search-wrapper input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    width: 100%;
    font-family: var(--fh-font);
}

.fh-search-results {
    position: absolute;
    top: 120%;
    right: 0;
    width: 350px;
    background: var(--fh-white);
    border-radius: 15px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 999999;
    display: none;
    border: 1px solid #eee;
}

.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    text-decoration: none;
    color: var(--fh-dark);
    transition: 0.2s;
    border-bottom: 1px solid #f1f1f1;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #fff5f7;
}

.search-item img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.search-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--fh-dark);
}

.search-id {
    font-size: 12px;
    color: var(--fh-primary);
    font-weight: 600;
}

.search-view-all {
    display: block;
    padding: 12px;
    text-align: center;
    background: #fdfdfd;
    color: var(--fh-primary);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
    border-top: 1px solid #f1f1f1;
}

.search-no-result {
    padding: 20px;
    text-align: center;
    color: var(--fh-text-gray);
    font-size: 14px;
}


.fh-cart-pill {
    display: flex;
    align-items: center;
    background: var(--fh-dark);
    color: var(--fh-white);
    padding: 6px 16px 6px 6px;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--fh-transition);
    border: 2px solid transparent;
}

.fh-cart-pill:hover {
    background: var(--fh-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 51, 102, 0.3);
}

.fh-cart-icon {
    position: relative;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.fh-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--fh-primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--fh-dark);
}

.fh-cart-label {
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.fh-label-sm {
    font-size: 10px;
    opacity: 0.8;
    font-weight: 400;
    text-transform: uppercase;
}

.fh-price {
    font-size: 15px;
    font-weight: 700;
}

@keyframes cartPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.cart-animate {
    animation: cartPulse 0.4s ease-in-out;
}


.fh-mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    background: var(--fh-light-gray);
    border: none;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--fh-dark);
    flex-shrink: 0;
}

@media (max-width: 1199px) {
    .fh-mobile-toggle {
        display: flex;
    }
}

.fh-navbar.scrolled .fh-top-bar {
    height: 0;
    overflow: hidden;
}

.fh-navbar.scrolled .fh-nav-content {
    height: 70px;
}

.fh-mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.fh-mobile-overlay.fh-active {
    opacity: 1;
    visibility: visible;
}

.fh-mobile-sheet {
    position: absolute;
    right: -100%;
    top: 0;
    width: 85%;
    max-width: 360px;
    height: 100%;
    background-color: var(--fh-white);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.25);
}

.fh-mobile-overlay.fh-active .fh-mobile-sheet {
    right: 0;
}

.fh-mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 18px;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.fh-mobile-header .fh-logo-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fh-mobile-header img {
    height: 38px;
    width: 38px;
    object-fit: contain;
}

.fh-mobile-header h1 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--fh-dark);
    margin: 0;
}

.fh-close-sheet {
    background: var(--fh-light-gray);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--fh-dark);
    flex-shrink: 0;
}


.fh-m-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex: 1;
}

.fh-m-list li {
    margin-bottom: 10px;
}

.fh-m-list > li > a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--fh-light-gray);
    border-radius: 14px;
    color: var(--fh-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s;
}

.fh-m-list > li > a:active {
    background: #ffeef2;
    transform: scale(0.98);
}

.fh-m-list a i {
    color: var(--fh-primary);
    font-size: 1.1rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.fh-m-dropdown .fh-dropdown-trigger {
    justify-content: space-between;
}

.fh-m-dropdown.is-open > a {
    background: #ffeef2;
    color: var(--fh-primary);
    border-radius: 14px 14px 0 0;
}

.fh-m-dropdown.is-open .fh-dropdown-trigger i.fa-chevron-down {
    transform: rotate(180deg);
}

.fh-m-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    list-style: none;
    padding: 0;
    margin: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fafafa;
    border-radius: 0 0 14px 14px;
}

.fh-m-dropdown.is-open .fh-m-dropdown-menu {
    max-height: 500px;
    opacity: 1;
    padding: 5px 0;
    border: 1px solid #eee;
    border-top: none;
}

.fh-m-dropdown-menu li a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: transparent !important;
    padding: 12px 16px 12px 48px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    border-radius: 0 !important;
    color: var(--fh-dark) !important;
    text-decoration: none;
}

.fh-m-dropdown-menu li img {
    width: 18px;
}


.fh-m-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.08);
    padding: 10px 15px calc(10px + env(safe-area-inset-bottom));
    z-index: 2500;
    display: none;
    border-top: 1px solid #eee;
}

@media (max-width: 1199px) {
    .fh-m-footer {
        display: block;
    }
}

.fh-m-footer-container {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.fh-m-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    min-width: 56px;
    gap: 3px;
}

.fh-m-action-btn i {
    font-size: 1.15rem;
}

.fh-m-action-btn span {
    font-size: 0.68rem;
    font-weight: 500;
}

.fh-m-phone {
    color: var(--fh-dark);
}

.fh-m-line {
    color: #06c755;
}

.fh-btn-checkout {
    flex: 1;
    background: var(--primary-color, var(--fh-primary));
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md, 12px);
    font-family: var(--fh-font);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: var(--shadow-hover, 0 8px 20px rgba(255, 51, 51, 0.25));
    transition: transform 0.2s, background 0.2s;
}

.fh-btn-checkout:active {
    transform: scale(0.97);
    background: var(--fh-primary-dark);
}

.fh-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}


@media (min-width: 768px) and (max-width: 1199px) {
    .fh-mobile-header h1 {
        font-size: 1.2rem;
    }

    .fh-m-list > li > a {
        font-size: 15px;
        padding: 16px 18px;
    }

    .fh-m-dropdown-menu li a {
        font-size: 14.5px !important;
    }

    .fh-mobile-sheet {
        max-width: 420px;
    }

    .fh-search-results {
        position: fixed;
        top: calc(var(--fh-nav-h-tablet) + 10px);
        left: 15px;
        right: 15px;
        width: auto;
    }
}

@media (max-width: 767px) {
    .fh-mobile-sheet {
        max-width: 320px;
        padding: 20px 18px;
    }

    .fh-search-results {
        position: fixed;
        top: calc(var(--fh-nav-h-mobile) + 8px);
        left: 12px;
        right: 12px;
        width: auto;
        max-height: 70vh;
        border-radius: 12px;
    }

    .search-item {
        padding: 10px;
        gap: 10px;
    }

    .search-item img {
        width: 44px;
        height: 44px;
    }

    .search-name {
        font-size: 13px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .search-id {
        font-size: 11px;
    }

    .search-view-all {
        padding: 10px;
        font-size: 12px;
    }

    .fh-m-action-btn span {
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .fh-mobile-sheet {
        max-width: 100%;
        width: 92%;
    }

    .fh-m-action-btn {
        min-width: 48px;
    }

    .fh-btn-content span {
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .fh-mobile-overlay {
        display: none !important;
    }
}