.pv-products{
    margin: 0 auto;
}

.pv-products .owl-stage {
    margin: 0 auto;
}
.pv-products-card .pv-products-title{
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: flex-end;
}

.pv-products-card .pv-products-title h5{
    color: #333;
    margin: 0 !important;
}
.pv-products-card .pv-products-title a{
    width: 110px;
    text-align: right;
}
.pv-products .pv-product-item {
    border: thin solid #eee;
    margin-bottom: 10px;
}
.pv-products .pv-product-name{
    /* width: 160px;
    height: 50px; */
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Số dòng tối đa */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.pv-products .pv-product-sell-price{
    font-size: 13px;
    font-weight: normal;
    color: rgb(3, 0, 190);
}

.pv-products .pv-product-sell-price span{
    text-decoration: line-through;
    color: rgb(130, 134, 158);
}
    
.pv-products .pv-product-price{
    color: rgb(3, 0, 190);
    font-weight: bold;
    height: 50px;
    display: flex;
    flex-direction: column;
}

.teko-product-btn {
    width: 100%;
    display: inline-block;
    padding: 3px 20px;
    font-size: 14px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgb(3, 0, 190);
    border-radius: 5px;
    color: rgb(3, 0, 190);
    background-color: #fff;
    transition: background-color 0.3s, color 0.3s;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    align-content: space-evenly;
}

.teko-product-btn:hover {
    /* color: #81d742;
    background-color: #fff;
    border: 1px solid #81d742; */
}

.teko-product-btn:active {
    /* color: #81d742;
    background-color: #fff;
    border: 1px solid #81d742; */
}

.teko-product-btn.disabled {
    cursor: not-allowed;
    border: 1px solid #ccc;
    color: rgb(51, 51, 51);
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    background-color: #fff;
}


/* .pv-products a:hover {
    color: white;
    background-color: rgb(3, 0, 190);
} */
.pv-products .toggle-checkbox{
    display: none;
}
.pv-products .pv-product-image img{
    margin-bottom: 0 !important;
    opacity: 1 !important;
    object-fit: contain;
    aspect-ratio: 1/1;
}
.pv-products .toggle-label {
    cursor: pointer;
    color: rgb(3, 0, 190);
    text-decoration: underline;
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
}
.pv-products .pv-product-description p{
    margin: 0;
}

/* Layout Carousel */
.pv-products .pv-product-item{
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
}
.pv-products .pv-product-image{
    margin-bottom: 10px;
}

.pv-products .pv-product-sell-price span{
    margin-left: 0;
}
.pv-products .pv-product-item .pv-product-button {
    margin: 10px 0 0 0;
    width: 100%;
}

/* Layout List */
.pv-products .pv-product-list .pv-product-item {
    display: grid;
    grid-template-areas: 'image name' 'image description' 'image button';
    grid-template-columns: 220px auto;
    gap: 10px;
}
.pv-products .pv-product-list.pv-product-single .pv-product-item {
    grid-template-columns: 320px auto;
}
.pv-products .pv-product-list .pv-product-item .pv-product-description-area .pv-product-description{
    max-height: 50px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}
.pv-products .pv-product-list .pv-product-price{
    height: auto;
}
.pv-products .pv-product-list .pv-product-name{
    height: auto;
}
.pv-products .pv-product-list.pv-product-single .pv-product-name{
    font-size: 20px;
    margin-top: 0;
}
.pv-products .pv-product-list .pv-product-button a{
    width: auto;
}
.pv-products .pv-product-list.pv-product-single .pv-product-price{
    font-size: 18px;
    align-items: center;
    flex-direction: row;
}
.pv-products .pv-product-list.pv-product-single .pv-product-sell-price{
    font-size: 16px;
    margin-left: 10px;
}
.pv-products .pv-product-list.pv-product-single .pv-product-item .pv-product-description-area .pv-product-description{
    max-height: unset;
}
.pv-products .pv-product-list.pv-product-single .toggle-label{
    display: none;
}
.pv-products .pv-product-list .pv-product-item .pv-product-description-area .toggle-checkbox:checked + .pv-product-description {
    max-height: 500px;
    animation: fadeIn 1s ease-in-out;
}
.pv-products .pv-product-list .pv-product-item .pv-product-image {
    grid-area: image;
    margin-bottom: 0;
    padding-right: 10px;
}
.pv-products .pv-product-list .pv-product-item .pv-product-image img{
    width: 100%;
    object-fit: contain;
    aspect-ratio: 1/1;
}
.pv-products .pv-product-list.pv-product-single .pv-product-image {
    padding-right: 20px;
}
.pv-products .pv-product-list .pv-product-item .pv-product-description-area {
    grid-area: description;
    position: relative;
    padding-bottom: 30px;
}
.pv-products .pv-product-list.pv-product-single .pv-product-item .pv-product-description-area {
    padding-bottom: 0;
}
.pv-products .pv-product-list .pv-product-item .pv-product-button {
    grid-area: button;
}

@media (max-width: 768px) {
    .pv-products .pv-product-list .pv-product-item {
        grid-template-areas: 'image name' 'description description' 'button button';
        grid-template-columns: 120px auto;
    }
    .pv-products .pv-product-list.pv-product-single .pv-product-item {
        display: flex;
    }
    .pv-products .pv-product-list.pv-product-single .pv-product-image,
    .pv-products .pv-product-list.pv-product-single .pv-product-description-area,
    .pv-products .pv-product-list.pv-product-single .pv-product-detail,
    .pv-products .pv-product-list.pv-product-single .pv-product-button{
        width: 100%;
    }
    .pv-products .pv-product-list.pv-product-single .pv-product-button{
        text-align: center;
    }
    .pv-products .pv-product-list.pv-product-single .pv-product-image {
        padding-right: 0;
    }
    .pv-products .pv-product-list .pv-product-price,
    .pv-products .pv-product-list.pv-product-single .pv-product-price{
        flex-direction: column;
        align-items: flex-start;
    }
    .pv-products .pv-product-list .pv-product-sell-price{
        margin-left: 0;
    }
    .pv-products .pv-product-list .pv-product-item .pv-product-description-area {
        margin-top: 5px;
    }
}

.pv-product-uom {
    font-size: 12px;
    color: rgb(130, 134, 158);
    font-weight: 400;
    line-height: 16px;
}

.pv-products .pv-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* If mobile for grid */
@media (max-width: 768px) {
    .pv-products .pv-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pv-products .pv-product-grid .pv-product-item {
    display: flex;
    flex-direction: column;
    /* width: 160px; */
    height: auto;
}

.pv-products .pv-product-grid .pv-product-item .pv-product-image img {
    width: 100%;
    object-fit: contain;
    aspect-ratio: 1/1;
}

.pv-products .pv-product-grid .pv-product-item .pv-product-button {
    width: 100%;
    margin-top: 10px;
}

.pv-product-detail-area {
    width: 100%;
}

/* .pv-products .pv-product-grid .pv-product-item .pv-product-button a{
    width: 100%;
} */

.pv-product-name-area {
    height: 50px;
}

.quantity-container {
    display: flex;
    align-items: center;
    border: 1px solid rgb(3, 0, 190);
    border-radius: 6px;
    width: fit-content;
    /* padding: 4px 8px; */
    background-color: #f9f9ff;
    padding-inline: 4px;
}

.quantity-btn {
    background-color: none;
    border: none;
    color: rgb(3, 0, 190);
    font-size: 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    cursor: pointer;
    /* width: 30px; */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    /* padding: 0 10px; */
}

.quantity-btn:hover {
    background-color: #f9f9ff;
    color: rgb(3, 0, 190);
}

.quantity-btn:active {
    background-color: #f9f9ff;
    color: rgb(3, 0, 190);
}

.quantity-btn:focus {
    background-color: #f9f9ff;
    color: rgb(3, 0, 190);
}

.quantity-input {
    text-align: center;
    border-style: none;
    border-width: 0;
    background: transparent;
    font-size: 16px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: rgb(3, 0, 190);
    outline: none;
    padding-inline: 4px;
    -webkit-appearance: none;
}

.quantity-input[type=number]::-webkit-inner-spin-button,
.quantity-input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
    -moz-appearance: none;
}

.quantity-container.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.quantity-container.loading::before {
    content: "";
    position: absolute;
    right: 6px;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    border: 2px solid rgba(3, 0, 190, 0.2);
    border-top-color: rgb(3, 0, 190);
    border-radius: 50%;
    animation: pv-spin 0.8s linear infinite;
}

@keyframes pv-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
