/* Atolyeman store chrome — top utility bar + full footer + shared layout. */

/* ---- Container alignment --------------------------------------------------
   Blocksy's content container is 1290px with no inner padding; our chrome
   (header/footer/topbar) uses .at-container = 1280px + 24px padding. Align
   Blocksy's containers to the same rails so page content lines up with the
   header and nav on every page (cart, account, legal pages, archives). */
#main .ct-container,
.hero-section .entry-header {
	/* width:100% matters: Blocksy's .ct-container-narrow variant computes a
	   ~90% width that drifts off our rail at sub-1440 viewports. */
	width: 100% !important;
	max-width: var(--at-container) !important;
	padding-inline: var(--at-space-6) !important;
	margin-inline: auto !important;
	box-sizing: border-box;
}

/* Width-constrained heroes (page titles on cart/account/legal pages) compute
   their width with Blocksy's own edge-spacing formula, which drifts from our
   container at sub-1440 viewports. Pin them to the same rail. */
#main .hero-section.is-width-constrained {
	max-width: var(--at-container) !important;
	width: 100% !important;
	margin-inline: auto !important;
}
#main .hero-section.is-width-constrained .entry-header {
	padding-inline: var(--at-space-6) !important;
}

/* Page content blocks (cart/checkout/account/legal pages) get Blocksy's own
   1290px block width; pin them to the same 1232px content rail instead. */
#main .entry-content > * {
	max-width: calc(var(--at-container) - 2 * var(--at-space-6)) !important;
	margin-inline: auto;
}

/* Blocksy's page-title hero band is 250px tall with 50px paddings — compact it
   everywhere (the shop archive does the same in shop.css). */
.hero-section .entry-header {
	min-height: 0 !important;
	padding-block: var(--at-space-8) !important;
}
.hero-section .page-title {
	font-family: var(--at-font-display);
}

/* Blocksy's page.php delegates to get_template_part('single') → our single.php,
   so ordinary pages (legal/agreement pages, Hakkımızda, İletişim, cart, account)
   render inside `.at-post`. Its editorial top/bottom padding lives in blog.css,
   which only loads on blog/post contexts — on pages it never loads, so the
   content sat flush against the category nav. Pin the same spacing here (chrome
   loads everywhere); the value mirrors blog.css so real posts are unchanged. */
.at-post {
	padding-block: clamp(2.5rem, 5vw, 5rem);
}

/* Same reason: blog.css also carries the editorial heading/lead spacing for
   `.at-post`. Without it the page title butts against the first line and section
   headings crowd the text above them. Restore just the vertical rhythm here.
   Direct-child selectors only, so WooCommerce shortcode markup on cart/checkout/
   account (whose headings are nested, not direct children) is left untouched. */
.at-post__head {
	margin-bottom: var(--at-space-8);
}
.at-post__body > h2,
.at-post__body > h3,
.at-post__body > h4 {
	margin-top: var(--at-space-8);
}
.at-post__body > *:first-child {
	margin-top: 0;
}

/* ---- Top utility bar ---- */
.at-topbar {
	background: var(--at-text, #1c1a17);
	color: #fff;
	font-size: 13px;
}
.at-topbar__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 42px;
	padding-block: 6px;
}
/* Rotating promo messages (Flying Tiger pattern): centered single message,
   prev/next chevrons; JS cycles .is-active. */
.at-topbar__inner {
	justify-content: center;
	gap: var(--at-space-4);
}
.at-topbar__slider {
	position: relative;
	overflow: hidden;
	min-width: 0;
	max-width: 640px;
	flex: 1;
	min-height: 1.5em;
	text-align: center;
}
.at-topbar__promo {
	position: absolute;
	inset: 0;
	color: #fff;
	font-weight: 600;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .4s ease, transform .4s ease;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.at-topbar__promo.is-active {
	opacity: 1;
	transform: translateY(0);
}
.at-topbar__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: 0;
	color: rgba(255, 255, 255, .7);
	cursor: pointer;
	padding: var(--at-space-1);
	transition: color .18s ease;
	flex: none;
}
.at-topbar__arrow:hover { color: #fff; }
.at-topbar__arrow svg { width: 16px; height: 16px; }
@media (prefers-reduced-motion: reduce) {
	.at-topbar__promo { transition: opacity .4s ease; transform: none; }
}
.at-topbar__right { display: flex; align-items: center; gap: 14px; }
.at-topbar__search {
	display: flex;
	align-items: center;
	background: rgba(255, 255, 255, .12);
	border-radius: 999px;
	padding: 2px 4px 2px 14px;
}
.at-topbar__search input[type="search"] {
	background: transparent;
	border: none;
	color: #fff;
	font-size: 13px;
	width: 190px;
	outline: none;
}
.at-topbar__search input[type="search"]::placeholder { color: rgba(255, 255, 255, .6); }
.at-topbar__search button {
	background: transparent;
	border: none;
	color: #fff;
	cursor: pointer;
	display: grid;
	place-items: center;
	padding: 6px;
}
.at-topbar__link { color: #fff; text-decoration: none; font-weight: 600; }
.at-topbar__link:hover { opacity: .82; }
.at-topbar__link--accent {
	color: #1c1a17;
	background: #fff;
	padding: 5px 14px;
	border-radius: 999px;
}

@media (max-width: 782px) {
	/* D6.2: the promo used to be hidden here, which left two orphan chevrons on
	   an otherwise empty black bar. Keep the message and let it wrap to two
	   lines instead — the longest promo does not fit one phone line. */
	.at-topbar { font-size: 12px; }
	.at-topbar__inner { gap: var(--at-space-2); }
	.at-topbar__slider { max-width: none; min-height: 2.6em; }
	.at-topbar__promo {
		display: flex;
		align-items: center;
		justify-content: center;
		white-space: normal;
		line-height: 1.3;
	}
	/* 16px chevrons in 4px padding = a 24px tap target; pad them to 40px. */
	.at-topbar__arrow { min-width: 40px; min-height: 40px; }
	.at-topbar__search input[type="search"] { width: 120px; }
}

/* ---- Footer ---- */
.at-footer {
	background: var(--at-surface-2, #f2efe9);
	border-top: 1px solid var(--at-border, #e5e0d8);
	/* The newsletter band renders flush above the footer on every page it
	   appears on, so no gap here. Cart/checkout/account omit the band, so those
	   restore the separation below. */
	margin-top: 0;
}
.woocommerce-cart .at-footer,
.woocommerce-checkout .at-footer,
.woocommerce-account .at-footer {
	margin-top: 48px;
}
.at-footer__top {
	display: grid;
	grid-template-columns: 1.5fr 1fr 1fr 1fr;
	gap: 40px;
	padding-block: 56px;
}
.at-footer__logo { max-width: 170px; height: auto; }
.at-footer__brand { font-family: var(--at-font-display, Georgia, serif); font-size: 1.5rem; font-weight: 700; }
.at-footer__blurb {
	color: var(--at-text-muted, #6b6560);
	font-size: 14px;
	line-height: 1.65;
	margin: 16px 0;
	max-width: 36ch;
}
.at-footer__contact { list-style: none; margin: 0; padding: 0; color: var(--at-text-muted, #6b6560); font-size: 14px; line-height: 1.9; }
.at-footer__contact a { color: var(--at-text, #1c1a17); text-decoration: none; }
.at-footer__contact a:hover { color: var(--at-accent, #8a6d4b); }
.at-footer__title {
	font-family: var(--at-font-sans, sans-serif);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .08em;
	margin: 0 0 16px;
	color: var(--at-text, #1c1a17);
}
.at-footer__col ul { list-style: none; margin: 0; padding: 0; }
.at-footer__col li { margin-bottom: 11px; }
.at-footer__col a { color: var(--at-text-muted, #6b6560); text-decoration: none; font-size: 14px; }
.at-footer__col a:hover { color: var(--at-accent, #8a6d4b); }
.at-footer__bar { border-top: 1px solid var(--at-border, #e5e0d8); }
.at-footer__bar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 18px;
	font-size: 13px;
	color: var(--at-text-muted, #6b6560);
}

@media (max-width: 900px) {
	.at-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; padding-block: 40px; }
}
@media (max-width: 560px) {
	.at-footer__top { grid-template-columns: 1fr; }
	.at-footer__bar-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* We render our own footer (above) — hide Blocksy's default footer. */
.ct-footer { display: none !important; }

/* ETBİS registration badge — footer "about" column, under the contact block:
   official logo (assets/etbis.png) with "ETBİS'e kayıtlıdır" label to its right. */
.at-footer__etbis { display: inline-flex; align-items: center; gap: 10px; margin-top: 18px; text-decoration: none; }
.at-footer__etbis-logo { max-width: 84px; height: auto; display: block; }
.at-footer__etbis-text {
	font-size: 12px; font-weight: 600; letter-spacing: .02em;
	color: var(--at-text-muted, #6b6560); transition: color .18s ease;
}
.at-footer__etbis:hover .at-footer__etbis-text { color: var(--at-accent, #8a6d4b); }
