body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #e3f2fd;
    margin: 0;
    padding: 0;
}

.detail-container {
    max-width: 1300px;
    margin: 40px auto;
    padding: 20px;
    background: #fefefe;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.product-top {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.detail-image {
    width: 550px;
    height: auto;
    max-width: 650px;
    max-height: 500px;
    object-fit: contain;
    border: none;
    background-color: transparent;
    border-radius: 4px;
    overflow-x: auto;
    white-space: nowrap;
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
    max-width: 100%;
}

.thumbnail {
    display: inline-block;
    width: 130px;
    height: 130px;
    object-fit: contain;
    border: none;
    background-color: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s;
}

.thumbnail:hover {
    transform: scale(1.1);
    border-color: #66bb6a;
}

.detail-info {
    flex-grow: 1;
}

.detail-info h2 {
    margin: 0 0 10px;
    color: #2e7d32;
}

.detail-info p.price {
    color: #c62828;
    font-size: 26px;
    font-weight: bold;
    margin: 5px 0;
}

.product-description {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.product-description h3 {
    color: black;
    margin-bottom: 10px;
    font-size: 24px;
}

.product-description {
    font-size: 18px;
}

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

input[type=number] {
    -moz-appearance: textfield;
}

input[type=number] {
    padding: 5px;
    border: 1px solid #a5d6a7;
    border-radius: 5px;
    background-color: #e3f2fd;
    ;
    color: #2e7d32;
}

button {
    font-size: 16px;
    cursor: pointer;
}

button[type="button"] {
    padding: 5px 10px;
    background-color: #a5d6a7;
    color: #1b5e20;
    border: none;
    border-radius: 4px;
    transition: background-color 0.2s;
}

button[type="button"]:hover {
    background-color: #81c784;
}

.purchase-buttons form button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.purchase-buttons form:first-child button {
    background-color: #43a047;
    color: white;
}

.purchase-buttons form:first-child button:hover {
    background-color: #388e3c;
}

.purchase-buttons form:last-child button {
    background-color: #66bb6a;
    color: white;
}

.purchase-buttons form:last-child button:hover {
    background-color: #4caf50;
}
.offer-info, .store-info {
    margin-top: 25px;
    padding: 15px 20px;
    border: 1px solid #a5d6a7;
    border-radius: 16px;
    background-color: #e8f5e9;
    max-width: 650px; /* Giảm kích thước khung */
    font-size: 18px;   /* Thu nhỏ chữ */
}

.offer-info h4, .store-info h4 {
    color: #2e7d32;
    margin-bottom: 10px;
    text-align: center;
    font-size: 22px;
    padding-bottom: 5px;
    border-bottom: 1px solid #a5d6a7;
}

.offer-info ul {
    list-style: disc;
    margin-left: 20px;
    padding-left: 0;
    color: #33691e;
}

.store-info p {
    margin: 3px 0;
    color: #33691e;
}

.info-muted {
    font-size: 12px;
    color: #777; /* màu xám mờ */
}

.stock-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: bold;
    background-color: #e0f2f1;
    color: green;
    border: 1px solid #a5d6a7;
}

.stock-badge.out {
    background-color: #ffebee;
    color: red;
    border: 1px solid #ef9a9a;
}

.stock-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 5px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc; /* Đường kẻ dưới */
}

.news-section {
    padding: 30px;
    background-color: #f9f9f9;
    text-align: center;
    background: #e3f2fd;
    ;
}

.news-title {
    font-size: 28px;
    margin-bottom: 20px;
    color: #222;
}

.news-carousel {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.news-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    padding: 10px;
    justify-items: center;
    align-items: center;
}

.news-card {
    width: 100%;
    height: 320px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}

.news-card:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    mix-blend-mode: multiply;
    padding: 10px;
}

.news-card h3 {
    font-size: 18px;
    color: #1c3d5a;
    margin: 10px;
    text-align: center;
    min-height: 80px;
    /*line-height: 1.3;*/
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    text-align: center;

    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 50px; /* hoặc 2 * line-height */
}

/*.news-card p {
    margin: 0 10px 10px;
    font-size: 14px;
    color: #3d5a80;
}*/

.news-card p {
    margin-bottom: 25px; /* ĐẨY phần tử xuống cuối */
    font-size: 14px;
    color: #ef5350;
    font-weight: bold; /* Thêm in đậm */
}

/* Pagination buttons */
.news-pagination {
    margin-top: 20px;
}

.news-page-btn {
    padding: 8px 16px;
    margin: 0 5px;
    background-color: #ddd;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

.news-page-btn.active {
    background-color: #333;
    color: white;
}

/* ========== Responsive: Tablet (≤768px) ========== */
@media (max-width: 768px) {
    .detail-container {
        padding: 20px 15px;
    }

    .product-top {
        flex-direction: column;
        align-items: center;
    }

    .detail-image {
        width: 100%;
        max-width: 100%;
    }

    .detail-info h2 {
        font-size: 22px;
        text-align: center;
    }

    .detail-info p.price {
        font-size: 22px;
        text-align: center;
    }

    .offer-info,
    .store-info {
        max-width: 100%;
        font-size: 16px;
    }

    .offer-info h4,
    .store-info h4 {
        font-size: 20px;
    }

    .purchase-buttons {
        text-align: center;
    }

    .purchase-buttons form {
        margin-bottom: 15px;
    }

    .news-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .news-card {
        height: auto;
    }

    .news-card img {
        height: 160px;
    }

    .news-card h3 {
        font-size: 16px;
    }

    .news-card p {
        font-size: 13px;
    }
}

/* ========== Responsive: Mobile (≤480px) ========== */
@media (max-width: 480px) {
    .detail-container {
        padding: 15px 10px;
        margin: 20px auto;
    }

    .detail-info h2 {
        font-size: 20px;
    }

    .detail-info p.price {
        font-size: 20px;
    }

    .product-description h3 {
        font-size: 20px;
    }

    .product-description {
        font-size: 16px;
    }

    .thumbnail {
        width: 90px;
        height: 90px;
    }

    input[type=number] {
        width: 100%;
    }

    .purchase-buttons form button {
        width: 100%;
    }

    .offer-info,
    .store-info {
        padding: 12px;
        font-size: 15px;
    }

    .offer-info h4,
    .store-info h4 {
        font-size: 18px;
    }

    .stock-wrapper {
        justify-content: center;
    }

    .news-title {
        font-size: 22px;
    }

    .news-items {
        grid-template-columns: 1fr;
    }

    .news-card {
        width: 100%;
    }

    .news-card img {
        height: 140px;
    }

    .news-card h3 {
        font-size: 15px;
    }

    .news-card p {
        font-size: 13px;
    }

    .news-page-btn {
        padding: 6px 12px;
        font-size: 14px;
    }
}
