/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--card-bg);
    position: relative;
    margin: 5% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 16px;
    border: 1px solid rgba(21, 215, 171, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease;
    overflow: hidden;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 32px;
    font-weight: bold;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px;
}

.modal-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(21, 215, 171, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.modal-image:hover img {
    transform: scale(1.05);
}

.modal-info h2 {
    font-size: 32px;
    margin-bottom: 15px;
    color: var(--text-main);
}

.modal-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.stars {
    color: #ffd700;
    font-size: 18px;
    letter-spacing: 2px;
}

.rating-count {
    color: var(--text-soft);
    font-size: 14px;
}

.modal-price {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-price .price-current {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.modal-price .price-original {
    font-size: 18px;
    text-decoration: line-through;
    color: var(--text-soft);
}

.modal-description {
    color: var(--text-soft);
    font-size: 16px;
    margin-bottom: 30px;
    line-height: 1.6;
}

.modal-specs {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(21, 215, 171, 0.05);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
}

.modal-specs h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: var(--primary);
}

.modal-specs ul {
    list-style: none;
}

.modal-specs li {
    padding: 8px 0;
    color: var(--text-soft);
    border-bottom: 1px solid rgba(21, 215, 171, 0.1);
    font-size: 14px;
}

.modal-specs li:last-child {
    border-bottom: none;
}

.modal-quantity {
    margin-bottom: 25px;
}

.modal-quantity label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-main);
    font-weight: 600;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(21, 215, 171, 0.05);
    border: 1px solid rgba(21, 215, 171, 0.2);
    border-radius: 8px;
    padding: 10px;
    width: fit-content;
}

.quantity-selector button {
    background: var(--primary);
    color: var(--bg-main);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.quantity-selector button:hover {
    background: #0da878;
    transform: scale(1.1);
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 16px;
    font-weight: 600;
}

.quantity-selector input:focus {
    outline: none;
}

.modal-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-actions .btn {
    padding: 14px 20px;
}

.modal-guarantee {
    padding: 15px;
    background: rgba(21, 215, 171, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(21, 215, 171, 0.2);
}

.modal-guarantee p {
    color: var(--text-soft);
    font-size: 13px;
    margin: 8px 0;
}

.modal-guarantee p::before {
    content: '✓ ';
    color: var(--primary);
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20% auto;
    }

    .modal-body {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 25px;
    }

    .modal-image {
        min-height: 300px;
    }

    .modal-info h2 {
        font-size: 24px;
    }

    .modal-price .price-current {
        font-size: 28px;
    }

    .modal-actions {
        grid-template-columns: 1fr;
    }

    .modal-close {
        right: 15px;
        top: 15px;
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .modal-body {
        padding: 15px;
        gap: 15px;
    }

    .modal-info h2 {
        font-size: 20px;
    }

    .modal-price .price-current {
        font-size: 24px;
    }

    .modal-specs {
        padding: 15px;
    }
}