/* ========================================================================
   MODÜL STİLLERİ — Ürünler, Haberler, Dinamik Sayfalar, Form geri bildirimi
   (style.css'in devamı; aynı tasarım değişkenlerini kullanır)
   ======================================================================== */

/* --- Genel yardımcılar --- */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form-alert { padding: 14px 18px; border-radius: 8px; font-size: 0.9rem; margin-bottom: 20px; border: 1px solid transparent; }
.form-alert.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.form-alert.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.page-single { max-width: 900px; margin: 0 auto; }
/* Ad uzun olsa ya da hover'da girinti artsa da sayı rozeti aynı satırda, sağda kalır */
.sidebar-nav li a.has-count { display: flex; align-items: center; gap: 10px; }
.sidebar-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sidebar-count { flex-shrink: 0; background: var(--light); color: var(--text-muted); font-size: 0.72rem; font-weight: 600; line-height: 1.5; padding: 2px 9px; border-radius: 20px; }
.sidebar-nav li.active .sidebar-count, .sidebar-nav li a:hover .sidebar-count { background: var(--primary); color: #fff; }
.sidebar-nav li.sidebar-group > a { font-weight: 700; }
.sidebar-nav ul.sidebar-sub { list-style: none; margin: 0; }
.sidebar-nav ul.sidebar-sub li { border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); margin-top: -1px; }
.sidebar-nav ul.sidebar-sub li a { padding: 10px 16px 10px 30px; font-size: 0.83rem; color: var(--text-muted); }
.sidebar-nav ul.sidebar-sub li a:hover, .sidebar-nav ul.sidebar-sub li.active a { padding-left: 34px; }
.sidebar-nav ul.sidebar-sub.is-collapsed > li.sidebar-more-item { display: none; }
.sidebar-more-toggle { display: block; width: 100%; padding: 10px 16px 10px 30px; background: none; border: 0; border-top: 1px solid var(--border); margin-top: -1px; text-align: left; font: inherit; font-size: 0.8rem; font-weight: 600; color: var(--accent); cursor: pointer; transition: var(--transition); }
.sidebar-more-toggle:hover { color: var(--primary); background: var(--light); }
.sidebar-more-toggle i { font-size: 0.7rem; margin-left: 4px; }
.sidebar-more-toggle .less-text, .sidebar-more-toggle[aria-expanded="true"] .more-text { display: none; }
.sidebar-more-toggle[aria-expanded="true"] .less-text { display: inline; }
.mega-dropdown-inner.no-highlight { grid-template-columns: 1fr; min-width: 320px; }

.page-hero-compact { padding: 150px 0 60px; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; }
.page-hero-compact .page-hero-content h1 { font-size: 2.4rem; }
.article-meta { display: flex; gap: 22px; flex-wrap: wrap; color: rgba(255,255,255,0.6); font-size: 0.85rem; margin-top: 8px; }
.article-meta i { color: var(--accent); margin-right: 6px; }

/* --- Zengin içerik (editör çıktısı) --- */
.rich-content { color: var(--text-light); line-height: 1.85; font-size: 1rem; }
.rich-content h2, .rich-content h3, .rich-content h4 { font-family: var(--font-display); color: var(--primary); margin: 32px 0 14px; line-height: 1.3; }
.rich-content h2 { font-size: 1.6rem; } .rich-content h3 { font-size: 1.3rem; } .rich-content h4 { font-size: 1.1rem; }
.rich-content h2:first-child, .rich-content h3:first-child { margin-top: 0; }
.rich-content p { margin-bottom: 18px; }
.rich-content ul, .rich-content ol { margin: 0 0 20px 22px; }
.rich-content li { margin-bottom: 8px; }
.rich-content img { max-width: 100%; height: auto; border-radius: 12px; margin: 12px 0; }
.rich-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.92rem; }
.rich-content th, .rich-content td { border: 1px solid var(--border); padding: 10px 14px; text-align: left; }
.rich-content th { background: var(--light); color: var(--primary); font-weight: 600; }
.rich-content blockquote { border-left: 4px solid var(--accent); padding: 12px 20px; margin: 20px 0; background: var(--light); border-radius: 0 10px 10px 0; font-style: italic; }
.rich-content a { color: var(--primary); text-decoration: underline; }

/* --- Kategori kartları --- */
.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.category-card { display: flex; flex-direction: column; background: var(--white); border-radius: 18px; overflow: hidden; border: 1px solid var(--border); transition: var(--transition); text-decoration: none; }
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.category-card-img { position: relative; height: 210px; overflow: hidden; background: linear-gradient(135deg, var(--dark), var(--primary)); }
.category-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.category-card:hover .category-card-img img { transform: scale(1.06); }
.category-card-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; color: rgba(255,255,255,0.35); }
.category-card-count { position: absolute; top: 16px; right: 16px; background: rgba(10,22,40,0.75); color: #fff; font-size: 0.72rem; font-weight: 600; letter-spacing: 1px; padding: 6px 12px; border-radius: 20px; backdrop-filter: blur(4px); }
.category-card-body { padding: 26px 26px 28px; position: relative; flex: 1; display: flex; flex-direction: column; }
.category-card-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-top: -52px; margin-bottom: 16px; box-shadow: 0 8px 20px rgba(15,43,76,0.25); }
.category-card-body h2 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: 10px; }
.category-card-body p { color: var(--text-light); font-size: 0.92rem; line-height: 1.6; flex: 1; }
.category-card-link { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; color: var(--primary); font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.category-card-link i { transition: transform 0.3s ease; }
.category-card:hover .category-card-link { color: var(--accent); }
.category-card:hover .category-card-link i { transform: translateX(5px); }

/* --- Ürün kartları --- */
.product-list-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; padding-bottom: 16px; border-bottom: 2px solid var(--border); }
.product-count-badge { background: var(--light); color: var(--text-light); font-size: 0.8rem; font-weight: 600; padding: 6px 14px; border-radius: 20px; white-space: nowrap; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 24px; }
.product-card { background: var(--white); border-radius: 16px; border: 1px solid var(--border); overflow: hidden; transition: var(--transition); }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: transparent; }
.product-card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.product-card-img { position: relative; aspect-ratio: 4 / 3; background: var(--light); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-placeholder { font-size: 3rem; color: rgba(15,43,76,0.18); }
.product-card-badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--dark); font-size: 0.68rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; padding: 5px 10px; border-radius: 6px; }
.product-card-body { padding: 20px 20px 18px; display: flex; flex-direction: column; flex: 1; }
.product-card-category { font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.product-card-title { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; color: var(--primary); line-height: 1.35; margin-bottom: 8px; }
.product-card-body p { font-size: 0.86rem; color: var(--text-light); line-height: 1.55; flex: 1; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.product-card-sku { font-size: 0.72rem; color: var(--text-muted); font-family: monospace; }
.product-card-more { font-size: 0.78rem; font-weight: 700; color: var(--primary); letter-spacing: 0.5px; display: inline-flex; align-items: center; gap: 6px; }
.product-card-more i { transition: transform 0.3s ease; }
.product-card:hover .product-card-more i { transform: translateX(4px); }

/* --- Ürün detay --- */
.product-detail-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: start; }
.product-gallery-main { border-radius: 18px; overflow: hidden; background: var(--light); border: 1px solid var(--border); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.product-gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.product-gallery-placeholder { display: flex; flex-direction: column; align-items: center; gap: 12px; color: rgba(15,43,76,0.25); font-size: 4rem; }
.product-gallery-placeholder span { font-size: 0.85rem; color: var(--text-muted); }
.product-gallery-thumbs { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.product-thumb { width: 82px; height: 82px; border-radius: 10px; overflow: hidden; border: 2px solid var(--border); background: var(--white); cursor: pointer; padding: 0; transition: var(--transition); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-thumb.active, .product-thumb:hover { border-color: var(--accent); }
.product-meta-row { display: flex; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; font-size: 0.82rem; color: var(--text-muted); }
.product-meta-item i { color: var(--accent); margin-right: 6px; }
.product-meta-item strong { color: var(--primary); }
.product-lead { font-size: 1.1rem; line-height: 1.7; color: var(--text); margin-bottom: 22px; }
.product-price { font-family: var(--font-display); font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 20px; }
.product-price small { font-size: 0.9rem; color: var(--text-muted); font-weight: 600; }
.product-features { list-style: none; margin: 0 0 28px; display: grid; gap: 10px; }
.product-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.93rem; color: var(--text); }
.product-features li i { color: #16a34a; margin-top: 3px; font-size: 0.9rem; }
.product-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.product-share { display: flex; align-items: center; gap: 10px; font-size: 0.8rem; color: var(--text-muted); }
.product-share a { width: 36px; height: 36px; border-radius: 50%; background: var(--light); color: var(--primary); display: inline-flex; align-items: center; justify-content: center; transition: var(--transition); }
.product-share a:hover { background: var(--primary); color: #fff; }
.product-tabs { margin-top: 64px; }
.product-tab-nav { justify-content: flex-start; margin-bottom: 32px; }
.product-tab-nav .tab-btn { padding: 14px 28px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.spec-table th, .spec-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.spec-table th { width: 34%; background: var(--light); color: var(--primary); font-weight: 600; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.doc-link { display: flex; align-items: center; gap: 18px; padding: 18px 22px; border: 1px solid var(--border); border-radius: 12px; transition: var(--transition); max-width: 520px; }
.doc-link:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.doc-link > i:first-child { font-size: 2rem; color: #dc2626; }
.doc-link div { flex: 1; }
.doc-link strong { display: block; color: var(--primary); font-size: 0.95rem; }
.doc-link span { font-size: 0.8rem; color: var(--text-muted); }
.doc-link > i:last-child { color: var(--text-muted); }

/* --- Haberler --- */
.news-grid-page { margin-bottom: 40px; }
.news-excerpt { font-size: 0.86rem; color: var(--text-light); line-height: 1.55; margin: 8px 0 14px; }
.article-layout { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.article-figure { border-radius: 18px; overflow: hidden; margin-bottom: 32px; box-shadow: var(--shadow); }
.article-figure img { width: 100%; display: block; }
.article-share { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border); }
.article-sidebar { position: sticky; top: 100px; }
.sidebar-news-list { list-style: none; }
.sidebar-news-list li { border-bottom: 1px solid var(--border); }
.sidebar-news-list a { display: flex; gap: 14px; padding: 14px 0; align-items: center; }
.sidebar-news-list img { width: 72px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.sidebar-news-list strong { display: block; font-size: 0.86rem; color: var(--primary); line-height: 1.35; font-weight: 600; }
.sidebar-news-list span { font-size: 0.74rem; color: var(--text-muted); }
.sidebar-news-list a:hover strong { color: var(--accent); }

/* --- Sayfalama / boş durum --- */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.pagination a { min-width: 42px; height: 42px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--border); color: var(--text); font-weight: 600; font-size: 0.88rem; transition: var(--transition); }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination a.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.empty-state { text-align: center; padding: 64px 24px; background: var(--light); border-radius: 18px; }
.empty-state i { font-size: 3rem; color: rgba(15,43,76,0.25); margin-bottom: 18px; }
.empty-state h3 { font-family: var(--font-display); color: var(--primary); margin-bottom: 8px; }
.empty-state p { color: var(--text-light); font-size: 0.92rem; }

/* --- Anasayfa ürün grupları --- */
.home-products { padding: 100px 0; background: var(--light); }
.home-products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px; margin-top: 48px; }
.home-products-cta { text-align: center; margin-top: 44px; }

/* --- Anasayfa öne çıkan ürünler / ürün detay benzer-ilişkili --- */
.home-featured { padding: 100px 0; background: var(--white); }
.home-featured-grid { margin-top: 48px; }
.product-relations { margin-top: 72px; }
@media (max-width: 768px) {
    .home-featured { padding: 72px 0; }
    .product-relations { margin-top: 56px; }
}

/* --- Duyarlı --- */
@media (max-width: 1024px) {
    .product-detail-grid, .article-layout { grid-template-columns: 1fr; gap: 40px; }
    .article-sidebar { position: static; }
}
@media (max-width: 768px) {
    .page-hero-compact { padding: 120px 0 48px; }
    .page-hero-compact .page-hero-content h1 { font-size: 1.8rem; }
    .product-tab-nav { flex-wrap: wrap; }
    .product-tab-nav .tab-btn { flex: 1 1 auto; }
    .product-list-header { flex-direction: column; align-items: flex-start; }
}

/* --- Alt bilgi: dinamik sütun sayısı (marka + N sütun) --- */
.footer-grid { grid-template-columns: 1.6fr repeat(auto-fit, minmax(150px, 1fr)); }
@media (max-width: 1024px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 600px) { .footer-grid { grid-template-columns: 1fr; } }
