/* assets/css/style.css - PackPress OS: Master Zero-Radius Industrial CSS (v1.7 Golden Freeze) */

:root {
    --brand-primary: #F97316;    /* Endüstriyel Turuncu */
    --brand-hover: #EA580C;
    --theme-navy: #0B1120;       /* Kurumsal Koyu Lacivert */
    --text-dark: #0F172A;        /* Ana Yazı / Siyah */
    --text-gray: #64748B;
    --bg-body: #FFFFFF;
    --bg-gray: #F8FAFC;
    --border-color: #CBD5E1;     /* Teknik Blueprint Grisi */
    --border-light: #E2E8F0;
    --font-main: 'Plus Jakarta Sans', -apple-system, sans-serif;
    --radius-zero: 0px !important;
}

* { box-sizing: border-box; border-radius: var(--radius-zero); }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--brand-hover); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   1. MASAÜSTÜ HEADER (Flyeralarm Kibarlığı)
   ========================================= */
.top-bar-bg { border-bottom: 1px solid var(--border-color); background: var(--bg-body); }
.top-bar { padding: 8px 20px; font-size: 12.5px; color: var(--text-gray); display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; font-weight: 500; }
.top-bar-left a { color: #0369A1; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.top-bar-right { display: flex; gap: 20px; font-weight: 500; }
.top-bar-right span { display: flex; align-items: center; gap: 5px; }

.header-main { padding: 22px 20px; display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 30px; position: relative; z-index: 100; }
.logo { font-size: 26px; font-weight: 800; color: var(--text-dark); text-decoration: none; display: flex; align-items: center; gap: 8px; letter-spacing: -0.8px; margin: 0; }

.search-box { flex: 1; max-width: 580px; display: flex; height: 46px; border: 1.5px solid var(--border-color); background: white; }
.search-box:focus-within { border-color: var(--text-dark); }
.search-box input { flex: 1; min-width: 0; border: none; padding: 0 18px; outline: none; font-family: var(--font-main); font-size: 14px; font-weight: 500; color: var(--text-dark); }
.search-box button { width: 54px; flex-shrink: 0; background: var(--text-dark); color: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.15s; padding: 0; }
.search-box button:hover { background: var(--brand-primary); }

.header-icons { display: flex; align-items: center; gap: 28px; }
.h-icon-box { display: flex; flex-direction: column; align-items: center; gap: 4px; text-decoration: none; color: var(--text-dark); background: none; border: none; padding: 0; cursor: pointer; font-family: inherit; }
.h-icon-box .material-symbols-outlined { font-size: 24px; color: #334155; transition: 0.15s; }
.h-icon-text { font-size: 11.5px; font-weight: 600; color: #334155; letter-spacing: 0; transition: 0.15s; }
.h-icon-box:hover .material-symbols-outlined, .h-icon-box:hover .h-icon-text { color: var(--brand-primary); }

.cart-icon-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.cart-badge { position: absolute; top: -6px; right: -8px; background: #DC2626; color: white; font-size: 10px; font-weight: 800; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; border: 1px solid white; z-index: 5; }

/* =========================================
   2. NAVİGASYON BARI & KİLİTLİ MEGA MENÜ
   ========================================= */
.nav-bar-bg { border-top: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color); background: var(--bg-body); position: relative !important; z-index: 90; }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; display: flex; gap: 32px; position: relative; }
.nav-link { padding: 15px 0; color: #1E293B; font-weight: 600; text-decoration: none; font-size: 15px; display: flex; align-items: center; gap: 5px; letter-spacing: -0.2px; }
.nav-link:hover { color: var(--brand-primary); }

.dropdown { position: static !important; } 

.dropdown .mega-menu {
    display: none !important;
    position: absolute !important; 
    top: 100% !important; 
    left: 0 !important; 
    width: 100% !important; 
    background-color: #ffffff !important;
    border-bottom: 3px solid var(--text-dark) !important;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.18) !important;
    z-index: 9999999 !important; 
    padding: 0; overflow: hidden;
}

.dropdown:hover .mega-menu { display: block !important; }

.mega-menu-inner { display: grid; grid-template-columns: 300px 1fr; max-width: 1200px; margin: 0 auto; min-height: 380px; }
.mega-menu-left { background-color: var(--bg-gray); padding: 25px; border-right: 1px solid var(--border-color); }
.mega-menu-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 2px; }
.mega-menu-list li a { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; color: #334155; text-decoration: none; font-weight: 600; font-size: 14px; }
.mega-menu-list li a:hover, .mega-menu-list li a.active { background-color: var(--text-dark); color: white; }
.mega-menu-list li a .material-symbols-outlined { font-size: 18px; opacity: 0; transform: translateX(-5px); transition: 0.15s; }
.mega-menu-list li a:hover .material-symbols-outlined { opacity: 1; transform: translateX(0); }

.mega-menu-right { padding: 30px; background-color: #ffffff; position: relative; }
.mega-content-panel { display: none; grid-template-columns: 1fr 280px; gap: 35px; }
.mega-content-panel.active { display: grid; }
.mega-subcats h3 { font-size: 18px; font-weight: 800; color: var(--text-dark); margin: 0 0 16px 0; }
.subcat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.subcat-item { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border-light); text-decoration: none; color: #334155; font-weight: 600; font-size: 13px; }
.subcat-item:hover { border-color: var(--text-dark); color: var(--brand-primary); background: #FAFAFA; }

.mega-visual { overflow: hidden; position: relative; background-color: var(--bg-gray); border: 1px solid var(--border-color); display: flex; flex-direction: column; }
.mega-visual img { width: 100%; height: 170px; object-fit: cover; }
.mega-visual-content { padding: 16px; }
.mega-visual-content h4 { margin: 0 0 4px 0; font-size: 14px; font-weight: 800; color: var(--text-dark); }
.mega-visual-content p { margin: 0; font-size: 12.5px; color: var(--text-gray); line-height: 1.4; }

/* =========================================
   3. MOBİL COĞRAFYA KORUMASI (Zırhlı Kapanış)
   ========================================= */
@media (max-width: 900px) {
    .top-bar-bg { display: none; }
    .desktop-only { display: none !important; }
    .header-main { display: flex; flex-direction: column; padding: 15px; gap: 15px; width: 100%; }
    .logo { order: 1; margin: 0 auto; font-size: 24px; }
    .header-icons { order: 2; width: 100%; display: flex; justify-content: space-between; gap: 5px; }
    .mobile-menu-btn { display: flex; }
    .search-box { order: 3; width: 100%; max-width: 100%; height: 46px; }
    
    .nav-bar-bg { position: fixed !important; top: 0; left: -100%; width: 85%; max-width: 340px; height: 100vh; background: white; z-index: 1000; transition: left 0.25s ease; overflow-y: auto; display: block; border-right: 1px solid var(--border-color); }
    .nav-bar-bg.active { left: 0; box-shadow: 20px 0 50px rgba(0,0,0,0.2); }
    
    .mobile-overlay { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.6); z-index: 999; opacity: 0; visibility: hidden; }
    .mobile-overlay.active { opacity: 1; visibility: visible; }
} /* <-- MOBİL SORGUSUNUN RESMİ KAPANIŞ PARANTEZİ */

/* ==========================================================================
   🔥 FLYERALARM EKOLÜ: KİBAR AKTİF İKONLAR & KESİN KİLİTLİ MEGA MENÜ
   ========================================================================== */

/* 1. Aktif olan menü kaba bir şekilde BOLD (kömür gibi) olmayacak! */
.h-icon-box.active, 
.h-icon-box.active .h-icon-text,
.h-icon-box[style*="color: var(--brand-primary)"] .h-icon-text {
    font-weight: 600 !important; /* Normal kibar kalınlıkta kalır */
    color: #0F172A !important;   /* Yazı simsiyah asil kalır */
}

/* Sadece üstündeki ikon turuncu parlar */
.h-icon-box.active .material-symbols-outlined,
.h-icon-box[style*="color: var(--brand-primary)"] .material-symbols-outlined {
    color: var(--brand-primary) !important;
}

/* 2. Kaçak Mega Menü'ye SIFIR TOLERANS (Fiziksel Kilit) */
.nav-container .dropdown .mega-menu {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Sadece fareyle "Ürünlerimiz" yazısının tam üstüne gelindiğinde açılır */
.nav-container .dropdown:hover .mega-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    z-index: 9999999 !important;
}