.product-detail-page {
    padding: 32px 0 60px;
    background: var(--my-bg-light);
}

.product-detail-card,
.product-detail-tabs-card,
.related-product-section {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(14, 7, 89, 0.04);
}

.product-detail-card {
    padding: 32px;
    margin-bottom: 24px;
}

.product-gallery-main {
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #fafafa;
}

.gallery-main-item {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.gallery-main-item img,
.gallery-main-item iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 0;
}

.product-gallery-thumb .gallery-thumb-item {
    padding: 0 6px;
}

.product-gallery-thumb img {
    width: 100%;
    height: 90px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
}

.product-gallery-thumb .slick-current img {
    border-color: var(--my-primary);
}

.product-detail-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: var(--my-primary-100);
    color: var(--my-primary);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1;
    width: fit-content;
}

.product-detail-meta-top {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    margin-bottom: 24px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.product-meta-pill,
.product-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    background: #fafafa;
    border: 1px solid #f1f1f1;
    white-space: nowrap;
    flex-shrink: 0;
}

.product-author-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.author-label {
    font-size: 13px;
    color: var(--my-text-gray);
    margin-bottom: 4px;
}

.product-info-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 20px;
}

.product-info-item {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f3f3f3;
}

.product-info-item span {
    color: var(--my-text-gray);
}

.product-info-item strong {
    color: var(--my-secondary);
    text-align: right;
}

.member-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.member-item {
    color: var(--my-primary);
    border-radius: 10px;
    padding: 10px 18px;
}

.product-detail-tabs-card {
    padding: 28px;
    margin-bottom: 24px;
}

.detail-tabs-header {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid #f1f1f1;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.detail-tab-btn {
    border: 0;
    background: #fafafa;
    color: var(--my-secondary);
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
}

.detail-tab-btn.active {
    background: var(--my-primary);
    color: #fff;
}

.detail-tab-content {
    display: none;
}

.detail-tab-content.active {
    display: block;
}

.related-product-section {
    padding: 32px;
}

.detail__product__comment {
    margin-bottom: 36px;
}

.detail__product__comment h5,
.detail__product__comment__form h5 {
    font-size: 24px;
    font-weight: 700;
    color: var(--my-secondary);
    margin-bottom: 20px;
}

.box-detail__product__comment {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.detail__product__comment__user {
    background: #fff;
    border: 1px solid #f1f1f1;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 18px rgba(14, 7, 89, 0.04);
}

.detail__product__comment__user .user {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.detail__product__comment__user .user img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #f3f3f3;
}

.user__name p {
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--my-secondary);
    font-weight: 600;
}

.user__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e11d48;
    font-size: 14px;
}

.rating_empty {
    color: var(--my-text-gray);
    font-style: italic;
}

.detail__product__comment__user .comment p {
    margin-bottom: 0;
    color: #475569;
    line-height: 1.7;
    font-size: 15px;
}

#comment_empty {
    padding: 18px 20px;
    border-radius: 14px;
    background: #fafafa;
    border: 1px dashed #ddd;
    color: var(--my-text-gray);
    margin-bottom: 0;
}

.detail__product__comment__form {
    margin-top: 40px;
    padding: 28px;
    border: 1px solid #f1f1f1;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(14, 7, 89, 0.04);
}

.box-rating {
    margin-bottom: 24px;
}

.box-rating label,
.comment-form-item label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--my-secondary);
    margin-bottom: 10px;
}

.box-show-rating {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 16px;
    border-radius: 14px;
    background: #fafafa;
    border: 1px solid #f1f1f1;
}

.box-show-rating .heart {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e11d48;
}

.box-show-rating p {
    margin-bottom: 0;
    color: var(--my-text-gray);
    font-size: 14px;
}

.rating {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 6px;
}

.rating input {
    display: none;
}

.rating label {
    width: 34px;
    height: 34px;
    cursor: pointer;
    margin-bottom: 0;
    position: relative;
}

.rating label::before {
    content: '\f005';
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 24px;
    color: #d4d4d8;
    transition: all 0.2s ease;
    display: block;
}

.rating input:checked ~ label::before,
.rating label:hover::before,
.rating label:hover ~ label::before {
    font-weight: 900;
    color: #f59e0b;
}
.user__rating,
.box-show-rating .heart,
.product-rating-hearts {
    color: #f59e0b;
}
.comment-form-item textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    resize: vertical;
    outline: none;
    transition: all 0.3s ease;
}

.comment-form-item textarea:focus {
    border-color: var(--my-primary);
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 56, 0.15);
}

#messger_error {
    display: block;
    margin-top: 8px;
    margin-bottom: 12px;
    color: #dc2626;
    font-size: 13px;
}

.comment-form-item button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: var(--my-primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.comment-form-item button:hover {
    background: #e85b2f;
    transform: translateY(-1px);
}

.btn-account {
    padding: 24px;
    border-radius: 18px;
    background: #fafafa;
    border: 1px dashed #ddd;
    text-align: center;
}

.btn-account p {
    margin-bottom: 16px;
    color: var(--my-text-gray);
}

.sign-in a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    background: var(--my-primary);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.sign-in a:hover {
    background: #e85b2f;
    color: #fff;
}

@media (max-width: 767px) {
    .detail__product__comment__form {
        padding: 20px;
    }

    .detail__product__comment__user {
        padding: 16px;
    }

    .detail__product__comment h5,
    .detail__product__comment__form h5 {
        font-size: 20px;
    }

    .box-show-rating {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 991px) {
    .product-detail-card,
    .product-detail-tabs-card,
    .related-product-section {
        padding: 20px;
        border-radius: 18px;
    }

    .product-detail-title {
        font-size: 28px;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .product-detail-page {
        padding: 20px 0 40px;
    }

    .product-author-box,
    .product-info-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .product-detail-title {
        font-size: 24px;
    }

    .detail-tabs-header {
        flex-direction: column;
    }
}

.rating-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
}

.rating-confirm-modal.active {
    display: block;
}

.rating-confirm-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
}

.rating-confirm-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    padding: 32px;
    transform: translate(-50%, -50%);
    box-shadow: 0 24px 60px rgba(14, 7, 89, 0.18);
}

.rating-confirm-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #64748b;
}

.rating-confirm-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 102, 56, 0.1);
    color: var(--my-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
}

.rating-confirm-content h4 {
    font-size: 24px;
    font-weight: 700;
    color: var(--my-secondary);
    text-align: center;
    margin-bottom: 12px;
}

.rating-confirm-content p {
    text-align: center;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 24px;
}

.rating-confirm-info {
    background: #fafafa;
    border: 1px solid #f1f1f1;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 24px;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.confirm-row + .confirm-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #ececec;
}

.confirm-row span {
    color: #64748b;
}

.confirm-row strong {
    color: var(--my-secondary);
    text-align: right;
    word-break: break-word;
}

.rating-confirm-actions {
    display: flex;
    gap: 12px;
}

.btn-cancel-rating,
.btn-submit-rating {
    flex: 1;
    height: 48px;
    border-radius: 12px;
    font-weight: 600;
    border: 0;
}

.btn-cancel-rating {
    background: #f3f4f6;
    color: #475569;
}

.btn-submit-rating {
    background: var(--my-primary);
    color: #fff;
}

@media (max-width: 767px) {
    .rating-confirm-content {
        width: calc(100% - 24px);
        padding: 24px 20px;
    }

    .rating-confirm-actions {
        flex-direction: column;
    }
}