/* Product Detail Page Styles */

/* Product Detail Container */
.product-detail {
    padding: 40px 0;
}

.product-detail-container {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    padding: 40px;
    border: 1px solid #f0f0f0;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Product Image */
.product-detail-image {
    flex: 1;
    min-width: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    transition: transform 0.3s ease;
    cursor: zoom-in;
}

.product-detail-image:hover {
    transform: scale(1.02);
}

.product-detail-image img {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    padding: 20px;
    transition: transform 0.5s ease;
}

.product-detail-image:hover img {
    transform: scale(1.05);
}

/* Product Information */
.product-detail-info {
    flex: 1.5;
    min-width: 300px;
}

.product-detail-title {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 700;
    line-height: 1.2;
}

.product-subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    margin-bottom: 25px;
    font-weight: 500;
}

.product-detail-description {
    color: #444;
    margin-bottom: 30px;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* Product Tags */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
}

.product-tag {
    padding: 8px 16px;
    background: #f1f7ff;
    color: #3498db;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid #e1e8ed;
    transition: all 0.3s ease;
}

.product-tag:hover {
    background: #e1efff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.15);
}

/* Action Buttons */
.product-actions {
    display: flex;
    gap: 15px;
    margin: 30px 0;
}

.action-button {
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    cursor: pointer;
}

.action-button i {
    font-size: 1.2rem;
}

.action-button.whatsapp {
    background: #25D366;
    color: white;
}

.action-button.whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.action-button.inquire {
    background: #3498db;
    color: white;
}

.action-button.inquire:hover {
    background: #2980b9;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

/* Product Details Meta */
.product-detail-meta {
    margin: 30px 0;
    padding: 25px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #edf0f7;
}

.meta-item {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
}

.meta-item:last-child {
    margin-bottom: 0;
}

.meta-label {
    font-weight: 600;
    width: 140px;
    color: #34495e;
    padding-right: 20px;
}

/* Specifications Section */
.product-specifications {
    margin-top: 40px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #f0f0f0;
    animation: fadeIn 1s ease-out;
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.spec-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    color: #2c3e50;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.spec-item {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: #f7f9fc;
    border-radius: 8px;
    border: 1px solid #edf0f7;
    transition: all 0.3s ease;
}

.spec-item:hover {
    background: #eef4ff;
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.1);
}

.spec-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #34495e;
    font-size: 0.95rem;
}

.spec-value {
    color: #3498db;
    font-weight: 500;
}

/* Tabs for Specifications */
.spec-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    gap: 5px;
}

.spec-tab-button {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #7f8c8d;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.spec-tab-button:hover {
    color: #34495e;
}

.spec-tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.spec-tab-content {
    display: none;
}

.spec-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* Related Products */
.related-products {
    margin-top: 60px;
    animation: fadeIn 1.2s ease-out;
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.related-title {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #2c3e50;
    position: relative;
    padding-bottom: 15px;
}

.related-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #3498db;
    border-radius: 2px;
}

.related-products .product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.related-products .product-item {
    border-radius: 12px;
    background: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
    border: 1px solid #f0f0f0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-products .product-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    position: relative;
}

.related-products .product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.related-products .product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-products .product-image-container:hover .product-overlay {
    opacity: 1;
}

.related-products .view-details {
    padding: 10px 20px;
    background: white;
    color: #2c3e50;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.related-products .view-details:hover {
    background: #3498db;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(52, 152, 219, 0.3);
}

.related-products .product-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.related-products .product-title {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #2c3e50;
    font-weight: 600;
}

.related-products .product-description {
    margin-bottom: 15px;
    color: #666;
    line-height: 1.5;
    flex-grow: 1;
}

.related-products .product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: auto;
}

.related-products .product-category,
.related-products .product-package {
    font-size: 0.85rem;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f7ff;
    color: #3498db;
    display: inline-block;
}

/* Image Zoom Overlay */
.image-zoom-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.image-zoom-overlay.active {
    opacity: 1;
    visibility: visible;
}

.zoomed-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.image-zoom-overlay.active .zoomed-image {
    transform: scale(1);
}

.zoom-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zoom-close-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(90deg);
}

/* Inquiry Form Popup */
.inquiry-form-content {
    width: 100%;
    max-width: 500px;
    position: relative;
    padding-top: 40px;
    margin: 10px auto;
    background: white;
    border-radius: 12px;
    overflow-y: auto;
    max-height: 80vh;
    transform: translateY(0);
}

/* Ensure the popup has higher z-index than header */
#inquireFormPopup {
    z-index: 9999 !important;
    display: none;
    align-items: flex-start;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
    padding-top: 50px;
    overflow-y: auto;
    box-sizing: border-box;
}

#inquireFormPopup.active {
    display: flex;
    opacity: 1;
}

.form-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-200);
    border: none;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.form-close-btn:hover {
    background: var(--primary-color);
    color: var(--white);
}

.inquiry-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 500;
    color: #34495e;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 15px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #34495e;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background-color: white;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: space-between;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
    text-align: center;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(41, 128, 185, 0.3);
}

.btn-secondary {
    background: #e0e0e0;
    color: #333;
}

.btn-secondary:hover {
    background: #ccc;
    transform: translateY(-2px);
}

.success-message {
    text-align: center;
    padding: 20px 0;
}

.success-message i {
    font-size: 4rem;
    color: #2ecc71;
    margin-bottom: 15px;
}

.success-message h3 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 10px;
}

.success-message p {
    color: #7f8c8d;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .product-detail-container {
        padding: 30px;
    }
    
    .product-detail-image img {
        max-height: 350px;
    }
    
    .product-detail-title {
        font-size: 2rem;
    }
    
    .action-button {
        padding: 12px 24px;
    }
}

@media (max-width: 768px) {
    .product-detail-container {
        padding: 25px;
        flex-direction: column;
        gap: 30px;
    }
    
    .product-detail-image img {
        max-height: 300px;
    }
    
    .product-detail-title {
        font-size: 1.8rem;
    }
    
    .product-subtitle {
        font-size: 1.1rem;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .meta-item {
        flex-direction: column;
    }
    
    .meta-label {
        width: 100%;
        margin-bottom: 5px;
    }
    
    .product-specifications {
        padding: 20px;
    }
    
    .spec-grid {
        grid-template-columns: 1fr;
    }
    
    .zoom-close-btn {
        top: 10px;
        right: 10px;
    }
    
    .related-products .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
    
    .related-products .product-image-container {
        height: 180px;
    }
    
    .inquiry-form-content {
        width: 90%;
        max-width: 450px;
        padding: 30px 20px;
        padding-top: 50px;
        margin: 0;
        max-height: 85vh;
    }
    
    #inquireFormPopup {
        padding-top: 20px;
    }
}

@media (max-width: 480px) {
    .product-detail-container {
        padding: 20px;
    }
    
    .product-detail-image img {
        max-height: 250px;
    }
    
    .product-detail-title {
        font-size: 1.5rem;
    }
    
    .product-detail-description {
        font-size: 1rem;
    }
    
    .spec-tabs {
        overflow-x: auto;
        padding-bottom: 5px;
    }
    
    .spec-tab-button {
        padding: 8px 15px;
        white-space: nowrap;
    }
    
    .inquiry-form-content {
        width: 95%;
        max-width: 100%;
        padding: 20px;
        padding-top: 50px;
        margin: 0;
        border-radius: 8px;
        max-height: 85vh;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on mobile */
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions button {
        width: 100%;
    }
    
    .confirm-content {
        width: 95%;
        max-height: 85vh;
        overflow-y: auto;
        padding: 20px;
        margin: 20px 0;
    }
    
    /* Improve form position on small screens */
    #inquireFormPopup {
        align-items: flex-start;
        padding: 15px;
        padding-top: 10px;
    }
    
    /* Ensure form is fully visible */
    #inquireFormPopup.active .inquiry-form-content {
        animation: slideUpForm 0.3s forwards;
    }
    
    @keyframes slideUpForm {
        from {
            transform: translateY(50px);
            opacity: 0.5;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
    
    .form-close-btn {
        top: 15px;
        right: 15px;
    }
    
    .confirm-title {
        font-size: 1.3rem;
        margin-top: 5px;
    }
    
    .related-products .product-grid {
        grid-template-columns: 1fr;
    }
    
    .related-title {
        font-size: 1.5rem;
    }
}

/* Small screen inquiry form fixes */
@media screen and (max-width: 800px) {
    /* Make sure popup appears from the top */
    #inquireFormPopup {
        align-items: flex-start !important;
        padding-top: 10px !important;
        overflow-y: auto !important;
    }
    
    /* Adjust form content for smaller screens */
    .inquiry-form-content {
        margin-top: 10px !important;
        margin-bottom: 10px !important;
        width: 95% !important;
        max-width: 450px !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        padding: 40px 15px 15px 15px !important;
    }
    
    /* Reduce padding and margins */
    .inquiry-form {
        gap: 10px !important;
    }
    
    .form-group {
        margin-bottom: 5px !important;
    }
    
    .form-group label {
        margin-bottom: 2px !important;
    }
    
    /* Use smaller text sizes */
    .confirm-title {
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }
    
    /* Adjust buttons for better mobile use */
    .form-actions {
        margin-top: 10px !important;
    }
}

/* Extra small screens like phones in portrait mode */
@media screen and (max-width: 530px) {
    #inquireFormPopup {
        padding-top: 0 !important;
    }
    
    .inquiry-form-content {
        margin-top: 0 !important;
        padding-top: 35px !important;
        max-height: 88vh !important; /* Give more room on very small screens */
    }
    
    /* Optimize for very small screens */
    .form-actions {
        flex-direction: column !important;
        gap: 8px !important;
    }
    
    .btn-primary, 
    .btn-secondary {
        width: 100% !important;
        padding: 10px !important;
    }
    
    /* Make input fields shorter */
    .form-group input {
        padding: 8px !important;
    }
    
    /* Make textarea smaller */
    .form-group textarea {
        height: 80px !important; /* Reduce height on very small screens */
    }
} 