/* ==========================================================================
   VISCORA - ANA RESPONSIVE DOSYASI (V3 - TAM EKRAN MENÜ)
   ========================================================================== */

/* 1. GENEL AYARLAR */
html,
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Fixed header için body padding */
body {
    padding-top: 180px;
    /* Mobil: announcement bar + header-top + header-main */
}

/* Header fixed olduğu için içeriklerin üst üste binmesini engelle */
section,
.section,
main,
.hero {
    margin-top: 0 !important;
}

header+* {
    margin-top: 0 !important;
}

/* Mobilde header fixed olmasın - scroll ile yukarı gitsin */
@media (max-width: 1023px) {
    body {
        padding-top: 0 !important;
    }
    header {
        position: relative !important;
    }
}

img {
    max-width: 100%;
    height: auto;
}

/* 2. HEADER & NAVBAR */

/* --- TEMEL HEADER --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);

    /* Fixed positioning - masaüstünde sabit, mobilde relative (override yukarıda) */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;

    /* Z-index - menü ve diğer elementlerin üstünde */
    z-index: 10005;

    /* Tam genişlik */
    width: 100%;
    max-width: 100vw;

    /* Performance - mobil cihazlarda smooth scroll */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    padding: 0 1rem;
    position: relative;
    z-index: 1001;
    /* Header içeriği menünün altında kalmasın diye */
    background: white;
    /* Menü açılınca header arka planı beyaz kalsın */
}

/* Logo */
.logo-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    z-index: 10020;
    /* Menü açıldığında da görünsün */
    position: relative;
    /* Relative kalsın, z-index işlesin */
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0e7490;
}

/* --- MASAÜSTÜ (1024px+) --- */
@media (min-width: 1024px) {
    .menu-toggle {
        display: none !important;
    }

    nav {
        display: block !important;
        position: static;
        background: transparent;
        width: auto;
        height: auto;
        box-shadow: none;
        padding: 0;
    }

    .nav-menu {
        display: flex;
        gap: 2rem;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-menu a {
        text-decoration: none;
        color: #1f2937;
        font-weight: 500;
        transition: color 0.2s;
    }

    .nav-menu a:hover {
        color: #4f46e5;
    }
}

/* --- MOBİL & TABLET (1023px ve altı) --- */
@media (max-width: 1023px) {

    .logo-img {
        height: 35px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    /* Hamburger Butonu - GÖZÜKMEME FIX */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 20px;
        background: transparent !important;
        border: none !important;
        cursor: pointer;
        z-index: 10005;
        /* En üstte */
        padding: 0 !important;
        margin-left: 0.5rem;
        -webkit-tap-highlight-color: transparent;
        flex-shrink: 0;
        /* Sıkışmayı önle */
        z-index: 10020 !important;
        /* En üstte (Duyuru barı ve overlay üstünde) */
    }

    /* Mobil Arama - Inline (Modal Yerine) */
    .header-search {
        display: none;
        /* JS ile açılıp kapanacak */
        position: absolute;
        top: 100%;
        /* Header'ın hemen altında */
        left: 0;
        width: 100%;
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        z-index: 10000;
        animation: slideDownSearch 0.3s ease;
        border-bottom: 1px solid #f1f5f9;
    }

    .header-search.active {
        display: block !important;
    }

    .header-search form {
        display: flex;
        align-items: center;
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        padding: 0.5rem 1rem;
        width: 100%;
    }

    .header-search input {
        border: none;
        background: transparent;
        flex: 1;
        outline: none;
        padding: 0.25rem;
        font-size: 1rem;
        color: #1e293b;
    }

    .header-search i {
        color: #94a3b8;
    }

    @keyframes slideDownSearch {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }

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

    .header-top {
        position: relative;
        z-index: 10025;
        /* Menünün üstünde kalsın */
    }

    .header-top-items {
        justify-content: center;
    }

    .header-top-item {
        padding: 0.45rem 0.75rem;
        font-size: 0.72rem;
    }

    .header-top-item:not(:last-child)::after {
        height: 10px;
    }

    .menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background-color: #000000 !important;
        border-radius: 3px;
        transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        opacity: 1;
    }

    /* Çarpı Animasyonu */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(8.5px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-8.5px) rotate(-45deg);
    }

    /* TAM EKRAN MOBİL MENÜ (Overlay) */
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: white;
        z-index: 10015;
        /* Duyuru barının üstünde olmalı */
        padding: 120px 1.5rem 2rem;
        /* Logo ile çakışmaması için artırıldı */
        /* Üst boşluk azaltıldı */
        overflow: hidden;
        /* Kaydırmayı kapat */

        /* Animasyon: Varsayılan olarak gizli (Yukarıda) */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease-in-out;
        border-top: 1px solid #f3f4f6;
    }

    nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        /* Tam genişlik */
        justify-content: flex-start;
        gap: 0;
        /* Gap yerine padding kullanacağız */
        list-style: none;
        padding: 1rem 0;
        margin: 0;
    }

    .nav-menu li {
        width: 100%;
        opacity: 0;
        transform: translateX(-30px);
        /* Soldan gelme efekti */
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Menü açılınca linkler sırayla gelsin */
    nav.active .nav-menu li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Gecikmeler (Stagger effect) - Biraz daha dinamik */
    nav.active .nav-menu li:nth-child(1) {
        transition-delay: 0.1s;
    }

    nav.active .nav-menu li:nth-child(2) {
        transition-delay: 0.15s;
    }

    nav.active .nav-menu li:nth-child(3) {
        transition-delay: 0.2s;
    }

    nav.active .nav-menu li:nth-child(4) {
        transition-delay: 0.25s;
    }

    nav.active .nav-menu li:nth-child(5) {
        transition-delay: 0.3s;
    }

    .nav-menu a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 1.15rem;
        /* Font küçültüldü */
        font-weight: 600;
        color: #334155;
        /* Daha yumuşak koyu renk */
        text-decoration: none;
        padding: 0.8rem 0.5rem;
        /* Dikey boşluk daha da azaltıldı */
        /* Dikey boşluk azaltıldı */
        border-bottom: 1px solid #f1f5f9;
        /* İnce ayıraç */
        transition: all 0.3s ease;
    }

    /* Chevron ikonu ekle (Font Awesome) */
    .nav-menu a::after {
        content: '\f054';
        /* fa-chevron-right */
        font-family: "Font Awesome 6 Free";
        font-weight: 900;
        font-size: 1rem;
        color: #cbd5e1;
        transition: all 0.3s ease;
    }

    .nav-menu a:active,
    .nav-menu a:hover {
        background-color: #f8fafc;
        padding-left: 1rem;
        /* Sağa kayma hissi */
        color: var(--primary-color);
    }

    .nav-menu a:hover::after {
        color: var(--primary-color);
        transform: translateX(5px);
    }

    .nav-menu a.active {
        background-color: transparent !important;
        background: none !important;
        color: var(--primary-color) !important;
        font-weight: 700 !important;
        border: none;
        border-bottom: 1px solid var(--primary-color);
        border-radius: 0;
        box-shadow: none !important;
        width: 100%;
        max-width: none;
        margin: 0;
        opacity: 1 !important;
        padding-left: 1rem;
        /* Active olan içeride başlasın */
    }

    .nav-menu a.active::after {
        color: var(--primary-color);
        opacity: 1;
    }

    /* Menü açılınca scroll'u kilitle */
    body.menu-open {
        overflow: hidden;
    }

    /* Kullanıcı Butonu (Header'da kalsın) */
    .header-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    #header-auth button>div>span:first-child {
        display: none !important;
    }

    /* Login button text hide on mobile */
    .login-btn-text {
        display: none !important;
    }
}

/* --- MOBİL & TABLET EKRANLAR (768px ve altı) --- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex !important;
        /* Force display */
        z-index: 10020 !important;
    }

    .header-container {
        padding: 0 1rem;
        gap: 0.5rem;
    }

    .logo-container {
        gap: 0.25rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 35px;
    }

    .header-actions {
        gap: 0.25rem;
        /* Boşluğu iyice azalttık */
    }

    .header-action-btn {
        padding: 5px;
        font-size: 1.1rem;
    }

    /* Favoriler butonunu mobilde gizle (yer açmak için) */
    .header-action-btn[title="Favoriler"] {
        display: none !important;
    }

    /* Ürünler Sayfası Başlık Küçültme */
    /* Ürünler Sayfası Başlık Küçültme */
    .products-hero-title {
        font-size: 1.75rem !important;
        /* 3rem'den düşürdük */
        line-height: 1.3 !important;
    }

    /* Ürün Filtreleme - Mobil Düzeltme (Alt alta, tam genişlik) */
    .products-filter-group {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        min-width: 0 !important;
        gap: 0.75rem !important;
    }

    .products-filter-group>div,
    .products-filter-group>select {
        width: 100% !important;
        flex: none !important;
        box-sizing: border-box !important;
    }

    /* Filtreleme Ana Konteyner - Dikey Hiza */
    .products-filter-container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }

    /* Ürün Sayısı Yazısı - En Alta ve Ortala */
    .products-filter-container>div:last-child {
        width: 100%;
        text-align: center;
        order: 3;
        /* En altta olsun */
        margin-top: 0.5rem;
    }

    /* Filtre Alanı - Kenar Boşluklarını Azalt (Daha Geniş Gözüksün) */
    .filter-section {
        padding: 1rem !important;
    }
}

/* --- ÇOK KÜÇÜK EKRANLAR (360px ve altı) --- */
@media (max-width: 360px) {
    .header-container {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 30px;
    }

    .header-actions {
        gap: 0.25rem;
    }

    .header-action-btn {
        padding: 6px;
    }

    .header-top-item {
        padding: 0.4rem 0.5rem;
        font-size: 0.65rem;
        gap: 0.3rem;
    }

    .header-top-item:not(:last-child)::after {
        height: 8px;
    }
}

/* 3. HERO SLIDER DÜZELTMESİ (Mobil) */
@media (max-width: 767px) {
    .hero {
        min-height: auto !important;
        padding: 1.5rem 0;
        text-align: center;
        display: block !important;
        /* Flex'i iptal et, blok olsun */
    }

    .hero-container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .hero-image {
        order: 1;
        /* Önce resim */
        width: 100%;
        margin-bottom: 1rem;
        border-radius: 1rem;
        overflow: hidden;
        position: relative;
        aspect-ratio: 4/3;
        /* Kareye yakın dikdörtgen */
        max-height: 400px;
    }

    .hero-content {
        order: 2;
        /* Sonra yazı */
    }

    /* Slider iç yapısı */
    .slider-wrapper,
    .slider-track,
    .slider-item {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .slider-wrapper {
        position: relative;
    }

    /* Wrapper relative olmalı */

    .slider-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Slider Dotları */
    .slider-dots {
        position: absolute;
        bottom: 1rem;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 0.5rem;
        z-index: 10;
        background: rgba(255, 255, 255, 0.8);
        padding: 5px 10px;
        border-radius: 15px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
        background: #ccc;
        border-radius: 50%;
    }

    .active-dot {
        background: #4f46e5;
        transform: scale(1.2);
    }
}

/* 4. GRID SİSTEMLERİ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 767px) {

    /* Features Section - Mobilde Kompakt */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem !important;
        margin-top: 1rem !important;
    }

    .feature-card {
        padding: 1rem !important;
        border-radius: 0.75rem !important;
    }

    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        margin: 0 auto 0.5rem !important;
        font-size: 1rem !important;
    }

    .feature-card h3 {
        font-size: 0.95rem !important;
        margin-bottom: 0.35rem !important;
    }

    .feature-card p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin: 0 !important;
    }

    /* Section Header - Mobilde Küçült */
    .section-header {
        margin-bottom: 1rem !important;
    }

    .section-header h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.25rem !important;
    }

    .section-header p {
        font-size: 0.85rem !important;
    }

    /* Section Padding - Mobilde Azalt */
    section {
        padding: 2rem 0 !important;
    }

    /* Product Grid — product-cards.css ile uyumlu */
    #product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    @media (max-width: 400px) {

        .features-grid {
            grid-template-columns: 1fr;
        }
        /* Not: #product-grid 400px'te bile 2 sütun kalır — product-cards.css yönetir */
    }
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 5. PANEL RESPONSIVE FIXES */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.password-section {
    border-left: 1px solid #e5e7eb;
    padding-left: 3rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .password-section {
        border-left: none !important;
        border-top: 1px solid #e5e7eb;
        padding-left: 0 !important;
        padding-top: 2rem;
        margin-top: 1rem;
    }
}

/* 6. HAKKIMIZDA SAYFASI RESPONSIVE */
.about-hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fce7f3 100%);
    padding: 4rem 0 3rem 0;
    position: relative;
    overflow: hidden;
}

.about-bg-circle {
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.about-title {
    font-size: 3rem;
    font-weight: 900;
    color: #1f2937;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    /* var(--primary), var(--accent-pink) */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .about-hero {
        padding: 2.5rem 0 2rem;
    }

    .about-bg-circle {
        width: 300px;
        height: 300px;
        top: -10%;
        right: -20%;
        opacity: 0.5;
    }

    .about-title {
        font-size: 2rem;
    }

    .about-content-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .about-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem;
    }

    @media (max-width: 480px) {
        .about-stats-grid {
            grid-template-columns: 1fr !important;
        }
    }
}

/* 7. İLETİŞİM SAYFASI RESPONSIVE */
.contact-hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #fce7f3 100%);
    padding: 3rem 0;
    position: relative;
}

.contact-title {
    font-size: 3rem;
    font-weight: 900;
    color: #1f2937;
    background: linear-gradient(135deg, #4f46e5, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 2.5rem 0;
    }

    .contact-title {
        font-size: 2rem;
    }

    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .contact-card {
        padding: 1.5rem;
    }
}

/* 8. ANA SAYFA İSTATİSTİKLER (MOBİLDE GİZLİ) */
.home-stats-section {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 2.5rem 0;
}

.home-stats-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.06;
    background: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 24px 24px;
}

.home-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.home-stats-grid > div {
    position: relative;
}

.home-stats-grid > div:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -1rem;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 768px) {
    .home-stats-section {
        display: none !important;
    }
}

/* ==========================================================================
   GLOBAL MOBILE FIXES
   ========================================================================== */

/* iOS zoom prevention — inputs must be 16px+ */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="tel"],
    input[type="search"],
    input[type="number"],
    input[type="url"],
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* Global container padding adjustment on small screens */
@media (max-width: 480px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Prevent horizontal overflow from any element */
@media (max-width: 768px) {
    section,
    main,
    .container {
        overflow-x: hidden;
    }
}