/* Genel stiller */
body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container-fluid {
    padding: 0 15px;
}

/* Ana sayfa tasarımı */
.hero-section {
    position: relative;
    height: 45vh;
    background: url('assets/images/home_bg.jpg') center/cover; /* Fallback - index.php'de override edilecek */
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.logo {
    width: 20%;
}

.hero-icons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
}

.hero-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

/* Logo tasarımı */
.logo-section {
    position: relative;
    margin-top: -100px;
    z-index: 3;
    text-align: center;
    padding: 0 20px;
}

.logo-button {
    display: inline-block;
    background: #fff;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: 0 8px 25px rgba(229, 93, 73, 0.3);
    border: none;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(229, 93, 73, 0.4);
    color: white;
    text-decoration: none;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Ana kategoriler */
.main-categories {
    display: flex;
    gap: 20px;
    margin: 40px 20px 20px 20px;
    flex-direction: column;
}

.main-category-btn {
    padding: 25px;
    text-decoration: none;
    border-radius: 15px;
    border: none;
    background-color: #e55d49;
    color: white;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(229, 93, 73, 0.2);
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.main-category-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(229, 93, 73, 0.3);
    text-decoration: none;
    color: white;
}

.main-category-btn.active {
    background: #e55d49;
    box-shadow: 0 8px 25px rgba(229, 93, 73, 0.4);
}

.main-category-btn i {
    font-size: 28px;
    margin-bottom: 10px;
    display: block;
}

.main-category-btn span {
    font-weight: 600;
    font-size: 14px;
}

/* Menü sayfası tasarımı */
.menu-page {
    display: none;
    background: white;
    min-height: 100vh;
    padding: 20px;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 15px;
    background-color: #f8f9fa;
    border-bottom: 2px solid #f0f0f0;
    top: 0;
    position: sticky;
    z-index: 999;
}

.back-btn {
    background: #e55d49;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: #e55d49;
    transform: scale(1.1);
}

.menu-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Breadcrumb */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: #e55d49;
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb-item.active {
    color: #333;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: ">";
    color: #6c757d;
}

/* Alt kategoriler */
.sub-categories {
    background: white;
    border-radius: 12px;
    padding: 16px 16px 8px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sub-category-link {
    display: inline-block;
    padding: 8px 14px;
    margin: 6px 8px 10px 0;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    color: #495057;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.sub-category-link:hover {
    background: #e55d49;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(229, 93, 73, 0.3);
    text-decoration: none;
}

.sub-category-link.active {
    background: #e55d49;
    color: white;
    border-color: #e55d49;
    box-shadow: 0 4px 8px rgba(229, 93, 73, 0.3);
}

/* Collapsible behavior for mobile */
.sub-categories.collapsed {
    max-height: 100%;
    overflow: hidden;
    position: relative;
}
.sub-categories.collapsed::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 36px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #ffffff);
}
.sub-toggle { display: none; margin: -8px 0 12px 0; color: #6c757d; cursor: pointer; user-select: none; }
.sub-toggle i { transition: transform .2s ease; }
.sub-toggle.expanded i { transform: rotate(180deg); }

/* Mobil için sade dropdown */
.sub-categories-mobile { display: none; margin-bottom: 16px; }
.mobile-select { width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid #e2e8f0; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.06); }

/* Mobile bottom sheet trigger */
.mobile-filter-bar { display: none; margin-bottom: 12px; position: sticky; top: 8px; z-index: 9; }
.mobile-filter-btn {
    width: 100%;
    display: inline-flex; align-items: center; justify-content: space-between;
    gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid #e9ecef; background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-weight: 500; color: #495057;
}
.mobile-filter-btn .current-name { color: #212529; font-weight: 600; }
/* Attention pulse for first-time users */
.mobile-filter-btn.attention { border-color: #e55d49; box-shadow: 0 0 0 0 rgb(229 93 73 / 55%); animation: pulseGlow 1.6s ease-out infinite; }
.mobile-filter-btn.attention i { color: #e55d49; animation: nudge 1.2s ease-in-out infinite; }
@keyframes pulseGlow { 0% { box-shadow: 0 0 0 0 #e55d4945;} 100% { box-shadow: 0 0 0 18px rgba(229,93,73,0);} }
@keyframes nudge { 0% { transform: translateY(0);} 100% { transform: translateY(-2px);} }
.mobile-filter-hint { display: none; margin-top: 6px; font-size: 12px; color: #e55d49; font-weight: 500; }
.sheet-search { position: sticky; top: 0; background: #fff; padding: 8px 0 12px; z-index: 1; }
.sheet-search input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #e2e8f0; }
.sheet-chip { display: inline-block; margin: 6px 6px 10px 0; padding: 10px 14px; border-radius: 22px; background: #f5f6f8; cursor: pointer; }
.sheet-chip.active { background: #e55d49; color: #fff; }

/* Ürün grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Ürün kartı */
.product-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-name {
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.price {
    font-size: 20px;
    font-weight: 700;
    color: #e55d49;
    margin: 0;
}

/* Admin panel stilleri */
.admin-sidebar {
    background-color: #343a40;
    min-height: 100vh;
    color: #fff;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    color: #fff;
    background-color: #495057;
}

.admin-content {
    padding: 30px;
}

.admin-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 20px 30px;
    margin-bottom: 30px;
}

.btn-primary {
    background-color: #e55d49;
    border-color: #e55d49;
}

.btn-primary:hover {
    background-color: #d63384;
    border-color: #d63384;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.table th {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    font-weight: 600;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 8px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
}

/* Form stilleri */
.form-control:focus {
    border-color: #e55d49;
    box-shadow: 0 0 0 0.2rem rgba(229, 93, 73, 0.25);
}

.form-select:focus {
    border-color: #e55d49;
    box-shadow: 0 0 0 0.2rem rgba(229, 93, 73, 0.25);
}

/* Alert stilleri */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Loading spinner */
.spinner-border {
    color: #e55d49;
}

/* Ürün Detay Modal Stilleri */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modal-header {
    background: #e55d49;
    color: white;
    border-radius: 16px 16px 0 0;
    border-bottom: none;
}

.modal-title {
    font-weight: 600;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 25px;
}

.product-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.product-detail-image {
    text-align: center;
    margin-bottom: 20px;
}

.product-detail-image img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-detail-info {
    padding: 0 10px;
}

.product-detail-name {
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
    font-size: 24px;
}

.product-detail-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.product-detail-price .price {
    font-size: 28px;
    font-weight: 700;
    color: #e55d49;
}

.product-detail-ingredients,
.product-detail-description,
.product-detail-allergens {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #e55d49;
    margin-top: 15px;
}

.product-detail-description {
    border-left-color: #28a745;
}

.product-detail-allergens {
    border-left-color: #dc3545;
}

.product-detail-ingredients h6,
.product-detail-description h6,
.product-detail-allergens h6 {
    color: #e55d49;
    font-weight: 600;
    margin-bottom: 10px;
}

.product-detail-description h6 {
    color: #28a745;
}

.product-detail-allergens h6 {
    color: #dc3545;
}

.product-detail-ingredients p,
.product-detail-description p,
.product-detail-allergens p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Responsive düzenlemeler */
/* Tablet (≥576px and <992px) 4 sütun */
@media (min-width: 576px) and (max-width: 991px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    .product-image img { height: 180px; }
    /* Tabletlerde de mobil filtre çubuğunu kullan, masaüstü chiplerini gizle */
    .sub-categories { display: none; }
    .mobile-filter-bar { display: block; }
    .sub-toggle { display: none; }
}

@media (max-width: 575px) {
    .main-categories {
        flex-direction: column;
    }
    
    .main-category-btn {
        min-width: auto;
    }
 
     /* Mobilde ürünler 2 sütun */
     .products-grid {
         grid-template-columns: repeat(2, 1fr);
         gap: 12px;
     }
 
     .product-image img {
         height: 160px;
     }
    .sub-toggle { display: none; }
    /* Mobilde de mobil filtre çubuğunu kullan */
    .sub-categories { display: none; }
    .mobile-filter-bar { display: block; }

     .product-detail-container {
         flex-direction: column;
     }
}

@media (max-width: 576px) {
    .admin-content {
        padding: 15px;
    }
    
    .admin-header {
        padding: 15px;
    }
    
    .table-responsive {
        font-size: 14px;
    }
    
    .product-detail-image img {
        width: 100%;
        height: auto;
    }
    
    .product-detail-name {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
}

/* Alt kategoriler grid tasarımı */
.sub-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 15px;
    margin-top: 0;
}

.sub-category-card {
    background: white;
    border-radius: 15px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden; /* EKLE */
}

.sub-category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(229, 93, 73, 0.2);
    border-color: var(--theme-color);
}

.sub-category-image {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.sub-category-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

/* ikon alanını sabitle (Android taşmasını bitirir) */
.sub-category-icon{
    width: 72px;
    height: 72px;
    margin: 0 auto 12px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* img/svg boyutunu px ile kilitle */
.sub-category-icon img,
.sub-category-icon svg{
    width: 56px !important;
    height: 56px !important;
    max-width: 56px !important;
    max-height: 56px !important;
    object-fit: contain;
    display: block;
}

.sub-category-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* Mobil için alt kategoriler grid - tek sütun */
@media (max-width: 768px) {
    .sub-categories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .sub-category-card {
        padding: 20px 15px;
    }
    
    .sub-category-image {
        height: 60px;
        margin-bottom: 10px;
    }
    
    .sub-category-image img {
        max-height: 60px;
    }
    
    .sub-category-icon {
        font-size: 30px;
        margin-bottom: 10px;
        height: 60px;
    }
    
    .sub-category-name {
        font-size: 16px;
    }
}

/* Sayfa geçişleri */
.menu-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Ürünler sayfası için özel stiller */
#productsPage .products-grid {
    margin-top: 20px;
}

/* Resim optimizasyonu ve lazy loading */
.product-image img,
.sub-category-image img {
    transition: opacity 0.3s ease;
}

.product-image img[loading="lazy"] {
    opacity: 0;
}

.product-image img[loading="lazy"].loaded {
    opacity: 1;
}

/* Resim yükleme animasyonu */
.image-loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive resim boyutları */
@media (max-width: 768px) {
    .product-image img {
        max-width: 100%;
        height: auto;
    }
    
    .sub-category-image img {
        max-width: 100%;
        height: auto;
    }
}

/* Font Awesome ikonları için ek stiller */
.fas, .fa, .far, .fab {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

/* Admin paneli ikonları için özel stiller */
.admin-sidebar .fas,
.admin-sidebar .fa {
    width: 20px;
    text-align: center;
}

.btn .fas,
.btn .fa {
    margin-right: 0.25rem;
}

/* İkon boyutları */
.fa-2x {
    font-size: 2em;
}

.fa-lg {
    font-size: 1.33333em;
}

.fa-sm {
    font-size: 0.875em;
}

/* Placeholder stilleri */
.placeholder-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    min-height: 100px;
    transition: all 0.3s ease;
}

.placeholder-container:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

.placeholder-container i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.placeholder-image {
    opacity: 0.6;
    filter: grayscale(100%);
}

/* Ürün kartı placeholder */
.product-card .placeholder-container {
    width: 100%;
    height: 200px;
    border-radius: 12px;
}

/* Alt kategori placeholder */
.sub-category-image .placeholder-container {
    width: 100%;
    height: 120px;
    border-radius: 8px;
}

/* Admin panel placeholder */
.admin-table .placeholder-container {
    width: 50px;
    height: 50px;
    min-height: 50px;
    border-radius: 4px;
}

/* Resim yükleme durumu */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}


