/* ==========================================================================
   HERO SECTION STYLES (Product Sidebar + Slick Slider + Service Home)
   ========================================================================== */

.tt-hero {
    padding: 16px 0 24px 0;
}

/* Đồng bộ khung Hero với layout chính: tối đa 1200px. */
.tt-hero > .container {
    width: 100%;
    max-width: 1200px;
}

/* --------------------------------------------------------------------------
   1. Sidebar Danh Mục Sản Phẩm (Desktop)
   -------------------------------------------------------------------------- */
.product-sidebar {
    width: 270px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border: 1px solid #700000;
    height: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
}

.tt-hero__sidebar-header {
    display: flex;
    align-items: center;
    height: 42px;
    gap: 8px;
    padding-left: 16px;
    padding-right: 16px;
    color: #ffffff;
    border-bottom: 1px solid #a10c0d;
    flex-shrink: 0;
}

.tt-hero__sidebar-icon {
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

.tt-hero__sidebar-title {
    font-size: 15px;
    color: #ffffff;
}

/* Category List with Scrollbar */
.tt-hero__category-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
}

/* Custom Scrollbar for Category List */
.tt-hero__category-list::-webkit-scrollbar {
    width: 3px;
}

.tt-hero__category-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
}

.tt-hero__category-list::-webkit-scrollbar-thumb {
    background: #faa519;
    border-radius: 3px;
}

.tt-hero__category-list::-webkit-scrollbar-thumb:hover {
    background: #ffb84d;
}

.tt-hero__category-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.tt-hero__category-item:last-child {
    border-bottom: none;
}

.tt-hero__category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 16px;
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease, color 0.2s ease;
}

.tt-hero__category-link:hover {
    background: rgba(0, 0, 0, 0.25);
    color: #faa519;
}

.tt-hero__category-icon {
    font-size: 18px;
    width: 18px;
    margin-right: 12px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.2s ease;
}

.tt-hero__category-link:hover .tt-hero__category-icon {
    color: #faa519;
}

/* --------------------------------------------------------------------------
   2. Mobile Category Button & Collapsible Menu
   -------------------------------------------------------------------------- */
.mobile-category-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #8b0000;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease;
}

.mobile-category-btn:hover {
    background: #7a0000;
}

.mobile-category-btn__content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-category-btn__content i {
    font-size: 18px;
    color: #faa519;
}

.mobile-category-btn__content h1,
.mobile-category-btn__title {
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    text-transform: uppercase;
}

.mobile-category-btn>i {
    font-size: 14px;
    color: #faa519;
    transition: transform 0.3s ease;
}

.mobile-category-btn--open>i {
    transform: rotate(180deg);
}

.mobile-category-dropdown {
    background: #8b0000;
    border-radius: 8px;
    margin-top: 8px;
    overflow: hidden;
    display: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.mobile-category-dropdown--show {
    display: block;
    animation: ttFadeInDown 0.2s ease;
}

/* Fix Slick Slider Flexbox Overflow */
.tt-hero .d-flex {
    max-width: 100%;
}

.tt-hero .flex-grow-1 {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.tt-hero__slider-frame,
.tt-hero__slider-wrap {
    position: relative;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid #8b0000;
    background: #fbf8f4;
    aspect-ratio: 16 / 9;
    width: 100%;
    max-width: 100%;
}

.tt-hero__slider {
    margin: 0;
    height: 100%;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.tt-hero__slider .slick-list {
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.tt-hero__slider .slick-track {
    height: 100%;
}

.tt-hero__slide-item {
    outline: none;
    height: 100%;
}

.tt-hero__slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.tt-hero__slide-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

/* Custom Slick Navigation Arrows */
.tt-hero__slider .slick-prev,
.tt-hero__slider .slick-next {
    width: 38px;
    height: 38px;
    background: rgba(139, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.2s ease;
}

.tt-hero__slider .slick-prev {
    left: 16px;
}

.tt-hero__slider .slick-next {
    right: 16px;
}

.tt-hero__slider .slick-prev:hover,
.tt-hero__slider .slick-next:hover {
    background: #8b0000;
    border-color: #faa519;
}

.tt-hero__slider .slick-prev:before,
.tt-hero__slider .slick-next:before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    color: #ffffff;
    opacity: 1;
}

.tt-hero__slider .slick-prev:before {
    content: '\f053';
    /* fa-chevron-left */
}

.tt-hero__slider .slick-next:before {
    content: '\f054';
    /* fa-chevron-right */
}

/* Slick Dots */
.tt-hero__slider .slick-dots {
    bottom: 14px;
    z-index: 6;
}

.tt-hero__slider .slick-dots li button:before {
    font-size: 10px;
    color: #ffffff;
    opacity: 0.6;
}

.tt-hero__slider .slick-dots li.slick-active button:before {
    color: #faa519;
    opacity: 1;
    font-size: 12px;
}

/* --------------------------------------------------------------------------
   4. Service Home (Thanh Dịch Vụ Cam Kết)
   -------------------------------------------------------------------------- */
.service-home {
    margin-top: 14px;
    background: #fbf8f4;
    border: 1px solid #eae1d3;
    border-radius: 8px;
    padding: 10px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-home__grid {
    margin-left: 0;
    margin-right: 0;
}

.service-home__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px;
    border-right: 1px solid #eae1d3;
    height: 100%;
}

.service-home__grid>div:last-child .service-home__item {
    border-right: none;
}

.service-home__image {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-home__image img {
    max-width: 32px;
    max-height: 32px;
    object-fit: contain;
}

.service-home__image i {
    font-size: 22px;
    color: #8b0000;
}

.service-home__content {
    flex: 1;
    min-width: 0;
}

.service-home__content h3 {
    font-size: 14px;
    font-weight: 700;
    color: #333333;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.service-home__content p {
    font-size: 12px;
    color: #666666;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   5. Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
    .product-sidebar {
        width: 100%;
        height: 350px;
    }

    .tt-hero__slider-frame {
        height: 350px;
    }

    .service-home__item {
        padding: 6px 10px;
        gap: 8px;
    }
}

@media (max-width: 767px) {
    .service-home__grid>div:nth-child(2) .service-home__item {
        border-right: none;
    }
}

@media (max-width: 576px) {
    .tt-hero__slider-frame {
        height: 220px;
    }

    .service-home__item {
        border-right: none;
        border-bottom: 1px solid #eae1d3;
        padding: 8px 12px;
    }

    .service-home__grid>div:last-child .service-home__item {
        border-bottom: none;
    }
}

/* --------------------------------------------------------------------------
   6. Compact Hero (inner pages: category hover + policies inline)
   -------------------------------------------------------------------------- */
.tt-hero--compact {
    padding: 8px 0 10px;
}

.tt-hero__compact-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: #fbf8f4;
    border: 1px solid #eae1d3;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    overflow: visible;
}

.tt-hero__category-hover {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    z-index: 20;
    align-self: stretch;
}

/* Invisible bridge so hover stays active when moving into the dropdown. */
.tt-hero__category-hover::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 8px;
    z-index: 201;
}

.product-sidebar--flyout-trigger {
    width: 100%;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    box-shadow: none;
}

.product-sidebar--flyout-trigger .tt-hero__sidebar-header--flyout {
    height: 100%;
    min-height: 44px;
    border-bottom: none;
}

.product-sidebar--flyout-trigger .tt-hero__sidebar-icon {
    font-size: 16px;
    margin-right: 10px;
}

.product-sidebar--flyout-trigger .tt-hero__sidebar-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.tt-hero--compact .tt-hero__category-hover .tt-hero__category-panel.product-sidebar--dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    width: 270px;
    max-height: min(420px, 72vh);
    min-height: 0;
    height: auto;
    margin-top: 0;
    z-index: 200;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
    animation: ttFadeInDown 0.18s ease;
}

.tt-hero--compact .tt-hero__category-hover:hover .tt-hero__category-panel.product-sidebar--dropdown,
.tt-hero--compact .tt-hero__category-hover:focus-within .tt-hero__category-panel.product-sidebar--dropdown {
    display: flex;
    flex-direction: column;
}

.product-sidebar--dropdown {
    min-height: 0;
    height: auto;
}

.product-sidebar--dropdown .tt-hero__category-list {
    max-height: min(400px, 72vh);
    overflow-y: auto;
    flex: 1 1 auto;
}

.product-sidebar--dropdown .tt-hero__category-link {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.35;
}

.product-sidebar--dropdown .tt-hero__category-icon {
    font-size: 17px;
    width: 18px;
    margin-right: 10px;
}

.tt-hero__compact-mobile .mobile-category-btn {
    padding: 8px 14px;
    border-radius: 0;
}

.tt-hero__compact-mobile .mobile-category-btn__title {
    font-size: 13px;
}

.tt-hero__compact-mobile .mobile-category-dropdown--source {
    display: none;
    margin-top: 6px;
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.tt-hero__compact-mobile .mobile-category-dropdown--source.mobile-category-dropdown--show {
    display: flex;
    flex-direction: column;
    animation: ttFadeInDown 0.18s ease;
}

.tt-hero__compact-mobile .mobile-category-dropdown--source .tt-hero__category-list {
    max-height: 300px;
}

.tt-hero__compact-mobile .product-sidebar--dropdown {
    width: 100%;
    min-height: 0;
}

.tt-hero__policies-inline {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.tt-hero__policies-inline.service-home,
.tt-hero__policies-inline .service-home,
.tt-hero__policies-inline.hero-policies-slot {
    margin-top: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 2px 0;
}

.tt-hero__policies-inline .service-home__grid {
    height: 100%;
}

.tt-hero--compact .tt-hero__policies-inline .service-home__item {
    gap: 8px;
    padding: 4px 10px;
}

.tt-hero--compact .tt-hero__policies-inline .service-home__image {
    width: 30px;
    height: 30px;
}

.tt-hero--compact .tt-hero__policies-inline .service-home__image img {
    max-width: 24px;
    max-height: 24px;
}

.tt-hero--compact .tt-hero__policies-inline .service-home__content h3 {
    font-size: 12px;
    margin: 0 0 1px;
    line-height: 1.2;
}

.tt-hero--compact .tt-hero__policies-inline .service-home__content p {
    font-size: 11px;
    line-height: 1.2;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full {
    background: #fbf8f4;
    border: 1px solid #eae1d3;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    padding: 2px 0;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full .service-home__item {
    gap: 8px;
    padding: 4px 10px;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full .service-home__image {
    width: 30px;
    height: 30px;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full .service-home__image img {
    max-width: 24px;
    max-height: 24px;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full .service-home__content h3 {
    font-size: 12px;
    margin: 0 0 1px;
    line-height: 1.2;
}

.tt-hero--compact-no-categories .tt-hero__policies-inline--full .service-home__content p {
    font-size: 11px;
    line-height: 1.2;
}

@keyframes ttFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .tt-hero__compact-row {
        flex-direction: row;
        align-items: stretch;
        gap: 0;
        min-height: 44px;
    }

    .tt-hero__category-hover {
        width: 270px;
        flex: 0 0 270px;
    }

    .product-sidebar--flyout-trigger {
        border-radius: 0;
    }

    .tt-hero--compact .tt-hero__category-hover .tt-hero__category-panel.product-sidebar--dropdown {
        top: calc(100% + 2px);
        left: 0;
    }

    .tt-hero__policies-inline.service-home,
    .tt-hero__policies-inline .service-home {
        padding: 0;
    }

    .tt-hero__policies-inline .service-home__item {
        min-height: 44px;
        padding: 4px 12px;
    }
}

@media (max-width: 767px) {
    .tt-hero--compact .tt-hero__policies-inline .service-home__item {
        padding: 6px 8px;
    }
}