/* Breadcrumb */
.breadcrumb {
    padding-top: 0;
    font-size: 20px;

    @media (max-width: 1290px) {
        padding-top: 0;
        font-size: 14px;
    }
}

.breadcrumb-primary {
    background: var(--color-2);
    padding: 10px 0;
    min-height: 240px;
    padding-top: 166px;
    border-radius: 20px;
    color: white;

    @media (max-width: 767px) {
        min-height: 120px;
        padding: 100px 10px 10px;
        border-radius: 10px;
    }
}

.breadcrumb-01 {
    height: 30px;
}

.breadcrumb {
    ul {
        display: block;
        white-space: normal;
        text-align: center;

        li {
            display: inline;
            font-weight: 600;

            a {
                color: inherit;

                &:hover {
                    color: var(--color-4);
                }
            }

            &.active {
                color: var(--color-4);
            }

            &:not(:last-child) {
                position: relative;
                padding-right: 15px;

                &::before {
                    content: "/";
                    position: absolute;
                    top: 50%;
                    transform: translateY(-50%);
                    right: 6px;
                }
            }

            &:last-child {
                /* color: var(--color-3); */
            }
        }
    }

    &.breadcrumb--white {
        padding: 17px 37px 8px;
        margin-left: -36px;
        transform: translateY(-100%);
        width: fit-content;
        border-radius: 20px 20px 0 0;
        position: relative;
        background: white;
        z-index: 10;

        @media (max-width: 1290px) {
            margin-left: 0;
            border-radius: 10px 10px 0 0;
            padding: 10px;
        }

        ul {
            text-align: left;
        }
    }
}

/* End breadcrumb  */
.banner {
    position: relative;
}

.banner-inner {
    display: grid;
    grid-template-columns: 20.8% auto 16.6%;
    gap: 15px;
}

.banner-slider {}

.banner-slider .item {
    display: none;
}

.banner-slider .item:first-child {
    display: block;
}

.banner-slider.slick-initialized .item {
    display: block;
}

.banner-slider img {
    border-radius: 20px;
    width: 100%;
    height: auto;
    object-fit: cover;
    overflow: hidden;
    aspect-ratio: 1260 / 500;
    max-height: 720px;
}

.banner .img-m {
    display: none;
}

/* Content cho editor  */

.noi-dung p {
    margin-bottom: 10px;
    text-align: justify;
    line-height: 1.5;

    &:last-child {
        margin-bottom: 0;
    }
}

.noi-dung h2 {
    font-size: 20px;
    margin-bottom: 15px;
}

.noi-dung h3 {
    font-size: 17px;
    margin-bottom: 15px;
}

.noi-dung hr {
    margin: 15px 0;
}

.noi-dung table td img {
    border-radius: 20px;
}

.noi-dung table td {
    width: 50%;
}

.noi-dung blockquote {
    border-left: 5px solid var(--color-3);
    padding: 8px 15px;
    /* background: #FFF; */
    border-radius: 10px;
    margin-bottom: 15px;
}

.noi-dung blockquote h3,
.noi-dung blockquote h2,
.noi-dung blockquote p {
    margin-bottom: 0;
}

.noi-dung ul,
.noi-dung ol {
    margin-left: 30px;
    margin-bottom: 10px;
}

.noi-dung ul li,
.noi-dung ol li {
    margin-bottom: 5px;
}

.noi-dung table tr td {
    padding: 10px;
}

.noi-dung table {}

.noi-dung img {
    border-radius: 20px;
}

.noi-dung {
    /* font-size: 15px; */

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: var(--color-2);
        line-height: 1.2;
    }

    @media (min-width: 992px) {
        h1 {
            font-size: 40px;
        }

        h2 {
            font-size: 40px;
        }

        h3 {
            font-size: 30px;
        }

        h4 {
            font-size: 24px;
        }

        h5 {
            font-size: 20px;
        }

        h6 {
            font-size: 18px;
        }
    }
}

/* end  */

/* pagination  */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    margin-top: 34px;
    gap: 15px;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 35px;
    height: 33px;
    padding: 0 7px;
    border-radius: 12px;
    background: transparent;
    color: var(--color-2);
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    color: var(--color-2);
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: var(--color-2);
    color: #fff;
    border-radius: 5px;
    pointer-events: none;
    font-weight: 700;
}

.pagination .page-item.disabled .page-link {
    pointer-events: none;
}

.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-2);
    color: #fff;
    padding: 0;
    min-width: auto;
}

.pagination .page-item:first-child.disabled .page-link,
.pagination .page-item:last-child.disabled .page-link {
    opacity: 0.5;
    background: #ccc;
    pointer-events: none;
}

.pagination .page-item:first-child .page-link:hover,
.pagination .page-item:last-child .page-link:hover {
    background: var(--color-1);
}

.highlight-item {
    border: 1px solid var(--color-3);
    position: relative;
    border-radius: 30px;
    margin-bottom: 20px;
    background: white;
    z-index: 1;

    .type {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
        font-size: 14px;
    }

    .bage {
        position: absolute;
        top: 15px;
        left: 15px;
        background: var(--color-3);
        color: var(--color-1);
        padding: 5px 10px;
        border-radius: 20px;
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        z-index: 2;

        &.sold-out {
            background: #888;
            color: white;
        }

        &.is-new {
            background: var(--color-4);
        }

        &.on-sale {
            background: var(--color-5);
            color: white;
        }
    }

    &::before {
        content: "";
        position: absolute;
        display: block;
        width: 85px;
        height: 38px;
        mask-image: url(../images/vien.png);
        mask-repeat: no-repeat;
        mask-position: bottom;
        mask-size: 100%;
        background-color: white;
        bottom: -18px;
        z-index: -2;
        left: 50%;
        transform: translateX(-50%);
    }

    &::after {
        content: "";
        position: absolute;
        display: block;
        width: 85px;
        height: 38px;
        mask-image: url(../images/line-item.png);
        mask-repeat: no-repeat;
        mask-position: bottom;
        mask-size: 100%;
        background-color: var(--color-3);
        bottom: -35px;
        left: 50%;
        z-index: -1;
        transform: translateX(-50%);
    }
}

.highlight-item__img {
    position: relative;
    overflow: hidden;
    z-index: 1;
    border-radius: 30px 30px 0 0;
    display: block;
    border-bottom: 1px solid var(--color-3);

    &:hover {
        img {
            opacity: 0;

            &.hover-img {
                opacity: 1;
            }
        }
    }

    img {
        object-fit: cover;
        z-index: -1;
        aspect-ratio: 1/1;
        transition: all 0.3s ease-in-out;

        &.hover-img {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            z-index: 1;
            transition: all 0.3s ease-in-out;
        }
    }
}

.highlight-item__content {
    padding: 20px;
    text-align: center;

    @media (max-width: 768px) {
        padding: 10px;
    }
}

.highlight-item__title {
    margin-bottom: 10px;
    font-size: 20px;

    @media (max-width: 768px) {
        font-size: 16px;
    }
}

.highlight-item__price {
    color: var(--color-3);
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    font-weight: 700;
    position: relative;
    margin-bottom: 20px;
    font-size: 17px;

    &::before {
        content: "";
        background-color: currentColor;
        width: 60px;
        height: 1px;
        position: absolute;
        bottom: -11px;
        left: 50%;
        transform: translateX(-50%);
    }
}

.highlight-item__link {
    margin-top: 10px;
    color: var(--color-3);
    display: block;
}

.highlight-item__addcart {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    background: transparent;
    color: var(--color-1);
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    margin: 15px auto 0;
    gap: 5px;
    font-size: 16px;
    position: absolute;
    left: 50%;
    width: 85px;
    height: 24px;
    bottom: 0;
    transform: translate(-50%, 50%);

    @media (max-width: 992px) {
        font-size: 14px;
        padding: 5px 14px;
        width: fit-content;
    }

    svg {
        width: 20px;
        height: 20px;
        transition: all 0.3s ease-in-out;
        stroke: currentColor;
    }

    &:hover {
        color: var(--color-3);

        svg {
            transform: scale(1.09);
        }
    }
}

.hover-effect_1 {
    position: relative;
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
}

.hover-effect_1::after {
    position: absolute;
    width: 200%;
    height: 0;
    left: 50%;
    top: 50%;
    background-color: hsla(0, 0%, 100%, 0.3);
    transform: translate(-50%, -50%) rotate(-45deg);
    content: "";
    z-index: 1;
}

.hover-effect_1:hover::after {
    height: 250%;
    transition: all 0.6s linear;
    background-color: transparent;
}

@media (max-width: 1100px) {
    .noi-dung table tr td {
        width: 50%;
    }

    .noi-dung img {
        max-width: 100%;
    }
}

@media (max-width: 992px) {
    .noi-dung table tr td {
        width: 100% !important;
        display: block;
    }
}

@media (max-width: 768px) {
    .pagination .page-link {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }

    .noi-dung h2 {
        font-size: 18px;
    }

    .noi-dung h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
}

/* ============================================
   Form Success Modal (dùng chung cho các form)
   Usage: @include('frontend.components.form-success') trong page
          JS: showFormSuccess();
   ============================================ */
.form-success-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}

.form-success-modal.active {
    display: flex;
}

.form-success-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    animation: fsmFadeIn 0.25s ease;
}

.form-success-modal__content {
    position: relative;
    z-index: 1;
    max-width: 420px;
    animation: fsmScaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* box-shadow: 4px 4px 4px 0px #000000B2; */
}

.form-success-modal__box {
    background: var(--color-2, #2d6a2d);
    color: #fff;
    border-radius: 20px;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    box-shadow: 4px 4px 4px 0px #000000B2;
    border: 1px solid white;
}

.form-success-modal__box span {
    display: block;
    font-size: 40px;
    font-weight: 800;
    text-transform: uppercase;
    line-height: 1.2;
    letter-spacing: 1px;
}

/* ============================================
   TOC Widget – Mục lục bài viết
   ============================================ */
.toc-widget {
    position: relative;
    width: 100%;
    margin: 24px auto;
    border: 1.5px solid var(--color-2, #2a7e43);
    border-radius: 20px;
    overflow: hidden;
    background: #f7faf8;
    font-family: inherit;
    box-shadow: 0 2px 12px rgba(42, 126, 67, 0.08);
}

.toc-widget * {
    box-sizing: border-box;
}

/* Ẩn toolbar editor trên frontend */
.toc-tools {
    display: none !important;
}

/* Header */
.toc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid rgba(42, 126, 67, 0.15);
    background: linear-gradient(135deg, #f0f8f3 0%, #e6f4eb 100%);
}

.toc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-2, #2a7e43);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toc-title::before {
    content: "📑";
    font-size: 18px;
}

/* Toggle button */
.toc-toggle {
    background: none;
    border: 1.5px solid var(--color-2, #2a7e43);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--color-2, #2a7e43);
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.toc-toggle:hover {
    background: var(--color-2, #2a7e43);
    color: #fff;
}

.toc-toggle.collapsed {
    transform: rotate(-90deg);
}

/* Body */
.toc-body {
    padding: 12px 20px 16px;
    transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease;
    overflow: hidden;
}

.toc-body.collapsed {
    max-height: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
}

/* List reset */
.toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    counter-reset: toc-h2;
}

.toc-list li {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.toc-list>li {
    margin-bottom: 2px !important;
    counter-increment: toc-h2;
}

/* Links */
.toc-list a {
    display: block;
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--color-4, #333);
    text-decoration: none;
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.toc-list a:hover {
    background: rgba(42, 126, 67, 0.08);
    color: var(--color-2, #2a7e43);
}

.toc-list a.active {
    background: rgba(42, 126, 67, 0.1);
    color: var(--color-2, #2a7e43);
    font-weight: 600;
    border-left: 3px solid var(--color-2, #2a7e43);
    border-radius: 0 8px 8px 0;
}

/* Numbering */
.toc-list>li>a::before {
    content: counter(toc-h2) ". ";
    font-weight: 700;
    color: var(--color-2, #2a7e43);
}

/* Nested lists */
.toc-list ul {
    list-style: none !important;
    margin: 2px 0 2px 0 !important;
    padding-left: 20px !important;
    counter-reset: toc-h3;
}

.toc-list ul>li {
    counter-increment: toc-h3;
}

.toc-list ul>li>a {
    font-size: 13px;
    color: var(--color-1, #828282);
    padding: 5px 12px;
}

.toc-list ul>li>a::before {
    content: counter(toc-h2) "." counter(toc-h3) " ";
    font-weight: 600;
    color: rgba(42, 126, 67, 0.5);
}

.toc-list ul>li>a:hover {
    color: var(--color-2, #2a7e43);
    background: rgba(42, 126, 67, 0.05);
}

/* H4+ nested */
.toc-list ul ul>li>a {
    font-size: 12.5px;
    color: #888;
    padding: 4px 12px;
}

.toc-list ul ul>li>a::before {
    content: "– ";
    font-weight: 400;
    color: #aaa;
}

/* Empty state */
.toc-empty {
    text-align: center;
    padding: 20px;
    color: var(--color-1, #828282);
    font-size: 13px;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .toc-widget {
        margin: 16px 0;
        border-radius: 12px;
    }

    .toc-header {
        padding: 12px 16px;
    }

    .toc-title {
        font-size: 15px;
    }

    .toc-body {
        padding: 10px 16px 14px;
    }

    .toc-list a {
        font-size: 13px;
        padding: 5px 10px;
    }

    .toc-list ul>li>a {
        font-size: 12px;
    }
}

@keyframes fsmFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fsmScaleIn {
    from {
        opacity: 0;
        transform: scale(0.7);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 576px) {
    .form-success-modal__box {
        padding: 32px 36px;
    }

    .form-success-modal__box span {
        font-size: 22px;
    }
}