:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary: #059669;
    --accent: #f59e0b;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --radius: 8px;
    --max-width: 1200px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

h1, h2, h3, h4 { line-height: 1.3; font-weight: 700; }
h1 { font-size: 2rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }

.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.logo img { height: 40px; width: auto; }

.main-nav { display: flex; align-items: center; }

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-menu > li > a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.nav-menu > li > a:hover { color: var(--primary); }

.has-submenu { position: relative; }

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    list-style: none;
    min-width: 220px;
    z-index: 200;
    padding: 0.5rem 0;
}

.has-submenu:hover .submenu { display: block; }

.submenu li a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.submenu li a:hover { background: var(--bg-alt); color: var(--primary); }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 4px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: 0.3s;
}

.country-selector select {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 0.85rem;
    cursor: pointer;
}

.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 { font-size: 2.5rem; color: white; }
.hero-subtitle { font-size: 1.2rem; opacity: 0.9; max-width: 600px; margin: 1rem auto; }

.hero-cta {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }
.btn-secondary { background: white; color: var(--primary); }
.btn-secondary:hover { background: var(--bg-alt); }
.btn-outline { border: 1px solid var(--border); background: transparent; color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

.section { padding: 3rem 0; }

.page-header {
    background: var(--bg-alt);
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.page-header h1 { margin-bottom: 0.5rem; }
.lead { font-size: 1.1rem; color: var(--text-light); max-width: 700px; }

.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.card:hover { box-shadow: var(--shadow-lg); }

.card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--bg-alt); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 1rem; }

.country-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    color: var(--text);
}

.country-flag { font-size: 2.5rem; margin-bottom: 0.5rem; }
.country-card h3 { font-size: 1rem; }
.country-card p { font-size: 0.85rem; color: var(--text-light); }

.rating { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.rating-lg { color: var(--accent); font-weight: 700; font-size: 1.3rem; }

.tag {
    display: inline-block;
    background: var(--bg-alt);
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.sidebar { position: sticky; top: 80px; }

.widget {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.widget h3 { font-size: 1rem; margin-bottom: 0.75rem; }

.widget ul { list-style: none; }
.widget ul li { padding: 0.4rem 0; border-bottom: 1px solid var(--border); }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { font-size: 0.9rem; color: var(--text); }
.widget ul li a:hover { color: var(--primary); }

.country-links li { padding: 0.4rem 0; }
.country-links li a { display: flex; align-items: center; gap: 0.5rem; }

.breadcrumbs {
    padding: 0.75rem 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    gap: 0;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.breadcrumbs li::after { content: '/'; margin: 0 0.5rem; color: var(--text-light); }
.breadcrumbs li:last-child::after { content: ''; }
.breadcrumbs a { color: var(--primary); }
.breadcrumbs li:last-child span { color: var(--text-light); }

.brand-item { padding: 1.5rem; margin-bottom: 1.5rem; }

.brand-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.brand-logo img { border-radius: var(--radius); }

.brand-header-detail {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.brand-logo-lg { border-radius: var(--radius); }

.highlights {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.highlights li {
    background: #dbeafe;
    color: var(--primary-dark);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

.nutrition-table { margin: 1rem 0; }
.nutrition-table h3 { font-size: 1rem; }

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.table th, .table td {
    padding: 0.6rem 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th { background: var(--bg-alt); font-weight: 600; }
.table-responsive { overflow-x: auto; }

.comparison-table th { white-space: nowrap; }
.comparison-table td { white-space: nowrap; }

.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.product-main-img {
    border-radius: var(--radius);
    background: var(--bg-alt);
    width: 100%;
}

.price-box { margin: 1rem 0; }
.price { font-size: 1.5rem; font-weight: 700; color: var(--secondary); }
.weight { color: var(--text-light); }

.flavor-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.recipe-header { text-align: center; margin-bottom: 2rem; }
.recipe-meta { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; color: var(--text-light); font-size: 0.9rem; }

.recipe-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.recipe-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin: 2rem 0;
}

.ingredients ul {
    list-style: none;
    padding: 0;
}

.ingredients li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.instructions ol { padding-left: 1.5rem; }
.instructions li { padding: 0.75rem 0; line-height: 1.6; }

.nutrition-badges {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nutrition-badge {
    text-align: center;
    padding: 1rem;
    background: var(--bg-alt);
    border-radius: var(--radius);
    min-width: 100px;
}

.nutrition-badge .value { display: block; font-size: 1.3rem; font-weight: 700; color: var(--primary); }
.nutrition-badge .label { display: block; font-size: 0.8rem; color: var(--text-light); }

.faq-section { margin-top: 2rem; }

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    background: var(--bg-alt);
    list-style: none;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { font-size: 1rem; margin: 0; }
.faq-item p { padding: 1rem; }

.prose h2 { margin-top: 2rem; }
.prose h3 { margin-top: 1.5rem; }
.prose p { margin-bottom: 1rem; }
.prose ul, .prose ol { margin: 1rem 0; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.5rem; }
.prose img { border-radius: var(--radius); margin: 1.5rem 0; }
.prose strong { font-weight: 600; }
.prose blockquote { border-left: 4px solid var(--primary); padding-left: 1rem; margin: 1rem 0; color: var(--text-light); }

.post-header { margin-bottom: 2rem; }
.post-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.post-image {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 2rem;
}

.toc {
    padding: 1.25rem;
    margin-bottom: 2rem;
}

.toc h2 { font-size: 1.1rem; }
.toc ol { padding-left: 1.25rem; }
.toc li { padding: 0.3rem 0; }
.toc a { font-size: 0.9rem; }

.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1rem 0; }
.pros h4 { color: var(--secondary); }
.cons h4 { color: #dc2626; }
.pros ul, .cons ul { list-style: none; padding: 0; }
.pros li::before { content: '✓ '; color: var(--secondary); font-weight: 700; }
.cons li::before { content: '✗ '; color: #dc2626; font-weight: 700; }

.brand-analysis { padding: 1.5rem; margin-bottom: 1.5rem; }
.brand-analysis-content { display: flex; gap: 1.5rem; }
.brand-thumb { border-radius: var(--radius); flex-shrink: 0; }

.geo-links { margin-top: 2rem; }
.geo-link-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.search-form { display: flex; gap: 0.5rem; margin: 1.5rem 0; max-width: 600px; }
.search-input { flex: 1; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; }
.results-count { color: var(--text-light); margin-bottom: 1rem; }
.search-result { padding: 1.25rem; margin-bottom: 1rem; }

.error-page { text-align: center; padding: 4rem 0; }
.error-page h1 { font-size: 6rem; color: var(--primary); }
.error-page h2 { color: var(--text-light); }
.error-actions { display: flex; gap: 1rem; justify-content: center; margin: 2rem 0; }
.error-suggestions { margin-top: 2rem; }
.error-suggestions ul { list-style: none; }
.error-suggestions li { padding: 0.4rem 0; }

.text-center { text-align: center; }
.content-narrow { max-width: 800px; margin: 0 auto; }

.blog-categories { display: flex; gap: 0.5rem; margin-bottom: 2rem; flex-wrap: wrap; }

.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.footer-col h3 { color: white; font-size: 1rem; margin-bottom: 1rem; }
.footer-col p { font-size: 0.85rem; line-height: 1.6; }
.footer-col ul { list-style: none; }
.footer-col li { padding: 0.3rem 0; }
.footer-col a { color: #9ca3af; font-size: 0.85rem; }
.footer-col a:hover { color: white; }

.footer-bottom {
    border-top: 1px solid #374151;
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    color: #6b7280;
}

.geo-header { background: linear-gradient(135deg, #059669 0%, #10b981 100%); color: white; }
.geo-header h1 { color: white; }
.geo-header .lead { color: rgba(255,255,255,0.9); }

.sticky { position: sticky; top: 80px; }

.meta { font-size: 0.85rem; color: var(--text-light); }
.brand-name { font-size: 1rem; }
.product-description { margin: 1rem 0; }
.where-to-buy { margin: 1.5rem 0; padding: 1rem; background: var(--bg-alt); border-radius: var(--radius); }

/* Admin styles */
.admin-layout { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: #1e293b; color: white; padding: 1.5rem; }
.admin-sidebar h2 { font-size: 1.2rem; margin-bottom: 1.5rem; }
.admin-sidebar ul { list-style: none; }
.admin-sidebar li a { display: block; padding: 0.6rem 0.8rem; color: #cbd5e1; border-radius: 4px; font-size: 0.9rem; margin-bottom: 0.25rem; }
.admin-sidebar li a:hover, .admin-sidebar li a.active { background: #334155; color: white; }
.admin-main { padding: 2rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.admin-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--bg-alt); padding: 1.5rem; border-radius: var(--radius); text-align: center; }
.stat-card .stat-value { font-size: 2rem; font-weight: 700; color: var(--primary); }
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-light); }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.25rem; font-size: 0.9rem; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-family: var(--font);
}
.form-group textarea { min-height: 200px; resize: vertical; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.75rem; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-alt); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.admin-actions { display: flex; gap: 0.5rem; }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    h1 { font-size: 1.5rem; }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 2.5rem 0; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .product-detail { grid-template-columns: 1fr; }
    .recipe-grid { grid-template-columns: 1fr; }
    .pros-cons { grid-template-columns: 1fr; }
    .brand-analysis-content { flex-direction: column; }
    .footer-grid { grid-template-columns: 1fr; }
    .admin-stats { grid-template-columns: repeat(2, 1fr); }

    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 1rem;
    }
    .nav-menu.active { display: flex; }
    .submenu { position: static; box-shadow: none; border: none; padding-left: 1rem; }
    .has-submenu:hover .submenu { display: block; }
}
