:root {
    --bg-color: #050505;          /* Fondo oficial app */
    --card-bg: rgba(18, 18, 18, 0.85); /* Panel bg app */
    --primary: #2196f3;           /* Highlight oficial */
    --primary-dim: rgba(33, 150, 243, 0.15);
    --secondary: #0056b3;         /* Accent color oficial */
    --text-main: #b0b0b0;         /* Text muted oficial */
    --text-light: #ffffff;        /* Text main oficial */
    --accent: #e74c3c;
    --whatsapp: #25D366;
}

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

body {
    background: linear-gradient(rgba(5, 5, 5, 0.4), rgba(5, 5, 5, 0.6)), url('../assets/bg_gorilla.png') center center fixed;
    background-size: cover;
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Navbar with Glassmorphism */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    background: rgba(11, 12, 16, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    border-bottom: 1px solid rgba(102, 252, 241, 0.2);
}

.logo {
    font-family: 'Anton', sans-serif;
    font-size: 2.2rem;
    font-weight: 400;
    color: var(--text-light);
    letter-spacing: 2px;
    text-transform: uppercase;
    background: linear-gradient(180deg, #ffffff 0%, #a0a0a0 50%, #404040 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(33, 150, 243, 0.3));
    text-shadow: 2px 2px 0px rgba(0,0,0,0.5), 0px 0px 10px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
}

.logo span {
    background: linear-gradient(180deg, var(--primary) 0%, #1565c0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 8px;
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border-radius: 30px;
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-dim);
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-light);
    font-size: 1rem;
    margin-left: 10px;
    width: 280px;
}

.search-bar .material-icons {
    color: var(--secondary);
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 50px 20px;
    background: radial-gradient(circle at 50% 0%, var(--primary-dim) 0%, transparent 70%);
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-light);
    margin-bottom: 10px;
    text-shadow: 0 0 25px rgba(33, 150, 243, 0.4);
    letter-spacing: -1px;
}

.catalog-container {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

/* Category Filters */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.cat-btn {
    background: rgba(18, 18, 22, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-light);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
}

.cat-btn:hover {
    background: rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.5);
    transform: translateY(-2px);
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}

/* Grid System */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.card {
    background: rgba(18, 18, 22, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.07);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s, border-color 0.4s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.6), 0 0 25px rgba(33, 150, 243, 0.2);
    border-color: rgba(33, 150, 243, 0.4);
}

.card-img-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
    background: #1c1c1f; /* Color exacto del fondo de la tarjeta */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.05);
}

.card-img {
    width: 90%;
    height: 90%;
    object-fit: contain;
    background: transparent;
    border-radius: 8px;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card:hover .card-img {
    transform: scale(1.10) translateY(-5px);
    filter: drop-shadow(0 20px 25px rgba(33, 150, 243, 0.3));
}

/* Badges */
.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(5px);
    z-index: 10;
}

.badge-stock { background: rgba(46, 204, 113, 0.9); color: #fff; }
.badge-out { background: rgba(231, 76, 60, 0.9); color: #fff; }
.badge-category { top: 15px; right: 15px; left: auto; background: rgba(0,0,0,0.6); color: var(--primary); border: 1px solid var(--primary); }

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-price {
    font-size: 1.6rem;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.card-bulk-info-wrapper {
    background: rgba(33, 150, 243, 0.05);
    border: 1px solid rgba(33, 150, 243, 0.2);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 15px;
}

.card-bulk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bulk-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bulk-item span {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
}

.bulk-item strong {
    font-size: 0.95rem;
    color: var(--text-light);
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price small {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 400;
}

.spacer { flex: 1; }

.btn-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-wa:hover:not(:disabled) {
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transform: scale(1.02);
}

.btn-wa:disabled {
    background: #444;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.hidden { display: none !important; }

/* Loader */
.loader-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(102, 252, 241, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 15px;
}

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

/* Contact Section */
.contact-section {
    text-align: center;
    padding: 60px 20px;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.contact-section h2 {
    font-size: 2rem;
    color: var(--text-light);
    margin-bottom: 10px;
}

.contact-section p {
    color: var(--text-main);
    margin-bottom: 30px;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 15px;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(255,255,255,0.05);
    width: 280px; /* Ancho fijo para consistencia */
}

.contact-card img {
    width: 35px;
    height: 35px;
}

.contact-card.whatsapp:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    border-color: #25D366;
}

.contact-card.instagram:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(225, 48, 108, 0.3);
    border-color: #E1306C;
}

.contact-card.facebook:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(24, 119, 242, 0.3);
    border-color: #1877F2;
}

.contact-card span small {
    display: block;
    font-weight: 400;
    color: var(--text-main);
    font-size: 0.8rem;
    margin-top: 2px;
    text-align: left;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: auto;
    color: #666;
}

@media (max-width: 768px) {
    .navbar { flex-direction: column; gap: 15px; }
    .search-bar { width: 100%; }
    .search-bar input { width: 100%; }
    .hero-section h1 { font-size: 2.2rem; }
}
