.product-main {
    width: 100%;
    padding: 80px 0;
    position: relative;
}

.product_wrapper {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
}

.product_list_box {
    flex: 4;
    width: 100%;
    max-width: 890px;
}

.category_filter {
    flex: 1;
    width: 100%;
    position: relative;
}

.list_category {
    position: sticky;
    top: 80px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 16px;
    list-style: none;
}

.list_category li {
    width: 100%;
}

.category-btn {
    position: relative;
    width: 100%;
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 16px;
    text-align: start;
    display: flex;
    align-items: center;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--price-sale);
}

.category-btn i {
    position: relative;
    opacity: 0;
    transition: opacity 0.4s ease;
    color: var(--color-text-active);
}

.category-btn span {
    display: inline-block;
    transition: transform 0.4s ease;
    transform: translateX(-14px);
}

.category-btn:hover span,
.category-btn.active span {
    transform: translateX(8px);
}

.category-btn:hover i,
.category-btn.active i {
    left: 0;
    opacity: 1;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.container-detail {
    align-items: center;
    max-width: 1120px;
    margin: 20px auto;
}

.bread-crumb {
    background: #eeeeee;
    padding: 13px 15px;
}

.product-detail {
    display: flex;
    gap: 20px;
}

.product-detail-right {
    width: calc(100% - 570px);
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
}

.product-detail-right h1 {
    display: block;
    color: #ff6600;
    font-size: 20px;
    margin-bottom: 10px;
}

.product-detail-right a img {
    margin-right: 5px;
    width: 20px;
    height: 20px;
}

.product-detail-right a {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #fff;
    text-decoration: none;
    background: #007bff;
    padding: 2px 5px;
    max-width: 80px;
    border-radius: 5px;
}

.product-information {
    list-style: none;
    line-height: 1.9;
}

.product-items {
    display: flex;
    align-items: center;
    flex-direction: row;
}

.product-item-label {
    font-size: 15px;
    font-weight: bold;
    margin: 0px 5px 0px 0px;
}

.price-new-detail {
    color: #ff8500;
    font-size: 26px;
    font-weight: 700;
}

.price-old-detail {
    margin-left: 10px;
    color: #666;
    text-decoration: line-through;
}

.desc-information-product ul,
.desc-information-product ol {
    margin-left: 17px;
}

.add-cart-product-detail {
    display: flex;
    margin-top: 10px;
}

.product-content-information ul,
.product-content-information ol {
    margin-left: 17px;
}

.product-quantity-detail {
    border: 1px solid #ccc;
    display: flex;
    align-items: center;
}

.quantity-minus,
.quantity-plus {
    font-size: 20px;
    padding: 0 10px;
    width: 50px;
    text-align: center;
}

.qty-product {
    width: 50px;
    border: none;
    outline: none;
    text-align: center;
    padding: 15px 0px;
    font-size: 16px;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.add-cart-product-detail-btn {
    margin-left: 10px;
    padding: 10px 15px;
    background: #fd6e1d;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.add-cart-product-detail-btn span {
    text-transform: uppercase;
    font-weight: 600;
}

/* product-right */
.product-detail-left {
    width: 100%;
    max-width: 570px;
}

.product-detail-left .MagicZoom {
}

.product-detail-gallery {
    position: relative;
    margin-top: 15px;
}

.thumbnail-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.thumbnail-grid img {
    border-radius: 5px;
    height: auto;
    border-bottom: 0px !important;
    padding-bottom: 0px !important;
    width: 100% !important;
}

.next-left,
.next-right {
    background: #ccc;
    padding: 5px 8px;
    font-size: 20px;
    align-content: center;
    max-height: 30px;
}

.title-product-detail {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.title-product-detail li {
    border-radius: 5px;
    font-size: 14px;
    text-transform: uppercase;
    background: #ccc;
    padding: 10px 15px;
    list-style: none;
}

.title-product-detail li:hover {
    background: #ffde1f;
}

.specifications-product {
    padding-top: 10px;
    margin-top: 10px;
    border-top: #ccc solid 1px;
}

.specifications-product span {
    font-size: 18px;
    color: #f1c40f;
    font-weight: 700;
    text-transform: capitalize;
    margin-top: 20px;
}

.product-desc-information ul li {
    line-height: 1.2;
    margin: 15px 0px 0px 15px;
    font-size: 18px;
}

.suite-product {
    font-size: 18px;
    color: #0f0f0f;
    font-weight: 700;
    margin-top: 20px;
}

.img-info {
    display: grid;
    grid-template-columns: 50% 50%;
    gap: 5px;
    margin-top: 20px;
}

.img-info img {
    width: 100%;
    border-radius: 5px;
}

.add-cart-product-detail-btn-cat {
    padding: 10px 0px;
    background: #fd6e1d;
    color: #fff;
    border-radius: 5px;
    margin: 0px auto;
    white-space: nowrap;
    text-align: center;
    max-width: 90%;
}

.add-cart-product-detail-btn-cat span {
    text-transform: uppercase;
    font-weight: 400;
    font-size: 14px;
}

.product-viewed {
    margin-top: 60px;
}

.product-item-content-cat {
    text-align: center;
}

.product-list-cat-ot {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    gap: 5px;
}

.product-item-cat a img {
    width: 200px;
    height: 200px;
}

.product-item-cat {
    border: #ccc solid 1px;
    height: 350px;
    line-height: 1.7;
}

.price-new-detail-cat {
    color: #ff8500;
    font-size: 20px;
    font-weight: 700;
}

.price-old-detail-cat {
    margin-left: 10px;
    color: #666;
    text-decoration: line-through;
    align-content: center;
}

.name-product-cat {
    font-weight: 700;
}

.title-product-detail {
    margin-bottom: 16px;
}

.title-product-detail li {
    font-weight: 600;
}

/** Product relation **/
.product-detail-relation {
    padding: 60px 0;
}

/* PRODUCT DETAIL */
.product-detail-main {
    padding: 60px 0;
}
.product-card {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    overflow: hidden;
    margin-bottom: 100px;
}

/* Phần hình ảnh */
.product-image {
    flex: 1;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.list_image {
    width: 100%;
    max-width: 600px;
    position: relative;
    min-width: 0;
}

.list_image .owl_product_image {
    width: 100%;
    min-width: 0;
}

.item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-product-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--price-sale);
    font-size: 18px;
    z-index: 10;
}

.btn-prev {
    left: -16px;
}

.btn-next {
    right: -16px;
}

.item img {
    width: 100%;
    max-width: 90%;
    height: auto;
    border-radius: 8px;
}

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    color: #333;
    cursor: pointer;
    padding: 10px;
}

.prev {
    left: 10px;
}
.next {
    right: 10px;
}

.product-info {
    flex: 1.2;
    color: var(--price-sale);
}

.category {
    color: var(--color-text-active);
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.product-title {
    font-size: 28px;
    margin-bottom: 8px;
}

.price-section {
    margin-bottom: 12px;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 8px;
}

.old-price {
    text-decoration: line-through;
    color: #a3a3a3;
    font-weight: 500;
    font-size: 16px;
}

.current-price {
    color: var(--color-text-active);
    font-size: 24px;
    font-weight: 500;
}

.description {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 24px;
}

.metadata {
    border-top: 0.5px solid var(--color-text-active);
    border-bottom: 0.5px solid var(--color-text-active);
    padding: 10px 0;
    color: var(--color-text-active);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}

.metadata span {
    margin-right: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    justify-content: start;
    margin-bottom: 20px;
    border-bottom: 0.5px solid #a3a3a3;
    padding: 20px 0 10px 0;
    gap: 20px;
}

.detail-item {
    min-width: 200px;
}

.detail-item strong {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
}

.detail-item p {
    font-size: 14px;
    font-weight: 400;
}

.ingredients {
    margin-bottom: 30px;
}

.ingredients strong {
    font-size: 14px;
    font-weight: 600;
    color: var(--price-sale);
    line-height: 1.5;
}

.product-info button {
    border: none;
    width: 150px;
}

.prodcut_detail_box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 20px;
}

.list_thumbnail {
    width: 100%;
    max-width: 590px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.thumbnail_img {
    width: 590px;
    height: 680px;
    overflow: hidden;
    border-radius: 12px;
}

.thumbnail_img img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product_detail_content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: start;
    gap: 20px;
}

.product_detail_content .product_content,
.product_detail_content .product_main_ingredients,
.product_detail_content .product_how_to_use {
    width: 100%;
    min-height: 680px;
    max-height: 680px;
    padding: 44px 35px;
    background-color: #ffeff4;
    border-radius: 12px;
}

.product_warranty_policy {
    grid-column: span 2;
    width: 100%;
    padding: 44px 35px;
    background-color: #ffeff4;
    border-radius: 12px;
}

.product_detail_content .product_content,
.product_main_ingredients,
.product_how_to_use {
    display: flex;
    flex-direction: column;
}

.title_metadata {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-text-active);
    text-transform: uppercase;
    margin-bottom: 24px;
}

.product_main_ingredients .additional_info_list {
    max-height: fit-content;
}

.product_desc_metadata {
    font-size: 24px;
    font-weight: 600;
    color: var(--price-sale);
    line-height: 1.4;
    max-height: 275px;
    margin-bottom: 16px;
    overflow-y: scroll;
}

.product_desc_warranty {
    font-size: 24px;
    font-weight: 500;
    color: var(--price-sale);
    line-height: 1.4;
}

.title_item_metadata {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-active);
    line-height: 1.5;
}

.desc_item_metadata {
    font-size: 16px;
    font-weight: 400;
    color: var(--color-text-active);
    line-height: 1.5;
}

.additional_info_list {
    margin-top: auto;
    max-height: 300px;
    overflow-y: scroll;
    overscroll-behavior-y: contain;
}

.additional_info_row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 10px;
    border-bottom: 0.5px solid var(--color-text-active);
    margin-bottom: 16px;
}

.additional_info_row:last-child,
.main_components_item:last-child {
    margin-bottom: 0;
}

.main_components_item {
    padding-bottom: 18px;
    border-bottom: 0.5px solid var(--color-text-active);
    margin-bottom: 26px;
}

.title_form {
    font-size: 28px;
    font-weight: 600;
    color: var(--color-text-active);
    line-height: 1.5;
    margin-bottom: 18px;
    width: 100%;
    text-align: center;
}

.buy-now-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.buy-now-popup.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.buy-now-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.buy-now-container {
    width: 95%;
    position: relative;
    max-width: 920px;
    margin: auto;
    display: flex;
    align-items: stretch;
    justify-content: center;
    border-top-right-radius: 40px;
    border-bottom-left-radius: 40px;
    overflow: hidden;
}

.buy_image {
    flex: 1;
    max-width: 424px;
    height: auto;
}

.buy_image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.buy-now-modal {
    flex: 1;
    background-color: #fffdf8;
    overflow: hidden;
}

.buy-now-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.buy-now-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.2s;
    font-size: 24px;
}

.buy-now-close:hover {
    color: #374151;
}

.buy-now-body {
    padding: 46px 70px;
}

.buy-now-form .field {
    margin-bottom: 24px;
}

.buy-now-form label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--price-sale);
}

.buy-now-form input,
.buy-now-form textarea {
    width: 100%;
    padding: 8px 0;
    border: none;
    outline: none;
    border-bottom: 0.5px solid var(--price-sale);
    background: transparent;
    font-family: 'Inter', cursive;
}

.button_read_more {
    background-color: #ffeff4;
}

.btn-buy-now-cancel {
    background: #e5e7eb;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.buy-now-body .js-buy-now-submit {
    border: none;
    margin: 0px auto;
}

/* Extra Large Devices (Small Desktop) */
@media (max-width: 1199px) {
    .product-main {
        padding: 30px 0;
    }

    .thumbnail_img {
        width: 100%;
        height: auto;
    }

    .prodcut_detail_box {
        grid-template-columns: repeat(1, 1fr);
    }

    .list_thumbnail {
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .list_image {
        max-width: 500px;
    }

    .product_warranty_policy {
        grid-column: span 1;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .product_detail_content {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
    }

    .product_detail_content .product_content,
    .product_detail_content .product_main_ingredients,
    .product_detail_content .product_how_to_use {
        width: calc(50% - 10px);
        min-height: auto;
    }
}

/* Large Devices (Tablets) */
@media (max-width: 991px) {
    .product-detail {
        flex-direction: column;
    }
    .product-detail-right {
        width: 100%;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .product-item .info {
        padding: 8px;
    }

    .title-filter {
        flex-direction: column;
    }

    .product_wrapper {
        flex-direction: column;
    }
    .product_list_box {
        max-width: 100%;
    }
    .prodcut_detail_box {
        grid-template-columns: 1fr;
    }

    .list_thumbnail {
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
    }

    .product_detail_content .product_content,
    .product_detail_content .product_main_ingredients,
    .product_detail_content .product_how_to_use {
        min-height: auto;
        padding: 24px;
    }

    .product_warranty_policy {
        grid-column: span 1;
        padding: 24px;
    }

    .product-card {
        grid-template-columns: repeat(1, 1fr);
        margin-bottom: 50px;
    }
    .list_image {
        margin: 0 auto;
    }
}

/* Medium Devices (Tablets) */
@media (max-width: 768px) {
    .buy_image {
        display: none;
    }
    .product_desc_metadata {
        font-size: 16px;
    }
    .product_desc_warranty {
        font-size: 16px;
    }
}

/* Small Devices (Phones) */
@media (max-width: 575px) {
    .thumbnail-grid a {
        width: calc(25% - 9px);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .list_thumbnail {
        grid-template-columns: repeat(1, 1fr);
    }
    .buy-now-body {
        padding: 80px 20px 20px 20px;
    }
    .list_image {
        max-width: 100%;
    }
    .btn-product-image {
        display: none;
    }
}

/* Extra Small Devices */
@media (max-width: 374px) {
    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
