.search-page{
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #ececec;
}

.sidebar{
    width: 280px;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
}

.results-container{
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.recipe-card{
    display: flex;
    gap: 20px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    position: relative;
}

.recipe-image{
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
}

.recipe-info{
    flex: 1;
    min-width: 0;
}

.recipe-buttons{
    margin-top: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-read{
    background: orange;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
}

.btn-read:hover {
    background: #e06a00;
    color: white;
}

.sidebar-title{
    font-size: 40px;
    margin-bottom: 30px;
    color: #1d1d1d;
}

.search-box-info{
    background: #f7f7f7;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
}

.search-label{
    color: #777;
    font-size: 15px;
}

.search-query{
    margin-top: 10px;
    font-size: 32px;
    color: #ff7b00;
    word-break: break-word;
}

.filters-container{
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.filter-title{
    font-size: 24px;
    margin-bottom: 10px;
}

.filter-item{
    text-decoration: none;
    background: #f5f5f5;
    padding: 15px 18px;
    border-radius: 14px;
    color: #222;
    font-weight: 500;
    transition: 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item:hover{
    background: #ff7b00;
    color: white;
}

.active-filter{
    background: #ff7b00;
    color: white;
}

.recipe-meta{
    margin-top: 20px;
}

.author-profile{
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar{
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff7b00;
    flex-shrink: 0;
}

.default-avatar{
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #ff7b00;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    flex-shrink: 0;
}

.author-info{
    display: flex;
    flex-direction: column;
}

.author-name{
    text-decoration: none;
    color: #222;
    font-size: 16px;
    font-weight: 600;
}

.author-name:hover {
    color: #ff7b00;
}

.author-role{
    color: #888;
    font-size: 13px;
}

.author-avatar,
.default-avatar {
    cursor: pointer;
    transition: opacity 0.15s;
}

.author-avatar:hover,
.default-avatar:hover {
    opacity: 0.85;
}

.stars { color: #f59e0b; }
.star-empty { color: #d1d5db; }
.recipe-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.8rem;
}
.rating-value { font-weight: 600; color: #f59e0b; }
.rating-count { color: #9ca3af; }

.recipe-views{
    display: flex;
    align-items: center;
    gap: 4px;
    color: #777;
    font-size: 14px;
    font-weight: 500;
}

.recipe-views svg{
    width: 15px;
    height: 15px;
}

/* ── Botón guardar ── */
.btn-save {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #1a1a1a;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.btn-save:hover {
    background: #fff3e8;
    border-color: #F47B20;
    color: #d96a10;
}

.btn-save--saved {
    background: #fff3e8;
    border-color: #F47B20;
    color: #F47B20;
}

.btn-save--saved svg { fill: #F47B20; }

.btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Menú opciones ── */
.recipe-options {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 5;
}

.btn-options {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #9a9a9a;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, transform 0.15s;
}

.btn-options:hover {
    background: #fff3e8;
    color: #F47B20;
    transform: scale(1.1);
}

.btn-options:active { transform: scale(0.95); }

.recipe-options.is-open .btn-options {
    background: #fff3e8;
    color: #F47B20;
}

.options-dropdown {
    position: absolute;
    top: 38px;
    right: 0;
    min-width: 200px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.16);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

.recipe-options.is-open .options-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    text-align: left;
    white-space: nowrap;
    transition: background 0.25s ease, color 0.25s ease, transform 0.2s ease;
}

.dropdown-item svg {
    flex-shrink: 0;
    color: #d9534f;
    transition: color 0.15s;
}

.dropdown-item:hover {
    background: #fdeaea;
    color: #d32f2f;
    transform: translateX(4px);
}

.dropdown-item:hover svg { color: #d32f2f; }

/* ── Modal reporte ── */
.report-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20,20,20,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.report-modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.report-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    transform: scale(0.96) translateY(8px);
    transition: transform 0.2s;
    margin: 0 16px;
    box-sizing: border-box;
}

.report-modal-overlay.is-open .report-modal {
    transform: scale(1) translateY(0);
}

.report-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: #f5f5f5;
    color: #555;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.report-modal-close:hover {
    background: #ececec;
    color: #1a1a1a;
}

.report-modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #1d1d1d;
    margin: 0 0 6px;
    padding-right: 30px;
}

.report-modal-subtitle {
    font-size: 14px;
    color: #777;
    margin: 0 0 20px;
    word-break: break-word;
}

.report-options-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.report-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: border-color 0.15s, background 0.15s;
}

.report-option:hover {
    border-color: #F47B20;
    background: #fff8f2;
}

.report-option input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: #F47B20;
    flex-shrink: 0;
}

.report-option:has(input:checked) {
    border-color: #F47B20;
    background: #fff3e8;
    color: #d96a10;
    font-weight: 600;
}

.report-form--user .report-option--recipe-only { display: none; }
.report-form--recipe .report-option--user-only { display: none; }

.report-textarea {
    width: 100%;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
    resize: vertical;
    margin-bottom: 20px;
    box-sizing: border-box;
}

.report-textarea:focus {
    outline: none;
    border-color: #F47B20;
}

.report-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.btn-report-cancel {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid #d0d0d0;
    background: #ffffff;
    color: #444;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-report-cancel:hover { background: #f5f5f5; }

.btn-report-submit {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background: #F47B20;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-report-submit:hover { background: #d96a10; }
.btn-report-submit:disabled { opacity: 0.6; cursor: not-allowed; }

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

/* Tablet */
@media (max-width: 992px) {
    .search-page {
        gap: 16px;
        padding: 16px;
    }

    .sidebar {
        width: 220px;
        padding: 20px;
        border-radius: 14px;
    }

    .sidebar-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .search-query { font-size: 24px; }
    .filter-title { font-size: 18px; }

    .filter-item {
        padding: 12px 14px;
        font-size: 14px;
    }

    .recipe-image {
        width: 140px;
        height: 110px;
    }

    .recipe-card {
        padding: 16px;
        gap: 14px;
    }
}

/* Celular */
@media (max-width: 768px) {
    .search-page {
        flex-direction: column;
        padding: 12px;
        gap: 14px;
    }

    .sidebar {
        width: 100%;
        padding: 16px;
        border-radius: 12px;
        box-sizing: border-box;
    }

    .sidebar-title {
        font-size: 22px;
        margin-bottom: 14px;
    }

    .search-box-info {
        padding: 14px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .search-label { font-size: 13px; }
    .search-query { font-size: 20px; margin-top: 6px; }
    .filter-title { font-size: 16px; margin-bottom: 8px; }

    /* Filtros en fila con wrap */
    .filters-container {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .filter-item {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 20px;
        flex-shrink: 0;
    }

    /* Tarjeta de receta — apilar verticalmente */
    .recipe-card {
        flex-direction: column;
        padding: 14px;
        gap: 12px;
        border-radius: 10px;
    }

    .recipe-image {
        width: 100%;
        height: 180px;
        border-radius: 8px;
    }

    .recipe-info { width: 100%; }

    /* Botones al 100% */
    .recipe-buttons {
        flex-direction: row;
        gap: 8px;
        margin-top: 14px;
    }

    .btn-read,
    .btn-save {
        flex: 1;
        justify-content: center;
        padding: 10px 14px;
        font-size: 14px;
    }

    /* Avatar */
    .author-avatar,
    .default-avatar {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .author-name { font-size: 14px; }
    .author-role { font-size: 12px; }
    .recipe-meta { margin-top: 12px; }

    /* Opciones (tres puntos) — mover para no tapar imagen */
    .recipe-options {
        top: 12px;
        right: 12px;
    }

    /* Modal reporte */
    .report-modal {
        padding: 20px 16px;
        border-radius: 14px;
        margin: 0 8px;
    }

    .report-modal-title { font-size: 18px; }
}

/* Celular muy pequeño */
@media (max-width: 380px) {
    .search-page { padding: 10px; }

    .sidebar { padding: 12px; }
    .sidebar-title { font-size: 18px; }
    .search-query { font-size: 17px; }

    .recipe-image { height: 150px; }

    .btn-read,
    .btn-save {
        font-size: 13px;
        padding: 9px 10px;
    }

    .author-avatar,
    .default-avatar {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

    .filter-item {
        font-size: 12px;
        padding: 7px 10px;
    }
}