:root {
    --primary: #E50914; /* Ridestone Red */
    --primary-hover: #b8050e;
    --dark: #0a0a0a;
    --darker: #000000;
    --light: #ffffff;
    --gray: #e0e0e0;
    --card-bg: #141414;
    --border: #333333;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--dark);
    color: var(--light);
    line-height: 1.6;
}

.header {
    background-color: var(--darker);
    border-bottom: 4px solid var(--primary);
    padding: 2rem 1rem;
    text-align: center;
    background-image: linear-gradient(90deg, rgba(229,9,20,0.05) 0%, rgba(0,0,0,0) 50%, rgba(229,9,20,0.05) 100%), url('data:image/svg+xml;utf8,<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><rect width="10" height="10" fill="%231a1a1a"/><rect x="10" y="10" width="10" height="10" fill="%231a1a1a"/></svg>'); /* Checkered flag pattern */
}

.logo {
    font-family: 'Oswald', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    color: #ffd700; /* Yellow from Ridestone logo */
    text-transform: uppercase;
}

.logo span {
    color: var(--light);
}

.subtitle {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: var(--gray);
    letter-spacing: 1px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.filters {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
}

#searchInput {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    border-radius: 30px;
    border: 1px solid var(--border);
    background-color: var(--card-bg);
    color: var(--light);
    font-size: 1.1rem;
    outline: none;
    transition: all 0.3s ease;
}

#searchInput:focus {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(229,9,20,0.3);
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5), 0 0 15px rgba(229,9,20,0.2);
    border-color: var(--primary);
}

.card-image-container {
    height: 300px;
    background-color: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding: 1rem;
}

.card-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .card-image {
    transform: scale(1.08) rotate(3deg);
}

.card-badge {
    position: absolute;
    top: 35px;
    left: 17px;
    right: auto;
    background-color: var(--primary);
    color: white;
    font-family: 'Oswald', sans-serif;
    width: 130px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    z-index: 10;
}

.card-badge.right-side {
    left: auto;
    right: 15px;
    top: 15px;
    width: auto;
    height: auto;
    padding: 0.3rem 0.8rem;
    font-size: 1.2rem;
}

.card-badge.agotado {
    background-color: #555;
}

.card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-code {
    font-family: 'Oswald', sans-serif;
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-model {
    font-size: 1.1rem;
    color: var(--light);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-price-row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    margin-top: auto;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.card-price {
    font-family: 'Oswald', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light);
}

.btn-whatsapp {
    background-color: #25D366; /* WhatsApp Green */
    color: white;
    text-decoration: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.2s ease;
    text-align: center;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
}

.btn-mayorista {
    background-color: #ffd700;
    color: #000;
    border: none;
    text-decoration: none;
    padding: 0.6rem 0.6rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.2s ease;
    text-align: center;
}

.btn-mayorista:hover {
    background-color: #e5c100;
    color: #000;
}

.btn-whatsapp.disabled {
    background-color: #555;
    cursor: not-allowed;
    pointer-events: none;
}

.footer {
    background-color: var(--darker);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

.footer a:hover {
    text-decoration: underline;
}

.footer p {
    margin: 0.5rem 0;
    color: var(--gray);
}

@media (max-width: 768px) {
    .logo {
        font-size: 2.2rem;
    }
    .grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    .container {
        padding: 1rem;
    }
}
