/* ============================================================
   style.css — Grabado Elegante
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Reset y base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --brand-dark:   #1a1a1a;
    --brand-mid:    #4a4a4a;
    --brand-light:  #f5f3f0;
    --brand-border: #e4e0da;
    --wa-green:     #25D366;
    --wa-dark:      #128C7E;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'DM Sans', system-ui, sans-serif;
    --radius-sm:    6px;
    --radius-md:    10px;
    --radius-lg:    14px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 15px;
    line-height: 1.6;
}

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

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
    padding: 1.1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand-logo {
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 400;
    color: var(--brand-dark);
    letter-spacing: 0.02em;
    line-height: 1.1;
}

.brand-sub {
    font-size: 11px;
    font-weight: 300;
    color: var(--brand-mid);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ── Botón WhatsApp ──────────────────────────────────────── */
.wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: var(--radius-lg);
    background: var(--wa-green);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.wa-btn:hover  { background: var(--wa-dark); }
.wa-btn:active { transform: scale(0.97); }

.wa-btn svg {
    width: 16px;
    height: 16px;
    fill: #fff;
    flex-shrink: 0;
}

/* ── Barra de filtros ────────────────────────────────────── */
.filter-bar {
    background: #fff;
    border-bottom: 1px solid var(--brand-border);
    padding: 0.7rem 2rem;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filter-bar::-webkit-scrollbar { display: none; }

.filter-pill {
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--brand-border);
    background: var(--brand-light);
    color: var(--brand-mid);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    user-select: none;
}

.filter-pill:hover   { border-color: var(--brand-dark); color: var(--brand-dark); }
.filter-pill.active  { background: var(--brand-dark); color: #fff; border-color: var(--brand-dark); }

/* ── Contador de resultados ──────────────────────────────── */
.results-meta {
    padding: 1rem 2rem 0.25rem;
    font-size: 12px;
    color: var(--brand-mid);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── Catálogo: lista ─────────────────────────────────────── */
.catalog {
    padding: 1.25rem 2rem 3rem;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--brand-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 0.75rem 2rem;
}

/* Primer y último hijo: bordes redondeados */
.product-row:first-child { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.product-row:last-child  { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.product-row:only-child  { border-radius: var(--radius-lg); }

/* ── Fila de producto ────────────────────────────────────── */
.product-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    background: #fff;
    transition: background 0.12s;
}

.product-row:hover { background: #fafaf9; }

.product-row.hidden { display: none; }

/* Imagen */
.prod-img-wrap {
    width: 200px;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--brand-light);
}

.prod-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-row:hover .prod-img { transform: scale(1.03); }

/* Info */
.prod-info {
    padding: 1.1rem 1.4rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 1px solid var(--brand-border);
}

.prod-cat {
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--brand-mid);
    margin-bottom: 5px;
}

.prod-name {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 400;
    color: var(--brand-dark);
    line-height: 1.25;
    margin-bottom: 8px;
}

.prod-desc {
    font-size: 13px;
    color: var(--brand-mid);
    line-height: 1.65;
    flex: 1;
}

/* Footer de producto */
.prod-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--brand-border);
}

.prod-badge {
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--brand-light);
    color: var(--brand-mid);
    border: 1px solid var(--brand-border);
}

/* Botón cotizar por WhatsApp */
.prod-wa {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--wa-dark);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.15s;
}

.prod-wa:hover { color: var(--wa-green); }

.prod-wa svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* ── Sin resultados ──────────────────────────────────────── */
.no-results {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    color: var(--brand-mid);
    background: #fff;
    border-radius: var(--radius-lg);
    margin: 0.75rem 2rem;
}

.no-results p { font-size: 14px; margin-top: 8px; }

/* ── Footer del sitio ────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 2rem;
    font-size: 12px;
    color: var(--brand-mid);
    border-top: 1px solid var(--brand-border);
    background: #fff;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
    .site-header { padding: 1rem; flex-wrap: wrap; gap: 0.75rem; }
    .filter-bar  { padding: 0.6rem 1rem; }
    .catalog     { margin: 0.75rem 1rem; }
    .results-meta { padding: 0.75rem 1rem 0.25rem; }
    .no-results  { margin: 0.75rem 1rem; }

    .product-row {
        grid-template-columns: 1fr;
    }

    .prod-img-wrap {
        width: 100%;
        height: 200px;
    }

    .prod-info {
        border-left: none;
        border-top: 1px solid var(--brand-border);
        padding: 1rem;
    }

    .wa-btn span { display: none; }
    .wa-btn { padding: 9px 14px; }
}

@media (max-width: 400px) {
    .brand-name { font-size: 18px; }
}
