﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mtg-promo-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 20px;

    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.mtg-header-title {
    text-align: center;
    color: white;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.mtg-carousel-wrapper {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 15px;
    padding: 20px;
}

.mtg-products-container {
    display: flex;
    gap: 20px;
    transition: transform 0.3s ease;
    min-height: 300px;
}

.mtg-product-card {
    background: white;
    border-radius: 12px;
    padding: clamp(8px, 2vw, 15px);
    width: clamp(180px, 25vw, 300px);
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    position: relative;
    border: 1px solid #e2e8f0;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    text-align: center;
}

    .mtg-product-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

.mtg-discount-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    padding: 8px 12px;
    border-radius: 15px;
    font-weight: bold;
    font-size: 14px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mtg-product-image {
    width: 100%;
    height: clamp(120px, 20vw, 200px);
    object-fit: cover; /* ảnh sẽ co/tràn vừa khung */
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mtg-product-name {
    font-size: clamp(12px, 2vw, 16px);
    font-weight: bold;
    color: #2d3748;
    line-height: 1.4;
    word-wrap: break-word; /* chữ tự động xuống hàng */
    overflow-wrap: break-word;
    white-space: normal; /* cho phép xuống dòng */
    max-height: clamp(40px, 6vw, 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.mtg-product-specs {
    font-size: 12px;
    color: #718096;
    text-align: center;
    margin-bottom: 15px;
    line-height: 1.4;
    min-height: 60px;
}

.mtg-price-container {
    text-align: center;
}

.mtg-current-price {
    font-size: 18px;
    font-weight: bold;
    color: #e53e3e;
    margin-bottom: 5px;
}

.mtg-original-price {
    font-size: 14px;
    color: #a0aec0;
    text-decoration: line-through;
}

.mtg-installment-note {
    font-size: 11px;
    color: #e53e3e;
    margin-top: 8px;
    font-style: italic;
}

.mtg-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #4a5568;
    z-index: 3;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

    .mtg-nav-button:hover {
        background: white;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        transform: translateY(-50%) scale(1.1);
    }

.mtg-nav-prev {
    left: 0px;
}

.mtg-nav-next {
    right: 10px;
}

/*@media (max-width: 768px) {
    .mtg-promo-container {
        margin: 0px;
        padding: 0px;
    }

    .mtg-header-title {
        font-size: 18px;
    }

    .mtg-product-card {
        min-width: 250px;
    }

    .mtg-nav-button {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
@media (max-width: 480px) {

    .mtg-product-card {
        width: 90%;*/ /* 1 card/1 hàng */
    /*}

    .mtg-product-image {
        height: 130px;
    }

    .mtg-product-name {
        font-size: 12px;
        max-height: 40px;
    }
}*/
.mtg-loading-indicator {
    text-align: center;
    padding: 20px;
}

.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.mtg-products-container {
    transition: transform 0.3s ease;
}