/* ============================================
   TIANGUERO.COM — Estilos principales
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:      #C0470A;
    --primary-dark: #9A3808;
    --secondary:    #2C3E50;
    --bg:           #FAFAF8;
    --bg-card:      #FFFFFF;
    --text:         #1A1A1A;
    --text-muted:   #666666;
    --border:       #E5E5E5;
    --radius:       8px;
    --shadow:       0 2px 8px rgba(0,0,0,0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    font-size: 16px;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* ---- HEADER ---- */
.site-header {
    background: var(--secondary);
    color: #fff;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.logo:hover { text-decoration: none; opacity: 0.9; }
.logo-icon { font-size: 1.5rem; }

.main-nav { display: flex; gap: 24px; }
.main-nav a {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
    transition: color 0.2s;
}
.main-nav a:hover { color: #fff; text-decoration: none; }

/* ---- HERO ---- */
.hero {
    background: var(--primary);
    color: #fff;
    padding: 48px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.05rem;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0.92;
}

/* ---- SECCIÓN GENERAL ---- */
.section {
    padding: 40px 0;
}

.section-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary);
    display: inline-block;
}

/* ---- GRID DE TIANGUIS ---- */
.tianguis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.tianguis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.tianguis-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}

.card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: #eee;
}

.card-img-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f5a742, #c0470a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.card-body { padding: 16px; }

.card-ciudad {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.card-nombre {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 6px;
    line-height: 1.3;
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.cat-tag {
    background: #f0f0f0;
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    width: 100%;
}

.btn-primary:hover {
    background: var(--primary-dark);
    text-decoration: none;
    color: #fff;
}

/* ---- TEXTO SEO ---- */
.seo-text {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 40px;
}

.seo-text h2 {
    font-size: 1.25rem;
    color: var(--secondary);
    margin-bottom: 12px;
}

.seo-text p { 
    color: var(--text-muted); 
    margin-bottom: 12px; 
    font-size: 0.95rem;
}

/* ---- FOOTER ---- */
.site-footer {
    background: var(--secondary);
    color: rgba(255,255,255,0.75);
    padding: 32px 0;
    margin-top: 60px;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    margin-bottom: 24px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.footer-col a {
    display: block;
    color: rgba(255,255,255,0.7);
    margin-bottom: 6px;
    font-size: 0.88rem;
}

.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.85rem;
}

/* ---- ESTADO VACÍO ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }

/* ---- RESPONSIVO ---- */
@media (max-width: 600px) {
    .main-nav { gap: 14px; }
    .main-nav a { font-size: 0.85rem; }
    .hero { padding: 32px 0 28px; }
    .section { padding: 28px 0; }
    .tianguis-grid { grid-template-columns: 1fr; }
    .seo-text { padding: 20px; }
}