:root {
    --bg-main: #0f172a;
    --bg-secondary: rgba(30, 41, 59, 0.7);
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(148, 163, 184, 0.1);
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(15, 23, 42, 0.65);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background Animado */
.bg-animated {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 15% 50%, rgba(139, 92, 246, 0.15), transparent 25%),
                radial-gradient(circle at 85% 30%, rgba(16, 185, 129, 0.1), transparent 25%);
    animation: bgPulse 15s ease-in-out infinite alternate;
}

@keyframes bgPulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Header Glassmorphism */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    font-size: 0.75rem;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid rgba(139, 92, 246, 0.3);
    color: #c4b5fd;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    -webkit-text-fill-color: #c4b5fd;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

#search-input {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    outline: none;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    width: 250px;
    transition: all 0.3s;
}

#search-input:focus {
    width: 300px;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.btn-loja {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.btn-loja:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(139, 92, 246, 0.4);
}

/* Filtros de Categoria */
.category-filters {
    display: flex;
    gap: 0.8rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
    display: none;
}

.cat-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0.5rem 1.2rem;
    border-radius: 9999px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cat-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Grid de Produtos */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--card-shadow);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.product-card:hover::before {
    left: 150%;
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
}

.img-container {
    width: 100%;
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.5));
    transition: transform 0.4s ease;
}

.product-card:hover .img-container img {
    transform: scale(1.1) rotate(-3deg);
}

.product-cat {
    font-size: 0.75rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 800;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.product-price {
    font-size: 1.4rem;
    font-weight: 800;
    color: #10b981;
}

/* Modal */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.modal.hide {
    opacity: 0;
    pointer-events: none;
}

.modal-glass {
    background: var(--bg-secondary);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    width: 90%;
    max-width: 800px;
    padding: 2rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: scale(1);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal.hide .modal-glass {
    transform: scale(0.9);
}

.close-modal {
    position: absolute;
    top: 1rem; right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 36px; height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex; justify-content: center; align-items: center;
    transition: background 0.2s;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

.modal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.modal-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 2rem;
}

.modal-image-container img {
    max-width: 100%;
    max-height: 300px;
    filter: drop-shadow(0 20px 25px rgba(0,0,0,0.5));
}

.modal-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

#modal-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.2;
}

#modal-cat {
    color: var(--primary);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

#modal-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: #10b981;
}

#modal-desc {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 1.05rem;
}

.btn-comprar-modal {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.4);
}

.btn-comprar-modal:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 20px -3px rgba(16, 185, 129, 0.5);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
    grid-column: 1 / -1;
}

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

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    #search-input {
        width: 100%;
    }
    
    .modal-layout {
        grid-template-columns: 1fr;
    }
    
    .modal-glass {
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Mockup Overlay Text */
.mockup-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mockup-label {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    text-align: center;
    color: white;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8), -1px -1px 3px rgba(0,0,0,0.8);
    pointer-events: none;
    z-index: 10;
    line-height: 1.1;
    font-family: 'Outfit', sans-serif;
}
/* Modo Lista (Excel) */
.catalog-grid.modo-lista {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
}
.catalog-grid.modo-lista .product-card {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: auto;
    border-radius: 4px;
}
.catalog-grid.modo-lista .product-image {
    display: none !important;
}
.catalog-grid.modo-lista .product-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    gap: 15px;
}
.catalog-grid.modo-lista .product-title {
    margin: 0;
    font-size: 13px !important;
    flex: 2;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.catalog-grid.modo-lista .product-price {
    margin: 0;
    font-size: 14px !important;
    flex: 1;
    text-align: right;
    color: #10b981;
}
.catalog-grid.modo-lista .buy-btn {
    padding: 6px 15px !important;
    font-size: 12px !important;
    margin-top: 0 !important;
    flex-shrink: 0;
    width: auto !important;
}
