body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #fafbfc;
    color: #1a1a1a;
}

.main-product-layout {
    max-width: 1300px;
    margin: 35px auto 40px auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.mid{
    color: #4D403D;
}
/* Khối thông tin chính */
.product-main-info {
    display: flex;
    gap: 36px;
    padding: 32px 36px;
    border-radius: 18px;
    background: #fff;
    align-items: flex-start;
}

.product-img-block {
    min-width: 320px;
    max-width: 350px;
    width: 350px;
    aspect-ratio: 1/1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9fa;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 18px 0 rgba(198, 40, 40, 0.08);
}
.product-img-block img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.product-info-block {
    flex: 1;
}

.product-title {
    font-size: 2rem;
    font-weight: 900;
    margin-bottom: 10px;
    color: #b71c1c;
}

.product-desc {
    font-size: 1.05rem;
    color: #555;
    margin-bottom: 8px;
}

.product-rating-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.product-stars {
    color: #FFC700;
    font-size: 18px;
}
.product-rating-count {
    font-size: 13px;
    color: #999;
}

.product-price {
    font-size: 1.7rem;
    font-weight: bold;
    color: #d32f2f;
    margin-bottom: 15px;
    margin-top: 3px;
}

.product-attrs {
    list-style: none;
    font-size: 1rem;
    margin: 0 0 18px 0;
    padding: 0;
}
.product-attrs li {
    margin-bottom: 3px;
}

.product-variants {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.variant-block {
    display: flex;
    align-items: center;
    gap: 10px;
}
.variant-block span {
    min-width: 74px;
    font-weight: 500;
}
.variant-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.variant-item {
    padding: 8px 15px;
    border: 2px solid #e4e4e4;
    border-radius: 8px;
    background: #fafafa;
    cursor: pointer;
    transition: all .22s;
    font-size: 1rem;
    font-weight: 500;
    color: #222;
    margin-right: 3px;
}
.variant-item.active, .variant-item:hover {
    background: #fdeaea;
    border-color: #d32f2f;
    color: #b71c1c;
}
.quantity-box {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 0;
    margin-top: 2px;
}
.qty-btn {
    width: 34px;
    height: 34px;
    font-size: 19px;
    font-weight: bold;
    border: 1.5px solid #d7d7d7;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    transition: background .22s;
    color: #b71c1c;
}
.qty-btn:hover {
    background: #fdeaea;
}
#inputQuantity {
    width: 48px;
    height: 32px;
    text-align: center;
    border: 1.5px solid #ccc;
    border-radius: 6px;
    background: #fff;
    font-size: 17px;
    font-weight: 600;
}
.stock-info {
    font-size: 13px;
    color: #777;
    margin-left: 10px;
}

.action-buttons {
    margin-top: 26px;
    display: flex;
    gap: 18px;
}
.action-buttons .btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: bold;
    color: #fff;
    background: #b71c1c;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    transition: background .28s;
}
.action-buttons .btn:hover {
    background: #921b1b;
}
.action-buttons .btn.buy-now {
    background: #f56c00;
}
.action-buttons .btn.buy-now:hover {
    background: #d67b00;
}

/* ===== Feedback Section - Gen Z style ===== */
.product-feedback-section {
    background: #f7faff;
    border-radius: 18px;
    padding: 30px 36px 38px 36px;
    margin-top: 5px;
    box-shadow: 0 4px 18px 0 rgba(42, 66, 143, 0.07);
}

/* Tổng hợp và filter */
.feedback-summary-bar {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 18px;
}
.star-bar {
    color: #FFC700;
    font-size: 1.3rem;
}
.rating-count {
    font-size: 1rem;
    color: #888;
}
.feedback-filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 6px;
    border: 1.5px solid #e2e4e8;
    background: #fff;
    color: #b71c1c;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .18s;
}
.filter-btn.active,
.filter-btn:hover {
    background: #fdeaea;
    border-color: #c62828;
}

/* List feedback - mỗi feedback là 1 khối đẹp */
/* SỬA Ở ĐÂY: DÙNG GRID ĐỂ BÌNH LUẬN + ẢNH LUÔN DƯỚI USER */
.feedback-list {
    display: flex;
    flex-direction: column;
    gap: 26px;
    margin-top: 12px;
}
.review-item {
    display: grid;
    grid-template-columns: min-content 1fr;
    grid-template-rows: min-content min-content;
    grid-template-areas:
        "user-info feedback-content"
        "user-info feedback-imgs";
    align-items: flex-start;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 14px 0 rgba(210, 72, 72, 0.08);
    padding: 22px 28px 20px 22px;
    gap: 4px 22px;
    border-left: 5px solid #e4eaf6;
    margin-bottom: 12px;
    position: relative;
    transition: box-shadow 0.2s, border-color 0.18s;
}
.review-item:hover {
    box-shadow: 0 6px 32px 0 rgba(210, 72, 72, 0.17);
    border-left: 5px solid #d32f2f;
}
.review-item .user-info          {
    grid-area: user-info;
}
.review-item .feedback-content   {
    grid-area: feedback-content;
}
.review-item .feedback-imgs      {
    grid-area: feedback-imgs;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 0px;
}
.user-info .avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    background: #f7f7f7;
    border: 2px solid #f1f1f4;
    box-shadow: 0 2px 8px #eee;
    margin-right: 10px;
}
.user-info > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-info b {
    color: #1b2237;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}
.user-info .stars {
    color: #FFC700;
    font-size: 1.18rem;
    display: flex;
    align-items: center;
    gap: 2px;
}
.feedback-time {
    font-size: 0.99rem;
    color: #7c7c8b;
    font-weight: 400;
    font-style: italic;
    margin-top: 1px;
    margin-left: 0;
}

.feedback-content {
    color: #232323;
    font-size: 1.10rem;
    margin-bottom: 6px;
    margin-top: 2px;
    line-height: 1.6;
    word-break: break-word;
    margin-left: 0 !important;
}
.feedback-imgs {
    margin-top: 5px;
    display: flex;
    gap: 9px;
    margin-left: 0 !important;
}
.feedback-imgs img {
    max-width: 130px;
    max-height: 90px;
    border-radius: 8px;
    border: 1px solid #f1eaea;
    object-fit: cover;
    box-shadow: 0 2px 8px #f6f6fa;
}

/* ---- Related products ---- */
.related-products-section {
    background: #fff7f7;
    border-radius: 18px;
    padding: 24px 36px 26px 36px;
    box-shadow: 0 4px 18px 0 rgba(226, 58, 58, 0.05);
}
.related-products-list {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
    margin-top: 8px;
}
.related-product-card {
    width: 210px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 9px 0 rgba(226, 66, 66, 0.08);
    overflow: hidden;
    transition: transform .22s;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 10px 15px 10px;
}
.related-product-card:hover {
    transform: translateY(-6px) scale(1.04);
}
.related-product-img {
    width: 100%;
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
    margin-bottom: 11px;
}
.related-product-name {
    font-weight: 700;
    color: #b71c1c;
    text-decoration: none;
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
    text-align: center;
}
.related-product-price {
    font-size: 1.07rem;
    font-weight: 700;
    color: #d32f2f;
    text-align: center;
}
.toast-notify {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 300px;
    max-width: 90vw;
    padding: 16px 28px 16px 18px;
    display: flex;
    align-items: center;
    z-index: 2000;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 500;
    box-shadow: 0 8px 24px 0 rgba(0,0,0,0.13);
    transition: all .25s;
    opacity: 0.96;
}
.toast-notify.success {
    background: #eafbee;
    color: #17a675;
    border: 1.5px solid #17a675;
}
.toast-notify.error {
    background: #fff0f3;
    color: #e14556;
    border: 1.5px solid #e14556;
}
.toast-notify.info {
    background: #eaf6fb;
    color: #2894d1;
    border: 1.5px solid #2894d1;
}
.toast-notify i {
    font-size: 1.6rem;
    margin-right: 14px;
    display: inline-block;
}

/* Shadow helper */
.shadow {
    box-shadow: 0 4px 24px 0 rgba(42,66,143,0.06);
}

/* --- SLIDER --- */
.product-slider {
    position: relative;
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 16px;
    background: #f9f9fa;
}

.product-slider .slide {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

.product-slider .slide.active {
    opacity: 1;
}

.slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.slider-dots .dot {
    width: 12px;
    height: 12px;
    background: #ddd;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
}

.slider-dots .dot.active {
    background: #b71c1c;
}

.size-guide-block {
    margin-top: 25px;
    padding: 15px 20px;
    background: #f8f8f8;
    border-radius: 12px;
    border: 1px solid #ddd;
}

.size-guide-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.size-guide-desc {
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}

.size-guide-list {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
    color: #444;
    font-size: 14px;
}

.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
}

.size-guide-table th,
.size-guide-table td {
    border: 1px solid #ccc;
    padding: 8px;
    font-size: 14px;
}

.size-guide-table th {
    background-color: #e9e9e9;
}

.product-description-block {
    margin-top: 30px;
    background: #fff;
    border-radius: 16px;
    padding: 25px 30px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    line-height: 1.7;
    color: #333;
}

.desc-title {
    font-size: 20px;
    font-weight: 700;
    color: #b71c1c;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.brand-intro {
    background: #fff7f6;
    padding: 15px 18px;
    border-left: 4px solid #b71c1c;
    border-radius: 8px;
    margin-bottom: 20px;
}

.brand-intro p {
    margin: 0 0 8px;
    font-size: 15px;
}

.desc-section {
    margin-bottom: 18px;
}

.desc-section h4 {
    font-size: 16px;
    color: #444;
    margin-bottom: 8px;
    font-weight: 600;
}

.desc-section ul {
    list-style-type: "• ";
    padding-left: 20px;
    margin: 0;
}

.desc-section ul li {
    margin-bottom: 6px;
    font-size: 14.5px;
}

.desc-section.highlight {
    background-color: #fff3cd;
    border-radius: 10px;
    padding: 12px 15px;
    color: #856404;
    font-weight: 500;
    text-align: center;
}

/* Responsive cho feedback */
@media screen and (max-width: 900px) {
    .main-product-layout {
        max-width: 98vw;
    }
    .product-main-info, .product-feedback-section, .related-products-section {
        padding: 20px 6vw;
    }
    .product-img-block {
        min-width: 220px;
        max-width: 270px;
        width: 100%;
        aspect-ratio: 1/1;
    }
}
@media screen and (max-width: 700px) {
    .main-product-layout {
        gap: 18px;
    }
    .product-main-info {
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }
    .product-img-block {
        margin: 0 auto 14px auto;
    }
    .product-info-block {
        width: 100%;
    }
    .related-products-list {
        gap: 10px;
    }
    .related-product-card {
        width: 42vw;
        min-width: 110px;
    }
    /* Responsive cho feedback-list */
    .review-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "user-info"
            "feedback-content"
            "feedback-imgs";
        padding: 13px 7vw 13px 7vw;
        gap: 8px 0;
    }
}
/* ==================== RESPONSIVE CẢI TIẾN ==================== */

/* Tablet nhỏ & Mobile lớn */
@media (max-width: 900px) {
    .main-product-layout {
        width: 94%;
        margin: 25px auto;
        gap: 24px;
    }

    .product-main-info, 
    .product-feedback-section, 
    .related-products-section {
        padding: 20px;
    }

    .product-img-block {
        min-width: 240px;
        max-width: 300px;
        width: 100%;
        margin: 0 auto;
    }

    .product-title {
        font-size: 1.7rem;
        text-align: center;
    }

    .product-desc {
        font-size: 0.98rem;
        text-align: center;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-buttons .btn {
        width: 90%;
        text-align: center;
    }

    .variant-list {
        justify-content: flex-start;
        gap: 8px;
    }

    .product-feedback-section {
        padding: 25px 5vw;
    }
}

/* Mobile (<700px) */
@media (max-width: 700px) {
    .product-main-info {
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .product-img-block {
        width: 85%;
        max-width: 300px;
        margin-bottom: 10px;
    }

    .product-info-block {
        width: 100%;
        text-align: center;
    }

    .variant-block {
        flex-direction: column;
        align-items: center;
    }

    .variant-block span {
        margin-bottom: 5px;
    }

    .quantity-box {
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
    }

    .feedback-summary-bar {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feedback-filter-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .review-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "user-info"
            "feedback-content"
            "feedback-imgs";
        padding: 15px 5vw;
        gap: 8px 0;
    }

    .user-info {
        justify-content: center;
        text-align: center;
    }

    .user-info .avatar {
        margin: 0 auto 5px auto;
    }

    .feedback-imgs {
        justify-content: center;
        flex-wrap: wrap;
    }

    .related-products-list {
        justify-content: center;
        gap: 12px;
    }

    .related-product-card {
        width: 46%;
        min-width: 150px;
    }

    .product-description-block {
        padding: 20px 5vw;
        text-align: justify;
    }

    .desc-title {
        justify-content: center;
        font-size: 1.2rem;
    }
}

/* Mobile nhỏ hơn 480px */
@media (max-width: 480px) {
    .product-title {
        font-size: 1.4rem;
    }

    .product-price {
        font-size: 1.4rem;
    }

    .variant-item {
        font-size: 0.9rem;
        padding: 6px 12px;
    }

    .action-buttons .btn {
        padding: 10px 0;
        font-size: 14px;
    }

    .feedback-content {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .related-product-card {
        width: 90%;
    }
}

/* Tablet nhỏ & mobile ngang */
@media (max-width: 900px) {
    .size-guide-block {
        padding: 15px;
    }
    .size-guide-title {
        font-size: 1.15rem;
        justify-content: center;
    }
}

/* Mobile dọc <700px */
@media (max-width: 700px) {
    .size-guide-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        border: none;
    }

    .size-guide-table table {
        width: 700px; /* đảm bảo không vỡ hàng khi scroll ngang */
    }

    .size-guide-table th,
    .size-guide-table td {
        padding: 8px;
        font-size: 0.9rem;
    }

    .size-guide-note {
        font-size: 0.85rem;
        text-align: left;
        margin-top: 8px;
    }
}

/* Mobile nhỏ <480px */
@media (max-width: 480px) {
    .size-guide-block {
        padding: 10px;
    }
    .size-guide-title {
        font-size: 1rem;
    }
    .size-guide-table td,
    .size-guide-table th {
        font-size: 0.85rem;
        padding: 6px;
    }
}
