/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    color: var(--white);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image {
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

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

.modal-info {
    padding: 30px;
}

.modal-info h2 {
    font-size: 24px;
    margin-bottom: 10px;
}

.modal-category {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 15px;
}

.modal-price {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.modal-description {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
    color: var(--text-primary);
}

.modal-specs {
    margin-bottom: 25px;
}

.modal-specs h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.modal-specs ul {
    list-style: none;
}

.modal-specs li {
    padding: 5px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.modal-specs li:before {
    content: "•";
    margin-right: 10px;
    color: var(--text-secondary);
}

.modal-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #0086d8;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--background-color);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--white);
    z-index: 3000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2500;
}

.cart-overlay.active {
    display: block;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.cart-header h3 {
    font-size: 18px;
}

.close-cart {
    font-size: 28px;
    cursor: pointer;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-info {
    flex: 1;
}

.cart-item-info h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-info .price {
    font-weight: 600;
    color: var(--text-primary);
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.cart-item-quantity button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

.cart-item-quantity span {
    font-size: 14px;
}

.remove-item {
    color: var(--accent-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-summary span:last-child {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.cart-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.cart-empty i {
    font-size: 48px;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background: var(--white);
    border-top: 1px solid var(--border-color);
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 16px;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--text-primary);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    /* Mostrar botão de busca no mobile */
    .search-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Ajuste da busca flutuante no mobile */
    .search-bar-container.active {
        padding: 10px 15px;
    }
    
    .search-bar-container.active .search-bar {
        max-width: none;
    }
    
    .modal-body {
        grid-template-columns: 1fr;
    }
    
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    padding: 40px;
}

.loading::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.no-results i {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-results h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

