/* Simple Header */
.simple-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.simple-header .header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2c5aa0;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.back-button:hover {
    background-color: #f0f4f8;
    transform: translateX(-3px);
}

.back-button i {
    font-size: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

/* Layout Structure */
.product-detail-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
}

.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    position: relative;
}

.product-main-content {
    flex: 1;
    min-width: 0; /* Prevent overflow */
    max-width: calc(100% - 150px);
    box-sizing: border-box;
}

/* Contact Info Fixed */
.contact-info-fixed {
    width: 320px;
    position: sticky;
    top: 120px;
    align-self: flex-start;
    z-index: 100;
    transition: all 0.3s ease;
}

/* Responsive Styles */
@media (max-width: 1199px) {
    .product-main-content {
        max-width: 100%;
        padding-right: 0;
    }
    
    .contact-info-fixed {
        position: static;
        width: 100%;
        margin-top: 30px;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* Product Gallery Styles */
.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 0;
    position: relative;
    width: 100%;
}

#productMainImage.main-image {
    display: block;
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    margin: 0 auto 20px;
    border-radius: 4px;
    background: #ffffff00;
    padding: 10px;
    box-sizing: border-box;
  
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-image img.zoomed {
    transform: scale(1.6);
    cursor: zoom-out;
    transition: transform 0.3s ease-out;
    z-index: 10;
}

/* Image overlay and zoom button have been removed */

.thumbnail-gallery {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 0.75rem !important;
    overflow-x: auto !important;
    padding: 1rem !important;
    scrollbar-width: thin !important;
    scrollbar-color: #ddd #f5f5f5 !important;
    border: 1px solid #eee !important;
    border-top: none !important;
    background: #f9f9f9 !important;
    margin: 0 !important;
    position: relative !important;
    z-index: 2 !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth !important;
    width: 100% !important;
    box-sizing: border-box !important;
    align-items: center !important;
    height: 120px !important;
    max-width: 100% !important;
    min-width: 100% !important;
    white-space: nowrap !important;
    /* Reset any conflicting styles */
    float: none !important;
    clear: both !important;
    display: -webkit-box !important;
    display: -ms-flexbox !important;
    -ms-flex-wrap: nowrap !important;
    -webkit-box-orient: horizontal !important;
    -webkit-box-direction: normal !important;
    -ms-flex-direction: row !important;
    -webkit-box-align: center !important;
    -ms-flex-align: center !important;
    -ms-flex-line-pack: center !important;
    align-content: center !important;
    -webkit-box-pack: start !important;
    -ms-flex-pack: start !important;
    justify-content: flex-start !important;
}

.thumbnail {
    /* Reset all possible conflicting properties */
    all: unset !important;
    /* Flex properties */
    flex: 0 0 auto !important;
    -webkit-box-flex: 0 !important;
    -ms-flex: 0 0 auto !important;
    /* Display properties */
    display: inline-block !important;
    /* Sizing */
    width: 120px !important;
    height: 80px !important;
    min-width: 120px !important;
    min-height: 80px !important;
    max-width: 120px !important;
    max-height: 80px !important;
    /* Styling */
    border: 2px solid transparent !important;
    border-radius: 0 !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    background: #fff !important;
    /* Prevent any transform from other styles */
    transform: none !important;
    -webkit-transform: none !important;
    -ms-transform: none !important;
    /* Prevent any opacity from other styles */
    opacity: 1 !important;
    /* Box model */
    box-sizing: border-box !important;
    -webkit-box-sizing: border-box !important;
    -moz-box-sizing: border-box !important;
    /* Prevent any float */
    float: none !important;
    clear: none !important;
    /* Prevent any flex grow/shrink */
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    -webkit-box-flex: 0 !important;
    -ms-flex-positive: 0 !important;
    -ms-flex-negative: 0 !important;
    /* Align self */
    align-self: center !important;
    -ms-flex-item-align: center !important;
    -ms-grid-row-align: center !important;
}

.thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.thumbnail.active {
    border-color: #3498db !important;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Các quy tắc cho thumbnail đã được di chuyển lên đầu file */

/* Hide scrollbar for Chrome, Safari and Opera */
.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 3px;
}

/* Ẩn dòng tiêu đề contact trên desktop */
.contact-row:first-child {
    display: none;
}

/* Responsive styles */
@media (max-width: 767.98px) {
    /* Hiển thị lại dòng tiêu đề contact trên mobile */
    .contact-row:first-child {
        display: flex;
    }
    .product-gallery {
        flex-direction: row;
    }
    
    .main-image {
        width: 70%;
        padding-bottom: 52.5%; /* 4:3 aspect ratio for larger screens */
    }
    
    .thumbnail-gallery {
        width: 80px;
        flex-direction: column;
        height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
        padding: 0 0.5rem;
    }
    
    .thumbnail {
        width: 100%;
        height: 60px;
        margin-bottom: 0.5rem;
    }
}

/* Product Info Styles */
.product-info {
    padding: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.product-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.product-price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: 700;
    margin: 1rem 0;
}

.product-price.original-price {
    font-size: 1.2rem;
    color: #7f8c8d;
    text-decoration: line-through;
    margin-right: 0.5rem;
}

.product-discount-price {
    font-size: 1.5rem;
    color: #e74c3c;
    font-weight: 700;
}

.product-meta {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    padding: 0.3rem 0.8rem;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background-color: #f8f9fa;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.badge.status {
    background-color: #f8f9fa;
    color: #27ae60;
    border: 1px solid #27ae60;
}

.badge.status.available {
    background-color: #2ecc71;
    color: #fff;
}

.badge.status.sold {
    background-color: #e74c3c;
    color: #fff;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* Hiển thị 3 cột trên màn hình nhỏ */
@media (max-width: 767px) {
    /* Container chính */
    .product-detail-container {
        padding: 0.5rem;
    }
    
    /* Tiêu đề sản phẩm */
    .product-info h1 {
        font-size: 1.4rem;
        margin: 0.5rem 0;
    }
    
    /* Badge và meta */
    .product-meta {
        margin: 0.5rem 0;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
        margin-right: 0.3rem;
        margin-bottom: 0.3rem;
    }
    
    /* Giá sản phẩm */
    .product-price {
        margin: 0.5rem 0;
    }
    
    .product-price span {
        font-size: 1.2rem;
    }
    
    /* Grid chi tiết sản phẩm */
    .product-details-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 0.5rem;
        padding: 0.5rem 0 !important;
        margin: 0.5rem 0 !important;
        width: 100%;
    }
    
    .detail-item {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0.3rem 0.2rem !important;
        margin: 0;
        min-width: 0;
        min-height: 50px !important;
        width: 100%;
        box-sizing: border-box;
        border-radius: 4px !important;
    }
    
    .detail-icon {
        margin: 0 0 0.1rem 0 !important;
        font-size: 0.7rem !important;
        width: 20px !important;
        height: 20px !important;
    }
    
    .detail-content {
        display: flex;
        flex-direction: column;
        width: 100%;
        align-items: center;
        padding: 0 0.1rem;
    }
    
    .detail-label {
        font-size: 0.6rem !important;
        line-height: 1.1;
        margin-bottom: 0.05rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    .detail-value {
        font-size: 0.7rem !important;
        font-weight: 600;
        line-height: 1.1;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: 100%;
    }
    
    #productAddress {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    #productAddress i {
        display: none;
    }
    
    /* Phần mô tả */
    .product-description {
        padding: 0.5rem 0;
    }
    
    .product-description h3 {
        font-size: 1.1rem;
        margin: 0.5rem 0;
    }
    
    /* Phần thông tin liên hệ */
    .contact-info-card {
        padding: 0.7rem !important;
        margin: 0.5rem 0 !important;
        border-radius: 6px !important;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    }
    
    .contact-info-card h4 {
        font-size: 1rem;
        margin: 0 0 0.8rem 0;
        color: #2c3e50;
        text-align: center;
        padding-bottom: 0.5rem;
        border-bottom: 1px solid #eee;
    }
    
    .contact-header {
        display: flex;
        align-items: center;
        margin-bottom: 0.8rem;
    }
    
    .agent-avatar {
        width: 50px !important;
        height: 50px !important;
        min-width: 50px;
        margin-right: 0.8rem;
        border: 2px solid #f1f1f1;
    }
    
    .agent-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }
    
    .agent-info {
        flex: 1;
    }
    
    .contact-details {
        margin: 0.5rem 0;
        font-size: 0.75rem;
    }
    
    .contact-row {
        display: flex;
        justify-content: space-between;
        margin-bottom: 0.3rem;
    }
    
    .contact-label {
        font-size: 0.6rem;
        color: #7f8c8d;
        text-align: center;
        flex: 1;
        padding: 0 0.2rem;
    }
    
    .contact-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        padding: 0.3rem 0.2rem;
        text-align: center;
        word-break: break-all; /* Cho phép ngắt từ dài */
        overflow-wrap: break-word; /* Ngắt từ dài khi cần */
    }
    
    .contact-item i {
        color: #3498db;
        margin-bottom: 0.3rem;
        font-size: 1rem; /* Kích thước cố định cho tất cả icon */
        width: 1.2rem; /* Chiều rộng cố định */
        height: 1.2rem; /* Chiều cao cố định */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .contact-value,
    .agent-phone,
    .agent-email {
        display: block;
        width: 100%;
        max-width: 100%;
        padding: 0.1rem 0.2rem;
        box-sizing: border-box;
        white-space: normal; /* Cho phép xuống dòng */
        word-break: break-word; /* Ngắt từ dài khi cần */
        line-height: 1.2;
    }
    
    /* Đảm bảo các cột có chiều rộng tối thiểu bằng nhau */
    .contact-row > div {
        flex: 1;
        min-width: 0; /* Đảm bảo flex item co lại đúng cách */
    }
    
    .contact-value, 
    .agent-phone,
    .agent-email {
        font-size: 0.75rem !important;
        font-weight: 500;
        color: #2c3e50 !important;
        display: block !important;
        margin-top: 0.1rem;
        word-break: break-word;
    }
    
    .agent-phone,
    .agent-email {
        color: #3498db !important;
    }
    
    /* Nút liên hệ */
    .contact-actions {
        display: flex;
        justify-content: space-between;
        gap: 0.4rem;
        margin: 0.8rem -0.2rem 0.2rem;
    }
    
    .contact-actions .btn {
        padding: 0.4rem 0.2rem !important;
        font-size: 0.6rem !important;
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.2rem;
        border-radius: 4px !important;
        white-space: nowrap;
        min-height: 32px;
    }
    
    .contact-actions .btn i {
        font-size: 0.65rem !important;
        margin: 0 !important;
    }
    
    .btn-primary {
        background: #e74c3c;
        border-color: #e74c3c;
    }
    
    .btn-secondary {
        background: #3498db;
        border-color: #3498db;
        color: #fff;
    }
    
    .btn-outline {
        background: transparent;
        border: 1px solid #3498db;
        color: #3498db;
    }
}

.detail-item {
    display: flex;
    align-items: center;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    min-height: 60px;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
}

.detail-item.not-available {
    opacity: 0.7;
    background: #f5f5f5;
}

.detail-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    border-radius: 8px;
    margin-right: 12px;
    color: #1976d2;
    flex-shrink: 0;
}

.detail-item.not-available .detail-icon {
    background: #f0f0f0;
    color: #9e9e9e;
}

.detail-content {
    text-align: left;
}

.detail-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.detail-value {
    display: block;
    font-weight: 600;
    color: #1a237e;
    font-size: 1rem;
    line-height: 1.4;
}

.detail-value a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-value a:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.detail-value i {
    font-size: 1rem;
    margin-right: 4px;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .product-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .detail-item {
        padding: 0.6rem;
    }
    
    .detail-icon {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
}

/* Contact Info Card */
.contact-info-card {
    background: #ffffff00;
   
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e000;
}

.contact-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 1rem;
    border: 3px solid #e3f2fd;
    background: #f5f5f5;
    flex-shrink: 0;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-info h4 {
    margin: 0 0 0.25rem;
    color: #1a237e;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-info h4 i {
    color: #1976d2;
}

.agent-position {
    margin: 0;
    color: #616161;
    font-size: 0.9rem;
}

.contact-details {
    margin: 1.5rem 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background-color: #f8f9fa;
}

.contact-item i {
    width: 20px;
    color: #1976d2;
    margin-top: 2px;
    margin-right: 12px;
    font-size: 1.1rem;
    text-align: center;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 2px;
}

.contact-value {
    display: block;
    font-weight: 500;
    color: #1a237e;
    text-decoration: none;
    transition: color 0.2s;
}

a.contact-value:hover {
    color: #0d47a1;
    text-decoration: underline;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn i {
    margin-right: 8px;
    font-size: 1rem;
}

.btn-primary {
    background-color: #1976d2;
    color: white;
}

.btn-primary:hover {
    background-color: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #1976d2;
    color: #1976d2;
}

.btn-outline:hover {
    background-color: rgba(25, 118, 210, 0.05);
    transform: translateY(-2px);
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .contact-header {
        flex-direction: column;
        text-align: center;
    }
    
    .agent-avatar {
        margin: 0 auto 1rem;
    }
    
    .agent-info {
        text-align: center;
    }
    
    .contact-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .btn {
        flex: 1;
        min-width: 120px;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn i {
    margin-right: 0.5rem;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Product Description */
.product-description {
    margin: 2rem 0;
    line-height: 1.7;
    color: #34495e;
}

.product-description h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    font-weight: 600;
}

.product-description p {
    margin-bottom: 1rem;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .product-title {
        font-size: 1.5rem;
    }
    
    .product-price {
        font-size: 1.3rem;
    }
    
    .product-details {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Product Detail Page Styles */
.product-detail-page {
    padding: 40px 0;
    background-color: #f9f9f9;
}

/* Price Styles */
.price {
    color: #e74c3c;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 10px 0;
}

/* Breadcrumb */
.breadcrumb {
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    padding: 15px 0;
    margin: 30px 0 30px 0;
    font-size: 14px;
    color: #495057;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.breadcrumb .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.breadcrumb a {
    color: #2c5aa0;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #1a3e72;
    text-decoration: none;
    transform: translateY(-1px);
}

.breadcrumb > * + *:before {
    content: ">";
    padding: 0 8px;
    color: #6c757d;
}

/* Menu Background */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    padding: 8px 15px !important;
    transition: all 0.3s ease;
}

/* Active Menu Item */
.navbar-nav .nav-link.active {
    color: #fff !important;
    position: relative;
}

.navbar-nav .nav-link.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    right: 15px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/* Hover Effect */
.navbar-nav .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Product Detail Container */
.product-detail-container {
    display: block;
    margin-top: 1rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 15px;
}

.product-gallery {
    width: 100%;
    margin-bottom: 0;
    display: block;
    float: none;
    clear: both;
}

.product-info {
    width: 100%;
    position: relative;
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    clear: both;
}

/* Product Gallery - Styles are defined at the top of the file */

/* Image overlay and zoom button styles have been removed */

.thumbnail-gallery {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #2c5aa0 #f1f1f1;
}

.thumbnail-gallery::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 3px;
}

.thumbnail-gallery::-webkit-scrollbar {
height: 6px;
}

.thumbnail-gallery::-webkit-scrollbar-thumb {
background: #2c5aa0;
border-radius: 3px;
}

.thumbnail {
flex: 0 0 100px;
height: 75px;
border-radius: 0;
overflow: hidden;
cursor: pointer;
border: 1px solid #eee;
transition: all 0.2s ease;
}

.thumbnail:hover, .thumbnail.active {
border-color: #3498db;
}

.thumbnail img {
width: 100%;
height: 100%;
object-fit: cover;
}

/* Product Info */
/* Contact Info Fixed */
.contact-info-fixed {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 320px;
    z-index: 1000;
    transition: all 0.3s ease;
    will-change: transform, opacity;
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 1199px) {
    .contact-info-fixed {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        margin: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    .contact-info-fixed .contact-info-card {
        border-radius: 0;
        margin-bottom: 0;
    }
    
    .contact-info-fixed .contact-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .contact-info-fixed .btn {
        flex: 1;
        min-width: 120px;
        text-align: center;
        padding: 8px 5px;
    }
}

@media (max-width: 576px) {
    .contact-info-fixed .btn {
        min-width: calc(50% - 5px);
    }
    
    .contact-info-fixed .btn i {
        margin-right: 5px;
    }
}

/* Contact Info Card */
.contact-info-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
}

.contact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    margin: 0 auto 20px;
    width: 100%;
    padding: 0 15px;
    min-height: auto;
}

.agent-avatar {
    width: 64px;
    height: 64px;
    min-width: 64px;
    
    overflow: hidden;
    margin: 0 auto 15px;
    border: 2px solid #f5f7fa;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-shrink: 0;
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    min-height: 120px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.agent-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #2c3e50;
}

.agent-position {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.contact-details {
    margin: 1.5rem 0;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #eee;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-item i {
    width: 30px;
    height: 30px;
    background: #f5f7fa;
    
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #3498db;
    font-size: 0.9rem;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.2rem;
}

.contact-value,
.contact-phone,
.contact-email {
    display: inline-block;
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
}

.contact-phone,
.contact-email {
    color: #3498db;
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-actions .btn {
    width: 100%;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .contact-info-fixed {
        position: static;
        width: 100%;
        max-width: 400px;
        margin: 20px auto 0;
    }
}

.product-info {
    flex: 1 1 40%;
    min-width: 300px;
    padding: 30px;
    background: #fff;
}

.product-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 20px;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
   
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.featured {
    background-color: #ffc107;
    color: #000;
}

.badge.status {
    background-color: #28a745;
    color: #fff;
}

.product-id {
    font-size: 13px;
    color: #666;
    margin-left: auto;
}

.product-price {
    margin: 20px 0;
}

.product-price span {
    display: block;
    line-height: 1.3;
}

.product-price #productPrice {
    font-size: 28px;
    font-weight: 700;
    color: #2c5aa0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.product-price .original-price {
    font-size: 20px;
    color: #999;
    text-decoration: line-through;
    font-weight: normal;
}

.product-price .discount-price {
    font-size: 28px;
    color: #e74c3c;
    font-weight: 700;
}

/* Badge for discount */
.discount-badge {
    display: inline-block;
    background-color: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 3px 8px;
   
    margin-left: 10px;
    vertical-align: middle;
}

.price-per-m2 {
    font-size: 14px;
    color: #666;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 25px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-icon {
    width: 36px;
    height: 36px;
    background-color: #f5f7fa;
   
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5aa0;
    flex-shrink: 0;
}

.detail-content {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 12px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-weight: 600;
    color: #333;
    margin-top: 2px;
}

.product-actions {
    display: flex;
    gap: 15px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
   
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background-color: #2c5aa0;
    color: #fff;
}

.btn-primary:hover {
    background-color: #1e4377;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

/* Related Products Section */
.related-products {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #eee;
    background-color: #f9fafb;
    position: relative;
}

.related-products .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.related-products h2 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
    font-weight: 600;
}

.related-products h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #2c5aa0;
    border-radius: 3px;
}

.related-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.related-products .product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    max-height: 450px; /* Giới hạn chiều cao tối đa */
}

.related-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.related-products .card-image {
    position: relative;
    padding-top: 66.67%; /* 3:2 Aspect Ratio */
    overflow: hidden;
    background: #f5f7fa;
}

.related-products .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-products .product-card:hover .card-image img {
    transform: scale(1.03);
}

.related-products .card-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Giảm khoảng cách giữa các phần tử */
}

.related-products .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
    color: #2c3e50;
    line-height: 1.3;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
}

.related-products .card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c5aa0;
    margin-bottom: 0.75rem;
}

.related-products .card-area,
.related-products .card-location {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.related-products .card-area i,
.related-products .card-location i {
    margin-right: 0.5rem;
    color: #2c5aa0;
    width: 16px;
    text-align: center;
}

/* Loading state */
.related-products .loading-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.related-products .spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(44, 90, 160, 0.1);
    border-radius: 50%;
    border-top-color: #2c5aa0;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.related-products .loading-products p {
    color: #2c3e50;
    font-size: 1rem;
    margin-top: 1rem;
}

.related-products .no-products,
.related-products .error-message {
    text-align: center;
    grid-column: 1 / -1;
    padding: 2rem;
    color: #666;
    font-size: 1.1rem;
}

.related-products .error-message {
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .related-products .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related-products .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .related-products h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .related-products .products-grid {
        grid-template-columns: 1fr;
    }
    
    .related-products h2 {
        font-size: 1.4rem;
    }
    
    .related-products .card-title {
        font-size: 1rem;
    }
    
    .related-products .card-price {
        font-size: 1.1rem;
    }
}

.related-products .card-image {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}

.related-products .card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-products .product-card:hover .card-image img {
    transform: scale(1.03);
}

.related-products .card-content {
    padding: 0.8rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Giảm khoảng cách giữa các phần tử */
}

/* Related products cards */
.related-products .product-card {
    width: 380px;
    height: 450px;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
    transition: transform 0.3s ease;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.related-products .product-card .card-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.related-products .product-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.related-products .product-card:hover .card-image img {
    transform: scale(1.05);
}

.related-products .product-card .card-content {
    padding: 0.8rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem; /* Giảm khoảng cách giữa các phần tử */
}

.related-products .product-card .card-title {
    font-size: 1.2rem;
    margin: 0 0 0.3rem;
    color: #2c3e50;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    line-height: 1.4;
    max-height: 2.8em;
}

.related-products .product-card .price-container {
    margin: 0.2rem 0 0.3rem 0;
    line-height: 1.2;
    min-height: auto;
}

.related-products .product-card .card-price,
.related-products .product-card .original-price,
.related-products .product-card .discounted-price {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    display: inline-block;
    margin: 0 0.1rem;
    color: #e74c3c;
    margin: 0;
}

.related-products .product-card .card-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.3rem 0;
    color: #7f8c8d;
    font-size: 0.8rem;
}

.related-products .product-card .card-detail {
    display: flex;
    align-items: center;
    gap: 2px;
}

.related-products .product-card .card-detail i {
    font-size: 0.7rem;
}

.related-products .card {
    width: 250px;
    height: 250px;
    border: none !important;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.related-products .card-img-top {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-products .card-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100px;
}

.related-products .card-title {
    font-size: 0.95rem;
    margin: 0 0 0.3rem;
    color: #2c3e50;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 2.8em;
    line-height: 1.4;
    max-height: 2.8em;
}

.related-products .card-price {
    font-size: 1rem;
    font-weight: 700;
    color: #e74c3c;
    margin: 0;
}

.related-products .card-location {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.related-products .row {
    margin: 0 -8px;
}

.related-products .col-md-3 {
    padding: 0 8px;
    margin-bottom: 16px;
}

.related-products .card-price {
    font-size: 1.25rem;
    color: #2c5aa0;
    font-weight: 700;
    margin: 0.5rem 0;
}

.related-products .card-details {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #7f8c8d;
}

.related-products .card-details span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.related-products .card-location {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.related-products .card-location i {
    color: #e74c3c;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .related-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .related-products {
        padding: 1.5rem 0;
    }
    
    .related-products h2 {
        font-size: 1.5rem;
    }
    
    .related-products .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .related-products .products-grid {
        grid-template-columns: 1fr;
    }
    
    .related-products .product-card {
        max-width: 320px;
        margin: 0 auto;
    }
}

.btn-secondary {
    background-color: #f5f7fa;
    color: #2c5aa0;
    border: 1px solid #d9e1ec;
}

.btn-secondary:hover {
    background-color: #e6eaf0;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-description {
    margin-top: 30px;
}

.product-description h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #222;
    position: relative;
    padding-bottom: 10px;
}

.product-description h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #2c5aa0;
}

.product-description p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 15px;
}

/* Map Section */
.map-section {
    padding: 60px 0;
    background-color: #f9f9f9;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #222;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #2c5aa0;
}

.map-container {
    height: 400px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Contact Info Card */
.contact-info-card {
    background-color: #f9f9f9;
  
    padding: 20px;
    margin: 25px 0;
    border: 1px solid #eee;
}

.contact-info-card h4 {
    margin-top: 0;
    color: #2c5aa0;
    font-size: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info-card h4 i {
    color: #2c5aa0;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.contact-item i {
    width: 20px;
    color: #2c5aa0;
    text-align: center;
}

.contact-item a {
    color: #2c5aa0;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-item a:hover {
    color: #1a3e72;
    text-decoration: underline;
}

/* Product Features */
.product-features {
    margin: 30px 0;
}

.product-features h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #222;
    position: relative;
    padding-bottom: 10px;
}

.product-features h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #2c5aa0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #f5f7fa;
    padding: 10px 15px;
 
    font-size: 14px;
}

.feature-item i {
    color: #2c5aa0;
    font-size: 16px;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
   
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.3s, opacity 0.3s;
}

.share-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.share-button.facebook { background-color: #3b5998; }
.share-button.zalo { background-color: #0068ff; }
.share-button.messenger { background-color: #0084ff; }
.share-button.link { background-color: #666; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-info-card {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Info Card */
.contact-info-card {
    background: #fff;
 
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-top: 2rem;
    border: 1px solid #eaeaea;
}

.contact-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.agent-avatar {
    width: 70px;
    height: 70px;
   
    overflow: hidden;
    margin-right: 1rem;
    border: 3px solid #f5f7fa;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.agent-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agent-info h4 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.agent-info h4 i {
    color: #3498db;
}

.agent-position {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.contact-details {
    margin-bottom: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed #eee;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-item i {
    width: 30px;
    height: 30px;
    background: #f5f7fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: #3498db;
    font-size: 0.9rem;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 0.2rem;
}

.contact-value {
    display: block;
    color: #2c3e50;
    font-weight: 500;
    text-decoration: none;
}

a.contact-value {
    color: #3498db;
    transition: color 0.2s;
}

a.contact-value:hover {
    color: #2980b9;
    text-decoration: underline;
}

.contact-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.contact-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.95rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.contact-actions .btn i {
    margin: 0;
    font-size: 1rem;
}

/* Related Products */
.related-products {
    padding: 60px 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .product-detail-container {
        flex-direction: column;
    }
    
    .product-gallery,
    .product-info {
        flex: 1 1 100%;
    }
    
    .product-details-grid {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .product-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .section-title {
        font-size: 24px;
    }
}
