/* css/main.css - Ana stil dosyası - Mobil öncelikli tasarım */

:root {
    /* Tema renkleri JavaScript tarafından dinamik olarak ayarlanacak */
    --primary: #22c55e;
    --primary-dark: #059669;
    --secondary: #10b981;
    --accent: #fbbf24;
    --background: #f0fdf4;
    --surface: #ffffff;
    --text: #1f2937;
    --text-light: #6b7280;
    --border: #e5e7eb;
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Gölgeler */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    
    /* Animasyon süreleri */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========== HEADER ========== */
.header {
    background: var(--surface);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 0;
    transition: all var(--transition-normal);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-container {
    width: 45px;
    height: 45px;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: linear-gradient(135deg, var(--primary), var(--primary-dark)); */
    background: white; /* veya transparent */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.logo-emoji {
    font-size: 24px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.site-info h1 {
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 800;
    color: var(--text);
    margin: 0;
    letter-spacing: -0.5px;
}

.site-info p {
    font-size: clamp(11px, 2.5vw, 14px);
    color: var(--primary);
    font-weight: 500;
    margin: 0;
}

/* ========== CATEGORIES ========== */
/* ========== CATEGORIES ========== */
.categories {
    padding: 16px;
    background: linear-gradient(to bottom, var(--surface), transparent);
    position: relative;
}

.categories-scroll {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    /* justify-content'i kaldırdık, media query ile kontrol edeceğiz */
}

/* PC ve büyük ekranlar için - kategorileri ortala */
@media (min-width: 1024px) {
    .categories-scroll {
        justify-content: center;
    }
}

/* Mobil ve tablet için - sola dayalı, scroll çalışsın */
@media (max-width: 1023px) {
    .categories-scroll {
        justify-content: flex-start;
    }
}

/* Scrollbar stilleri */
.categories-scroll::-webkit-scrollbar {
    height: 4px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 2px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 2px;
}

/* Kategori butonları */
.category-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--surface);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.category-btn:active {
    transform: scale(0.95);
}

.category-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-dark);
}

.category-btn:not(.active):hover {
    background: var(--background);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-btn:not(.active):hover::before {
    left: 100%;
}

/* ========== PRODUCTS ========== */
.products-container {
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 60vh;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Mobile - tek kolon */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.product-card {
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: all var(--transition-normal);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

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

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* Badge Container - Köşelere yerleşim */
.badge-container {
    position: absolute;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
}

.badge-container.top-left {
    top: 0;
    left: 0;
}

.badge-container.top-right {
    top: 0;
    right: 0;
    align-items: flex-end;
}

.badge-container.bottom-left {
    bottom: 0;
    left: 0;
}

.badge-container.bottom-right {
    bottom: 0;
    right: 0;
    align-items: flex-end;
}

/* Badge Stilleri */
.product-badge {
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-gradient {
    background: linear-gradient(135deg, var(--accent), var(--warning));
    color: white;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-danger {
    background: var(--error);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

/* Badge Animasyonları */
@keyframes badge-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes badge-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes badge-float {
    0%, 100% { 
        transform: translateY(0) rotate(-2deg); 
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    50% { 
        transform: translateY(-6px) rotate(2deg); 
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }
}

@keyframes badge-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

@keyframes badge-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.animation-pulse { animation: badge-pulse 2s ease-in-out infinite; }
.animation-bounce { animation: badge-bounce 1.5s ease-in-out infinite; }
.animation-float { animation: badge-float 2s ease-in-out infinite; }
.animation-shake { animation: badge-shake 0.5s ease-in-out infinite; }
.animation-rotate { animation: badge-rotate 3s linear infinite; }

/* Product Image */
.product-image-container {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--background), var(--surface));
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all var(--transition-slow);
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

/* Product Content */
.product-content {
    padding: 20px;
}

.product-name {
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    line-height: 1.3;
}

/* Size Options - Bardak boyutları */
.size-options {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.size-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-align: center;
}

.size-btn:hover {
    border-color: var(--primary);
    background: var(--background);
}

.size-btn.active {
    background: var(--primary);
    border-color: var(--primary-dark);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.size-name {
    font-size: 12px;
    font-weight: 600;
    display: block;
}

.size-price {
    font-size: 14px;
    font-weight: 700;
    margin-top: 4px;
}

/* Price Section */
.price-section {
    margin: 16px 0;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}

.price-original {
    color: var(--text-light);
    text-decoration: line-through;
    font-size: 16px;
    font-weight: 500;
}

.price-discount {
    font-size: clamp(24px, 5vw, 28px);
    font-weight: 800;
    color: var(--primary);
}

.price-normal {
    font-size: clamp(22px, 5vw, 26px);
    font-weight: 700;
    color: var(--text);
}

/* Ingredients */
.ingredients {
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ingredient-tag {
    display: inline-block;
    background: var(--background);
    color: var(--primary-dark);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--border);
    transition: all var(--transition-fast);
}

.ingredient-tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Boyut seçenekleri - main.css'e ekleyin */
.size-options {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
    justify-content: center;
}

.size-btn {
    flex: 1;
    min-width: 70px;
    max-width: 100px;
    padding: 10px 8px;
    background: var(--surface, #ffffff);
    border: 2px solid var(--border, #e5e7eb);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    position: relative;
    overflow: hidden;
}

.size-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.size-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.size-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.size-btn.active::before {
    opacity: 0.2;
}

.size-icon {
    font-size: 20px;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.size-name {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
}

/* Admin panel - Boyut satırları */
.size-row {
    display: grid;
    grid-template-columns: 120px 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--admin-light, #f8fafc);
    border-radius: 8px;
}

.size-label {
    font-weight: 600;
    color: var(--admin-dark, #1f2937);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

/* Mobil görünüm için responsive düzenleme */
@media (max-width: 480px) {
    .size-options {
        gap: 6px;
    }
    
    .size-btn {
        min-width: 60px;
        padding: 8px 6px;
    }
    
    .size-icon {
        font-size: 18px;
    }
    
    .size-name {
        font-size: 10px;
    }
    
    .size-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Fiyat görünümü animasyonu */
.price-section {
    transition: all 0.3s ease;
}

.price-original {
    text-decoration: line-through;
    color: var(--text-light, #6b7280);
    font-size: 14px;
    margin-right: 8px;
}

.price-discount {
    color: var(--accent, #f59e0b);
    font-size: 18px;
    font-weight: 700;
}

.price-normal {
    color: var(--primary, #22c55e);
    font-size: 18px;
    font-weight: 700;
}
/* Boyut seçenekleri */
.size-options {
    display: flex;
    gap: 8px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.size-btn {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.size-btn:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.size-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.size-name {
    font-size: 12px;
    font-weight: 600;
}

.size-price {
    font-size: 14px;
    font-weight: 700;
}
/* Premium badge efektleri */
.product-badge {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.badge-gradient {
    background: linear-gradient(135deg, #ff6b6b, #feca57) !important;
}

.badge-primary {
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
}

.badge-success {
    background: linear-gradient(135deg, #56ab2f, #a8e063) !important;
}
/* Benefits */
.benefits {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--text-light);
}

.benefit-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-top: 7px;
    flex-shrink: 0;
}

/* Loading State */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 40px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty State */
.no-products {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: 24px;
    box-shadow: var(--shadow-md);
}

.no-products-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-products-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.no-products-text {
    color: var(--text-light);
    font-size: 14px;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .header {
        padding: 10px 0;
    }
    
    .header-content {
        padding: 0 12px;
    }
    
    .logo-container {
        width: 40px;
        height: 40px;
    }
    
    .categories {
        padding: 12px;
    }
    
    .category-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .products-container {
        padding: 12px;
    }
    
    .product-content {
        padding: 16px;
    }
    
    .product-image-container {
        height: 180px;
    }
    
    /* Touch feedback */
    .category-btn:active,
    .size-btn:active {
        transform: scale(0.95);
    }
}

/* Dark mode support (eğer midnight tema seçiliyse) */
@media (prefers-color-scheme: dark) {
    .theme-midnight {
        /* Midnight tema renkleri otomatik uygulanacak */
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .header,
    .categories,
    .badge-container {
        display: none;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .product-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}