/**
 * QR Menü - Merkezi Tema Stilleri
 * Tüm frontend sayfaları (index, kesfet, urundetay) bu dosyayı kullanır.
 * Renk değişkenleri (:root) sayfa başında PHP ile dinamik atanır.
 */

/* ========== CSS Variables (varsayılan - PHP override eder) ========== */
:root {
    --color-primary: #ff666b;
    --color-primary-hover: #ff5056;
    --color-primary-light: rgba(255, 102, 107, 0.1);
    --color-primary-border: rgba(255, 102, 107, 0.1);
    --color-primary-shadow: rgba(255, 102, 107, 0.25);
    --color-background-light: #f8f5f5;
    --color-background-dark: #230f0f;
}

/* ========== Base ========== */
body {
    font-family: 'Inter', sans-serif;
    min-height: max(884px, 100dvh);
}

/* Keşfet, Ürün Detay gibi sayfalar - alt nav için boşluk */
.theme-page-body {
    padding-bottom: 7rem;
}

/* ========== Material Symbols İkonları ========== */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    display: inline-block;
    line-height: 1;
    letter-spacing: normal;
    white-space: nowrap;
    direction: ltr;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* ========== Logo - Tüm sayfalarda tutarlı, kompakt boyut ========== */
.theme-logo {
    height: 1.75rem;
    max-height: 1.75rem;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

.theme-logo-placeholder {
    width: 2rem;
    height: 2rem;
    flex-shrink: 0;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========== Header - Tutarlı yapı ========== */
.theme-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 0.75rem 1rem;
    justify-content: space-between;
    border-bottom: 1px solid var(--color-primary-border);
    min-height: 3rem;
}

.theme-header-dark {
    background: rgba(35, 15, 15, 0.95);
}

/* ========== Alt Nav Bar ========== */
.theme-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 28rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top-width: 1px;
    border-top-style: solid;
    padding: 0.75rem 1rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    z-index: 40;
    gap: 0;
}

.theme-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.theme-nav .theme-nav-item {
    flex: 1;
}

.theme-nav-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.theme-nav-label {
    font-size: 10px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== Alpine.js ========== */
[x-cloak] {
    display: none !important;
}

/* ========== Ana Sayfa - Özel ========== */
.theme-index-html {
    height: 100%;
    overflow: hidden;
}

.theme-index-body {
    height: 100%;
    min-height: 100%;
    overflow: hidden;
}

/* Sol kategori listesi - sadece dikey kaydırma, yatay kilitli */
.category-list-scroll {
    scrollbar-width: none;
    -ms-overflow-style: none;
    overflow-x: hidden !important;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
}

.category-list-scroll::-webkit-scrollbar {
    display: none;
}

.category-section.last-category-section {
    min-height: 320px;
}

/* ========== Sayfa Geçiş Animasyonları - Tüm sayfalarda ========== */
.page-transition-leave {
    animation: themePageLeave 0.18s ease-out forwards;
}

.page-transition-enter {
    animation: themePageEnter 0.2s ease-out forwards;
}

@keyframes themePageLeave {
    to {
        opacity: 0;
        transform: translateY(-8px);
    }
}

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

/* ========== Sepet Animasyon ========== */
.fly-to-cart {
    transition: left 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                top 0.55s cubic-bezier(0.5, -0.4, 0.5, 1),
                transform 0.55s cubic-bezier(0.34, 1.2, 0.64, 1),
                opacity 0.4s ease-out 0.35s;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}

.cart-badge-pop {
    animation: themeBadgePop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes themeBadgePop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* ========== Safe Area ========== */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ========== Gradient ========== */
.fade-bottom {
    mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}

/* ========== Ürün Listesi Geçiş ========== */
.product-list-transition {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* ========== Sosyal Medya ========== */
.social-icon {
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* ========== Google Translate - Arayüz temizliği (bar, balon, tooltip gizle) ========== */
.qr-gt-hidden {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    pointer-events: none !important;
}
/* Üst bar (goog-te-banner-frame) - tamamen gizle */
.goog-te-banner-frame,
iframe.goog-te-banner-frame,
.skiptranslate,
body > .skiptranslate,
body > div[class*="skiptranslate"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    max-height: 0 !important;
    overflow: hidden !important;
}
/* "Orijinali Göster" balonları */
.goog-te-balloon-frame,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
}
/* Çeviri sonrası hover tooltip'leri */
font[style*="verticalAlign"],
.gmnoprint,
.gm-style-cc {
    display: none !important;
}
/* Sayfa tepesinde boşluk oluşmasın */
body { top: 0 !important; margin-top: 0 !important; }
html.translated-ltr body,
html.translated-rtl body { margin-top: 0 !important; }

/* Google Translate yükleme spinner'ı - gizli arka plana */
.VIpgJd-ZVi9od-aZ2wEe-wOHMyf,
.VIpgJd-ZVi9od-aZ2wEe,
.VIpgJd-ZVi9od-aZ2wEe-OiiCO,
.VIpgJd-ZVi9od-aZ2wEe-Jt5cK {
    display: none !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* ========== notranslate - Çevrilmesin (ikon, logo, marka) ========== */
/* Bu class'ı ekleyerek element çevrilmez: class="notranslate" */
.notranslate,
[class*="notranslate"] { /* Google Translate bu elementleri atlar */ }

/* ========== Keşfet / Ürün Açıklama - Line Clamp ========== */
.theme-line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
