/* ===================================
   PRODUCT DETAIL MODAL
   =================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.product-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    border-radius: 20px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 2001;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.product-detail-modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--white);
    border-radius: 50%;
    font-size: 24px;
    color: var(--gray-700);
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: var(--gray-100);
    transform: rotate(90deg);
}

.modal-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-50);
    border-radius: 16px;
    padding: 40px;
}

.modal-image-section img {
    max-width: 100%;
    max-height: 500px;
    object-fit: contain;
}

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

.modal-brand {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gray-500);
}

.modal-product-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
    margin: 0;
}

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

.modal-rating .stars {
    color: #ffc107;
    font-size: 1.25rem;
}

.modal-rating .rating-text {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
}

.modal-rating .reviews-count {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.modal-prices {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.modal-price-original {
    font-size: 1.25rem;
    color: var(--gray-500);
    text-decoration: line-through;
}

.modal-price-current {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.modal-discount-badge {
    background: var(--error);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.modal-stock-info {
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: 8px;
    font-size: 0.875rem;
}

.modal-stock-info.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.modal-stock-info.low-stock {
    background: #fff3e0;
    color: #f57c00;
}

.modal-stock-info.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.modal-description {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0;
}

.modal-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.modal-tag {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.modal-tag.tag-new {
    background: #e3f2fd;
    color: #1976d2;
}

.modal-tag.tag-eco {
    background: #e8f5e9;
    color: #388e3c;
}

.modal-tag.tag-offer {
    background: #fff3e0;
    color: #f57c00;
}

.modal-add-to-cart-btn {
    width: 100%;
    padding: 18px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: auto;
}

.modal-add-to-cart-btn:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(224, 117, 82, 0.3);
}

.modal-add-to-cart-btn:disabled,
.modal-add-to-cart-btn.disabled {
    background: var(--gray-300);
    color: var(--gray-500);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .modal-product-name {
        font-size: 1.5rem;
    }

    .modal-price-current {
        font-size: 2rem;
    }

    .modal-image-section {
        padding: 20px;
    }

    .modal-image-section img {
        max-height: 300px;
    }
}