/* =====================================================
   Restaurant Director v2.0 — Frontend Styles
   Diseño inspirado en la marca Huevo / Huev·pedia
   ===================================================== */

:root {
    --rd-accent:     #2c2c2c;
    --rd-primary:    #f5a623;
    --rd-maps-btn:   #e74c3c;
    --rd-egg-fill:   #975b01;        /* ← v1: café oscuro */
    --rd-egg-empty:  #d0d0d0;
    --rd-bg:         #f8f7f4;
    --rd-white:      #ffffff;
    --rd-text:       #2c2c2c;
    --rd-gray:       #888888;
    --rd-radius:     12px;
    --rd-shadow:     0 4px 24px rgba(0,0,0,.08);
    --rd-transition: .25s ease;
}

/* ═══════════════════════════════════════════════════
   SINGLE RESTAURANT PAGE
══════════════════════════════════════════════════════ */
.rd-single-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding-bottom: 60px;
}

/* ── Banner Carousel ───────────────────────────────── */
.rd-banner-section { margin-bottom: 0; }

.rd-banner-carousel {
    position: relative;
    width: 100%;
    height: 480px;
    overflow: hidden;
    border-radius: 0 0 var(--rd-radius) var(--rd-radius);
    background: #1a1a1a;
}

.rd-banner-slides { position: relative; width: 100%; height: 100%; }

.rd-banner-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity .6s ease;
}
.rd-banner-slide.active { opacity: 1; }
.rd-banner-placeholder { background: linear-gradient(135deg, #2c2c2c, #444); }

/* Arrows */
.rd-banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.85);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    min-width: 44px;      /* ← v2: área táctil mínima */
    min-height: 44px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    transition: background .2s;
    box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.rd-banner-arrow:hover { background: #fff; }
.rd-banner-prev { left: 14px; }
.rd-banner-next { right: 14px; }

/* Dots */
.rd-banner-dots {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 10;
}
.rd-banner-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.rd-banner-dot.active { background: #fff; transform: scale(1.3); }

/* Info card over banner */
.rd-banner-info-card {
    position: absolute;
    bottom: 24px;
    left: 24px;
    background: #fff;
    border-radius: 14px;
    padding: 18px 22px 16px;
    max-width: 360px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    z-index: 10;
}
.rd-bic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.rd-bic-name {
    font-size: 1.55rem;
    font-weight: 800;
    color: #000000;          /* ← v1: negro puro */
    margin: 0;
    line-height: 1.2;
}

/* Rating en la info card del banner */
.rd-bic-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #000000;
    flex-shrink: 0;
    margin-left: 12px;
}
.rd-bic-rating .rd-egg-svg       { width: 22px; height: 28px; }
.rd-bic-rating.rd-has-rating .rd-egg-svg { color: var(--rd-egg-fill); }
.rd-bic-rating.rd-no-rating  .rd-egg-svg { color: #bbb; }
.rd-bic-rating.rd-no-rating span { color: var(--rd-gray); font-size: .95rem; }

.rd-bic-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}
.rd-price-badge {
    display: inline-block;
    background: #FFDBCB;     /* ← v1 */
    color: #7A3000;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: .82rem;
    font-weight: 700;
}
.rd-recipe-badge {
    display: inline-block;
    background: #FFDF9E;     /* ← v1 */
    color: #000000;
    border-radius: 20px;
    padding: 3px 12px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}
.rd-bic-short-desc {
    margin: 0;
    font-size: .85rem;
    color: #555;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════
   CONTENEDOR LADO A LADO: galería | votación/horarios
   ─────────────────────────────────────────────────
   .rd-with-gallery  → dos columnas: galería (1fr) + panel (360px)
   sin clase         → panel en ancho completo (sin galería)
══════════════════════════════════════════════════════ */
.rd-gallery-vote-row {
    margin: 20px 0 28px;
}

/* Dos columnas cuando hay galería */
.rd-gallery-vote-row.rd-with-gallery {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 24px;
    align-items: start;
}

/* Sin galería: el panel de votación ocupa ancho moderado */
.rd-gallery-vote-row:not(.rd-with-gallery) .rd-vote-schedule-section {
    max-width: 720px;
}

/* ── Galería: columna izquierda (galería + vote bar debajo) ── */
.rd-gallery-section {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rd-gallery-grid {
    display: grid;
    grid-template-columns: 1fr 420px;   /* ← v2: thumbs más angostos */
    gap: 10px;
    height: 650px;
}

.rd-gallery-main {
    display: block;
    overflow: hidden;
    border-radius: var(--rd-radius);
    background: #eee;
    cursor: pointer;
}
.rd-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
    display: block;
}
.rd-gallery-main:hover img { transform: scale(1.04); }

.rd-gallery-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
}
.rd-gallery-thumb {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #eee;
    cursor: pointer;
}
.rd-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}
.rd-gallery-thumb:hover img { transform: scale(1.06); }
.rd-gallery-empty { background: #f0f0f0; border-radius: 8px; }

/* ── Panel derecho: horarios + redes ─────────────────── */
.rd-vote-schedule-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* ── Rating widget ─────────────────────────────────── */
.rd-rating-widget { margin: 0; }
.rd-vote-bar {
    background: #000000;
    border-radius: var(--rd-radius);
    padding: 20px 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 90px;
}
.rd-vote-question {
    color: #fff;
    font-size: 1.15rem;
    font-weight: 700;
    margin: 0 0 10px;
}
.rd-eggs-interactive {
    display: flex;
    gap: 8px;
    cursor: pointer;
}
.rd-egg {
    cursor: pointer;
    outline: none;
    transition: transform var(--rd-transition);
    padding: 4px;
    margin: -4px;
    -webkit-tap-highlight-color: transparent;   /* ← v2 */
    touch-action: manipulation;                 /* ← v2 */
}
.rd-egg:hover, .rd-egg:focus { transform: scale(1.25); }
.rd-egg .rd-egg-svg { width: 42px; height: 54px; color: rgba(255,255,255,.6); }
.rd-egg .rd-egg-svg path { stroke: rgba(255,255,255,.8); }

/* Estado "votado" */
.rd-voted-state {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
}
.rd-voted-state .rd-vote-question { margin: 0; font-size: 1.05rem; }
.rd-voted-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    font-style: normal;
}

.rd-vote-bar-right { }
.rd-current-rating { display: flex; align-items: center; gap: 6px; color: #fff; }
.rd-eggs-display-sm { display: flex; gap: 2px; }
.rd-eggs-display-sm .rd-egg-svg { width: 18px; height: 22px; }
.rd-rating-avg-num { font-size: 3rem; font-weight: 800; color: #fff; }
.rd-rating-total { font-size: 1rem; color: rgba(255,255,255,.7); }
.rd-na-badge {
    background: rgba(255,255,255,.2);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: .1em;
}

/* Huevos de solo lectura en contexto oscuro */
.rd-vote-bar .rd-egg-static.filled .rd-egg-svg path      { fill: var(--rd-egg-fill); stroke: var(--rd-egg-fill); }
.rd-vote-bar .rd-egg-static:not(.filled) .rd-egg-svg path { fill: none; stroke: rgba(255,255,255,.35); }

/* ── Schedule box ──────────────────────────────────── */
.rd-schedule-box {
    background: var(--rd-white);
    border: 1px solid #eee;
    border-radius: var(--rd-radius);
    padding: 18px 20px;
    margin-bottom: 14px;
    box-shadow: var(--rd-shadow);
}
.rd-schedule-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rd-accent);
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}
.rd-schedule-icon { font-size: 1.1rem; }
.rd-schedule-rows { display: flex; flex-direction: column; gap: 8px; }
.rd-schedule-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.rd-schedule-days { font-size: .9rem; color: #555; font-weight: 500; }
.rd-schedule-time { font-size: .9rem; font-weight: 700; color: var(--rd-accent); }

/* ── Social box ────────────────────────────────────── */
.rd-social-box {
    background: var(--rd-white);
    border: 1px solid #eee;
    border-radius: var(--rd-radius);
    padding: 16px 20px;
    margin-bottom: 14px;
    box-shadow: var(--rd-shadow);
}
.rd-social-label {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rd-gray);
    font-weight: 600;
    margin: 0 0 12px;
}
.rd-social-icons { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.rd-social-icon {
    width: 38px;
    height: 38px;
    min-width: 44px;        /* ← v2: área táctil mínima */
    min-height: 44px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #555;
    transition: all .2s;
    border: 1px solid #eee;
    -webkit-tap-highlight-color: transparent;   /* ← v2 */
}
.rd-social-icon svg { width: 18px; height: 18px; }
.rd-social-icon:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.rd-social-maps:hover { background: #ea4335; color: #fff; border-color: #ea4335; }
.rd-social-fb:hover   { background: #1877f2; color: #fff; border-color: #1877f2; }
.rd-social-ig:hover   { background: linear-gradient(45deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: #fff; border-color: transparent; }
.rd-social-tk:hover   { background: #010101; color: #fff; border-color: #010101; }

.rd-contact-box { font-size: .9rem; }
.rd-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #555;
    margin-bottom: 6px;
    text-decoration: none;
}
.rd-contact-item:hover { color: var(--rd-accent); }

/* ── Descripción ───────────────────────────────────── */
.rd-about-section { padding: 32px 0 24px; border-top: 1px solid #eee; }
.rd-section-inner { }
.rd-section-title {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rd-accent);
    margin: 0 0 20px;
}
.rd-title-line {
    display: inline-block;
    width: 36px;
    height: 3px;
    background: var(--rd-primary);
    border-radius: 2px;
    flex-shrink: 0;
}
.rd-about-text { font-size: .98rem; line-height: 1.85; color: #444; max-width: 780px; }

.rd-attributes-grid { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.rd-attr-box {
    background: var(--rd-bg);
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 120px;
    text-align: center;
}
.rd-attr-icon  { font-size: 1.5rem; }
.rd-attr-label { font-size: .68rem; font-weight: 700; letter-spacing: .1em; color: var(--rd-gray); text-transform: uppercase; }
.rd-attr-value { font-size: .88rem; font-weight: 600; color: var(--rd-accent); }

/* ── Video ─────────────────────────────────────────── */
.rd-video-section { padding: 20px 0 32px; border-top: 1px solid #eee; }
.rd-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    border-radius: var(--rd-radius);
    overflow: hidden;
    background: #000;
}
.rd-video-wrapper iframe,
.rd-video-wrapper video { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ── Mapa ──────────────────────────────────────────── */
.rd-map-section { padding: 20px 0 32px; border-top: 1px solid #eee; }
.rd-map-wrap iframe { width: 100%; height: 400px; border: 0; border-radius: var(--rd-radius); display: block; }
.rd-map-fallback { text-align: center; padding: 40px; background: #f5f5f5; border-radius: var(--rd-radius); }
.rd-btn-maps-big {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    color: #fff !important;
    transition: opacity .2s;
}
.rd-btn-maps-big:hover { opacity: .88; }

/* ── Vote Modal ────────────────────────────────────── */
.rd-vote-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;                       /* ← v2 */
    -webkit-overflow-scrolling: touch;      /* ← v2 */
    padding: 16px 0;                        /* ← v2 */
}
.rd-modal-overlay {
    position: fixed;                        /* ← v2: fixed en lugar de absolute */
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);     /* ← v2 */
}
.rd-modal-box {
    position: relative;
    background: #fff;
    border-radius: 20px;
    padding: 36px;
    width: 90%;
    max-width: 460px;
    max-height: calc(100vh - 32px);        /* ← v2 */
    overflow-y: auto;                       /* ← v2 */
    -webkit-overflow-scrolling: touch;      /* ← v2 */
    box-shadow: 0 24px 64px rgba(0,0,0,.22);
    animation: rd-modal-in .25s ease;
    z-index: 1;                             /* ← v2 */
}
@keyframes rd-modal-in {
    from { opacity:0; transform:scale(.9) translateY(20px); }
    to   { opacity:1; transform:scale(1) translateY(0); }
}
.rd-modal-close {
    position: absolute;
    top: 12px; right: 16px;
    background: none; border: none;
    font-size: 2rem; cursor: pointer;
    color: #aaa; line-height: 1;
    min-width: 44px; min-height: 44px;      /* ← v2 */
    display: flex; align-items: center; justify-content: center;
    transition: color .2s;
    -webkit-tap-highlight-color: transparent; /* ← v2 */
}
.rd-modal-close:hover { color: #333; }
.rd-modal-box h3 { margin: 0 0 8px; font-size: 1.4rem; color: var(--rd-accent); padding-right: 36px; }
.rd-modal-box p  { margin: 0 0 16px; color: #666; font-size: .92rem; }
.rd-selected-rating {
    background: #fdf6ec;
    border: 1px solid #f0d9a0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 18px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--rd-accent);
    display: flex;
    align-items: center;
    gap: 8px;
}
.rd-eggs-preview { display: inline-flex; gap: 2px; }
.rd-eggs-preview .rd-egg-svg { width: 22px; height: 28px; }
.rd-form-group { margin-bottom: 14px; }
.rd-form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: .88rem; color: #444; }
.rd-form-group input {
    width: 100%; padding: 10px 14px;
    border: 2px solid #e0e0e0; border-radius: 8px;
    font-size: 16px;                        /* ← v2: evita zoom en iOS */
    transition: border-color .2s;
    box-sizing: border-box;
    color: var(--rd-accent); background: #fff;
    -webkit-appearance: none; appearance: none; /* ← v2 */
}
.rd-form-group input:focus { outline: none; border-color: var(--rd-accent); }
.rd-form-group small { display: block; margin-top: 4px; color: #999; font-size: .76rem; }
.rd-form-actions {
    display: flex;
    gap: 10px;
    margin-top: 18px;
    position: sticky; bottom: 0;           /* ← v2 */
    background: #fff;
    padding-top: 10px; padding-bottom: 4px;
}
.rd-btn-cancel {
    flex: 1; padding: 14px 12px;           /* ← v2: más padding táctil */
    border: 2px solid #ddd;
    background: none; border-radius: 8px; cursor: pointer;
    font-size: 1rem; font-weight: 600; color: #666;
    min-height: 48px;                       /* ← v2 */
    transition: all .2s;
    -webkit-tap-highlight-color: transparent; /* ← v2 */
}
.rd-btn-cancel:hover { border-color: #999; color: #333; }
.rd-btn-submit {
    flex: 2; padding: 14px 12px;           /* ← v2 */
    background: var(--rd-accent); color: #fff;
    border: none; border-radius: 8px; cursor: pointer;
    font-size: 1rem; font-weight: 700;
    min-height: 48px;                       /* ← v2 */
    transition: opacity .2s;
    -webkit-tap-highlight-color: transparent; /* ← v2 */
}
.rd-btn-submit:hover { opacity: .88; }
.rd-btn-submit:disabled { opacity: .5; cursor: not-allowed; }
.rd-vote-message {
    margin-top: 14px; padding: 12px 16px; border-radius: 8px;
    font-weight: 600; font-size: .9rem; text-align: center;
}
.rd-vote-message.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.rd-vote-message.error   { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* ── Admin bar ─────────────────────────────────────── */
.rd-admin-bar {
    background: #fffde7; border: 2px dashed #e0b800;
    border-radius: 8px; padding: 12px 16px; margin-top: 24px;
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .85rem;
}
.rd-admin-bar code { background: rgba(0,0,0,.06); padding: 3px 8px; border-radius: 4px; font-size: .78rem; }

/* ── Lightbox ──────────────────────────────────────── */
#rd-lightbox { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; }
.rd-lb-overlay { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.rd-lb-content { position: relative; max-width: 90vw; max-height: 90vh; animation: rd-modal-in .2s ease; }
.rd-lb-close { position: absolute; top: -36px; right: 0; background: none; border: none; font-size: 2.2rem; color: #fff; cursor: pointer; line-height: 1; padding: 0; }
#rd-lb-img { max-width: 90vw; max-height: 85vh; border-radius: 8px; display: block; }


/* ═══════════════════════════════════════════════════
   SHORTCODE — CARDS
══════════════════════════════════════════════════════ */

/* ── Card grande (carrusel featured) ──────────────── */
.rd-featured-carousel { position: relative; overflow: hidden; padding: 0 48px; margin: 24px 0; }
.rd-carousel-track-wrap { overflow: hidden; }
.rd-carousel-track { display: flex; gap: 20px; transition: transform .4s cubic-bezier(.4,0,.2,1); }

.rd-card-featured {
    flex: 0 0 calc(33.333% - 14px); min-width: 0; height: 380px;
    border-radius: 16px; overflow: hidden; position: relative;
    background: #333 center/cover no-repeat; cursor: pointer;
    box-shadow: var(--rd-shadow); transition: transform .3s ease, box-shadow .3s ease;
}
.rd-card-featured:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,.16); }
.rd-card-featured-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.1) 55%);
}

.rd-rating-badge {
    position: absolute; top: 12px; right: 12px;
    background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
    color: #fff; border-radius: 20px; padding: 4px 10px;
    display: flex; align-items: center; gap: 5px;
    font-size: .82rem; font-weight: 700; z-index: 2;
}
.rd-rating-badge.rd-badge-na { background: rgba(0,0,0,.5); }
.rd-badge-egg .rd-egg-svg { width: 16px; height: 20px; }

.rd-card-featured-body { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; z-index: 2; }
.rd-card-featured-tag  { display: inline-block; color: rgba(255,255,255,.75); font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.rd-card-featured-title { margin: 0 0 5px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.rd-card-featured-title a { color: #fff; text-decoration: none; }
.rd-card-featured-cuisine  { margin: 0 0 8px; font-size: .85rem; color: rgba(255,255,255,.8); }
.rd-card-featured-location { margin: 0 0 12px; font-size: .82rem; color: rgba(255,255,255,.7); }
.rd-card-featured-link { color: var(--rd-primary); text-decoration: none; font-size: .88rem; font-weight: 700; transition: opacity .2s; }
.rd-card-featured-link:hover { opacity: .8; }

.rd-carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    min-width: 44px; min-height: 44px;     /* ← v2 */
    background: var(--rd-white); border: none; border-radius: 50%;
    font-size: 1.5rem; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    color: var(--rd-accent); box-shadow: 0 2px 12px rgba(0,0,0,.14); transition: all .2s;
}
.rd-carousel-arrow:hover { background: var(--rd-accent); color: #fff; }
.rd-carousel-prev { left: 4px; }
.rd-carousel-next { right: 4px; }

/* ── Card pequeña (directorio) ─────────────────────── */
.rd-grid { display: grid; gap: 16px; margin: 0; }
.rd-cols-1 { grid-template-columns: 1fr; }
.rd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.rd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.rd-cols-4 { grid-template-columns: repeat(4, 1fr); }

.rd-card-small {
    background: var(--rd-white); border: 1px solid #efefef;
    border-radius: 14px; padding: 14px;
    display: flex; gap: 14px; align-items: flex-start;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
    transition: box-shadow .2s, transform .2s; cursor: pointer;
}
.rd-card-small:hover { box-shadow: 0 6px 24px rgba(0,0,0,.1); transform: translateY(-2px); }
.rd-card-small-img-wrap {
    flex-shrink: 0; width: 72px; height: 72px;
    border-radius: 50%; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: #f0f0f0; text-decoration: none;
    border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.rd-card-small-img-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rd-card-small-no-img { font-size: 2rem; }

.rd-card-small-body { flex: 1; min-width: 0; }
.rd-card-small-title { margin: 0 0 4px; font-size: .98rem; font-weight: 700; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-card-small-title a { color: var(--rd-accent); text-decoration: none; }
.rd-card-small-title a:hover { color: var(--rd-white); }

.rd-stars-row { display: flex; align-items: center; gap: 3px; margin-bottom: 4px; flex-wrap: wrap; }
.rd-stars-row .rd-egg-svg { width: 14px; height: 18px; }
.rd-stars-na .rd-egg-svg { color: #ccc; }
.rd-stars-count { font-size: .78rem; color: var(--rd-gray); margin-left: 2px; }

.rd-card-small-cuisine { margin: 0 0 3px; font-size: .82rem; color: #666; }
.rd-card-small-loc     { margin: 0; font-size: .8rem; color: var(--rd-gray); }

/* ── Directory con sidebar ──────────────────────────── */
.rd-directory-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 28px; margin: 24px 0; align-items: start; }
.rd-dir-sidebar { }
.rd-sidebar-box {
    background: var(--rd-white); border: 1px solid #eee;
    border-radius: 14px; padding: 20px; position: sticky; top: 20px; box-shadow: var(--rd-shadow);
}
.rd-sidebar-title { font-size: 1rem; font-weight: 700; color: var(--rd-accent); margin: 0 0 14px; padding-bottom: 10px; border-bottom: 2px solid #f0f0f0; }
.rd-filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rd-filter-item { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; cursor: pointer; transition: background .15s; }
.rd-filter-item:hover { background: #f5f5f5; }
.rd-filter-item.active { background: #f8f4ec; }
.rd-filter-item a { text-decoration: none; color: var(--rd-accent); font-size: .88rem; font-weight: 500; }
.rd-filter-item.active a { font-weight: 700; color: var(--rd-primary); }
.rd-filter-check { width: 16px; height: 16px; border: 2px solid #ccc; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.rd-filter-check.checked { background: var(--rd-primary); border-color: var(--rd-primary); }
.rd-filter-check.checked::after { content: ''; width: 6px; height: 6px; background: #fff; border-radius: 50%; }

/* ── Paginación ─────────────────────────────────────── */
.rd-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.rd-page-btn {
    width: 36px; height: 36px;
    min-width: 44px; min-height: 44px;     /* ← v2 */
    border-radius: 50%;
    background: var(--rd-white); border: 1px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; color: var(--rd-accent); font-size: .88rem; font-weight: 600; transition: all .2s;
}
.rd-page-btn:hover { background: var(--rd-accent); color: #fff; border-color: var(--rd-accent); }
.rd-page-btn.active { background: var(--rd-primary); color: var(--rd-accent); border-color: var(--rd-primary); font-weight: 800; }
.rd-page-arrow { font-size: 1.2rem; font-weight: 400; }

/* ── Tag filter ─────────────────────────────────────── */
.rd-tag-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.rd-tag-btn {
    padding: 8px 16px;                      /* ← v2 */
    border-radius: 20px; border: 2px solid #e0e0e0;
    background: #fff; cursor: pointer; font-size: .85rem; font-weight: 500;
    color: var(--rd-accent); min-height: 40px;  /* ← v2 */
    transition: all .2s;
    -webkit-tap-highlight-color: transparent;    /* ← v2 */
    touch-action: manipulation;                  /* ← v2 */
}
.rd-tag-btn:hover, .rd-tag-btn.active { border-color: var(--rd-accent); background: var(--rd-accent); color: #fff; }

.rd-no-results { text-align: center; padding: 40px; color: var(--rd-gray); font-size: 1rem; }

/* ── Egg display general ────────────────────────────── */
.rd-egg-svg { width: 24px; height: 30px; display: inline-block; vertical-align: middle; color: var(--rd-egg-fill); transition: transform var(--rd-transition); }
.rd-egg-static.filled .rd-egg-svg path      { fill: var(--rd-egg-fill); stroke: var(--rd-egg-fill); }
.rd-egg-static:not(.filled) .rd-egg-svg path { fill: none; stroke: var(--rd-egg-empty); }
.rd-eggs-display { display: inline-flex; align-items: center; gap: 2px; }


/* ═══════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════ */

/* Tablet: 980px (← v2) */
@media (max-width: 980px) {
    .rd-gallery-vote-row.rd-with-gallery {
        grid-template-columns: 1fr 300px;
        gap: 18px;
    }
    .rd-gallery-grid {
        grid-template-columns: 1fr 260px;
        height: 620px;
    }
    .rd-banner-carousel { height: 340px; }
    .rd-directory-wrap  { grid-template-columns: 1fr; }
    .rd-dir-sidebar     { order: -1; }
    .rd-featured-carousel { padding: 0 36px; }
    .rd-card-featured   { flex: 0 0 calc(50% - 10px); }
}

/* Mobile: 680px (← v2) */
@media (max-width: 680px) {
    .rd-gallery-vote-row.rd-with-gallery {
        display: block;
    }
    .rd-gallery-section { margin-bottom: 18px; }
    .rd-gallery-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    .rd-gallery-main   { height: 220px; }
    .rd-gallery-thumbs { grid-template-columns: repeat(4, 1fr); height: 64px; grid-template-rows: none; }

    .rd-banner-carousel  { height: 260px; }
    .rd-banner-info-card { left: 12px; right: 12px; max-width: none; padding: 14px 16px 12px; }
    .rd-bic-name         { font-size: 1.2rem; }
    .rd-vote-bar         { flex-direction: column; align-items: flex-start; gap: 14px; }

    .rd-cols-2, .rd-cols-3, .rd-cols-4 { grid-template-columns: 1fr; }
    .rd-card-featured   { flex: 0 0 calc(85% - 10px); height: 300px; }
    .rd-attributes-grid { gap: 8px; }
    .rd-attr-box        { min-width: 90px; padding: 10px; }

    /* Modal compacto (← v2) */
    .rd-modal-box    { padding: 20px 16px 16px; border-radius: 16px; width: 96%; max-height: 85vh; }
    .rd-modal-box h3 { font-size: 1.15rem; }
    .rd-form-actions { gap: 8px; }
    .rd-btn-cancel, .rd-btn-submit { padding: 13px 10px; font-size: .95rem; }
}

/* Eliminar double-tap delay en dispositivos táctiles (← v2) */
@media (hover: none) and (pointer: coarse) {
    .rd-egg, .rd-btn-submit, .rd-btn-cancel,
    .rd-modal-close, .rd-tag-btn, .rd-banner-arrow,
    .rd-carousel-arrow, .rd-page-btn, .rd-social-icon {
        touch-action: manipulation;
    }
}