/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 24px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 1;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: rotate(90deg);
}

#modalBody {
    padding: 48px;
}

.product-details {
    padding: 20px 0;
}

/* Override padding for detail page structure */
.products-section .product-details {
    padding: 0;
}

.product-details h2 {
    font-size: 32px;
    color: var(--gray-900);
    margin-bottom: 16px;
}

/* Adjust detail headings */
.product-details h3 {
    font-size: 24px;
    color: var(--primary-green);
    margin: 30px 0 15px;
}

.product-details h3:first-of-type {
    margin-top: 0;
}

/* Adjust detail description text */
.product-details p.product-description {
    font-size: 16px;
    line-height: 1.8;
}

.product-info {
    margin: 32px 0;
}

.product-info h3 {
    font-size: 22px;
    color: var(--primary-green);
    margin: 24px 0 12px;
}

.product-info p {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 16px;
}

.features-list {
    list-style: none;
    padding: 0;
    display: grid;
    gap: 12px;
}

.features-list li {
    padding: 12px 16px;
    background: var(--light-green);
    border-radius: 8px;
    color: var(--gray-900);
    position: relative;
    padding-right: 36px;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    right: 12px;
    color: var(--primary-green);
    font-weight: bold;
}

.product-actions {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    justify-content: center;
}

@media (max-width: 768px) {
    #modalBody {
        padding: 32px 24px;
    }
}