/**
 * ZMark Restoran - Frontend Styles
 * Modern restoran menü görünümü - v2.0
 */

/* =============================================
   CSS DEĞİŞKENLERİ
   ============================================= */
:root {
    --zmark-primary: #c9a962;
    --zmark-primary-rgb: 201, 169, 98;
    --zmark-secondary: #4a7c59;
    --zmark-secondary-rgb: 74, 124, 89;
    --zmark-text: #ffffff;
    --zmark-text-rgb: 255, 255, 255;
    --zmark-text-muted: #9ca3af;
    --zmark-card-bg: #1a1a2e;
    --zmark-card-bg-rgb: 26, 26, 46;
    --zmark-card-border: rgba(255, 255, 255, 0.1);
    --zmark-badge-border: #4a7c59;
    --zmark-transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --zmark-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --zmark-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.25);
    --zmark-radius: 16px;
    --zmark-radius-sm: 10px;
}

/* =============================================
   ANA WRAPPER
   ============================================= */
.zmark-restoran-wrapper {
    background: transparent;
    padding: 50px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--zmark-text);
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.zmark-restoran-wrapper *,
.zmark-restoran-wrapper *::before,
.zmark-restoran-wrapper *::after {
    box-sizing: border-box;
}

/* =============================================
   KATEGORİ FİLTRELERİ - Modern Tab Tasarımı
   ============================================= */
.zmark-restoran-categories {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 50px;
    padding: 8px;
    background: rgba(var(--zmark-card-bg-rgb), 0.5);
    border-radius: 60px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.zmark-restoran-category-btn {
    background: transparent;
    border: none;
    color: var(--zmark-text-muted);
    padding: 14px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--zmark-transition);
    border-radius: 50px;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.zmark-restoran-category-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--zmark-primary);
    opacity: 0;
    transition: var(--zmark-transition);
    border-radius: inherit;
}

.zmark-restoran-category-btn:hover {
    color: var(--zmark-text);
}

.zmark-restoran-category-btn:hover::before {
    opacity: 0.15;
}

.zmark-restoran-category-btn.active {
    background: linear-gradient(135deg, var(--zmark-primary) 0%, rgba(var(--zmark-primary-rgb), 0.85) 100%);
    color: #0d0d0d;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(var(--zmark-primary-rgb), 0.4);
}

.zmark-restoran-category-btn.active::before {
    opacity: 0;
}

/* =============================================
   ÜRÜN GRİD
   ============================================= */
.zmark-restoran-items {
    display: grid;
    gap: 24px;
}

.zmark-restoran-wrapper[data-columns="1"] .zmark-restoran-items {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
}

.zmark-restoran-wrapper[data-columns="2"] .zmark-restoran-items {
    grid-template-columns: repeat(2, 1fr);
}

.zmark-restoran-wrapper[data-columns="3"] .zmark-restoran-items {
    grid-template-columns: repeat(3, 1fr);
}

.zmark-restoran-wrapper[data-columns="4"] .zmark-restoran-items {
    grid-template-columns: repeat(4, 1fr);
}

/* =============================================
   ÜRÜN KARTI - Modern Glass Morphism
   ============================================= */
.zmark-restoran-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: rgba(var(--zmark-card-bg-rgb), 0.6);
    padding: 20px;
    border-radius: var(--zmark-radius);
    transition: var(--zmark-transition);
    position: relative;
    border: 1px solid var(--zmark-card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.zmark-restoran-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, 
        rgba(var(--zmark-primary-rgb), 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: var(--zmark-transition);
    pointer-events: none;
}

.zmark-restoran-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--zmark-shadow-hover);
    border-color: rgba(var(--zmark-primary-rgb), 0.3);
}

.zmark-restoran-item:hover::before {
    opacity: 1;
}

/* =============================================
   ÜRÜN GÖRSELİ
   ============================================= */
.zmark-restoran-item-image {
    width: 100px;
    min-width: 100px;
    height: 100px;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: var(--zmark-radius-sm);
    background: linear-gradient(135deg, 
        rgba(var(--zmark-card-bg-rgb), 0.8) 0%, 
        rgba(var(--zmark-card-bg-rgb), 0.4) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.zmark-restoran-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.zmark-restoran-item:hover .zmark-restoran-item-image img {
    transform: scale(1.1);
}

.zmark-restoran-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, 
        rgba(var(--zmark-card-bg-rgb), 0.9) 0%, 
        rgba(var(--zmark-card-bg-rgb), 0.5) 100%);
}

.zmark-restoran-no-image .dashicons {
    font-size: 36px;
    width: 36px;
    height: 36px;
    color: var(--zmark-text-muted);
    opacity: 0.3;
}

/* Badge'ler (Görsel Üzerinde) */
.zmark-restoran-soldout-badge,
.zmark-restoran-new-badge {
    position: absolute;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.zmark-restoran-soldout-badge {
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #fff;
}

.zmark-restoran-new-badge {
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, var(--zmark-primary) 0%, rgba(var(--zmark-primary-rgb), 0.85) 100%);
    color: #0d0d0d;
}

/* =============================================
   ÜRÜN İÇERİĞİ
   ============================================= */
.zmark-restoran-item-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 10px;
}

.zmark-restoran-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.zmark-restoran-item-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--zmark-text);
    line-height: 1.4;
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    transition: var(--zmark-transition);
}

.zmark-restoran-item:hover .zmark-restoran-item-title {
    color: var(--zmark-primary);
}

/* =============================================
   FİYAT ALANI
   ============================================= */
.zmark-restoran-item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
}

.zmark-restoran-current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--zmark-primary);
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.zmark-restoran-current-price.sale {
    color: #ef4444;
}

.zmark-restoran-old-price {
    font-size: 13px;
    color: var(--zmark-text-muted);
    text-decoration: line-through;
    opacity: 0.7;
}

/* =============================================
   AÇIKLAMA
   ============================================= */
.zmark-restoran-item-description {
    font-size: 14px;
    color: var(--zmark-text-muted);
    line-height: 1.65;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =============================================
   ETİKETLER (BADGES)
   ============================================= */
.zmark-restoran-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.zmark-restoran-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(var(--zmark-secondary-rgb), 0.15);
    border: 1px solid rgba(var(--zmark-secondary-rgb), 0.4);
    color: var(--zmark-secondary);
    transition: var(--zmark-transition);
}

.zmark-restoran-item:hover .zmark-restoran-badge {
    background: rgba(var(--zmark-secondary-rgb), 0.25);
    border-color: var(--zmark-secondary);
}

.zmark-restoran-portion {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(var(--zmark-text-rgb), 0.05);
    border: 1px solid var(--zmark-card-border);
    color: var(--zmark-text-muted);
    transition: var(--zmark-transition);
}

.zmark-restoran-spicy {
    font-size: 14px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}

/* =============================================
   MEVCUT OLMAYAN ÜRÜN
   ============================================= */
.zmark-restoran-item.zmark-restoran-unavailable {
    opacity: 0.5;
    pointer-events: none;
}

.zmark-restoran-item.zmark-restoran-unavailable .zmark-restoran-item-image img {
    filter: grayscale(100%);
}

/* =============================================
   BAŞLIKLAR
   ============================================= */
.zmark-restoran-category-title,
.zmark-restoran-section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 600;
    color: var(--zmark-primary);
    margin: 0 0 16px 0;
    font-family: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    position: relative;
}

.zmark-restoran-category-title::after,
.zmark-restoran-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--zmark-primary), rgba(var(--zmark-primary-rgb), 0.3));
    margin: 16px auto 0;
    border-radius: 2px;
}

.zmark-restoran-category-desc {
    text-align: center;
    color: var(--zmark-text-muted);
    margin: 0 0 40px 0;
    font-size: 16px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* =============================================
   BOŞ DURUM VE HATALAR
   ============================================= */
.zmark-restoran-no-items {
    text-align: center;
    color: var(--zmark-text-muted);
    padding: 80px 24px;
    grid-column: 1 / -1;
    font-size: 16px;
    background: rgba(var(--zmark-card-bg-rgb), 0.3);
    border-radius: var(--zmark-radius);
    border: 1px dashed var(--zmark-card-border);
}

.zmark-restoran-error {
    text-align: center;
    color: #ef4444;
    padding: 24px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--zmark-radius-sm);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* =============================================
   YÜKLEME ANİMASYONU
   ============================================= */
.zmark-restoran-loading {
    text-align: center;
    padding: 60px;
    color: var(--zmark-text-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.zmark-restoran-loading::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(var(--zmark-primary-rgb), 0.2);
    border-top-color: var(--zmark-primary);
    border-radius: 50%;
    animation: zmark-spin 0.8s linear infinite;
}

@keyframes zmark-spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   FADE IN ANİMASYONU
   ============================================= */
.zmark-restoran-item {
    animation: zmark-fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.zmark-restoran-item:nth-child(1) { animation-delay: 0.05s; }
.zmark-restoran-item:nth-child(2) { animation-delay: 0.1s; }
.zmark-restoran-item:nth-child(3) { animation-delay: 0.15s; }
.zmark-restoran-item:nth-child(4) { animation-delay: 0.2s; }
.zmark-restoran-item:nth-child(5) { animation-delay: 0.25s; }
.zmark-restoran-item:nth-child(6) { animation-delay: 0.3s; }
.zmark-restoran-item:nth-child(7) { animation-delay: 0.35s; }
.zmark-restoran-item:nth-child(8) { animation-delay: 0.4s; }
.zmark-restoran-item:nth-child(9) { animation-delay: 0.45s; }
.zmark-restoran-item:nth-child(n+10) { animation-delay: 0.5s; }

@keyframes zmark-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* =============================================
   RESPONSIVE - BÜYÜK TABLET (1200px)
   ============================================= */
@media (max-width: 1200px) {
    .zmark-restoran-wrapper[data-columns="4"] .zmark-restoran-items {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .zmark-restoran-items {
        gap: 20px;
    }
}

/* =============================================
   RESPONSIVE - TABLET (992px)
   ============================================= */
@media (max-width: 992px) {
    .zmark-restoran-wrapper {
        padding: 40px 20px;
    }
    
    .zmark-restoran-wrapper[data-columns="3"] .zmark-restoran-items,
    .zmark-restoran-wrapper[data-columns="4"] .zmark-restoran-items {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zmark-restoran-categories {
        gap: 8px;
        padding: 6px;
        margin-bottom: 40px;
    }
    
    .zmark-restoran-category-btn {
        padding: 12px 20px;
        font-size: 12px;
        letter-spacing: 0.8px;
    }
    
    .zmark-restoran-item {
        padding: 16px;
    }
    
    .zmark-restoran-item-image {
        width: 90px;
        min-width: 90px;
        height: 90px;
    }
    
    .zmark-restoran-category-title,
    .zmark-restoran-section-title {
        font-size: 30px;
    }
}

/* =============================================
   RESPONSIVE - KÜÇÜK TABLET (768px)
   ============================================= */
@media (max-width: 768px) {
    .zmark-restoran-wrapper {
        padding: 32px 16px;
    }
    
    .zmark-restoran-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        padding: 6px 8px;
        gap: 6px;
        margin-bottom: 32px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .zmark-restoran-categories::-webkit-scrollbar {
        display: none;
    }
    
    .zmark-restoran-category-btn {
        padding: 10px 18px;
        font-size: 11px;
        letter-spacing: 0.5px;
        flex-shrink: 0;
    }
    
    .zmark-restoran-wrapper[data-columns="2"] .zmark-restoran-items,
    .zmark-restoran-wrapper[data-columns="3"] .zmark-restoran-items,
    .zmark-restoran-wrapper[data-columns="4"] .zmark-restoran-items {
        grid-template-columns: 1fr;
    }
    
    .zmark-restoran-items {
        gap: 16px;
    }
    
    .zmark-restoran-item {
        padding: 16px;
        gap: 16px;
        border-radius: var(--zmark-radius-sm);
    }
    
    .zmark-restoran-item-image {
        width: 85px;
        min-width: 85px;
        height: 85px;
        border-radius: 8px;
    }
    
    .zmark-restoran-item-title {
        font-size: 16px;
    }
    
    .zmark-restoran-current-price {
        font-size: 18px;
    }
    
    .zmark-restoran-item-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
    
    .zmark-restoran-category-title,
    .zmark-restoran-section-title {
        font-size: 26px;
    }
    
    .zmark-restoran-category-title::after,
    .zmark-restoran-section-title::after {
        width: 50px;
        height: 2px;
        margin-top: 12px;
    }
}

/* =============================================
   RESPONSIVE - MOBİL (576px)
   ============================================= */
@media (max-width: 576px) {
    .zmark-restoran-wrapper {
        padding: 24px 12px;
    }
    
    .zmark-restoran-categories {
        margin-bottom: 24px;
        border-radius: var(--zmark-radius-sm);
    }
    
    .zmark-restoran-category-btn {
        padding: 10px 16px;
        font-size: 10px;
    }
    
    .zmark-restoran-items {
        gap: 12px;
    }
    
    .zmark-restoran-item {
        padding: 14px;
        gap: 14px;
    }
    
    .zmark-restoran-item-image {
        width: 75px;
        min-width: 75px;
        height: 75px;
    }
    
    .zmark-restoran-soldout-badge,
    .zmark-restoran-new-badge {
        font-size: 8px;
        padding: 4px 8px;
        top: 6px;
    }
    
    .zmark-restoran-soldout-badge { right: 6px; }
    .zmark-restoran-new-badge { left: 6px; }
    
    .zmark-restoran-item-header {
        gap: 12px;
    }
    
    .zmark-restoran-item-title {
        font-size: 15px;
    }
    
    .zmark-restoran-current-price {
        font-size: 16px;
    }
    
    .zmark-restoran-old-price {
        font-size: 11px;
    }
    
    .zmark-restoran-item-description {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .zmark-restoran-badge,
    .zmark-restoran-portion {
        font-size: 9px;
        padding: 5px 10px;
        border-radius: 5px;
    }
    
    .zmark-restoran-item-meta {
        gap: 6px;
    }
    
    .zmark-restoran-category-title,
    .zmark-restoran-section-title {
        font-size: 22px;
    }
    
    .zmark-restoran-category-desc {
        font-size: 14px;
        margin-bottom: 28px;
    }
}

/* =============================================
   RESPONSIVE - KÜÇÜK MOBİL (400px)
   ============================================= */
@media (max-width: 400px) {
    .zmark-restoran-wrapper {
        padding: 20px 10px;
    }
    
    .zmark-restoran-item {
        padding: 12px;
        gap: 12px;
    }
    
    .zmark-restoran-item-image {
        width: 65px;
        min-width: 65px;
        height: 65px;
    }
    
    .zmark-restoran-item-header {
        flex-direction: column;
        gap: 6px;
    }
    
    .zmark-restoran-item-price {
        align-items: flex-start;
        flex-direction: row;
        gap: 8px;
    }
    
    .zmark-restoran-item-title {
        font-size: 14px;
    }
    
    .zmark-restoran-current-price {
        font-size: 15px;
    }
}

/* =============================================
   YAZDIRMA STİLLERİ
   ============================================= */
@media print {
    .zmark-restoran-wrapper {
        background: #fff !important;
        color: #1a1a1a !important;
        padding: 20px !important;
    }
    
    .zmark-restoran-categories {
        display: none !important;
    }
    
    .zmark-restoran-items {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    .zmark-restoran-item {
        background: #fff !important;
        border: 1px solid #e0e0e0 !important;
        box-shadow: none !important;
        transform: none !important;
        padding: 12px !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .zmark-restoran-item::before {
        display: none !important;
    }
    
    .zmark-restoran-item-title,
    .zmark-restoran-current-price {
        color: #1a1a1a !important;
    }
    
    .zmark-restoran-item-description {
        color: #666 !important;
    }
    
    .zmark-restoran-badge {
        border-color: #666 !important;
        color: #666 !important;
        background: transparent !important;
    }
    
    .zmark-restoran-category-title,
    .zmark-restoran-section-title {
        color: #1a1a1a !important;
    }
    
    .zmark-restoran-category-title::after,
    .zmark-restoran-section-title::after {
        background: #1a1a1a !important;
    }
}

/* =============================================
   PREFERS REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .zmark-restoran-item,
    .zmark-restoran-category-btn,
    .zmark-restoran-item-image img,
    .zmark-restoran-badge {
        transition: none !important;
        animation: none !important;
    }
    
    .zmark-restoran-item {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* =============================================
   DARK MODE SUPPORT
   ============================================= */
@media (prefers-color-scheme: light) {
    .zmark-restoran-wrapper:not([style*="--zmark-text"]) {
        --zmark-text: #1a1a2e;
        --zmark-text-rgb: 26, 26, 46;
        --zmark-text-muted: #6b7280;
        --zmark-card-bg: #ffffff;
        --zmark-card-bg-rgb: 255, 255, 255;
        --zmark-card-border: rgba(0, 0, 0, 0.08);
    }
}
