/* ==========================================================================
   BIKES & CRAFTS - SOPHISTICATED ARTISAN PANEL (CSS VARIABLES)
   ========================================================================== */
:root {
    /* 1. TIPOGRAFİ */
    --font-primary: 'Montserrat', sans-serif;
    --font-heading: 'Bebas Neue', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* 2. FONT BOYUTLARI */
    --fs-main-nav: 26px;         
    --fs-sub-nav: 12px;          
    --fs-hero-title: 70px;       
    --fs-category-title: 60px;   
    --fs-section-manifesto: 25px;
    --fs-item-name: 40px;        
    --fs-item-desc: 15px;        
    --fs-price-value: 18px;      
    --fs-craft-badge: 15px;       

    /* 3. ANA RENK PALETİ */
    --color-bg: #FAF9F6;           
    --color-petrol: #2F3E46;       
    --color-petrol-muted: #526369; 
    
    /* 4. YARDIMCI ARTISAN RENKLER */
    --color-terracotta: #C06C4D;   
    --color-green: #828A69;        
    --color-mustard: #D9A021;      

    /* 5. GRAFİKSEL ÖGELER */
    --divider-width: 40px;        
    --photo-max-width: 300px; 
    --photo-border-radius: 6px;   
}

@media (max-width: 600px) {
    :root {
        --fs-main-nav: 16px;
        --fs-sub-nav: 11px;
        --fs-hero-title: 32px; 
        --fs-category-title: 30px;
        --fs-item-name: 22px;
        --fs-price-value: 16px;  
    }
}

/* ==========================================================================
   STİL ŞEMASI MOTORU
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-petrol);
    overflow-x: hidden;
    padding-top: 130px; 
}

/* 1. KATMAN: ÜST NAVİGASYON */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 60px;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    z-index: 1000;
    border-bottom: 2px solid var(--color-petrol);
    padding: 10px 20px;
}

.main-nav a {
    font-family: var(--font-heading);
    font-size: var(--fs-main-nav);
    letter-spacing: 1px;
    color: var(--color-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

.main-nav a.active, .main-nav a:hover {
    color: var(--color-petrol);
}

/* 2. KATMAN: ALT KATEGORİ (MOBİL AKICI KAYDIRMA DÜZENLEMESİ) */
.sub-nav-wrapper {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    min-height: 50px;
    background-color: rgba(250, 249, 246, 0.95);
    z-index: 999;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch; 
    border-bottom: 1px solid rgba(47, 62, 70, 0.1);
    display: flex;
    justify-content: center; 
    align-items: center;
}

.sub-nav-wrapper::-webkit-scrollbar {
    display: none;
}

.sub-nav {
    display: block;
    text-align: center;
    width: 100%;
    padding: 10px 15px;
}

.sub-nav a {
    font-size: var(--fs-sub-nav);
    font-weight: 600;
    color: var(--color-petrol-muted);
    text-decoration: none;
    padding: 6px 14px;
    margin: 4px 5px;
    border-radius: 20px;
    border: 1px solid rgba(47, 62, 70, 0.2);
    transition: all 0.2s ease;
    display: inline-block;
}

.sub-nav a.active, .sub-nav a:hover {
    background-color: var(--color-mustard);
    color: var(--color-bg);
    border-color: var(--color-mustard);
}

/* MODERN CSS PARALLAX KAPSAYICI YAPISI */
.hero-parallax-container {
    position: relative;
    width: 100%;
    height: 260px;
    overflow: hidden;
    clip-path: inset(0 0 0 0); 
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-parallax-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.hero-parallax-container::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(0deg, rgba(47, 62, 70, 0.3), rgba(217, 160, 33, 0.08));
    z-index: 2;
}

/* Mizanpaj Blok Kutusu */
.hero-banner-title-box {
    position: relative;
    z-index: 3; 
    background-color: var(--color-bg); 
    padding: 12px 35px;
    border: 2px solid var(--color-petrol);
    display: inline-block;
    transform: rotate(-1deg); 
}

.hero-banner-title-box h1 {
    font-family: var(--font-heading);
    font-size: var(--fs-hero-title);
    letter-spacing: 3px;
    color: var(--color-petrol);
    line-height: 1;
    margin: 0;
}

/* MENÜ PANELİ VE ORTALI AKS */
.menu-container {
    max-width: 500px;
    margin: 40px auto 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    scroll-margin-top: 150px; 
}

.category-title {
    font-family: var(--font-heading);
    font-size: var(--fs-category-title);
    letter-spacing: 4px;
    color: var(--color-petrol);
    margin-bottom: 15px;
    font-weight: 400;
}

.section-manifesto {
    font-family: var(--font-serif);
    font-size: var(--fs-section-manifesto);
    font-style: italic;
    color: var(--color-green);
    line-height: 1.6;
    max-width: 440px;
    margin-bottom: 40px;
}

/* ÜRÜN KARTLARI GENEL AKSI */
.menu-item {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.item-main-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.item-craft-badge {
    font-family: var(--font-primary);
    font-size: var(--fs-craft-badge);
    font-weight: 600;
    color: var(--color-terracotta);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 5px;
    border: 1px solid rgba(192, 108, 77, 0.4);
    padding: 2px 10px;
    border-radius: 3px;
    display: inline-block;
}

.item-name {
    font-family: var(--font-serif);
    font-size: var(--fs-item-name);
    font-weight: 400;
    color: var(--color-petrol);
    margin-bottom: 6px;
}

.item-description {
    font-family: var(--font-primary);
    font-size: var(--fs-item-desc);
    color: var(--color-petrol-muted);
    line-height: 1.6;
    font-style: italic;
    max-width: 420px;
    margin-bottom: 10px; /* Alttaki meta satırı için pay optimize edildi */
}

/* ==========================================================================
   YENİ: KALORİ & ALERJEN PANEL TİPOGRAFİSİ (SADE & EDİTÖRYEL DİPNOT)
   ========================================================================== */
.item-meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 14px;
}

.meta-calories {
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-petrol-muted);
    letter-spacing: 0.5px;
}

.meta-pipe {
    font-size: 13px;
    color: rgba(47, 62, 70, 0.15);
}

.meta-allergens {
    font-family: var(--font-serif);
    font-size: 13px;
    font-style: italic;
    color: var(--color-green); /* Zanaat ve doğallık tonu zeytin yeşili */
}

/* ==========================================================================
   GENİŞLİĞİ SABİT, YÜKSEKLİĞİ DOĞAL ORANLI INLINE RESIM YAPISI
   ========================================================================== */
.item-inline-photo-wrapper {
    width: 100%;
    max-width: var(--photo-max-width); /* Genişlik üst sınırını buradan kilitledik (300px) */
    height: auto;                      /* Yükseklik sınırını tamamen çöpe attık */
    margin: 12px auto 16px auto;
}

.item-inline-photo {
    width: 100%;
    height: auto;                      /* Fotoğrafın sünmesini engeller, kendi orijinal oranını korur */
    border-radius: 0; 
    border: none;    
    box-shadow: none; 
    
    /* KESİN ÇÖZÜM: Kırpma yapmaz, fotoğraf dikey çekildiyse dikey, yataysa yatay olarak tam kadraj basılır */
    object-fit: contain; 
} /* FİYAT ALANI */
.price-row {
    display: flex;
    justify-content: center;
    gap: 35px;
    width: 100%;
}

.price-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-col .label {
    font-size: 13px;
    text-transform: lowercase;
    color: var(--color-petrol-muted);
    margin-bottom: 2px;
}

.price-col .price {
    font-size: var(--fs-price-value);
    font-weight: 600;
    color: var(--color-mustard); 
}

.price-col .price::after {
    content: ' TL';
    font-size: 12px;
    color: var(--color-petrol-muted);
}

/* AYIRICI ÇİZGİLER */
.divider {
    width: var(--divider-width);
    height: 2px;
    background-color: var(--color-petrol);
    margin: 25px 0;
    opacity: 0.2;
}

/* NET VE KESKİN PASİF ÜRÜN MOTORU */
.menu-item.out-of-stock .item-main-content {
    opacity: 0.5 !important;
}

.unavailable-notice {
    display: inline-block;
    font-family: var(--font-primary);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #A64B2A; 
    background-color: #F5EBE6; 
    border: 1px solid rgba(166, 75, 42, 0.2);
    padding: 6px 16px;
    margin: 12px auto 6px auto;
    border-radius: 4px;
    text-align: center;
    text-transform: uppercase;
    position: relative;
    z-index: 10;
    opacity: 1 !important; 
}

.loading, .error {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-petrol-muted);
}

/* RESPONSIVE MOBİL ALAN KODLARI */
@media (max-width: 600px) {
    body { padding-top: 140px; }
    .main-nav { gap: 12px; }
    .sub-nav-wrapper { 
        top: 55px; 
        justify-content: flex-start;
        padding-left: 10px;
    }
    .sub-nav { 
        text-align: left;
        width: auto;
        padding: 8px 10px;
    }
    .hero-parallax-container { height: 180px; }
}

/* ==========================================================================
   MATBAA VE BASKI OPTİMİZASYON MOTORU (CTRL + P / PDF İÇİN KESİN ÇÖZÜM)
   ========================================================================== */
@media print {
    /* 1. Sayfa Yapısı ve Sayfa Sonu Ayarları (A4 / A3 Dikey Pafta) */
    @page {
        size: A4 portrait; 
        margin: 20mm 15mm; 
    }

    body {
        background-color: #ffffff !important; 
        color: #2F3E46 !important;
        padding-top: 0 !important; 
        overflow: visible !important;
    }

    /* 2. Baskıda Gereksiz Dijital Elemanları Gizle */
    .main-nav,
    .sub-nav-wrapper,
    .loading,
    .error {
        display: none !important; 
    }

    /* E-tabloda "yok" olan ürünleri baskı menüsünden tamamen gizle (Yer kaplamasın) */
    .menu-item.out-of-stock {
        display: none !important;
    }

    /* 3. BAŞLIK KAYMALARINI ÖNLEYEN VE HER ZAMAN SAYFA BAŞINA ATAN BANNER DÜZENLEMESİ */
    .hero-parallax-container {
        display: block !important;
        position: relative !important;
        width: 100% !important;
        height: 140px !important; 
        margin: 0 auto 30px auto !important; /* Sayfa başında olacağı için üst margin'i sıfırladık */
        overflow: hidden !important;
        clip-path: none !important;
        text-align: center !important;
        
        /* KESİN ÇÖZÜM: Bu bloktan hemen önce zorunlu olarak sayfa sonlandırma (page break) tetikler */
        page-break-before: always !important; /* Eski tarayıcı emniyeti */
        break-before: page !important;        /* Modern PDF motoru standardı */
    }

    /* Fixed kuralı baskı esnasında tamamen eziliyor, resim sayfaya kilitleniyor */
    .hero-parallax-bg {
        position: absolute !important; 
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-size: cover !important;
        background-position: center !important;
        z-index: 1 !important;
        transform: none !important;
    }

    .hero-parallax-container::before {
        content: '';
        position: absolute !important;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(47, 62, 70, 0.2) !important;
        z-index: 2 !important;
    }

    /* Başlık Kutusu: Sağa sola fırlamayı engelleyen net ortalama aksı */
    .hero-banner-title-box {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important; /* Yatayda ve dikeyde milimetrik ortalama */
        z-index: 3 !important; 
        background-color: #ffffff !important; 
        padding: 10px 30px !important;
        border: 2px solid #2F3E46 !important;
        display: inline-block !important;
        width: auto !important;
    }

    .hero-banner-title-box h1 {
        color: #2F3E46 !important;
        font-size: 32px !important; /* Baskı kalitesi için optimize boyut */
        letter-spacing: 2px !important;
        line-height: 1 !important;
        margin: 0 !important;
        text-align: center !important;
    }

    /* 4. Menü Konteyner ve Ürün Düzeni */
    .menu-container {
        max-width: 100% !important; 
        margin-top: 20px !important;
        page-break-inside: auto !important;
    }

    .menu-item {
        page-break-inside: avoid !important; /* Ürün kartının bölünmesini engelle */
        margin-bottom: 30px !important;
    }

    .item-main-content {
        opacity: 1 !important; /* Baskıda pasifleri gizlediğimiz için aktifler net çıksın */
    }
  /* ALT KATEGORİ BAŞLIKLARININ SAYFA SONUNDA TEK BAŞINA KALMASINI ENGELLER */
    .category-title {
        page-break-after: avoid !important; /* Eski tarayıcı emniyeti */
        break-after: avoid !important;      /* Modern PDF motoru standardı */
    }

    /* Resim Boyut Standardı */
    .item-inline-photo-wrapper {
        max-width: 240px !important; 
        margin: 10px auto !important;
    }

    .item-inline-photo {
        filter: none !important;
        -webkit-print-color-adjust: exact; 
        print-color-adjust: exact;
    }

    .divider {
        background-color: #2F3E46 !important;
        opacity: 0.3 !important;
        margin: 20px 0 !important;
        page-break-inside: avoid !important;
    }
}