/**
 * Restaurant Card - Yemeksepeti Style
 * FIXED: Große Food-Bilder, Badges, Clean Layout
 * CSP-konform
 */

/* === Card Container === */
.restaurant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.25s;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.restaurant-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

/* === Image Section === */
.restaurant-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #f5f5f5;
}

.restaurant-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.restaurant-card:hover .restaurant-image {
    transform: scale(1.08);
}

/* === Image Placeholder === */
.restaurant-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--theme-primary, #667eea) 0%, var(--theme-secondary, #764ba2) 100%);
}

.restaurant-image-placeholder i {
    font-size: 48px;
    color: white;
    opacity: 0.8;
}

/* Color variations for placeholders */
.restaurant-card:nth-child(6n+1) .restaurant-image-placeholder { background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%); }
.restaurant-card:nth-child(6n+2) .restaurant-image-placeholder { background: linear-gradient(135deg, #4ecdc4 0%, #44a8a0 100%); }
.restaurant-card:nth-child(6n+3) .restaurant-image-placeholder { background: linear-gradient(135deg, #45b7d1 0%, #3a9bb5 100%); }
.restaurant-card:nth-child(6n+4) .restaurant-image-placeholder { background: linear-gradient(135deg, #96ceb4 0%, #7fb89e 100%); }
.restaurant-card:nth-child(6n+5) .restaurant-image-placeholder { background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%); }
.restaurant-card:nth-child(6n+6) .restaurant-image-placeholder { background: linear-gradient(135deg, #a29bfe 0%, #6c5ce7 100%); }

/* === Badges (Top Left) === */
.badge-container {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: inline-block;
    max-width: fit-content;
}

.badge-yeclub {
    background: var(--color-danger, #e21b1b);
}

.badge-sponsored {
    background: var(--color-sponsored, #9333ea);
}

.badge-discount {
    background: var(--color-danger, #e21b1b);
}

.badge-express {
    background: var(--theme-success, #16a34a);
}

.badge-new {
    background: var(--color-info, #0ea5e9);
}

/* === "Öne Çıkan" Badge (Top Right) === */
.badge-featured {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    z-index: 10;
}

/* === Card Body === */
.restaurant-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* === Restaurant Header === */
.restaurant-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.restaurant-name {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}

.restaurant-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    background: var(--theme-success, #16a34a);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
    margin-left: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}

a.restaurant-rating:hover {
    color: white;
    opacity: 0.85;
    transform: scale(1.05);
}

.restaurant-rating i {
    font-size: 11px;
}

.restaurant-rating.rating-low {
    background: var(--theme-warning, #f59e0b);
}

.restaurant-rating .rating-count {
    font-weight: 400;
    opacity: 0.8;
    margin-left: 2px;
}

/* === Restaurant Info (Meta) === */
.restaurant-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    font-size: 14px;
    color: #666;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-item i {
    font-size: 13px;
    color: #999;
}

.info-separator {
    width: 4px;
    height: 4px;
    background: #ddd;
    border-radius: 50%;
}

/* === Cuisine Tags === */
.cuisine-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.cuisine-tag {
    padding: 5px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* === Footer (Delivery Info) === */
.restaurant-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
}

.delivery-info {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #666;
}

.delivery-time,
.delivery-fee {
    display: flex;
    align-items: center;
    gap: 4px;
}

.delivery-time i {
    color: var(--theme-success, #16a34a);
    font-size: 12px;
}

.delivery-fee i {
    color: var(--color-danger, #e21b1b);
    font-size: 12px;
}

.min-order {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.free-delivery {
    color: var(--theme-success, #16a34a);
    font-weight: 700;
}

/* === Info Link (SEO Detail Page) === */
.restaurant-info-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    color: var(--theme-primary, #667eea);
    text-decoration: none;
    transition: all 0.2s;
    flex-shrink: 0;
}

.restaurant-info-link:hover {
    background: var(--theme-primary, #667eea);
    color: white;
}

.restaurant-info-link i {
    font-size: 14px;
}

/* === Closed Overlay === */
.status-closed {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.status-closed-text {
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* === Sponsored Card Highlight === */
.restaurant-card.sponsored {
    box-shadow: 0 2px 12px rgba(226,27,27,0.15);
}

.restaurant-card.sponsored:hover {
    box-shadow: 0 8px 28px rgba(226,27,27,0.2);
}

/* === Special Promotions Banner === */
.promo-banner {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, var(--theme-warning, #fbbf24) 0%, color-mix(in srgb, var(--theme-warning, #f59e0b) 90%, black) 100%);
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #78350f;
    text-align: center;
    z-index: 15;
}

.promo-banner.discount-20 {
    background: linear-gradient(90deg, var(--color-danger, #e21b1b) 0%, color-mix(in srgb, var(--color-danger, #b91c1c) 85%, black) 100%);
    color: white;
}

/* === Skeleton Loading === */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 4 / 3;
}

.skeleton-text {
    height: 16px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* === Responsive === */
@media (max-width: 768px) {
    .restaurant-card-body {
        padding: 14px;
    }

    .restaurant-name {
        font-size: 16px;
    }

    .restaurant-info {
        font-size: 13px;
    }

    .badge-container {
        top: 10px;
        left: 10px;
    }

    .badge {
        padding: 5px 10px;
        font-size: 11px;
    }
}
