/*
Theme Name: NK Grafik Tahtalı Global
Theme URI: https://www.nkgrafik.com
Author: NK Grafik
Author URI: https://www.nkgrafik.com
Description: NK Grafik tarafından hazırlanan Tahtalı Global için doğal ekmek üretimi, ürün kataloğu, video arşivi, müşteri paneli ve blog odaklı responsive WordPress teması.
Version: 2.1.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: tahtali-global
*/

:root {
  --tg-ink: #17212b;
  --tg-ink-soft: #30404d;
  --tg-cream: #fff8e7;
  --tg-paper: #fffdf8;
  --tg-gold: #d59b38;
  --tg-gold-dark: #a66c17;
  --tg-blue: #17469b;
  --tg-green: #2fbf71;
  --tg-border: #eadfca;
  --tg-shadow: 0 18px 50px rgba(23, 33, 43, .10);
  --tg-radius: 20px;
  --tg-container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--tg-ink);
  background: var(--tg-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: var(--tg-blue); text-decoration: none; }
a:hover { color: var(--tg-gold-dark); }
img, video { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.container { width: min(100% - 2rem, var(--tg-container)); margin-inline: auto; }
.narrow { max-width: 820px; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,253,248,.94); border-bottom: 1px solid rgba(234,223,202,.9); backdrop-filter: blur(16px); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 82px; }
.site-branding { display: inline-flex; align-items: center; gap: .75rem; min-width: 205px; }
.site-logo { display: block; width: 176px; max-height: 68px; object-fit: contain; }
.site-title-text { font-weight: 800; color: var(--tg-ink); letter-spacing: -.03em; }
.primary-menu ul { display: flex; align-items: center; gap: .15rem; list-style: none; padding: 0; margin: 0; }
.primary-menu a { display: inline-block; padding: .65rem .8rem; color: var(--tg-ink-soft); font-size: .91rem; font-weight: 700; border-radius: 999px; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { background: var(--tg-cream); color: var(--tg-blue); }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.panel-top-link { color: var(--tg-blue); font-size: .82rem; font-weight: 800; }
.mobile-toggle { display: none; border: 0; background: transparent; color: var(--tg-ink); font-size: 1.5rem; cursor: pointer; }

.button, .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.2rem; border: 1px solid transparent; border-radius: 999px; background: var(--tg-gold); color: #fff; font-weight: 800; box-shadow: 0 8px 22px rgba(213,155,56,.24); transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover, .wp-block-button__link:hover { transform: translateY(-2px); background: var(--tg-gold-dark); color: #fff; box-shadow: 0 12px 28px rgba(213,155,56,.28); }
.button-outline { background: transparent; color: var(--tg-blue); border-color: var(--tg-blue); box-shadow: none; }
.button-outline:hover { background: var(--tg-blue); color: #fff; }
.button-whatsapp { background: var(--tg-green); box-shadow: 0 8px 22px rgba(47,191,113,.25); }
.button-whatsapp::before { content: ""; display: inline-block; width: 1.1em; height: 1.1em; flex: 0 0 1.1em; background: url('assets/images/whatsapp-icon.svg') center / contain no-repeat; }
.whatsapp-icon { display: inline-block; width: 1.1em; height: 1.1em; flex: 0 0 1.1em; object-fit: contain; vertical-align: middle; }
.whatsapp-icon-float { width: 1.35rem; height: 1.35rem; flex-basis: 1.35rem; }
.button-whatsapp:has(.whatsapp-icon)::before, .whatsapp-float:has(.whatsapp-icon)::before { display: none; }
.button-whatsapp:hover { background: #239858; }

.hero { position: relative; isolation: isolate; overflow: hidden; color: #fff; background: linear-gradient(120deg, rgba(13,23,34,.96), rgba(20,61,126,.8)), url('assets/images/tahtali-roll-ekmek.jpg') center/cover; }
.hero-slides { position: relative; min-height: 610px; }
.hero-slide { display: none; position: relative; z-index: 1; }
.hero-slide.is-active { display: block; animation: tg-slide-in .5s ease both; }
@keyframes tg-slide-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: translateX(0); } }
.slider-arrow { position: absolute; top: 50%; z-index: 4; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(15,27,39,.55); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; transform: translateY(-50%); transition: background .2s ease, transform .2s ease; }
.slider-arrow:hover { background: var(--tg-gold); transform: translateY(-50%) scale(1.05); }
.slider-prev { left: 1rem; }
.slider-next { right: 1rem; }
.slider-dots { position: absolute; right: 0; bottom: 1.3rem; left: 0; z-index: 5; display: flex; justify-content: center; gap: .55rem; }
.slider-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.45); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.slider-dot.is-active { background: var(--tg-gold); transform: scale(1.35); }
@media (prefers-reduced-motion: reduce) { .hero-slide.is-active { animation: none; } }
.hero::after { content: ""; position: absolute; inset: auto -5% -28% -5%; z-index: -1; height: 48%; background: rgba(213,155,56,.16); border-radius: 50%; filter: blur(14px); }
.hero-inner { min-height: 610px; display: grid; align-items: center; grid-template-columns: 1.06fr .94fr; gap: 3rem; padding: 5.6rem 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 1rem; color: var(--tg-gold); font-size: .8rem; font-weight: 900; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
.hero h1 { max-width: 750px; margin: 0 0 1.25rem; font-size: clamp(2.5rem, 6vw, 5.6rem); line-height: 1.03; letter-spacing: -.055em; }
.hero p { max-width: 660px; margin: 0 0 1.7rem; color: rgba(255,255,255,.83); font-size: 1.08rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero-panel { justify-self: end; max-width: 410px; padding: 1.2rem; border: 1px solid rgba(255,255,255,.2); border-radius: 28px; background: rgba(255,255,255,.10); box-shadow: var(--tg-shadow); backdrop-filter: blur(14px); }
.hero-panel img { display: block; width: 100%; border-radius: 18px; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-panel-caption { padding: .9rem .25rem .2rem; color: rgba(255,255,255,.84); font-size: .9rem; }

.section { padding: 5.4rem 0; }
.section-soft { background: var(--tg-cream); }
.section-dark { background: var(--tg-ink); color: #fff; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.section-heading h2, .page-heading h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -.045em; line-height: 1.08; }
.section-heading p { max-width: 680px; margin: .5rem 0 0; color: var(--tg-ink-soft); }
.section-dark .section-heading p { color: rgba(255,255,255,.74); }
.section-kicker { margin: 0 0 .4rem; color: var(--tg-gold-dark); font-weight: 900; text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 1.25rem; }
.post-grid, .video-grid, .gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 1.25rem; }
.product-card, .post-card, .video-card, .panel-card, .contact-card { overflow: hidden; border: 1px solid var(--tg-border); border-radius: var(--tg-radius); background: #fff; box-shadow: var(--tg-shadow); }
.card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #eef2f5, #f5e5be); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .card-media img, .post-card:hover .card-media img, .video-card:hover .card-media img { transform: scale(1.04); }
.card-content { padding: 1.2rem; }
.card-content h3 { margin: 0 0 .45rem; font-size: 1.16rem; line-height: 1.25; }
.card-content p { margin: 0 0 1rem; color: #5c6a73; font-size: .94rem; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; }
.card-link { font-weight: 800; }
.badge { display: inline-flex; padding: .25rem .6rem; border-radius: 999px; background: var(--tg-cream); color: var(--tg-gold-dark); font-size: .75rem; font-weight: 800; }

.value-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.value-card { padding: 1.5rem; border: 1px solid var(--tg-border); border-radius: var(--tg-radius); background: #fff; }
.value-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 1rem; border-radius: 14px; background: var(--tg-cream); color: var(--tg-blue); font-size: 1.5rem; }
.value-card h3 { margin: 0 0 .4rem; }
.value-card p { margin: 0; color: #5c6a73; }

.video-feature { display: grid; grid-template-columns: 1.08fr .92fr; gap: 2rem; align-items: center; }
.video-frame { overflow: hidden; border-radius: 26px; background: #000; box-shadow: var(--tg-shadow); }
.video-frame video { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.video-copy h2 { margin: 0 0 .8rem; font-size: clamp(2rem, 4vw, 3.3rem); letter-spacing: -.045em; }
.video-copy p { color: #5c6a73; }

.page-heading { padding: 4.5rem 0 2rem; background: linear-gradient(135deg, var(--tg-cream), #fff); }
.page-heading p { max-width: 760px; margin: 1rem 0 0; color: var(--tg-ink-soft); }
.breadcrumbs { margin-bottom: 1rem; color: var(--tg-gold-dark); font-size: .84rem; font-weight: 800; }
.single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.entry-content { font-size: 1.04rem; }
.entry-content h2, .entry-content h3 { margin-top: 2rem; line-height: 1.2; }
.entry-content img { border-radius: 18px; }
.entry-content blockquote { margin: 1.5rem 0; padding: 1rem 1.2rem; border-left: 4px solid var(--tg-gold); background: var(--tg-cream); }
.entry-meta { color: #6a737b; font-size: .86rem; }
.sidebar-card { padding: 1.2rem; border: 1px solid var(--tg-border); border-radius: var(--tg-radius); background: #fff; box-shadow: var(--tg-shadow); }
.sidebar-card + .sidebar-card { margin-top: 1rem; }
.sidebar-card h3 { margin-top: 0; }

.contact-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 1.25rem; }
.contact-stack { display: grid; gap: 1rem; }
.contact-card { padding: 1.25rem; }
.contact-card h3 { margin: 0 0 .35rem; }
.contact-card p { margin: 0; color: #5c6a73; }
.contact-form { padding: 1.5rem; border: 1px solid var(--tg-border); border-radius: var(--tg-radius); background: #fff; box-shadow: var(--tg-shadow); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.form-field { display: grid; gap: .4rem; margin-bottom: 1rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 800; font-size: .9rem; }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid #d7dfe3; border-radius: 12px; padding: .78rem .9rem; background: #fff; color: var(--tg-ink); }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { outline: 3px solid rgba(23,70,155,.15); border-color: var(--tg-blue); }
.checkbox-row { display: flex; align-items: start; gap: .55rem; margin: .4rem 0 1rem; font-size: .88rem; }
.checkbox-row input { margin-top: .3rem; }
.map-frame { width: 100%; min-height: 300px; border: 0; border-radius: var(--tg-radius); }

.gallery-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.gallery-item { overflow: hidden; border-radius: 16px; aspect-ratio: 1; background: var(--tg-cream); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.gallery-item:hover img { transform: scale(1.05); }

.panel-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.panel-nav { position: sticky; top: 100px; padding: .8rem; border: 1px solid var(--tg-border); border-radius: var(--tg-radius); background: #fff; box-shadow: var(--tg-shadow); }
.panel-nav a { display: block; padding: .7rem .8rem; border-radius: 10px; color: var(--tg-ink-soft); font-weight: 800; }
.panel-nav a:hover, .panel-nav a.active { background: var(--tg-cream); color: var(--tg-blue); }
.panel-card { padding: 1.35rem; }
.panel-card + .panel-card { margin-top: 1rem; }
.notice { padding: .8rem 1rem; border-left: 4px solid var(--tg-gold); background: var(--tg-cream); border-radius: 8px; }
.notice.error { border-left-color: #bf3f3f; background: #fff0f0; }
.notice.success { border-left-color: var(--tg-green); background: #effbf4; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: .75rem .6rem; border-bottom: 1px solid var(--tg-border); text-align: left; vertical-align: top; }
.data-table th { color: var(--tg-ink-soft); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }

.site-footer { padding: 3rem 0 1rem; color: rgba(255,255,255,.76); background: #101923; }
.footer-grid { display: grid; grid-template-columns: 1.2fr .8fr .8fr; gap: 2rem; }
.site-footer h2, .site-footer h3 { color: #fff; }
.footer-logo { width: 180px; filter: brightness(0) invert(1); opacity: .94; }
.site-footer a { color: rgba(255,255,255,.78); }
.site-footer a:hover { color: #fff; }
.footer-menu ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-menu li { margin: .35rem 0; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.14); font-size: .82rem; }
.whatsapp-float { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; display: inline-flex; align-items: center; gap: .55rem; padding: .78rem 1rem; border-radius: 999px; background: var(--tg-green); color: #fff; font-weight: 900; box-shadow: 0 12px 30px rgba(47,191,113,.35); }
.whatsapp-float::before { content: ""; display: inline-block; width: 1.35rem; height: 1.35rem; background: url('assets/images/whatsapp-icon.svg') center / contain no-repeat; }
.whatsapp-float:hover { color: #fff; background: #239858; transform: translateY(-2px); }
.form-help { margin: 0 0 1rem; color: #5c6a73; font-size: .88rem; }

@media (max-width: 980px) {
  .primary-menu { display: none; position: absolute; left: 1rem; right: 1rem; top: 78px; padding: .7rem; border: 1px solid var(--tg-border); border-radius: 16px; background: #fff; box-shadow: var(--tg-shadow); }
  .primary-menu.is-open { display: block; }
  .primary-menu ul { display: block; }
  .primary-menu a { display: block; }
  .mobile-toggle { display: block; }
  .header-actions .button, .panel-top-link { display: none; }
  .hero-inner, .video-feature, .contact-layout { grid-template-columns: 1fr; }
  .hero-slides { min-height: 720px; }
  .slider-arrow { top: auto; bottom: 1rem; transform: none; }
  .slider-arrow:hover { transform: scale(1.05); }
  .slider-prev { left: 1rem; }
  .slider-next { right: 1rem; }
  .slider-dots { bottom: 1.95rem; }
  .hero-panel { justify-self: start; max-width: 520px; }
  .product-grid, .post-grid, .video-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .single-layout { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .panel-shell { grid-template-columns: 1fr; }
  .panel-nav { position: static; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 1.25rem, var(--tg-container)); }
  .header-inner { min-height: 72px; }
  .site-logo { width: 150px; }
  .hero-inner { min-height: auto; padding: 4.5rem 0; }
  .hero h1 { font-size: clamp(2.5rem, 14vw, 4rem); }
  .section { padding: 3.6rem 0; }
  .section-heading { display: block; }
  .section-heading .button { margin-top: 1rem; }
  .product-grid, .post-grid, .video-grid, .value-grid, .gallery-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .footer-bottom { display: block; }
  .footer-bottom span { display: block; margin-top: .4rem; }
  .whatsapp-float { right: .75rem; bottom: .75rem; padding: .7rem .85rem; font-size: .88rem; }
}

/* Son görünüm düzeltmeleri: menü tek satır, ürünler masaüstünde 4 sütun. */
.primary-menu ul { flex-wrap: nowrap; }
.primary-menu a, .button, .wp-block-button__link, .panel-nav a { white-space: nowrap; }
.product-grid { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
.category-product-grid { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
@media (max-width: 1100px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }
@media (max-width: 980px) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 980px) { .category-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 620px) { .category-product-grid { grid-template-columns: 1fr !important; } }
@media (max-width: 620px) { .product-grid { grid-template-columns: 1fr !important; } }

.home-product-item { min-width: 0; }
.home-product-category { margin: 0 0 .5rem; color: var(--tg-gold-dark); font-size: .78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 980px) { .tg-home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 620px) { .tg-home-product-grid { grid-template-columns: 1fr !important; } }

.panel-nav-note { display:block; color:#6b7280; font-size:.78rem; line-height:1.35; padding:.35rem 0; }
.category-child-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1rem; margin-top:1.25rem; }
.category-child-card { display:flex; flex-direction:column; gap:.4rem; min-height:110px; padding:1.15rem; border:1px solid rgba(19,61,108,.14); border-radius:1rem; background:#fff; box-shadow:0 8px 22px rgba(18,45,74,.07); color:#17469b; text-decoration:none; }
.category-child-card span { color:#6b7280; font-size:.85rem; }
@media (max-width:980px) { .category-child-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .category-child-grid { grid-template-columns:1fr; } }

.home-category-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:1.25rem; margin:0 0 2.5rem; }
.home-category-card { display:flex; flex-direction:column; overflow:hidden; min-height:210px; border:1px solid rgba(19,61,108,.12); border-radius:1rem; background:#fff; box-shadow:0 10px 24px rgba(18,45,74,.08); color:inherit; text-decoration:none; transition:transform .2s ease, box-shadow .2s ease; }
.home-category-card:hover { transform:translateY(-3px); box-shadow:0 16px 32px rgba(18,45,74,.14); }
.home-category-card img { width:100%; aspect-ratio:4/3; object-fit:cover; }
.home-category-card-body { display:flex; flex:1; flex-direction:column; justify-content:space-between; gap:.55rem; padding:1rem; }
.home-category-card-body strong { color:#17469b; font-size:1.05rem; }
.home-category-card-body small { color:#6b7280; }
@media (max-width:980px) { .home-category-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:620px) { .home-category-grid { grid-template-columns:1fr; } }
