/* ========== СТРАНИЦА НА РЕЦЕПТА ========== */

/* Breadcrumb */
.breadcrumb {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding: 10px 0;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Основна карта */
.recipe-card {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    padding: 35px;
    margin-bottom: 30px;
}

.recipe-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-color);
    line-height: 1.3;
}

/* Мета информация */
.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}

.recipe-meta span i {
    color: var(--primary-color);
}

.recipe-meta strong {
    color: var(--text-primary);
}

.recipe-rating i {
    color: #f59e0b;
}

/* Снимка */
.recipe-image-wrap {
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.recipe-image {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.recipe-image:hover {
    transform: scale(1.02);
}

/* Описание */
.recipe-description {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.8;
    margin-bottom: 25px;
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
    background: var(--bg-secondary);
    border-radius: 0 8px 8px 0;
}

/* Тяло - продукти + инструкции */
.recipe-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* Продукти */
.recipe-ingredients {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid var(--border-color);
    position: sticky;
    top: 20px;
}

.recipe-ingredients h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-ingredients h2 i {
    color: var(--primary-color);
}

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

.recipe-ingredients ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-primary);
    display: flex;
    gap: 8px;
    align-items: baseline;
}

.recipe-ingredients ul li:last-child {
    border-bottom: none;
}

.recipe-ingredients ul li em {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Инструкции */
.recipe-instructions h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.recipe-instructions h2 i {
    color: var(--primary-color);
}

.instructions-text {
    font-size: 16px;
    line-height: 1.5;
    color: var(--text-primary);
}

/* Подобни рецепти */
.similar-recipes {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
}

.similar-recipes h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
}

.similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.similar-card {
    text-decoration: none;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    display: block;
}

.similar-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.similar-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
}

.similar-info {
    padding: 12px 15px;
}

.similar-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.similar-info span {
    font-size: 13px;
    color: var(--text-secondary);
}

.similar-info span i {
    color: var(--primary-color);
}

/* Коментари */
.comments-section {
    background: var(--bg-primary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
}

.comments-section h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 25px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 3px solid var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comments-section h2 i {
    color: var(--primary-color);
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.comment-item:last-child {
    border-bottom: none;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.comment-header strong {
    font-size: 15px;
    color: var(--text-primary);
}

.comment-header time {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: auto;
}

.comment-stars i {
    color: #f59e0b;
    font-size: 13px;
}

.comment-item p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
}

.no-comments {
    color: var(--text-primary);
    font-style: italic;
    text-align: center;
    padding: 20px 0;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .recipe-body {
        grid-template-columns: 1fr;
    }

    .recipe-ingredients {
        position: static;
    }

    .similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .recipe-card {
        padding: 20px;
    }

    .recipe-title {
        font-size: 24px;
    }

    .recipe-image {
        height: 280px;
    }

    .similar-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .recipe-title {
        font-size: 20px;
    }

    .recipe-meta {
        gap: 10px;
    }

    .recipe-image {
        height: 220px;
    }
}

/* ========== ФОРМА ЗА КОМЕНТАР ========== */
.comment-form-wrap {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.comment-form-wrap h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-form-wrap h3 i {
    color: var(--primary-color);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input[type="text"],
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    resize: vertical;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

/* Звездички */
.star-rating {
    display: flex;
    gap: 5px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 28px;
    color: #d1d5db;
    padding: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #f59e0b;
    transform: scale(1.2);
}

/* Бутон изпрати */
.btn-submit {
    padding: 14px 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.btn-submit:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 15px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}


/* ===== ОЦЕНЯВАНЕ (вътре в aside продукти) ===== */
.rating-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.rating-section h2 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rating-section h2 i {
    color: #f59e0b;
}

.rating-avg-display {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.rating-avg-display i {
    font-size: 16px;
    color: #f59e0b;
}

.rating-num {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.rating-votes {
    font-size: 13px;
    color: var(--text-primary);
}

.no-ratings {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 12px;
}

/* ---- Форма за гласуване ---- */
.vote-form-wrap {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 14px;
}

.vote-form-wrap > p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 10px;
}

.user-voted {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.user-voted i {
    color: #f59e0b;
    font-size: 13px;
}

.star-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 12px;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    color: #d1d5db;
    padding: 0;
    line-height: 1;
    transition: transform 0.15s ease, color 0.15s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #f59e0b;
    transform: scale(1.2);
}

.btn-vote {
    width: 100%;
    justify-content: center;
    padding: 10px;
    font-size: 14px;
}

/* Alert вътре в aside */
.rating-section .alert {
    font-size: 13px;
    padding: 8px 12px;
    margin-bottom: 10px;
}

/* Dark mode */
.theme-dark .vote-form-wrap {
    background: var(--bg-secondary);
}

.comment-item.hidden {
    display: none !important;
}

.recipe-extra {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}
.recipe-extra h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.recipe-extra p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-primary);
}


.comment-item.hidden { display: none; }  /* вече имаш това в JS */
.load-more-wrap      { text-align: center; margin: 1rem 0; }
.btn-hidden          { display: none; }


.share-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
}

.share-label {
    font-weight: 600;
    color: var(--text-muted);
    margin-right: 4px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.85; }

.share-facebook  { background: #0b57ba; color: #fff; }
.share-pinterest { background: #e60023; color: #fff; }
.share-whatsapp  { background: #068234; color: #fff; }
.share-viber     { background: #7360f2; color: #fff; }
.share-copy      { background: var(--bg-secondary, #f1f1f1); color: var(--text-primary, #333); }