:root {
    --primary-color: #EDB62D;
    /* Mustard - Vurgu Rengi */
    --primary-hover: #FFC107;
    --secondary-color: #6B8E23;
    /* Olive - Tamamlayıcı */
    --bg-color: #Fdfbf7;
    /* Cream - Ana Arka Plan */
    --text-color: #333333;
    /* Dark Anthracite - Metin */
    --text-muted: #636e72;
    --card-bg: #FFFFFF;
    --border-radius: 20px;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Lato', sans-serif;
    --font-serif: 'Merriweather', serif;

    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
}

html {
    overflow-y: scroll;
    color-scheme: light;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background-color: var(--bg-color);
    will-change: scroll-position;
    background-image: url('assets/bg_final_edited.webp');
    background-size: cover;
    background-position: top center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    /* Performance fixes */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Remove body::before */



.app-header {
    text-align: center;
    padding: 1.5rem 2rem;
    background: rgba(253, 251, 247, 0.85);
    /* New cream color with transparency */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
    margin: 0 auto 3rem auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    max-width: 100%;
    border-radius: 0 0 24px 24px;
}

.app-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

.app-header p {
    color: var(--primary-color);
    font-size: 1rem;
    margin-top: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

main {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 1rem;
    flex: 1;
}

.view {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
    display: none;
}

.view.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.view-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    font-weight: 700;
    position: relative;
    padding-left: 1rem;
}

.glow-effect {
    text-shadow: 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #fff, 0 0 60px #fff, 0 0 80px #fff;
}

.view-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: var(--primary-color);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color);
}

/* Category Grid */
.category-grid {
    display: grid;
    /* Desktop: 3-4 columns preferred, we use minmax to adapt */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-md);
}

.category-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 1rem;
    /* mix-blend-mode removed to keep images bright */
    border-radius: 50%;
    /* Modern circular look */
    box-shadow: var(--shadow-sm);
    /* Start slightly visible to avoid total emptiness, or keep 0 if placeholder color is enough */
    opacity: 0;
    background-color: #e0e0e0;
    /* Use a visible placeholder color */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease-out;
}

.category-image.loaded {
    opacity: 1;
}

.category-card:hover .category-image {
    transform: scale(1.1) rotate(2deg);
    /* Dynamic zoom & subtle twist */
}

.category-name {
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--text-color);
}

/* Product View Header */
.view-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1.5rem;
}

.view-header .icon-button {
    position: relative;
    top: -15px;
    /* Lift button up */
}

.icon-button {
    background: #ffffff;
    border: none;
    box-shadow: var(--shadow-sm);
    color: var(--text-color);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    flex-shrink: 0;
    /* Prevent squashing */
}

.icon-button:hover {
    background: var(--primary-color);
    color: #ffffff;
    box-shadow: var(--shadow-md);
    transform: scale(1.1);
}

/* Product List */
.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.product-card {
    background: var(--card-bg);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: row;
    min-height: 160px;
    height: auto;
    /* Slightly taller for better description fit */
    transition: all var(--transition-speed);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.product-image {
    width: 140px;
    height: 100%;
    object-fit: cover;
    background-color: #e0e0e0;
    /* Darker placeholder */
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

.product-image.loaded {
    opacity: 1;
}

.product-details {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    /* Prevents flex item from overflowing */
}

.product-price-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    /* Align right */
    padding-right: 1.5rem;
    padding-left: 0.5rem;
    flex-shrink: 0;
    /* Prevent shrinking */
    min-width: 80px;
    /* Ensure space */
}

.product-name {
    font-family: var(--font-heading);
    /* Poppins */
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

.product-desc {
    font-family: var(--font-serif);
    /* Merriweather for description */
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 300;
    font-style: italic;
    margin-top: 5px;
}

.product-price {
    font-weight: 800;
    color: var(--text-color);
    /* Dark text on... */
    font-size: 1.25rem;

    background: var(--primary-color);
    /* Mustard background */
    padding: 0.5rem 1rem;
    border-radius: 12px;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(237, 182, 45, 0.3);
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-card {
        padding: 1rem;
        min-height: 120px;
    }

    .product-list {
        grid-template-columns: 1fr;
    }

    .product-card {
        height: auto;
        min-height: 140px;
    }

    .app-header h1 {
        font-size: 2rem;
    }

    /* Mobile specific: Disable fixed background to prevent address bar jitter */
    body {
        background-attachment: scroll;
        background-position: top center;
        background-size: 100% auto;
        background-repeat: repeat-y;
    }

    /* Loading Title Fix */
    .loading-title {
        /* Force text to stack (Mutlu / Restorant) immediately */
        width: min-content;
        margin-left: auto;
        margin-right: auto;
        line-height: 1.1;
    }
}

/* Footer & Contact Info */
.app-footer {
    text-align: center;
    padding: 2rem;
    margin-top: auto;
    /* Flexbox ile en alta itilmesi için */
    background: rgba(255, 255, 255, 0.9);
    /* Daha opak beyaz */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 24px 24px 0 0;
    width: 100%;
}

.contact-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem 2rem;
    background: #ffffff;
    border-radius: 30px;
    /* Biraz daha karemsi ama yuvarlak */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.03);
    flex-direction: column;
    /* İçeriği alt alta diz */
}

.contact-title {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--primary-color);
    margin-bottom: 0;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.contact-info:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(237, 182, 45, 0.25);
}

.contact-info svg {
    color: var(--primary-color);
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.contact-info a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

/* Mobile Adjustments for Footer - En Sona Eklendi */
@media (max-width: 600px) {
    .app-footer {
        padding: 1.5rem 1rem;
    }

    .contact-info {
        width: 100%;
        max-width: 320px;
        /* Biraz daha geniş */
        padding: 0.75rem 1rem;
        justify-content: center;
        background: #ffffff;
        /* Garanti olsun */
    }

    .contact-info a {
        font-size: 0.95rem;
        /* Biraz daha okunaklı */
    }

    .contact-info svg {
        width: 20px;
        height: 20px;
    }
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100vh;
    /* Fallback */
    height: 100dvh;
    /* Mobile viewport fix */
    background-color: #ffffff;
    z-index: 2147483647;
    /* Maximum z-index */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    overscroll-behavior: none;
    /* Prevent scroll */
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 1s ease-out;
}

.loading-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.loading-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(237, 182, 45, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Utility to prevent scrolling */
html.no-scroll,
body.no-scroll {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
    overscroll-behavior: none !important;
    position: fixed !important;
    width: 100% !important;
}