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

body {
    font-family: 'Inter', sans-serif;
    background-color: #fef9f0;
    color: #2c2c2c;
    line-height: 1.5;
}

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

/* Header rediseñado */
header {
    background-color: #6B0F1E;
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Lado izquierdo: logo + texto */
.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo-img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background-color: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.logo-texto h1 {
    font-size: 1.6rem;
    margin-bottom: 5px;
    color: white;
}

.logo-texto p {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Lado derecho: redes sociales + admin */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-icons {
    display: flex;
    gap: 12px;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: white;
    border-radius: 50%;
    color: #6B0F1E;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background-color: #C49A2C;
    color: white;
    transform: translateY(-3px);
}

.admin-btn {
    background-color: #C49A2C;
    color: #6B0F1E;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
}

.admin-btn:hover {
    background-color: #D4AF37;
    transform: scale(1.05);
}

/* Hero / Búsqueda */
.hero {
    background: linear-gradient(135deg, #8B1A1A 0%, #6B0F1E 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 5px 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.search-box i {
    color: #8B1A1A;
    font-size: 1.2rem;
    margin-right: 10px;
}

.search-box input {
    flex: 1;
    padding: 15px 0;
    border: none;
    outline: none;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

/* Secciones */
.section {
    padding: 60px 0;
    border-bottom: 1px solid #e9e0cf;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    color: #6B0F1E;
    margin-bottom: 10px;
}

.section-header i {
    margin-right: 10px;
    color: #C49A2C;
}

/* Grids */
.categorias-grid, .comarcas-grid, .productos-grid, .productores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
}

.categoria-card, .comarca-card, .productor-card {
    background: white;
    padding: 20px 15px;
    text-align: center;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: 0.2s;
    cursor: pointer;
}

.categoria-card i {
    font-size: 2rem;
    color: #C49A2C;
    margin-bottom: 10px;
    display: block;
}

.categoria-card span {
    font-weight: 600;
    color: #5A0E18;
}

.comarca-card {
    text-align: left;
}

.comarca-card i {
    font-size: 1.5rem;
    margin-bottom: 8px;
    color: #8B1A1A;
}

.comarca-card strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: #5A0E18;
}

.comarca-card p {
    font-size: 0.85rem;
    color: #6b6a6a;
}

.productor-card {
    text-align: center;
}

.productor-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    border-radius: 50%;
    background-color: #f0e7d8;
    padding: 15px;
    margin-bottom: 15px;
}

.productor-card h3 {
    font-size: 1.1rem;
    color: #5A0E18;
    margin-bottom: 5px;
}

.productor-card p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 15px;
    word-break: break-all;
}

.categoria-card:hover, .comarca-card:hover, .productor-card:hover, .producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.producto-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    transition: 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.producto-imagen {
    width: 100%;
    height: 150px;
    object-fit: cover;
    background-color: #f0e7d8;
}

.producto-card h3 {
    font-size: 1.1rem;
    padding: 12px 15px 5px;
    color: #5A0E18;
}

.producto-precio {
    color: #8B1A1A;
    font-weight: bold;
    padding: 0 15px;
    font-size: 1.2rem;
}

.btn-ver {
    display: inline-block;
    margin: 12px 15px 20px;
    color: #C49A2C;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: 0.2s;
}

.btn-ver:hover {
    border-bottom-color: #C49A2C;
    color: #8B1A1A;
}

.loading, .empty-msg, .error-msg {
    text-align: center;
    padding: 40px;
    grid-column: 1 / -1;
    color: #666;
}

/* Footer */
footer {
    background-color: #5A0E18;
    color: #d4d9bf;
    text-align: center;
    padding: 40px 0;
    margin-top: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.footer-logo i {
    color: #C49A2C;
}

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

.footer-link {
    color: #d4d9bf;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.footer-link:hover {
    color: #C49A2C;
}

.copyright {
    margin-top: 20px;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 40px 0;
    }
    .section-header h2 {
        font-size: 1.5rem;
    }
    .categorias-grid, .comarcas-grid, .productos-grid, .productores-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    header .container {
        flex-direction: column;
        text-align: center;
    }
    
    .header-left {
        justify-content: center;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .logo-img {
        width: 55px;
        height: 55px;
    }
    
    .logo-texto h1 {
        font-size: 1.3rem;
    }
    
    .hero {
        padding: 40px 0;
    }
}
/* Tarjeta de productor cliqueable */
.productor-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.productor-card-link .productor-card {
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.productor-card-link:hover .productor-card {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.productor-card-link .btn-ver {
    display: inline-block;
    margin-top: 10px;
    border-bottom: 2px solid transparent;
}

.productor-card-link:hover .btn-ver {
    border-bottom-color: #C49A2C;
    color: #8B1A1A;
}