html {
    margin: 0 !important;
    padding: 0 !important;
    scroll-behavior: smooth;
}

body {
    background: #f5f7fb;
    color: #1f2937;
    margin: 0 !important;
    padding: 0 !important;
    -webkit-font-smoothing: antialiased;
}

body[data-layout=topnav],
body[data-layout=topnav] .wrapper,
body[data-layout=mobile],
body[data-layout=mobile] .wrapper,
body[data-layout=mobile] .mobile-shell {
    padding-top: 0 !important;
}

body[data-layout=topnav] .content-page,
body[data-layout=topnav] .content,
body[data-layout=mobile] .content-page,
body[data-layout=mobile] .content,
.content-page,
.content,
.header-navbar {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.wrapper {
    min-height: 100vh;
}

.mobile-shell,
.mobile-page,
.mobile-content {
    margin: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
    width: 100%;
}

.mobile-shell {
    min-height: 100vh;
}

.mobile-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.mobile-content {
    flex: 1 0 auto;
    padding-bottom: 24px;
}

.content-page {
    margin-left: 0;
    padding: 0;
}

.content {
    margin-bottom: 0;
    padding-bottom: 24px;
}

.container {
    width: 100%;
    max-width: 1040px;
}

.navbar-custom {
    min-height: 58px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-navbar {
    height: auto;
    min-height: 0 !important;
    padding: 0 !important;
}

.mobile-content > .container {
    padding-top: 0 !important;
}

.header-navbar + .container {
    margin-top: 0 !important;
}

.header-flex {
    align-items: center !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    height: auto !important;
    min-height: 0 !important;
    padding-bottom: 6px;
    padding-top: 6px !important;
}

@media (max-width: 576px) {
    .header-flex {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .topnav-logo {
        min-width: 0;
        overflow: hidden;
    }

    .topnav-logo img {
        flex: 0 0 auto;
        height: 30px;
    }

    .logo-title {
        display: block;
        font-size: 20px;
        line-height: 1.1;
        margin-left: 7px;
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .navbar-search {
        grid-column: 1 / -1;
        grid-row: 2;
        min-width: 0;
        order: 5;
        width: 100%;
    }

    .header-flex .btn {
        min-width: 58px;
        padding-left: 8px;
        padding-right: 8px;
        white-space: nowrap;
    }
}

.site-notice-panel {
    margin-top: 8px !important;
}

.topnav-logo {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    min-width: 44px;
}

.topnav-logo img {
    height: 32px;
}

.header-flex .btn {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 4px;
    justify-content: center;
    font-size: 13px;
    min-height: 34px;
    padding: 5px 8px;
}

.navbar-search {
    flex: 1 1 120px;
    min-width: 96px;
    width: auto;
}

.navbar-search .form-control {
    height: 36px;
    border-radius: 999px;
    box-shadow: none;
    padding-left: 34px;
    padding-right: 10px;
}

.navbar-search .uil-search {
    left: 12px;
}

.customer-service-link.is-disabled {
    opacity: 0.58;
}

.page-title-box {
    align-items: stretch;
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
    margin: 4px 0 4px;
    padding: 0;
}

.page-title-box .page-title {
    line-height: 1;
    margin: 0;
}

.page-title-box .page-title-right {
    float: none;
    width: 100%;
}

.buy-product .card-title {
    line-height: 1.45;
    margin-bottom: 12px;
    padding-top: 4px;
}

.app-search {
    margin: 0;
    max-width: none;
    width: 100%;
}

.app-search .position-relative {
    position: relative;
}

.app-search .form-control {
    background: #ffffff;
    border: 1px solid #dbe4f0;
    border-radius: 16px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
    color: #111827;
    font-size: 14px;
    height: 40px;
    padding-left: 40px;
    padding-right: 16px;
}

.app-search .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14), 0 10px 22px rgba(15, 23, 42, 0.06);
}

.app-search .uil-search {
    color: #8da0b8;
    font-size: 18px;
    left: 15px;
    line-height: 1;
    pointer-events: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}

#notice-open {
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    min-height: 32px;
    padding: 4px 11px;
}

.nav-list {
    display: flex;
    gap: 7px;
    margin: 2px -12px 8px;
    overflow-x: visible;
    padding: 0 12px 4px;
    scrollbar-width: none;
    white-space: nowrap;
    flex-wrap: wrap;
}

.nav-list::-webkit-scrollbar {
    display: none;
}

.nav-list .tab-link {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dce4ef;
    border-radius: 999px;
    color: #4b5563;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 32px;
    padding: 5px 11px;
    position: relative;
}

.nav-list .tab-link.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.nav-list .img-checkmark {
    display: none;
}

.hyper-wrapper {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.home-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    min-height: 96px;
    overflow: hidden;
    padding: 12px;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recommend-ribbon {
    background: #38d49b;
    box-shadow: 0 4px 10px rgba(16, 185, 129, .24);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    height: 28px;
    left: -30px;
    line-height: 28px;
    position: absolute;
    text-align: center;
    top: 10px;
    transform: rotate(-45deg);
    width: 96px;
    z-index: 3;
}

.recommend-ribbon span {
    display: block;
    letter-spacing: 0;
}

.home-card.ribbon-box {
    background: #f8fafc;
    border-color: #e5e7eb;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.045);
    cursor: not-allowed;
    opacity: .94;
    position: relative;
}

.home-card.ribbon-box .ribbon-two {
    align-items: center;
    background: #111827;
    border-radius: 999px;
    color: #ffffff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    height: 26px;
    justify-content: center;
    left: auto;
    line-height: 1;
    min-width: 58px;
    padding: 0 10px;
    position: absolute;
    right: 12px;
    top: 12px;
    transform: none;
    width: auto;
    z-index: 2;
}

.home-card.ribbon-box .ribbon-two span {
    color: inherit;
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    line-height: 1;
    padding: 0;
    position: static;
    transform: none;
    width: auto;
}

.home-card.ribbon-box .home-img {
    filter: grayscale(1);
    opacity: .58;
}

.home-card.ribbon-box .name,
.home-card.ribbon-box .price {
    color: #94a3b8;
}

.home-card:active {
    transform: scale(0.985);
}

.home-card .home-img {
    border-radius: 12px;
    height: 72px;
    object-fit: cover;
    width: 72px;
}

.home-card .flex {
    min-width: 0;
}

.home-card .name {
    color: #111827;
    display: -webkit-box;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.home-card .price {
    color: #ef4444;
    font-size: 13px;
    font-weight: 700;
}

.home-card .price b {
    font-size: 20px;
    letter-spacing: 0;
}

.card,
.modal-content {
    border-radius: 14px;
}

.form-control,
.custom-select,
.btn {
    border-radius: 10px;
    min-height: 42px;
}

.btn {
    font-weight: 700;
}

.footer {
    padding: 18px 0;
}

.hyper-footer {
    background: #f5f7fb;
    bottom: auto;
    flex-shrink: 0;
    margin-top: auto;
    position: static;
}

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
    }

    .header-flex {
        column-gap: 8px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        row-gap: 8px !important;
    }

    .topnav-logo {
        align-items: center !important;
        display: flex !important;
        flex: 1 1 0 !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    .topnav-logo img {
        flex: 0 0 auto !important;
        height: 32px !important;
        width: 32px !important;
    }

    .topnav-logo .logo-title {
        flex: 1 1 auto !important;
        max-width: none !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }

    .header-flex > .btn {
        flex: 0 0 auto !important;
        font-size: 13px !important;
        min-height: 38px !important;
        padding: 7px 10px !important;
    }

    .header-flex > .btn .noti-icon {
        margin-right: 2px !important;
    }

    .header-flex .navbar-search {
        flex: 0 0 100% !important;
        order: 2 !important;
        width: 100% !important;
    }

    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .content {
        padding-top: 2px;
    }

    .hyper-wrapper {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .home-card {
        align-items: center;
        display: flex;
        gap: 10px;
        min-height: 82px;
        padding: 9px 11px;
        width: 100%;
    }

    .home-card .home-img {
        border-radius: 10px;
        height: 60px;
        width: 60px;
    }

    .home-card .flex {
        flex: 1;
    }

    .home-card .name {
        font-size: 14px;
        line-height: 1.28;
        margin-bottom: 5px;
    }

    .home-card .price b {
        font-size: 18px;
    }

    .modal-dialog {
        margin: 12px;
    }
}

@media (max-width: 420px) {
    .header-flex {
        column-gap: 6px !important;
    }

    .topnav-logo .logo-title {
        font-size: 17px !important;
    }

    .header-flex > .btn {
        font-size: 12px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .home-card .home-img {
        height: 58px;
        width: 58px;
    }

    .home-card .name {
        font-size: 13.5px;
    }

    .home-card .price b {
        font-size: 17px;
    }
}
