/* ========================================
   PRODUCT QUICK VIEW MODAL - CAO CẤP
   ======================================== */

/* Modal Overlay - Làm mờ hẳn background */
.product-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
    overflow-y: auto;
}

.product-modal-overlay.active {
    display: flex;
}

/* Modal Container - Chiếm 90% màn hình như showroom */
.product-modal-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    width: 90vw;
    height: 90vh;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Close Button */
.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-close-btn:hover {
    background: #D4AF37;
    transform: rotate(90deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.modal-close-btn svg {
    color: #333;
}

.modal-close-btn:hover svg {
    color: white;
}

/* Content Grid */
.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

/* ========================================
   GALLERY - BÊN TRÁI
   ======================================== */

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Glassmorphism Effect */
.glassmorphism {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ========================================
   IMAGE ZOOM MAGNIFIER - KÍNH LÚP
   ======================================== */

/* Container cho zoom */
.main-image-container {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
}

/* Kính lúp - Vùng hover */
.zoom-lens {
    position: absolute;
    border: 3px solid #D4AF37;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    pointer-events: none;
    display: none;
    z-index: 10;
    background: rgba(212, 175, 55, 0.1);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.5),
                inset 0 0 20px rgba(212, 175, 55, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

/* Khung phóng to - Hiển thị bên phải */
.zoom-result {
    position: absolute;
    top: 0;
    right: -420px;
    width: 400px;
    height: 400px;
    border: 3px solid #D4AF37;
    border-radius: 16px;
    background-repeat: no-repeat;
    display: none;
    z-index: 100;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

/* Hint text khi chưa hover */
.main-image-container::after {
    content: '🔍 Di chuột để phóng to';
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.main-image-container:hover::after {
    opacity: 0;
}

.main-image-container {
    border-radius: 20px;
    padding: 20px;
    overflow: hidden;
}

.main-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 16px;
    transition: transform 0.5s ease;
}

.main-image:hover {
    transform: scale(1.05);
}

/* Thumbnails */
.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.thumbnail {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.thumbnail:hover::after {
    opacity: 1;
}

.thumbnail.active {
    border-color: #D4AF37;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.thumbnail.active::after {
    opacity: 0;
}

.thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.thumbnail:hover img {
    transform: scale(1.1);
}

/* ========================================
   PRODUCT INFO - BÊN PHẢI
   ======================================== */

.modal-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Product Name - Playfair Display */
.product-name {
    font-family: 'Playfair Display', serif;
    font-size: 36px;
    font-weight: 700;
    color: #2C3E50;
    line-height: 1.3;
    margin: 0;
}

/* Product Price */
.product-price {
    font-size: 32px;
    font-weight: 800;
    color: #D4AF37;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Product Description */
.product-description {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Specs Section */
.product-specs {
    background: #F8F9FA;
    border-radius: 16px;
    padding: 24px;
}

.specs-title {
    font-size: 20px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.specs-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.specs-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #555;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.specs-list .icon {
    font-size: 20px;
}

/* Feng Shui Box - Glassmorphism */
.fengshui-box {
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.fengshui-title {
    font-size: 20px;
    font-weight: 700;
    color: #D4AF37;
    margin-bottom: 16px;
    font-family: 'Playfair Display', serif;
}

.fengshui-suitable,
.fengshui-colors,
.fengshui-advice {
    font-size: 14px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 12px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.color-tag {
    display: inline-block;
    background: rgba(212, 175, 55, 0.2);
    color: #D4AF37;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
    margin-top: 4px;
}

/* CTA Buttons */
.cta-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: auto;
}

.btn-zalo,
.btn-fengshui {
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    font-family: 'Be Vietnam Pro', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: none;
    text-decoration: none;
}

.btn-zalo {
    background: linear-gradient(135deg, #D4AF37 0%, #DAA520 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

.btn-zalo:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.6);
}

.btn-fengshui {
    background: white;
    color: #D4AF37;
    border: 2px solid #D4AF37;
}

.btn-fengshui:hover {
    background: #D4AF37;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }

    .main-image {
        height: 300px;
    }

    .product-name {
        font-size: 28px;
    }

    .product-price {
        font-size: 24px;
    }

    .cta-buttons {
        grid-template-columns: 1fr;
    }

    .modal-close-btn {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }

    .thumbnails-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .thumbnail img {
        height: 80px;
    }
}

/* Custom Scrollbar */
.product-modal-container::-webkit-scrollbar {
    width: 8px;
}

.product-modal-container::-webkit-scrollbar-track {
    background: #F5F5F7;
    border-radius: 10px;
}

.product-modal-container::-webkit-scrollbar-thumb {
    background: #D4AF37;
    border-radius: 10px;
}

.product-modal-container::-webkit-scrollbar-thumb:hover {
    background: #C4A484;
}

/* ========================================
   FENG SHUI FORM & RESULT STYLES
   ======================================== */

/* Form nhập năm sinh */
.fengshui-form {
    margin-bottom: 20px;
}

.fengshui-label {
    display: block;
    font-size: 15px;
    color: #555;
    margin-bottom: 12px;
    font-weight: 600;
}

.fengshui-input-group {
    display: flex;
    gap: 12px;
}

.fengshui-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Be Vietnam Pro', sans-serif;
    transition: all 0.3s ease;
}

.fengshui-input:focus {
    outline: none;
    border-color: #D4AF37;
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.1);
}

.btn-analyze {
    padding: 14px 28px;
    background: linear-gradient(135deg, #D4AF37 0%, #DAA520 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Be Vietnam Pro', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-analyze:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.4);
}

/* Kết quả phân tích */
.fengshui-result {
    margin-top: 24px;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.personalized-result {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF5D6 100%);
    border-radius: 16px;
    padding: 24px;
    border: 2px solid rgba(212, 175, 55, 0.3);
}

.result-header h4 {
    font-size: 22px;
    font-weight: 700;
    color: #D4AF37;
    margin: 0 0 20px 0;
    font-family: 'Playfair Display', serif;
    text-align: center;
}

.result-info {
    margin-bottom: 20px;
}

.result-main {
    font-size: 18px;
    color: #2C3E50;
    margin-bottom: 16px;
    line-height: 1.6;
    text-align: center;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.result-advice {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* Grid màu MDF */
.mdf-colors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.mdf-color-card {
    background: white;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.mdf-color-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

.color-icon {
    font-size: 20px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.color-name {
    font-size: 14px;
    font-weight: 700;
    color: #2C3E50;
    font-family: 'Be Vietnam Pro', sans-serif;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.8);
}

/* Text màu sáng cho nền tối */
.mdf-color-card[style*="000080"] .color-name,
.mdf-color-card[style*="2C2C2C"] .color-name,
.mdf-color-card[style*="708090"] .color-name,
.mdf-color-card[style*="722F37"] .color-name,
.mdf-color-card[style*="8B7355"] .color-name,
.mdf-color-card[style*="8B6F47"] .color-name {
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Benefit text */
.result-benefit {
    background: white;
    border-radius: 12px;
    padding: 16px;
    font-size: 16px;
    color: #2C3E50;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-left: 4px solid #D4AF37;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.benefit-icon {
    font-size: 24px;
    flex-shrink: 0;
}

/* CTA trong kết quả */
.result-cta {
    background: linear-gradient(135deg, #D4AF37 0%, #DAA520 100%);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.cta-text {
    color: white;
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    font-family: 'Be Vietnam Pro', sans-serif;
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 768px) {
    .fengshui-input-group {
        flex-direction: column;
    }
    
    .btn-analyze {
        width: 100%;
    }
    
    .mdf-colors-grid {
        grid-template-columns: 1fr;
    }
    
    .result-main {
        font-size: 16px;
    }
    
    .result-header h4 {
        font-size: 20px;
    }
}
