﻿/* ===== Trang chi tiết sản phẩm ===== */
#big_product .item img {
    width: 100%;
    max-height: 450px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

#thumbs_product {
    margin-top: 10px;
}

    #thumbs_product .item img {
        width: 100%;
        height: 70px;
        object-fit: cover;
        cursor: pointer;
        border: 2px solid #e3e3e3;
        border-radius: 3px;
    }

        #thumbs_product .owl-item.current .item img,
        #thumbs_product .item img:hover {
            border-color: var(--primary-second, #e99417);
        }

    #big_product .owl-nav button, #thumbs_product .owl-nav button {
        background: rgba(29,31,92,.75) !important;
        color: #fff !important;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    #big_product .owl-nav .owl-prev, #thumbs_product .owl-nav .owl-prev {
        left: 5px;
    }

    #big_product .owl-nav .owl-next, #thumbs_product .owl-nav .owl-next {
        right: 5px;
    }

.product-big-image {
    position: relative;
}

.price-box .price {
    font-size: 26px;
    font-weight: 700;
    color: var(--red, #e5003f);
}

.price-box .old-price {
    margin-left: 10px;
    color: #999;
    text-decoration: line-through;
}

.availability.out-of-stock span {
    color: var(--red, #e5003f);
}

.ec-attr-group {
    margin-bottom: 14px;
}

.ec-attr-label {
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
}

.ec-attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ec-attr-option.active {
    background: var(--primary, #1d1f5c);
    border-color: var(--primary, #1d1f5c);
    color: #fff;
}

.ec-attr-option.is-unavailable {
    opacity: .45;
    text-decoration: line-through;
}

    .ec-attr-option.is-unavailable.active {
        opacity: 1;
        text-decoration: none;
    }

.cart-plus-minus {
    margin: 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .cart-plus-minus .numbers-row {
        display: inline-flex;
        align-items: center;
        gap: 4px;
    }

    .cart-plus-minus .qty {
        width: 64px;
    }

    .cart-plus-minus .qtybutton {
        width: 36px;
        height: 36px;
        padding: 0;
        line-height: 1;
    }

.ec-product-msg {
    margin: 10px 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

    .ec-product-msg.is-error {
        background: #fdecef;
        color: var(--red, #e5003f);
        border: 1px solid #f5b5c3;
    }

    .ec-product-msg.is-success {
        background: var(--color2, #d5eaff);
        color: var(--primary, #1d1f5c);
        border: 1px solid var(--color3, #ace2ee);
    }

.ec-buy-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

    .ec-buy-actions .button {
        min-width: 160px;
    }

    .ec-buy-actions .is-disabled {
        opacity: .55;
        pointer-events: none;
    }

    .ec-buy-actions .is-busy {
        pointer-events: none;
        opacity: .8;
        cursor: progress;
    }

        .ec-buy-actions .is-busy::before {
            content: "";
            display: inline-block;
            width: 1em;
            height: 1em;
            margin-right: .5em;
            vertical-align: -.15em;
            border: 2px solid currentColor;
            border-right-color: transparent;
            border-radius: 50%;
            animation: ec-spin .7s linear infinite;
        }

@keyframes ec-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Sản phẩm liên quan ===== */
.related-products {
    margin: 40px 0 20px;
}

    .related-products .rp-title {
        margin: 0 0 18px;
        padding-bottom: 8px;
        font-size: 20px;
        font-weight: 700;
        color: var(--primary, #1d1f5c);
        border-bottom: 2px solid var(--primary-second, #e99417);
    }

.rp-list:not(.owl-loaded) {
    display: flex;
    gap: 15px;
    overflow-x: auto;
}
    /* trước khi Owl chạy / không có Owl */
    .rp-list:not(.owl-loaded) > .item {
        flex: 0 0 240px;
    }

.rp-list .owl-nav button {
    background: var(--primary, #1d1f5c) !important;
    color: #fff !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: absolute;
    top: 40%;
}

.rp-list .owl-nav .owl-prev {
    left: -8px;
}

.rp-list .owl-nav .owl-next {
    right: -8px;
}
