/* AMLAB Product Show Styles */
.is-disabled {
    position: relative;
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
    overflow: hidden;
}

.is-disabled::before,
.is-disabled::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    /* đủ để kéo dài từ góc này qua góc kia */
    height: 1px;
    border-top: 1px dashed #333;
    transform-origin: center;
    pointer-events: none;
}

.is-disabled::before {
    transform: rotate(45deg);
    /* Đường chéo từ trái trên xuống phải dưới */
}

.is-disabled::after {
    transform: rotate(-45deg);
    /* Đường chéo từ trái dưới lên phải trên */
}



.amlab-products-container {
    margin: 20px 0;
    position: relative;
}

/* Single Style (1 sản phẩm) - Hiển thị ngang */
.amlab-products-container.amlab-single .amlab-product-item.single-style {
    width: 100%;
    max-width: 70%;
    margin: 0 auto;
}

.amlab-products-container.amlab-single .amlab-product-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 20px;
    background: #fff;
    border: 1px solid rgba(229, 229, 229, 1);
    border-radius: 12px;
    padding: 12px;
}

.amlab-products-container.amlab-single .amlab-product-image {
    flex-shrink: 0;
    width: 40%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
}
.amlab-products-container.amlab-single .amlab-product-image img{
    width: 100%;
}

.amlab-products-container.amlab-single .amlab-product-info {
    flex: 1;
    padding: 0;
}

/* Row Layout (2 sản phẩm) */
.amlab-products-container.amlab-row {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(var(--columns, 2), 1fr);
    border: 1px solid rgba(229, 229, 229, 1);
    padding: 12px;
    border-radius: 12px;
}

/* Slider Layout (3+ sản phẩm) */

.amlab-slider-wrapper {
    position: relative;
}

.amlab-slider-track {
    display: flex;
    transition: transform 0.3s ease;
    width: 100%;
}

.amlab-slider .amlab-product-item {
    flex: 0 0 calc(50% + 5px);
    padding: 0 10px;
    box-sizing: border-box;
}

/* Card Style (2+ sản phẩm) - Hiển thị dọc */
.amlab-product-item.card-style .amlab-product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.amlab-products-container.amlab-slider .amlab-slider-wrapper {
    border: 1px solid rgba(229, 229, 229, 1);
    border-radius: 12px;
    padding: 12px;
    overflow: hidden;
}

.amlab-product-item.card-style .amlab-product-image {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    margin: 0 auto;
    position: relative;
    text-align: center;
}

.amlab-product-item.card-style .amlab-product-image>img {
    border-radius: 16px;
    /* border: 1px solid #c8c8c8; */
    /* border-radius: 8px; */
}

.amlab-product-item.card-style .amlab-product-info {
    padding: 20px 0 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Product Image */
.amlab-product-image img {
    width: 80%;
    height: 100%;
    /* border: 1px solid #c8c8c8; */
    border-radius: 8px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amlab-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 14px;
}

/* Discount Badge */
.amlab-discount-badge {
    /* position: absolute; */
    align-items: center;
    background: #000;
    border-radius: 6px;
    color: #fff;
    display: flex;
    font-size: .7rem;
    font-weight: 700;
    height: 18px;
    margin-left: 10px;
    padding: 0 5px;
    z-index: 2;
}

/* Product Info */
.amlab-product-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.4;
    color: #000; 
}

.amlab-option-group span.amlab-option-label {
    font-size: 16px;
    font-weight: 400;
    color: #242424;
}
.amlab-option-group span.amlab-option-label .amlab-color-label_value{
    color: #242424;
    font-weight: 700;   
}
.amlab-option-group[class*="size"] span.amlab-option-label {
    display: none;
}

.amlab-products-container.amlab-single .amlab-product-title {
    font-size: 24px;
    margin-bottom: 10px;
    margin-top: 15px;

}

.amlab-product-title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    /* min-height: calc(1.4em * 2);  */
}

.amlab-product-title a:hover {
    color: #e74c3c;
}

/* Price */
.amlab-product-price {
    font-weight: 400;
    color: #242424;
    position: relative;
    display: flex   ;
    font-size: 20px;
    align-items: center;
}

.amlab-products-container.amlab-single .amlab-product-price {
    margin: 12px 0;
}

.amlab-price,
.amlab-sale-price {
    color: black;
    font-size: 16px;
}

.amlab-original-price {
    color: rgba(82, 82, 82, 1);
    /* text-decoration: line-through; */
    font-size: 14px;
    margin-left: 8px;
}

/* Color Options */
.amlab-product-options {
    margin: 15px 0;
}

.amlab-products-container.amlab-single .amlab-product-options {
    margin: 0;
}

.amlab-option-group[class*="color"] {
    margin-bottom: 12px;
}

.amlab-color-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 400;
}

.amlab-color-swatches {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 5px;
}

.amlab-color-swatch {
    width: 38px;
    height: 24px;
    border-radius: 99999px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
}

.amlab-color-swatch::before,
.amlab-color-swatch::after {
    border-radius: 16px;
    content: "";
    height: 100%;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: all .2s;
    border-radius: 999999px;
    width: 100%;
}

.amlab-color-swatch.active::before {
    opacity: 1;
    border: 3px solid #fff;
}

.amlab-color-swatch.active::after {
    border: 2px solid #242424;
    opacity: 1;
}

.amlab-more-colors {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 12px;
}

/* Size Options */
.amlab-product-sizes {
    margin: 15px 0;
}

.amlab-products-container.amlab-single .amlab-product-sizes {
    margin: 20px 0;
}

.amlab-size-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 400;
}

.amlab-size-swatches {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.amlab-size-swatch {
    width: 44px;
    height: 30px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(229, 229, 229, 1);
    text-align: center;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.amlab-size-swatch.active {
    background: black;
    color: white;
}

.amlab-size-swatch:hover {
    border-color: black;
}

.amlab-more-sizes {
    font-size: 12px;
    color: #666;
    margin-left: 4px;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 12px;
}

/* Actions */
.amlab-product-actions {
    margin-top: auto;
    padding-top: 10px;
    margin-top: 12px;
}

.amlab-btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 99999px;
    text-decoration: none;
    font-weight: 400;
    text-align: center;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.amlab-products-container.amlab-row .amlab-btn {
    padding: 10px 20px;
    font-size: 16px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.amlab-products-container.amlab-single .amlab-btn {
    padding: 10px 20px;
    font-size: 16px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 70%;
    gap: 10px;
}

.amlab-slider .amlab-product-options {
    margin-bottom: 0;
}

.amlab-products-container.amlab-slider .amlab-btn {
    padding: 10px 20px;
    font-size: 16px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.amlab-products-container .amlab-btn::before {
    content: "";
    width: 24px;
    height: 24px;
    display: block;
    position: relative;
    background-image: url(../images/ic_holder.png);
    background-size: contain;
    background-repeat: no-repeat;
}

.amlab-btn-primary {
    background: #000;
    color: white;
}

.amlab-btn-primary:hover {
    background: #000;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Slider Navigation */
.amlab-slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 3;
}

.amlab-slider-prev,
.amlab-slider-next {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    margin: 0 10px;
}

.amlab-slider-prev:hover,
.amlab-slider-next:hover {
    background: rgba(0, 0, 0, 0.9);
}

/* Slider Dots */
.amlab-slider-dots {
    display: flex;
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.amlab-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.amlab-dot.active,
.amlab-dot:hover {
    background: #e74c3c;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .amlab-products-container.amlab-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .amlab-product-item.card-style .amlab-product-info {
        padding: 15px;
    }

    .amlab-product-title {
        font-size: 16px;
    }

    .amlab-products-container.amlab-single .amlab-product-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .amlab-products-container.amlab-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Single style responsive */
    .amlab-products-container.amlab-single .amlab-product-card {
        flex-direction: column;
        gap: 15px;
    }

    /* .amlab-products-container.amlab-single .amlab-product-image {
        width: 100%;
        height: 300px;
    } */


    .amlab-slider-prev,
    .amlab-slider-next {
        width: 35px;
        height: 35px;
        font-size: 16px;
        margin: 0 5px;
    }

    .amlab-product-title {
        font-size: 15px;
    }

    .amlab-products-container.amlab-single .amlab-product-title {
        font-size: 18px;
    }

    .amlab-price,
    .amlab-sale-price {
        font-size: 16px;
    }

    .amlab-products-container.amlab-single .amlab-price,
    .amlab-products-container.amlab-single .amlab-sale-price {
        font-size: 18px;
    }

    .amlab-color-swatch {
        width: 28px;
        height: 14px;
    }

    .amlab-size-swatch {
        padding: 5px 10px;
        font-size: 13px;
    }

    .amlab-products-container.amlab-single .amlab-size-swatch {
        padding: 6px 12px;
        font-size: 14px;
    }
}

@media (max-width: 48em) {
    .amlab-color-swatch {
        width: calc(100% / 6);
        height: 24px;
    }

    .amlab-products-container.amlab-single .amlab-btn {
        width: 100%;
        max-width: 100%;
    }

    .amlab-products-container.amlab-single .amlab-product-options {
        margin: 15px 0;
    }

    .amlab-products-container.amlab-single .amlab-product-item.single-style {
        max-width: 100%;
        width: 100%;
    }

    .amlab-products-container.amlab-single .amlab-product-image {
        width: 70%;
        height: auto;
        aspect-ratio: 4 / 5;
        overflow: hidden;
        margin: 0 auto;
        position: relative;
    }

    .amlab-products-container {
        margin: 15px 0;
    }

    .amlab-products-container.amlab-single .amlab-product-card {
        padding: 15px;
    }

    /* .amlab-products-container.amlab-single .amlab-product-image {
        height: 250px;
    } */

    .amlab-product-item.card-style .amlab-product-info {
        padding: 12px;
    }

    .amlab-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .amlab-products-container.amlab-single .amlab-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* Loading Animation */
.amlab-products-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.amlab-products-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #e74c3c;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 10;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Print styles */
@media print {

    .amlab-slider-nav,
    .amlab-slider-dots {
        display: none;
    }

    .amlab-products-container.amlab-slider .amlab-product-item {
        flex: 0 0 50%;
    }
}