body { padding-top: 100px; background: #fefef7; }
.product-detail-img { border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; }
.product-price { font-size: 1.8rem; color: #6ab04c; font-weight: 700; }
.btn-back { background: #6c757d; color: white; border-radius: 40px; padding: 0.5rem 1.5rem; text-decoration: none; }
.btn-back:hover { background: #5a6268; color: white; }
.related-card { transition: 0.3s; border-radius: 16px; overflow: hidden; background: white; box-shadow: 0 5px 15px rgba(0,0,0,0.05); height: 100%; }
.related-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.related-img { height: 200px; object-fit: cover; width: 100%; }
.related-info { padding: 1rem; }
.related-title { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.5rem; }
.related-title a { color: #2c3e2f; text-decoration: none; }
.related-title a:hover { color: #6ab04c; }
.divider-light { width: 60px; height: 2px; background: #d4e2d4; margin: 20px auto; }
/* Horizontal scroll for related products */
.related-scroll-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; /* mượt trên iOS */
    scrollbar-width: thin; /* thanh cuộn mỏng trên Firefox */
}

.related-scroll-container {
    display: inline-flex;
    gap: 1.5rem;
    padding: 0.5rem 0.25rem 1rem 0.25rem;
}

.related-scroll-item {
    flex: 0 0 auto;
    width: 260px; /* độ rộng mỗi sản phẩm, bạn có thể điều chỉnh */
    white-space: normal; /* cho phép text xuống dòng bên trong */
}

/* Tuỳ chỉnh thanh cuộn (webkit) */
.related-scroll-wrapper::-webkit-scrollbar {
    height: 6px;
}

.related-scroll-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.related-scroll-wrapper::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.related-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Đảm bảo card hiển thị tốt trong item */
.related-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.related-info {
    padding: 0.75rem 0 0.5rem 0;
}

.related-title a {
    text-decoration: none;
    color: #2c3e2f;
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-title a:hover {
    color: #4a7c4c;
}