.product-detail-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 20px;
}

@media (min-width: 992px) {
    .product-detail-layout {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        grid-template-areas:
            "header summary"
            "details summary";
        gap: 0 10px;
        align-items: flex-start;
    }
}

.product-header-container { grid-area: header; }
.product-summary-column { grid-area: summary; }
.product-details-column { grid-area: details; }

.product-header-container .product-brand a {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
}
.product-header-container .product-brand a:hover { text-decoration: underline; }

.product-header-container .product-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--color-text-base);
    margin: 5px 0 10px 0;
}

.product-header-container .product-brand-subtitle {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 15px;
}
.product-header-container .product-brand-subtitle a {
    color: var(--color-text-base);
    font-weight: 500;
    text-decoration: none;
}
.product-header-container .product-brand-subtitle a:hover { color: var(--color-primary); }

.product-header-container .product-rating-summary {
    display: flex;
    align-items: center;
    gap: 10px;
}
.product-header-container .stars-outer { font-size: 20px; }
.product-header-container .rating-text {
    color: var(--color-text-muted);
    font-weight: 500;
    text-decoration: none;
}
.product-header-container .rating-text:hover { text-decoration: underline; }

@media (min-width: 992px) {
    .product-summary-column { position: sticky; top: 90px; }
}

.sidebar-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

.product-gallery .main-image {
    width: 100%;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    object-fit: cover;
    aspect-ratio: 1 / 1;
    background-color: var(--color-background);
}

.extra-images { display: flex; gap: 10px; margin-top: 10px; }

.extra-image-link {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}
.extra-image-link:hover { color: var(--color-primary); border-color: var(--color-primary); }

.product-status-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}
.product-status-hero i { font-size: 18px; }

.product-specs { margin-bottom: 20px; }

.spec-item {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    padding: 8px 0;
    border-bottom: 1px solid var(--color-background);
}
.spec-item:last-child { border-bottom: none; }
.spec-key { color: var(--color-text-muted); }

.spec-value, .spec-value a {
    font-weight: 500;
    color: var(--color-text-base);
    text-decoration: none;
}
.spec-value a:hover { color: var(--color-primary); }

.product-actions .favorite-btn {
    width: 100%;
    justify-content: center;
    padding: 12px;
    font-size: 16px;
}

.favorite-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    background-color: var(--color-surface);
    color: var(--color-text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}
.favorite-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.favorite-btn.active {
    background-color: #fff5f5;
    border-color: #e53e3e;
    color: #c53030;
}
.favorite-btn .fas.fa-heart { display: none; }
.favorite-btn .far.fa-heart { display: inline-block; }
.favorite-btn.active .fas.fa-heart { display: inline-block; }
.favorite-btn.active .far.fa-heart { display: none; }

.share-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    border-top: 1px solid var(--color-background);
    padding-top: 15px;
}
.share-btn {
    flex-grow: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: opacity 0.2s ease;
}
.share-btn:hover { opacity: 0.9; color: #fff; }
.share-btn.facebook { background-color: #1877F2; }
.share-btn.twitter { background-color: #1DA1F2; }
.share-btn.whatsapp { background-color: #25D366; }

.admin-edit-link { margin-top: 20px; text-align: center; }
.admin-edit-link a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 14px;
}
.admin-edit-link a:hover { color: var(--color-primary); }

@media (min-width: 992px) {
    .product-header-container,
    .product-details-column {
        background-color: var(--color-surface);
        border: 1px solid var(--color-border);
        padding: 20px;
    }
    .product-header-container {
        border-bottom: none;
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .product-details-column {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .product-details-column .section-box:first-child {
        margin-top: 0;
        padding-top: 0;
        border-top: none;
    }
}

.section-box {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-border);
}
.section-box h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 25px;
    color: var(--color-text-base);
}

.product-description p { line-height: 1.8; color: var(--color-text-muted); }

.allergens-section h2 { display: flex; align-items: center; gap: 10px; color: #b45309; }

.ingredient-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}
.ingredient-tags.collapsed { max-height: 70px; }

.ingredient-tag {
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid;
    line-height: 1.5;
    text-decoration: none;
}
.ingredient-tag:hover { opacity: 0.8; }

.ingredient-tag.risk-helal {
    background-color: rgba(25, 135, 84, 0.1);
    border-color: rgba(25, 135, 84, 0.2);
    color: #146c43;
}
.ingredient-tag.risk-supheli {
    background-color: rgba(255, 193, 7, 0.1);
    border-color: rgba(255, 193, 7, 0.2);
    color: #b45309;
    font-weight: 600;
}
.ingredient-tag.risk-kacinilmali {
    background-color: rgba(255, 136, 0, 0.1);
    border-color: rgba(255, 136, 0, 0.2);
    color: #c46a00;
    font-weight: 600;
}
.ingredient-tag.risk-haram {
    background-color: #fee2e2;
    border-color: #ef4444;
    color: #b91c1c;
    font-weight: 600;
}

.toggle-ingredients-btn {
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    padding: 5px 0;
    font-size: 14px;
}
.toggle-ingredients-btn:hover { text-decoration: underline; }

.review-form-container {
    background-color: var(--color-background);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-bottom: 40px;
}
.review-form-container h3 { margin: 0 0 20px 0; font-size: 18px; font-weight: 600; }

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    font-size: 2em;
    margin-bottom: 15px;
}
.star-rating input { display: none; }
.star-rating label { color: #ccc; cursor: pointer; transition: color 0.2s; padding: 0 5px; }
.star-rating input:checked~label,
.star-rating label:hover,
.star-rating label:hover~label { color: #ffc107; }

.form-control {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 16px;
    resize: vertical;
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 169, 127, 0.1);
}

.button-submit {
    margin-top: 15px;
    padding: 10px 20px;
    background-color: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.button-submit:hover { background-color: var(--color-primary-dark); }

.login-prompt { font-size: 16px; color: var(--color-text-muted); }

.review-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.review-item { display: flex; gap: 15px; }

.review-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 500;
    text-transform: uppercase;
}
.review-avatar a {
    color: inherit;
    text-decoration: none;
    display: block;
    width: 100%;
    height: 100%;
    line-height: 48px;
    text-align: center;
}

.review-content { flex-grow: 1; }
.review-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 5px;
}
.review-author { font-weight: 600; color: var(--color-text-base); text-decoration: none; }
.review-author:hover { color: var(--color-primary); }
.review-date { font-size: 13px; color: var(--color-text-muted); }

.review-rating { font-size: 16px; margin-bottom: 10px; }
.review-text { color: var(--color-text-muted); line-height: 1.7; margin: 0; }

.stars-outer { position: relative; display: inline-block; font-family: 'Times New Roman', Times, serif; }
.stars-outer::before { content: '★★★★★'; color: #e0e0e0; }
.stars-inner { position: absolute; top: 0; left: 0; white-space: nowrap; overflow: hidden; width: 0; }
.stars-inner::before { content: '★★★★★'; color: #ffc107; }

.review-actions {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
}
.reply-btn, .vote-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-weight: 600;
    cursor: pointer;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.reply-btn:hover, .vote-btn:hover { color: var(--color-primary); }
.vote-btn.active { color: var(--color-primary); font-weight: 700; }
.vote-count { font-weight: 600; color: var(--color-text-muted); }
.vote-btn.active + .vote-count { color: var(--color-primary); }
.action-separator { color: var(--color-border); }
.vote-meta { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-muted); }

.reply-form-container { margin-top: 15px; padding-left: 63px; }
.comment-reply-form textarea { min-height: 80px; font-size: 14px; }
.reply-form-actions { margin-top: 10px; display: flex; gap: 10px; }
.reply-form-actions .button-submit { margin-top: 0; padding: 8px 15px; font-size: 14px; }
.button-cancel-reply {
    padding: 8px 15px;
    font-size: 14px;
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-radius: 6px;
    cursor: pointer;
}
.button-cancel-reply:hover { background-color: var(--color-background); }

.comment-replies.nested {
    margin-left: 30px;
    padding-left: 30px;
    border-left: 2px solid var(--color-border);
    margin-top: 20px;
}

.related-products-section .content-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.related-products-section .product-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.related-products-section .product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.related-products-section .product-card-image-link {
    display: block;
    aspect-ratio: 1 / 1;
    background-color: #f1f1f1;
    position: relative;
}
.related-products-section .product-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Kart üstü durum rozetinin sadece yerleşim/stil kabı;
   renkler components.css'teki status-* sınıflarından gelir. */
.related-products-section .product-card-status {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    z-index: 2;
}

.related-products-section .product-card-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.related-products-section .product-card-meta {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}
.related-products-section .product-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--color-text-base);
    margin-bottom: 10px;
    flex-grow: 1;
}
.related-products-section .product-card-title a { color: inherit; text-decoration: none; }
.related-products-section .product-card-title a:hover { color: var(--color-primary); }

.related-products-section .product-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}
.related-products-section .rating-count { color: var(--color-text-muted); font-size: 13px; }

@media (max-width: 480px) {
    .product-header-container .product-title { font-size: 24px; }
    .section-box h2 { font-size: 20px; }
}
