:root {
    --bg-color: #FDFBF7;
    --card-bg: #FFFFFF;
    --text-color: #362219;
    --coffee-muted: #6E5B50;
    --accent-color: #8C2D19;
    --hover-color: #6E2212;
    --accent-soft: #F4EBE1;
    --border-color: #E8DFD8;
    --shadow-soft: 0 18px 40px rgba(54, 34, 25, 0.08);
    --radius: 24px;
    --radius-sm: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif);
    background:
        radial-gradient(circle at top, rgba(255,255,255,0.8), transparent 35%),
        linear-gradient(180deg, rgba(255,255,255,0.6), rgba(244,235,225,0.45)),
        var(--bg-color);
    color: var(--text-color);
    line-height: 1.55;
    padding-bottom: 90px;
}

/* Si el fondo es oscuro, evitar overlays claros que lo laven */
body.theme-dark {
    background: var(--bg-color) !important;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

.site-header {
    position: static !important;
    top: auto !important;
    z-index: 1;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(54, 34, 25, 0.06);
    box-shadow: none;
    padding: 0.7rem 1rem 0.55rem;
    text-align: center;
}

/* Ajustes para tema oscuro */
body.theme-dark .site-header {
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.site-header-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
}

.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    box-shadow: 0 8px 18px rgba(140, 45, 25, 0.12);
    background: var(--accent-soft);
    margin: 0 auto;
}

.brand-title {
    font-family: var(--font-heading, Georgia, 'Times New Roman', serif);
    font-size: clamp(1.35rem, 2vw, 1.85rem);
    line-height: 1.08;
    color: var(--accent-color);
    letter-spacing: -0.04em;
    font-weight: 700;
}

.site-header-address {
    margin: 0;
    line-height: 1.35;
    font-size: 0.78rem;
    color: var(--coffee-muted);
}

.site-header .address {
    font-size: 0.9rem;
    color: var(--coffee-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 1.25rem 1rem 0;
}

.search-box {
    position: relative;
    margin: 1.35rem 0 1rem;
}

.search-input {
    width: 100%;
    padding: 0.95rem 1.1rem 0.95rem 1rem;
    border: 1px solid rgba(54, 34, 25, 0.08);
    border-radius: 999px;
    font-size: 1rem;
    background: var(--card-bg);
    box-shadow: 0 8px 30px rgba(54, 34, 25, 0.05);
    outline: none;
    transition: all 0.2s ease;
    color: var(--text-color);
}

.search-input::placeholder {
    color: rgba(54, 34, 25, 0.5);
}

body.theme-dark .search-input::placeholder {
    color: rgba(255,255,255,0.55);
}

.search-input:focus {
    border-color: rgba(140, 45, 25, 0.45);
    box-shadow: 0 0 0 4px rgba(140, 45, 25, 0.08);
    background: var(--card-bg);
}

.category-nav {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.35rem 0 1rem;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    background: rgba(244, 235, 225, 0.9);
    color: var(--text-color);
    border: 1px solid transparent;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(54, 34, 25, 0.04);
}

body.theme-dark .cat-chip {
    background: rgba(255,255,255,0.03);
    color: var(--text-color);
    border: 1px solid rgba(255,255,255,0.04);
}

.cat-chip:hover,
.cat-chip.active {
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    color: #FFF;
    box-shadow: 0 10px 20px rgba(140, 45, 25, 0.18);
}

.category-section {
    margin-bottom: 2.2rem;
}

.category-title {
    font-family: var(--font-heading, Georgia, 'Times New Roman', serif);
    font-size: clamp(1.5rem, 2vw, 2rem);
    color: var(--text-color);
    margin-bottom: 1rem;
    padding-bottom: 0.55rem;
    border-bottom: 2px solid rgba(140, 45, 25, 0.1);
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.category-title::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    box-shadow: 0 0 0 6px rgba(140, 45, 25, 0.08);
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.product-card {
    background: var(--card-bg);
    border: 1px solid rgba(54, 34, 25, 0.06);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 1rem;
    display: flex;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 42px rgba(54, 34, 25, 0.1);
    border-color: rgba(140, 45, 25, 0.12);
}

.product-card.agotado {
    opacity: 0.8;
    filter: grayscale(0.2);
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.product-title {
    font-weight: 800;
    font-size: 1.02rem;
    color: var(--text-color);
    margin-bottom: 0.3rem;
}

.product-desc {
    font-size: 0.83rem;
    color: var(--coffee-muted);
    margin-bottom: 0.7rem;
    flex: 1;
}

.product-price {
    font-weight: 800;
    color: var(--accent-color);
    font-size: 1.12rem;
}

.product-img {
    width: 94px;
    height: 94px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--accent-soft);
    border: 1px solid rgba(54, 34, 25, 0.03);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}

.badge-agotado-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    padding: 0.32rem 0.55rem;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 8px 18px rgba(229,62,62,0.22);
}

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.5rem 1rem 3rem;
    text-align: center;
    margin-top: 3rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.site-footer > * {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer-about {
    margin: 1rem auto 1.5rem;
}

.site-footer-section-title {
    margin-bottom: 0.4rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: rgba(255,255,255,0.75);
}

.site-footer-description {
    max-width: 760px;
    margin: 0 auto;
    color: rgba(255,255,255,0.8);
    font-size: 0.94rem;
    line-height: 1.7;
}

.site-footer p {
    margin-bottom: 0.55rem;
}

.site-footer strong {
    font-size: 1.05rem;
}

.site-footer a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 0.18rem;
}

.btn-print-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.9rem 1.35rem;
    background: linear-gradient(135deg, var(--accent-color), var(--hover-color));
    color: #fff;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: 0.01em;
    box-shadow: 0 16px 28px rgba(140,45,25,0.2);
    border: 1px solid rgba(255,255,255,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-print-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 32px rgba(140,45,25,0.26);
    filter: brightness(1.02);
}

.whatsapp-float {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366, #1EBE5A);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 18px 35px rgba(37,211,102,0.35);
    z-index: 1000;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-float:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 22px 40px rgba(37,211,102,0.42);
}
