/* =========================================================================
   Drobalance Pharma — main stylesheet
   ========================================================================= */

:root {
	--c-primary:        #0ea36b;
	--c-primary-dark:   #0a7d52;
	--c-accent:         #ff8a3d;
	--c-base:           #ffffff;
	--c-surface:        #f6f8fa;
	--c-contrast:       #0c1b22;
	--c-muted:          #6b7a85;
	--c-border:         #e3e7ec;
	--c-danger:         #e0413a;
	--c-header:         #ffffff;
	--c-header-hover:   #f3f5f8;
	--c-header-ink:     #ffffff;
	--c-brand:          #2b2b5e;
	--radius:           10px;
	--radius-lg:        16px;
	--shadow-sm:        0 1px 2px rgba(12, 27, 34, 0.06);
	--shadow-md:        0 6px 18px rgba(12, 27, 34, 0.08);
	--container:        1240px;
	--gap:              clamp(1rem, 0.6rem + 1.4vw, 2rem);
	--font-sans:        Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: var(--font-sans);
	font-size: 16px;
	line-height: 1.6;
	color: var(--c-contrast);
	background: var(--c-base);
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
}
.site-content,
.site-footer {
	background: transparent;
}
.site-header {
	background: #ffffff;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }

.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding: 0 var(--gap);
}

.text-center { text-align: center; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: -9999px; top: 0; background: var(--c-contrast); color: var(--c-base);
	padding: .75rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Topbar ---------- */
.topbar {
	background: var(--c-contrast); color: var(--c-base);
	font-size: .85rem;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .55rem; }
.topbar a { color: inherit; opacity: .8; }
.topbar a:hover { opacity: 1; }
.topbar-menu { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.topbar-note { opacity: .8; }

/* ---------- Sepete eklendi toast ---------- */
.dro-toast {
	position: fixed; z-index: 200;
	left: 50%; bottom: calc(120px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%) translateY(16px);
	background: #0c1b22;
	color: #fff;
	padding: .85rem 1.1rem;
	border-radius: 14px;
	display: inline-flex; align-items: center; gap: .65rem;
	font-size: .92rem; font-weight: 600;
	box-shadow: 0 12px 32px rgba(12, 27, 34, .25), 0 2px 8px rgba(12, 27, 34, .1);
	opacity: 0;
	max-width: calc(100vw - 2rem);
	transition: opacity .25s ease, transform .25s ease;
	pointer-events: auto;
}
.dro-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}
.dro-toast.is-success { background: var(--c-primary, #0ea36b); }
.dro-toast.is-error { background: var(--c-danger, #e0413a); }
.dro-toast__icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 22px; height: 22px;
	background: rgba(255, 255, 255, .18);
	border-radius: 999px; flex-shrink: 0;
}
.dro-toast__icon svg { width: 14px; height: 14px; }
.dro-toast__msg { line-height: 1.2; }
.dro-toast__cta {
	margin-left: .35rem;
	color: #fff; text-decoration: underline;
	font-weight: 700; font-size: .85rem;
	white-space: nowrap;
}
.dro-toast__cta:hover { color: #fff; opacity: .8; }
@media (min-width: 769px) {
	.dro-toast { bottom: 1.5rem; }
}

/* ---------- Üst sabit güven barı ---------- */
.top-ticker {
	position: sticky; top: 0; z-index: 51;
	background: #0c1b22;
	color: #fff;
	padding: .6rem 1rem;
	font-size: .85rem;
	line-height: 1.25;
	box-shadow: 0 1px 0 rgba(255,255,255,.05);
}
.top-ticker__static {
	display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
	gap: .4rem .8rem;
	max-width: var(--container, 1240px);
	margin: 0 auto;
	text-align: center;
}
.top-ticker__item {
	display: inline-block;
	color: #fff;
	font-weight: 600;
	letter-spacing: .01em;
}
.top-ticker__sep {
	display: inline-block;
	color: rgba(255,255,255,.45);
	font-weight: 400;
}

/* ---------- Header ---------- */
.site-header {
	background: var(--c-header);
	color: var(--c-header-ink);
	border-bottom: 1px solid var(--c-border);
	position: sticky; top: 38px; /* top-ticker yüksekliği */ z-index: 50;
	box-shadow: 0 1px 3px rgba(12, 27, 34, .04);
}
@media (max-width: 768px) {
	.site-header { top: 38px; }
	.top-ticker { padding: .5rem .75rem; font-size: .72rem; }
	.top-ticker__static { gap: .3rem .55rem; }
}
.site-header a { color: var(--c-header-ink); }
.site-header__inner {
	display: grid;
	grid-template-columns: 1fr auto auto;
	gap: 1.5rem;
	align-items: center;
	padding-block: .9rem;
}
.site-branding { min-width: 0; }
.header-actions { justify-self: end; }
.site-title { font-weight: 700; font-size: 1.25rem; color: var(--c-brand); }
.site-description { color: var(--c-muted); font-size: .8rem; margin: 0; }
.site-branding .custom-logo {
	max-height: 56px;
	width: auto;
	height: auto;
}
@media (max-width: 768px) {
	.site-branding .custom-logo { max-height: 40px; }
}

.primary-nav { display: flex; }
.primary-nav__toggle {
	display: none; background: transparent; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--c-contrast);
}
.primary-menu { list-style: none; display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.primary-menu a { color: var(--c-contrast); font-weight: 500; padding: .25rem 0; }
.primary-menu a:hover { color: var(--c-primary); }

/* Header butonları: alt alta, kompakt, bold beyaz yazı */
.header-actions {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	align-items: stretch;
	min-width: 115px;
	max-width: 145px;
}
.header-action {
	display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
	padding: .4rem .6rem; border-radius: var(--radius);
	color: #ffffff; font-weight: 700; font-size: .78rem;
	border: 1px solid var(--c-border);
	background: #fff;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
	white-space: nowrap;
	width: 100%;
	letter-spacing: -.005em;
}
.header-action__icon { width: 16px; height: 16px; flex-shrink: 0; }
.header-action__label { line-height: 1; display: inline-block; font-weight: 700; color: inherit; }
.header-action--track {
	background: #bd0000;
	border-color: #bd0000;
	color: #fff;
}
.header-action--track:hover { background: #960000; border-color: #960000; color: #fff; }
.header-action--cart { background: #312783; border-color: #312783; color: #fff; }
.header-action--cart:hover { background: #251c63; border-color: #251c63; color: #fff; }
.header-action--cart .cart-count {
	background: rgba(255,255,255,.28); color: #fff;
	padding: .05rem .45rem; border-radius: 999px;
	font-size: .8rem; min-width: 1.25rem; text-align: center;
}

/* ---------- Buttons ---------- */
.button, .wp-element-button, button.alt, button.button {
	display: inline-flex; align-items: center; justify-content: center;
	background: var(--c-primary); color: var(--c-base);
	padding: .75rem 1.25rem; border-radius: var(--radius);
	border: 1px solid var(--c-primary);
	font-weight: 600; cursor: pointer; transition: background .15s, transform .1s;
	text-decoration: none;
}
.button:hover, button.button:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: var(--c-base); }
.button:active { transform: translateY(1px); }
.button--ghost { background: transparent; color: var(--c-primary); }
.button--ghost:hover { background: var(--c-primary); color: var(--c-base); }
.button--outline { background: transparent; color: var(--c-contrast); border-color: var(--c-border); }
.button--outline:hover { background: var(--c-surface); color: var(--c-contrast); }

/* ---------- Hero ---------- */
.hero {
	background: linear-gradient(135deg, #e9faf2 0%, #f4f8ff 100%);
	padding: clamp(2rem, 1rem + 5vw, 5rem) 0;
}
.hero__inner {
	display: grid; grid-template-columns: 1.2fr 1fr; gap: 3rem; align-items: center;
}
.eyebrow {
	display: inline-block; background: var(--c-base); padding: .25rem .75rem; border-radius: 999px;
	color: var(--c-primary); font-size: .85rem; font-weight: 600; box-shadow: var(--shadow-sm);
}
.hero__title {
	margin: .75rem 0 1rem;
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem);
	line-height: 1.1; font-weight: 800; color: var(--c-contrast);
}
.hero__lede { color: var(--c-muted); font-size: 1.1rem; max-width: 38ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }

.hero__art {
	position: relative; aspect-ratio: 1 / 1; max-width: 420px; margin-inline: auto;
}
.hero__pill, .hero__capsule, .hero__cross { position: absolute; border-radius: 999px; }
.hero__pill {
	inset: 12% auto auto 8%; width: 55%; height: 22%;
	background: var(--c-primary); transform: rotate(-18deg);
	box-shadow: var(--shadow-md);
}
.hero__capsule {
	inset: auto 4% 14% auto; width: 60%; height: 22%;
	background: linear-gradient(90deg, var(--c-accent) 50%, #ffd8b8 50%);
	transform: rotate(20deg); box-shadow: var(--shadow-md);
}
.hero__cross {
	inset: 38% 14% auto auto; width: 22%; aspect-ratio: 1/1; border-radius: 12px;
	background: var(--c-base); box-shadow: var(--shadow-md);
}
.hero__cross::before, .hero__cross::after {
	content: ""; position: absolute; inset: 0; margin: auto; background: var(--c-primary);
}
.hero__cross::before { width: 60%; height: 14%; }
.hero__cross::after  { width: 14%; height: 60%; }

/* ---------- Section heads & shop blocks ---------- */
.section-head {
	display: flex; justify-content: center; align-items: center;
	margin-bottom: 1.5rem; text-align: center;
}
.section-head h2 {
	margin: 0; font-size: clamp(1.4rem, 1.2rem + .6vw, 2rem);
	font-weight: 500; letter-spacing: -0.005em;
	position: relative; padding-bottom: .6rem;
	color: var(--c-contrast);
}
.section-head h2::after {
	content: ""; position: absolute; left: 50%; bottom: 0;
	width: 48px; height: 3px; background: var(--c-primary);
	border-radius: 2px; transform: translateX(-50%);
}
.section-head__link { font-weight: 600; }

.featured-products, .category-grid { padding: clamp(1.75rem, 1rem + 2vw, 3rem) 0; }
.category-grid .woocommerce ul.products li.product .woocommerce-loop-category__title { text-align: center; font-weight: 600; }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--c-contrast); color: var(--c-base); padding: 3rem 0; }
.newsletter__inner {
	display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center;
}
.newsletter h2 { margin: 0 0 .25rem; color: var(--c-base); }
.newsletter p { margin: 0; color: rgba(255,255,255,.7); }
.newsletter__form { display: flex; gap: .5rem; }
.newsletter__form input {
	flex: 1; padding: .8rem 1rem; border-radius: var(--radius); border: 0; font: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
	background: var(--c-surface);
	padding: 3rem 0 1.5rem; margin-top: 4rem;
}
.footer-credit { color: var(--c-muted); margin: 0; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }
.footer-col h4, .footer-col .widget-title { margin-top: 0; }
.footer-bottom {
	display: flex; justify-content: space-between; align-items: center;
	border-top: 1px solid var(--c-border); margin-top: 2rem; padding-top: 1.25rem; gap: 1rem;
	flex-wrap: wrap;
}
.footer-credit { color: var(--c-muted); margin: 0; }
.footer-menu { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.footer-menu a { color: var(--c-muted); }

/* ---------- Mobil kayan duyuru barı (ticker) ---------- */
.ticker {
	display: none; /* yalnız mobilde aktif */
	position: fixed; left: 0; right: 0; z-index: 59;
	bottom: calc(62px + env(safe-area-inset-bottom, 0px)); /* bottom-nav'ın hemen üstü */
	background: #000;
	color: #fff;
	overflow: hidden;
	padding: .55rem 0;
	font-size: .82rem;
	line-height: 1;
	white-space: nowrap;
	border-top: 1px solid rgba(255,255,255,.08);
}
.ticker__track {
	display: inline-flex;
	gap: 2.5rem;
	padding-left: 2.5rem;
	will-change: transform;
	animation: drobalance-ticker 28s linear infinite;
}
.ticker__item {
	display: inline-block;
	color: #fff;
	font-weight: 500;
	letter-spacing: .01em;
}
@keyframes drobalance-ticker {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}
/* Hareketi azaltma tercihine saygı */
@media (prefers-reduced-motion: reduce) {
	.ticker__track { animation: none; transform: none; padding-left: 1rem; }
}

/* ---------- Mobil alt menü barı (3 eşit pill) ---------- */
.mobile-bottom-nav {
	display: none;
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
	background: #ffffff;
	border-top: 1px solid var(--c-border);
	padding: .45rem .45rem calc(.45rem + env(safe-area-inset-bottom, 0px));
	grid-template-columns: 1fr 1fr 1fr;
	gap: .35rem;
	align-items: stretch;
	box-shadow: 0 -2px 10px rgba(12, 27, 34, .06);
}

/* Anasayfa pill — beyaz/outline, eşit boyutta */
.mbn-item--home {
	display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
	padding: .55rem .35rem;
	color: var(--c-contrast);
	font-size: .72rem; font-weight: 700;
	text-decoration: none;
	border-radius: 12px;
	border: 1px solid var(--c-border);
	background: #fff;
	min-height: 42px;
	white-space: nowrap;
	transition: background .15s ease, border-color .15s ease;
}
.mbn-item--home:hover { background: var(--c-surface); color: var(--c-contrast); }
.mbn-item--home.is-active { border-color: var(--c-brand); color: var(--c-brand); }
.mbn-item--home .mbn-icon svg { width: 15px; height: 15px; }
.mbn-item--home .mbn-label { line-height: 1; }

/* Sipariş Sorgu ve Sepetim: pill buton */
.mbn-item--track,
.mbn-item--cart {
	display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
	padding: .55rem .35rem;
	font-size: .72rem; font-weight: 700;
	text-decoration: none;
	border-radius: 12px;
	min-height: 42px;
	white-space: nowrap;
	border: 1px solid transparent;
	position: relative;
	transition: background .15s ease, transform .1s ease, box-shadow .15s ease;
}
.mbn-item--track {
	background: #bd0000; color: #fff;
	border-color: #bd0000;
	box-shadow: 0 3px 8px rgba(189, 0, 0, .25);
}
.mbn-item--track:hover { background: #960000; color: #fff; }
.mbn-item--cart {
	background: #312783; color: #fff;
	border-color: #312783;
	box-shadow: 0 3px 8px rgba(49, 39, 131, .28);
}
.mbn-item--cart:hover { background: #251c63; color: #fff; }

.mbn-item--track .mbn-label,
.mbn-item--cart .mbn-label {
	line-height: 1; display: inline-block; color: #fff;
}
.mbn-item--track .mbn-icon,
.mbn-item--cart .mbn-icon { color: #fff; }
.mbn-item--track .mbn-icon svg,
.mbn-item--cart .mbn-icon svg { width: 14px; height: 14px; }

/* Belirgin badge — sepete eklendiğinde net görünür */
.mbn-badge {
	display: none;
	position: absolute; top: -6px; right: -6px;
	background: #ff8a3d; /* accent — yeşilin üstünde net seçilir */
	color: #fff;
	font-size: .72rem; font-weight: 800;
	min-width: 22px; height: 22px; padding: 0 .35rem;
	border-radius: 999px;
	align-items: center; justify-content: center;
	border: 2px solid #fff;
	box-shadow: 0 2px 6px rgba(255, 138, 61, .45);
	line-height: 1;
}
.mbn-badge.is-visible { display: inline-flex; }
/* Pulse animation — sayı artarken çekici */
@keyframes mbn-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.15); }
}
.mbn-badge.is-visible { animation: mbn-pulse 1.6s ease-in-out infinite; }

@media (max-width: 400px) {
	.mobile-bottom-nav { padding: .4rem .35rem calc(.4rem + env(safe-area-inset-bottom, 0px)); gap: .25rem; }
	.mbn-item--home,
	.mbn-item--track,
	.mbn-item--cart { font-size: .66rem; padding: .5rem .25rem; min-height: 40px; }
	.mbn-item--home .mbn-icon svg { width: 13px; height: 13px; }
	.mbn-item--track .mbn-icon svg,
	.mbn-item--cart .mbn-icon svg { width: 12px; height: 12px; }
	.mbn-badge { min-width: 18px; height: 18px; font-size: .65rem; top: -5px; right: -5px; }
}

/* ---------- Layout helpers ---------- */
.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 2.5rem; padding-block: 2.5rem; }
.widget-area .widget + .widget { margin-top: 2rem; }

/* ---------- Post cards ---------- */
.post-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.post-card {
	background: var(--c-base); border: 1px solid var(--c-border); border-radius: var(--radius-lg);
	overflow: hidden; display: flex; flex-direction: column;
}
.post-card__media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.post-card__body { padding: 1rem 1.1rem 1.25rem; }
.post-card__title { margin: 0 0 .35rem; font-size: 1.1rem; }
.post-card__meta { color: var(--c-muted); font-size: .85rem; margin-bottom: .5rem; }
.post-card__excerpt p { margin: 0; }
.post-card__more { display: inline-block; margin-top: .75rem; font-weight: 600; }

/* ---------- 404 ---------- */
.error-404 { padding: 5rem 0; }
.error-404 .display { font-size: clamp(4rem, 8vw, 8rem); margin: 0; color: var(--c-primary); }
.error-search { max-width: 480px; margin: 1.5rem auto 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
	.site-header__inner { grid-template-columns: auto auto auto; }
	.primary-nav { order: 4; grid-column: 1 / -1; }
	.primary-nav__toggle { display: inline-flex; }
	.primary-menu {
		display: none; flex-direction: column; gap: .5rem;
		background: var(--c-header); border-top: 1px solid rgba(255,255,255,.1);
		padding: 1rem 0;
	}
	.primary-nav.is-open .primary-menu { display: flex; }
	.hero__inner { grid-template-columns: 1fr; }
	.hero__art { display: none; }
	.footer-grid { grid-template-columns: repeat(2, 1fr); }
	.layout-with-sidebar { grid-template-columns: 1fr; }
	.post-list { grid-template-columns: 1fr; }
	.newsletter__inner { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
	/* Bottom nav + ticker göster */
	.mobile-bottom-nav { display: grid; }
	.ticker { display: block; }

	/* Sayfa altına bottom nav + ticker için boşluk */
	body { padding-bottom: calc(64px + 38px + env(safe-area-inset-bottom, 0px)); }

	/* Mobilde hero ve topbar gizle — direkt ürünler görünsün */
	.hero,
	.topbar,
	.newsletter { display: none; }

	/* Header sadeleştir mobilde — yazılar görünür kalır, butonlar alt alta SAĞDA */
	.site-header__inner { grid-template-columns: 1fr auto; gap: .5rem; padding-block: .55rem; align-items: center; }
	.primary-nav { display: none; } /* Artık navigasyon alt barda */
	.site-branding { flex: 1; }
	.site-title { font-size: 1rem; }
	.site-branding .custom-logo { max-height: 32px; width: auto; }
	.header-actions { min-width: 140px; gap: .3rem; }
	.header-action { padding: .35rem .55rem; font-size: .72rem; gap: .3rem; }
	.header-action__icon { width: 14px; height: 14px; }
	.header-action__label { display: inline-block; }
	.header-action--cart .cart-count { font-size: .7rem; padding: 0 .35rem; }

	/* Anasayfa ilk bölümü kenardan-kenara değil — featured-products üst padding'i azalt */
	.featured-products { padding-top: 1rem; }
}
@media (max-width: 380px) {
	.header-actions { min-width: 120px; }
	.header-action { padding: .35rem .5rem; font-size: .68rem; gap: .25rem; }
	.header-action__icon { display: none; } /* çok dar ekranda sadece yazı */
	.site-title { font-size: .92rem; }
}

@media (max-width: 540px) {
	.footer-grid { grid-template-columns: 1fr; }
}
