/* Public facing styles for QR Menu */
body {
    background: #f6f3ee;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* No padding-top needed as the topbar is removed */
}

.primary-green {
    color: #145c46;
}

/* --- Header Banner --- */
.header-banner {
    position: relative;
    width: 100%;
    color: white;
}

.header-background {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 500px; /* Default height (increased for PC view) */
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    background-color: #145c46; /* Fallback color */
}

.header-background::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 20px;
    background: linear-gradient(
        to bottom,
        rgba(246,243,238,0) 0%,
        #f6f3ee 100%
    );
}

.header-background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000;
    opacity: 0.2; /* Opacity for the image */
    z-index: 1;
}

.header-content {
    text-align: center;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.header-logo {
    max-width: 300px;
    max-height: 150px;
    object-fit: contain;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.9);
}

.language-switcher-container {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
}

.language-switcher .btn {
    border-radius: 14px;
    font-size: 0.7rem; /* Current font size */
    font-weight: 600;
    padding: 6px 10px; /* Current padding */
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.language-switcher .btn.active {
    background: #fff;
    color: #145c46;
    border-color: #fff;
}

/* Responsive adjustments for header */
@media (max-width: 768px) {
    .header-background {
        height: 240px;
    }

    .header-logo {
        max-width: 200px;
        max-height: 100px;
        padding: 0.75rem;
    }

    .language-switcher-container {
        top: 0.5rem;
        right: 0.5rem;
    }
}

/* Back Button Styling */
.back-button-container {
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.back-button {
    background: rgba(20, 92, 70, 0.1);
    border: 1px solid rgba(20, 92, 70, 0.3);
    color: #145c46;
    font-weight: 500;
    border-radius: 25px;
    padding: 12px 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 15px rgba(20, 92, 70, 0.1);
}

.back-button:hover {
    background: #145c46;
    color: white;
    border-color: #145c46;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(20, 92, 70, 0.2);
    text-decoration: none;
}

.back-button i {
    transition: transform 0.2s ease;
}

.back-button:hover i {
    transform: translateX(-2px);
}

/* --- Mobile-specific Optimizations --- */

@media (max-width: 991.98px) {
    .public-topbar {
        display: flex;
    }
}

/* Mobile Logo Optimizations from menu.php styles */
@media (max-width: 768px) {
    .restaurant-logo-container {
        display: none; /* Hide the desktop logo on mobile, as it's in the top bar now */
    }
}

/* Mobile Back Button Optimizations from menu.php styles */
@media (max-width: 768px) {
    .back-button-container {
        margin-top: 0.5rem;
        margin-bottom: 1.5rem;
        padding: 0 0.75rem;
    }
    
    .back-button {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 20px;
        width: auto;
    }
}

@media (max-width: 576px) {
    .back-button-container {
        margin-top: 0;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }
    
    .back-button {
        padding: 8px 14px;
        font-size: 0.85rem;
        border-radius: 18px;
        justify-content: center;
        min-width: 140px;
    }
    
    .back-button i {
        font-size: 0.8rem;
    }
}

/* --- UI/UX Improvements --- */
body {
    background-color: #FFF8EE; /*fef9f2   FFE0B2   F3F7F4   F9FAF7   F4F5F2   FFF8EE*/
    /*background-image:
        linear-gradient(to right, rgba(216, 211, 201, 0.5) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(216, 211, 201, 0.5) 1px, transparent 1px);*/
    background-size: 20px 20px;
}

@media (min-width: 992px) {
    .container {
        padding-top: 3rem;
    }
}

.search-wrapper {
    margin-bottom: 3rem;
    margin-top: 0rem !important;
}

@media (max-width: 767.98px) {
    .search-wrapper {
        margin-bottom: 1.5rem !important;
        margin-top: 0.5rem !important;
        padding-left: 5px;
        padding-right: 5px;
    }

    .search-wrapper .form-control {
        font-size: 0.85rem !important;
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
    }

    .search-wrapper > div {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
    }
}

.menu-title-section {
    margin-bottom: 3rem;
}

@media (max-width: 767.98px) {
    .menu-title-section {
        margin-bottom: 1rem !important;
    }
}

.category-item, .product-item {
    /* styles for the items */
}




/* Card hover efektleri */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* büyüyen resmin taşmasını engeller */
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card .card-title{
        min-height: 3rem;
}

.product-item:hover .product-card {
    transform: translateY(-8px); /* kart hafif yukarı kayıyor */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-item:hover .product-card img {
    transform: scale(1.05); /* resim hafifçe büyüyor */
}

/* Card hover efektleri */
.category-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden; /* büyüyen resmin taşmasını engeller */
}

.category-card img {
    transition: transform 0.3s ease;
}

.category-item:hover .category-card {
    transform: translateY(-8px); /* kart hafif yukarı kayıyor */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.category-item:hover .category-card img {
    transform: scale(1.05); /* resim hafifçe büyüyor */
}

.product-item.hover-effect .product-card,
.category-item.hover-effect .category-card {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

.product-item.hover-effect .product-card img,
.category-item.hover-effect .category-card img {
    transform: scale(1.05);
}






/*post edit link yağınca linke gitmiyordu sorun çözüldü*/
.instagram-posts .product-card {
    pointer-events: auto !important;
}
.instagram-posts a {
    pointer-events: auto !important;
}


.square-img,
.category-placeholder {
    width: 100%;
}

/* 5-column grid for desktop */
@media (min-width: 1200px) {
    .col-xl-2-4 {
        flex: 0 0 20%;
        max-width: 20%;
    }
}

@media (min-width: 768px) {

    .square-img,
    .category-placeholder {
        height: 180px;      /* 🔑 kritik */
        width: 100%;
        object-fit: cover;
        display: block;
    }

}
/* --- Consolidated Mobile Grid Styles --- */
@media (max-width: 767.98px) {

      /* Görsel alanı kare */
      .square-img,
      .category-placeholder {
          aspect-ratio: 1 / 1;
          object-fit: cover;
      }
    /* --- CATEGORY STYLES --- */
    .category-item {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
        padding-left: 5px;
        padding-right: 5px;
    }

    .square-img {
        width: 100%;
        aspect-ratio: 1 / 1;
        object-fit: cover;
    }

    .category-card {
        border-radius: 0.75rem !important;
        background: #fff;
        height: 100%;
    }

    .category-card .badge-custom {
        display: none;
    }

    .category-card .card-body {
        padding: 0.5rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 90px; /* Changed from height: 90px to min-height: 90px */
    }

    .category-card .card-title {
        font-size: 0.65rem;
        line-height: 1.2;
        margin: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
    }

    /* --- PRODUCT STYLES --- */
    .product-item {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /*.product-card .card-img-top, 
    .product-card .d-flex {
        height: 120px;
        width: 100%;
        object-fit: cover;
    }*/
    .product-card .card-img-top {
        height: 150px !important;   /*card yapısında resim küçültme eski halinde sadece burası vardı aşaığılar yoktu*/
        width: 100%;
        object-fit: cover;
    }

    .product-card .no-image {
        height: 150px !important;
        width: 100%;
        object-fit: cover;
    }


    .product-card img {
        transition: transform 0.3s ease;
    }
    
    .product-card .card-body {
        padding: 0.75rem;
    }

    .product-card .card-title {
        font-size: 0.9rem;
        margin-bottom: 0.25rem !important;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;

        min-height: 2rem;
    }

    .product-card .card-text {
        font-size: 0.7rem;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    .product-card .card-text-instagram {
        font-size: 0.8rem;
        overflow: visible;       /* hidden yerine visible */
        text-overflow: unset;    /* ellipsis kaldır */
        display: block;          /* -webkit-box yerine block */
        -webkit-line-clamp: unset;
        -webkit-box-orient: unset;
    }
    
    .product-card .fw-bold.fs-5 {
        font-size: 1rem !important;
    }
}


/* Responsive adjustments for social buttons */
@media (max-width: 767.98px) {
    .social-btn-responsive {
        padding: 0.3rem 0.6rem !important; /* Smaller padding for mobile */
        font-size: 0.8rem !important; /* Slightly smaller font size */
    }

    .social-btn-responsive i {
        font-size: 1.6em !important; /* Adjust icon size relative to button text */
        vertical-align: middle; /* Ensure vertical alignment */
    }
}

/* PC ve tabletde grid değişmiyor */
.instagram-posts .col-6,
.instagram-posts .col-md-4,
.instagram-posts .col-lg-3 {
    flex: 0 0 auto;
    max-width: 100%; /* Varsayılan Bootstrap sınıflarına uyumlu */
}

.instagram-posts .product-card .card-img-top {
    height: 300px !important;   /*card yapısında resim küçültme eski halinde sadece burası vardı aşaığılar yoktu*/
    width: 100%;
    object-fit: cover;
}
/* Mobilde tek satır */
@media (max-width: 767.98px) {
    .instagram-posts .col-6,
    .instagram-posts .col-md-4,
    .instagram-posts .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }


    .instagram-posts .product-card .card-img-top {
        height: 300px !important;   /*card yapısında resim küçültme eski halinde sadece burası vardı aşaığılar yoktu*/
        width: 100%;
        object-fit: cover;
    }

}



/*categori slide kaydırma*/
.category-slider-wrapper {
    padding: 0; /* Changed from 0 15px to 0 to span full width */
}

.category-slider {
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.category-btn {
    white-space: nowrap;
    border-radius: 50px;
    background-color: #2f7a63; /* Örnek renk */
    color: #fff;
    font-weight: 500;
    font-size: 0.75rem; /* Küçültülmüş font boyutu */
    padding: 0.3rem 0.6rem; /* Küçültülmüş dolgu */
    /*transition: transform 0.2s ease, background 0.2s ease;*/
}

.category-btn:hover {
    background-color: #fff; /* Örnek renk */
    color: #2f7a63;
    transform: translateY(-2px);
}

.category-slider::-webkit-scrollbar {
    height: 6px;
}

.category-slider::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,0.2);
    border-radius: 3px;
}

.category-btn.active-category {
    background-color: #fff;   /* Beyaz arka plan */
    color: #2f7a63;           /* Yeşil yazı */
    font-weight: 300;
}

/* --- Mobile Sidebar Menu --- */
.mobile-menu-toggle {
    display: none; /* Hidden by default */
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    color: #145c46;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block; /* Show on mobile */
    }
}

.mobile-sidebar {
    position: fixed;
    top: 0;
    left: -300px; /* Hidden off-screen */
    width: 300px;
    height: 100%;
    background: #fff;
    z-index: 1051;
    transition: left 0.3s ease-in-out;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.mobile-sidebar.open {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.sidebar-title {
    margin: 0;
    font-weight: 600;
    color: #145c46;
}

.close-sidebar-button {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #888;
}

.sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1049;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* --- Mobile Sidebar Navigation --- */
.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-nav a {
    display: block;
    padding: 15px 20px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s ease;
}

.sidebar-nav a:hover {
    background: #f7f7f7;
}

/* Sub-menu styling */
.sidebar-nav ul ul {
    background: #f9f9f9;
    padding-left: 0; /* No extra padding, the link indent will handle it */
    display: none; /* Sub-menus are hidden by default */
}

.sidebar-nav ul ul a {
    padding-left: 40px; /* Indent sub-menu links */
    font-size: 0.9em;
    color: #555;
}

.submenu-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: 60px;
    height: 50px;
    background: none;
    border: none;
    cursor: pointer;
    color: #145c46;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.submenu-toggle.open {
    transform: rotate(180deg);
}



/*mobilde kategori ve üürn arama alanları zoomlama çözümü*/

input[type="text"],
input[type="search"],
.form-control,
textarea {
    font-size: 16px !important;
    font-family: inherit !important;
}

/* Mobile için */
@media (max-width: 768px) {
    input[type="text"],
    input[type="search"],
    .form-control,
    textarea {
        font-size: 16px !important;
    }
}

input[type="text"],
input[type="search"],
.form-control {
    font-size: 16px !important;
    -webkit-text-size-adjust: none;
    -webkit-appearance: none;
}

/* Tüm input'lar için zoom sorunu çözümü */
#categorySearch,
#productSearch,
input[type="text"],
input[type="search"],
.form-control {
    font-size: 16px !important;
    -webkit-text-size-adjust: 100% !important;
}

/* Mobile viewport ayarı */
@media (max-width: 992px) {
    #categorySearch,
    #productSearch {
        font-size: 16px !important;
    }
}

/* iOS spesifik */
@supports (-webkit-touch-callout: none) {
    #categorySearch,
    #productSearch {
        font-size: 16px !important;
    }
}