﻿/* ===== Chọn phân loại (partial _ProductVariantPicker) ===== */
.ec-vp-pricebox {
    margin: 8px 0 4px;
}

.ec-vp-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--red, #e5003f);
}

.ec-vp-old {
    margin-left: 10px;
    color: #999;
    text-decoration: line-through;
}

    .ec-vp-old[hidden], .ec-vp [hidden] {
        display: none !important;
    }

.ec-vp-avail {
    margin: 4px 0 14px;
    font-size: 14px;
    color: #555;
}

    .ec-vp-avail.in-stock .ec-vp-stock {
        color: var(--white, #fff);
        font-weight: 600;
    }

    .ec-vp-avail.out-of-stock .ec-vp-stock {
        color: var(--yelow, #ffeb3b);
        font-weight: 600;
    }

.ec-vp-group {
    margin-bottom: 14px;
}

.ec-vp-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    color: var(--primary, #1d1f5c);
}

.ec-vp-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ec-vp-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 6px 14px;
    border: 1px solid #cfd6e4;
    border-radius: 6px;
    background: #fff;
    color: var(--primary, #1d1f5c);
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

    .ec-vp-opt:hover {
        border-color: var(--primary, #1d1f5c);
    }

    .ec-vp-opt:focus-visible {
        outline: 2px solid var(--primary-second, #e99417);
        outline-offset: 2px;
    }

    .ec-vp-opt.is-active {
        background: var(--primary, #1d1f5c);
        border-color: var(--primary, #1d1f5c);
        color: #fff;
    }

    .ec-vp-opt.is-unavailable:not(.is-active) {
        opacity: .5;
        border-style: dashed;
    }

.ec-vp-swatch {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.25);
    display: inline-block;
    flex: none;
}

.ec-vp-qtyrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 10px;
}

    .ec-vp-qtyrow label {
        margin: 0;
        font-weight: 700;
    }

.ec-vp-qtybox {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid #cfd6e4;
    border-radius: 6px;
    overflow: hidden;
}

.ec-vp-qty-btn {
    width: 36px;
    border: 0;
    background: var(--color3, #ace2ee);
    color: var(--primary, #1d1f5c);
    font-size: 18px;
    cursor: pointer;
}

    .ec-vp-qty-btn:hover {
        background: var(--color3, #ace2ee);
    }

.ec-vp-qty {
    width: 60px;
    border: 0;
    text-align: center;
    font-size: 15px;
    -moz-appearance: textfield;
}

    .ec-vp-qty::-webkit-outer-spin-button, .ec-vp-qty::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.ec-vp-msg {
    margin: 8px 0;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    background: #fdecef;
    color: var(--red, #e5003f);
    border: 1px solid #f5b5c3;
}

.ec-vp-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

    .ec-vp-actions .btn {
        min-width: 160px;
    }

        .ec-vp-actions .btn:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

        .ec-vp-actions .btn.is-busy {
            pointer-events: none;
            opacity: .8;
            cursor: progress;
        }

            .ec-vp-actions .btn.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-vp-spin .7s linear infinite;
            }

@keyframes ec-vp-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ec-vp-actions .btn.is-busy::before {
        animation-duration: 2s;
    }
}

/* ===== Trang chi tiết: gallery ===== */
#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;
}

.product-details-area .short-description {
    margin-top: 18px;
    color: #555;
}

/* ===== 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;
}

    .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;
}

/* ===== Hộp Chọn nhanh (quick-add.js) ===== */
body.ec-qa-open {
    overflow: hidden;
}

.ec-qa {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

    .ec-qa[hidden] {
        display: none;
    }

.ec-qa-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16,18,50,.55);
    opacity: 0;
    transition: opacity .2s;
}

.ec-qa.is-open .ec-qa-backdrop {
    opacity: 1;
}

.ec-qa-dialog {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 22px 22px 18px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(0,0,0,.3);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s, transform .2s;
    outline: none;
}

.ec-qa.is-open .ec-qa-dialog {
    opacity: 1;
    transform: none;
}

.ec-qa-close {
    position: absolute;
    top: 6px;
    right: 12px;
    border: 0;
    background: none;
    font-size: 28px;
    line-height: 1;
    color: #666;
    cursor: pointer;
}

    .ec-qa-close:hover {
        color: var(--red, #e5003f);
    }

.ec-qa-head {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
    padding-right: 28px;
}

    .ec-qa-head img {
        width: 72px;
        height: 72px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #e3e3e3;
        flex: none;
    }

    .ec-qa-head h4 {
        margin: 0 0 4px;
        font-size: 16px;
        color: var(--primary, #1d1f5c);
    }

.ec-qa-link {
    font-size: 13px;
    color: var(--primary-second, #e99417);
}

.ec-qa-loading {
    padding: 30px;
    text-align: center;
    color: #666;
}

@media (prefers-reduced-motion: reduce) {
    .ec-qa-backdrop, .ec-qa-dialog {
        transition: none;
    }
}
