/* ============================================
   QR Menü - Modern Mobil Arayüz
   ============================================ */

:root {
    --bg: #f7f7f7;
    --surface: #ffffff;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --border: #f0f0f0;
    --accent: #e8654a;
    --accent-light: rgba(232, 101, 74, 0.1);

    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-search: 0 2px 16px rgba(0, 0, 0, 0.06);

    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-full: 9999px;

    --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 200px;
}

body {
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-bottom: 2rem;
    max-width: 480px;
    margin: 0 auto;
}

/* ============================================
   Header
   ============================================ */

.header {
    padding: 3rem 1.25rem 1.25rem;
    background: var(--surface);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.header-text {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
}

.header-logo {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.header-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.header-slogan {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 400;
    margin-top: 0.1rem;
}

/* Dil Değiştirici */
.lang-switcher {
    display: flex;
    background: var(--bg);
    border-radius: var(--radius-full);
    padding: 3px;
    gap: 2px;
    align-self: center;
}

.lang-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-spring);
    letter-spacing: 0.02em;
}

.lang-btn:active {
    transform: scale(0.92);
}

.lang-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232, 101, 74, 0.3);
}

/* ============================================
   Search
   ============================================ */

.search-section {
    padding: 0.75rem 1.25rem 0.5rem;
    background: var(--surface);
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg);
    border-radius: var(--radius-full);
    padding: 0.7rem 1rem;
    border: 1.5px solid transparent;
    transition: all 0.3s ease;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-light);
    background: var(--surface);
}

.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-bar input {
    width: 100%;
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

/* ============================================
   Categories
   ============================================ */

.categories-section {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--surface);
    padding: 1rem 0 0.75rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.categories-header {
    padding: 0 1.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-label {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.categories-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.5rem;
    padding: 0 1.25rem 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.35s var(--ease-spring);
    position: relative;
}

.cat-chip:active {
    transform: scale(0.95);
}

.cat-chip.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(232, 101, 74, 0.3);
    font-weight: 600;
}

/* ============================================
   Main Content
   ============================================ */

.main-content {
    padding: 0 1rem;
    margin-top: 0.5rem;
}

.category-section {
    padding-top: 1.25rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-left: 0.25rem;
}

/* ============================================
   Products Grid - 2 sütun
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

/* ============================================
   Product Card
   ============================================ */

.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.35s var(--ease-out);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

@media (hover: hover) {
    .product-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-hover);
    }
}

.product-card:active {
    transform: scale(0.97);
}

.card-img {
    width: 100%;
    aspect-ratio: 1 / 0.85;
    overflow: hidden;
    position: relative;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}

@media (hover: hover) {
    .product-card:hover .card-img img {
        transform: scale(1.05);
    }
}

.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg), #eee);
}

.placeholder-img svg {
    width: 40px;
    height: 40px;
    fill: var(--text-muted);
    opacity: 0.4;
}

.card-body {
    padding: 0.7rem 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
}

.card-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-price {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin-top: auto;
    padding-top: 0.3rem;
}

.card-price .currency {
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   Empty State
   ============================================ */

.empty-state {
    text-align: center;
    padding: 4rem 1.5rem;
    color: var(--text-muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1rem;
    font-weight: 500;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    text-align: center;
    padding: 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

/* ============================================
   Arama Sonuç Vurgulama
   ============================================ */

.product-card.hidden {
    display: none;
}

.category-section.hidden {
    display: none;
}

.search-no-result {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    display: none;
}

.search-no-result.visible {
    display: block;
}

/* ============================================
   Giriş Animasyonları
   ============================================ */

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

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

.product-card {
    animation: fadeInUp 0.4s var(--ease-out) both;
}

.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;
}

/* ============================================
   Responsive - Büyük Ekranlar
   ============================================ */

@media (min-width: 768px) {
    body {
        max-width: 680px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.1rem;
    }

    .header {
        padding: 3.5rem 2rem 1.5rem;
    }

    .search-section,
    .categories-header {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .categories-scroll {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .main-content {
        padding: 0 1.5rem;
    }
}

/* ============================================
   Ürün Detay Modalı
   ============================================ */

.product-card {
    cursor: pointer;
}

.detail-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.detail-overlay.active {
    opacity: 1;
    visibility: visible;
}

.detail-modal {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    max-height: 92vh;
    background: var(--surface);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow-y: auto;
    z-index: 1001;
    transition: transform 0.4s var(--ease-out);
    box-shadow: 0 -4px 40px rgba(0, 0, 0, 0.15);
}

.detail-overlay.active .detail-modal {
    transform: translateX(-50%) translateY(0);
}

.detail-back {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.detail-back:active {
    transform: scale(0.9);
}

.detail-image {
    width: 100%;
    aspect-ratio: 1 / 0.75;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--bg), #eee);
}

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

.detail-image .detail-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.detail-image .detail-placeholder svg {
    width: 64px;
    height: 64px;
    fill: var(--text-muted);
    opacity: 0.3;
}

.detail-body {
    padding: 1.5rem 1.25rem 2rem;
}

.detail-name {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.detail-price {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1rem;
}

.detail-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.detail-desc:empty {
    display: none;
}

/* Body scroll kilitleme */
body.modal-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .detail-modal {
        max-width: 500px;
        border-radius: var(--radius-lg);
        bottom: auto;
        top: 50%;
        transform: translateX(-50%) translateY(calc(-50% + 30px));
        max-height: 85vh;
        opacity: 0;
    }

    .detail-overlay.active .detail-modal {
        transform: translateX(-50%) translateY(-50%);
        opacity: 1;
    }
}