/* ==========================================================================
   Arte kamienie – style podstawowe
   Tokeny → baza → układ → nagłówek → szuflada → stopka → treść → komponenty
   Kolory i fonty zmieniamy tylko w :root.
   ========================================================================== */

:root {
	/* Kolory */
	--ak-bg: #f3f4f2;          /* tło strony – chłodny, kamienny jasny szary */
	--ak-surface: #ffffff;     /* karty, panele */
	--ak-stone: #e3e8e5;       /* tło sekcji wyróżnionych */
	--ak-sand: #e9e1cf;        /* kolekcje, ciepłe akcenty */
	--ak-fg: #1b1f1e;          /* tekst i przyciski główne */
	--ak-muted: #4f5855;       /* tekst drugorzędny */
	--ak-subtle: #6b7471;      /* podpisy, przekreślone ceny */
	--ak-line: #dce0de;        /* obramowania */
	--ak-line-strong: #c9cfcc; /* obramowania pól formularzy */
	--ak-accent: #2c6a5c;      /* jadeit – linki, potwierdzenia */
	--ak-accent-soft: #dde8e4;
	--ak-sale: #b23a2e;        /* promocje, błędy */
	--ak-sale-soft: #f6e1de;
	--ak-warn: #93650f;
	--ak-warn-soft: #f4ead3;

	/* Typografia */
	--ak-font-display: "Libre Caslon Text", Georgia, "Times New Roman", serif;
	--ak-font-body: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--ak-text-xs: 0.8125rem;   /* 13 */
	--ak-text-sm: 0.875rem;    /* 14 */
	--ak-text-md: 1rem;        /* 16 */
	--ak-text-lg: 1.125rem;    /* 18 */
	--ak-h4: 1.25rem;
	--ak-h3: 1.5rem;
	--ak-h2: clamp(1.625rem, 1.3rem + 1.2vw, 2rem);
	--ak-h1: clamp(2rem, 1.5rem + 2.2vw, 2.875rem);

	/* Układ */
	--ak-container: 1280px;
	--ak-gutter: clamp(16px, 3vw, 32px);
	--ak-radius: 6px;
	--ak-radius-lg: 10px;
	--ak-pill: 999px;
	--ak-shadow: 0 8px 24px rgba(27, 31, 30, 0.08);
	--ak-header-h: 72px;
	--ak-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Baza
   -------------------------------------------------------------------------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--ak-header-h) + 16px); }

body {
	margin: 0;
	background: var(--ak-bg);
	color: var(--ak-fg);
	font-family: var(--ak-font-body);
	font-size: var(--ak-text-md);
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }
.ak-icon { display: inline-block; flex: none; vertical-align: middle; }

h1, h2, h3, h4 {
	margin: 0 0 0.5em;
	font-family: var(--ak-font-display);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.005em;
	text-wrap: balance;
}
h1 { font-size: var(--ak-h1); }
h2 { font-size: var(--ak-h2); }
h3 { font-size: var(--ak-h3); }
h4 { font-size: var(--ak-h4); }

p { margin: 0 0 1em; }

a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ak-accent); }

:focus-visible { outline: 2px solid var(--ak-accent); outline-offset: 3px; border-radius: 2px; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

hr { border: 0; border-top: 1px solid var(--ak-line); margin: 2rem 0; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0;
	top: 8px; left: 8px; z-index: 1000;
	padding: 12px 16px;
	background: var(--ak-fg); color: #fff;
	border-radius: var(--ak-radius);
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* --------------------------------------------------------------------------
   Układ
   -------------------------------------------------------------------------- */

.ak-container {
	width: 100%;
	max-width: var(--ak-container);
	margin-inline: auto;
	padding-inline: var(--ak-gutter);
}

.ak-main { padding-block: 24px 64px; min-height: 50vh; }
.ak-main--elementor,
.ak-main--full { padding-block: 0; }

.ak-page-header { padding-block: 12px 24px; }
.ak-page-title { margin: 0; }
.ak-page-lede { margin-top: 10px; max-width: 62ch; color: var(--ak-muted); font-size: var(--ak-text-lg); }

.ak-eyebrow {
	margin: 0 0 8px;
	font-size: var(--ak-text-xs);
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ak-accent);
}

/* --------------------------------------------------------------------------
   Przyciski
   -------------------------------------------------------------------------- */

.ak-button,
.button,
button.button,
input[type="submit"],
.wp-element-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 24px;
	border: 1px solid var(--ak-fg);
	border-radius: var(--ak-pill);
	background: var(--ak-fg);
	color: #fff;
	font-weight: 600;
	font-size: var(--ak-text-md);
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s var(--ak-ease), color 0.15s var(--ak-ease), border-color 0.15s var(--ak-ease);
}
.ak-button:hover,
.button:hover,
input[type="submit"]:hover,
.wp-element-button:hover { background: #333a38; border-color: #333a38; color: #fff; }

.ak-button--ghost { background: transparent; color: var(--ak-fg); }
.ak-button--ghost:hover { background: var(--ak-fg); color: #fff; }

.ak-button--accent { background: var(--ak-accent); border-color: var(--ak-accent); }
.ak-button--block { width: 100%; }

.ak-button[disabled],
.button.disabled,
.button:disabled { opacity: 0.45; cursor: not-allowed; }

/* --------------------------------------------------------------------------
   Pasek górny
   -------------------------------------------------------------------------- */

.ak-topbar { background: var(--ak-fg); color: #e7ecea; font-size: var(--ak-text-xs); }
.ak-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 32px;
	padding-block: 8px;
	text-align: center;
}
@media (max-width: 640px) {
	.ak-topbar__inner span:not(:first-child) { display: none; }
}

/* --------------------------------------------------------------------------
   Nagłówek
   -------------------------------------------------------------------------- */

.ak-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--ak-surface);
	border-bottom: 1px solid var(--ak-line);
}
.admin-bar .ak-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .ak-header { top: 0; } }

.ak-header__inner {
	display: flex;
	align-items: center;
	gap: 12px 32px;
	min-height: var(--ak-header-h);
	padding-block: 12px;
}

.ak-logo { display: block; flex: none; line-height: 0; }
.ak-logo__img { width: 132px; height: auto; }

.ak-header__search { flex: 1 1 320px; min-width: 0; }
.ak-header__actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }

.ak-header__icon {
	display: inline-grid;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--ak-fg);
}
.ak-header__icon:hover { background: var(--ak-bg); color: var(--ak-fg); }

.ak-header__menu-toggle,
.ak-header__search-toggle { display: none; }

.ak-header__cart {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px 0 12px;
	border-radius: var(--ak-pill);
	background: var(--ak-fg);
	color: #fff;
	font-size: var(--ak-text-sm);
	font-weight: 600;
	text-decoration: none;
}
.ak-header__cart:hover { color: #fff; background: #333a38; }
.ak-header__cart-count {
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: #fff;
	color: var(--ak-fg);
	font-size: 12px;
	line-height: 20px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}
.ak-header__cart-count[hidden] { display: none; }
.ak-header__cart.is-bumped .ak-header__cart-count { animation: ak-bump 0.4s var(--ak-ease); }
@keyframes ak-bump { 50% { transform: scale(1.3); } }

/* Wyszukiwarka */
.ak-search {
	display: flex;
	align-items: center;
	gap: 8px;
	height: 46px;
	padding: 0 5px 0 18px;
	border: 1px solid var(--ak-line);
	border-radius: var(--ak-pill);
	background: var(--ak-bg);
}
.ak-search:focus-within { border-color: var(--ak-fg); background: var(--ak-surface); }
.ak-search__input {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	font-size: 15px;
	outline: none;
}
.ak-search__submit {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: var(--ak-fg);
	color: #fff;
}

/* Menu kategorii */
.ak-nav { border-top: 1px solid var(--ak-line); }
.ak-nav__list,
.ak-nav__list .sub-menu { list-style: none; margin: 0; padding: 0; }
.ak-nav__list { display: flex; flex-wrap: wrap; gap: 0 28px; font-size: 15px; font-weight: 600; }
.ak-nav__list > li { position: relative; }
.ak-nav__list > li > a { display: block; padding: 12px 0; text-decoration: none; }
.ak-nav__list > .current-menu-item > a,
.ak-nav__list > .current-menu-ancestor > a { box-shadow: inset 0 -2px 0 var(--ak-fg); }
.ak-nav__list .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 6px; height: 6px;
	margin-left: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-3px) rotate(45deg);
}
.ak-nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: -16px;
	z-index: 60;
	min-width: 240px;
	padding: 8px;
	background: var(--ak-surface);
	border: 1px solid var(--ak-line);
	border-radius: var(--ak-radius);
	box-shadow: var(--ak-shadow);
	font-weight: 500;
	opacity: 0;
	visibility: hidden;
	transform: translateY(4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.ak-nav__list li:hover > .sub-menu,
.ak-nav__list li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.ak-nav__list .sub-menu a { display: block; padding: 10px 12px; border-radius: 4px; text-decoration: none; }
.ak-nav__list .sub-menu a:hover { background: var(--ak-bg); }
/* Pozycja menu z klasą CSS „ak-highlight” – wyróżniony kolor (np. Promocje). */
.ak-nav__list .ak-highlight > a { color: var(--ak-sale); }
.ak-nav__list .ak-right { margin-left: auto; }
.ak-nav__list .ak-right > a { color: var(--ak-accent); }

@media (max-width: 960px) {
	:root { --ak-header-h: 60px; }
	.ak-header__inner { gap: 4px; padding-block: 6px; }
	.ak-header__menu-toggle,
	.ak-header__search-toggle { display: inline-grid; }
	.ak-logo { margin-inline: auto; }
	.ak-logo__img { width: 104px; }
	.ak-header__actions { margin-left: 0; }
	.ak-header__cart { width: 44px; padding: 0; justify-content: center; background: transparent; color: var(--ak-fg); }
	.ak-header__cart:hover { background: var(--ak-bg); color: var(--ak-fg); }
	.ak-header__cart-label { display: none; }
	.ak-header__cart-count { position: absolute; top: 4px; right: 0; background: var(--ak-fg); color: #fff; min-width: 18px; height: 18px; line-height: 18px; font-size: 11px; padding: 0 5px; }
	.ak-header__search { order: 10; flex-basis: 100%; display: none; padding-bottom: 8px; }
	.ak-header__search.is-open { display: block; }
	.ak-nav { display: none; }
	.ak-header__actions .ak-header__icon[href] { display: none; }
}

/* --------------------------------------------------------------------------
   Szuflada mobilna
   -------------------------------------------------------------------------- */

.ak-drawer { position: fixed; inset: 0; z-index: 100; }
.ak-drawer[hidden] { display: none; }
.ak-drawer__backdrop { position: absolute; inset: 0; background: rgba(20, 24, 23, 0.45); }
.ak-drawer__panel {
	position: absolute;
	inset: 0 auto 0 0;
	width: min(88vw, 360px);
	display: flex;
	flex-direction: column;
	background: var(--ak-surface);
	overflow-y: auto;
	padding-top: env(safe-area-inset-top, 0px);
	animation: ak-slide-in 0.22s var(--ak-ease);
}
@keyframes ak-slide-in { from { transform: translateX(-100%); } }
.ak-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--ak-line); }
.ak-drawer__head .ak-logo__img { width: 96px; }
.ak-drawer__list,
.ak-drawer__list .sub-menu { list-style: none; margin: 0; padding: 0; }
.ak-drawer__list { padding: 8px 0; font-size: 17px; font-weight: 600; }
.ak-drawer__list a { display: block; padding: 13px 20px; text-decoration: none; }
.ak-drawer__list .sub-menu { padding-left: 16px; font-weight: 400; font-size: 15px; }
.ak-drawer__list .sub-menu a { padding-block: 9px; }
.ak-drawer__foot { margin-top: auto; padding: 20px; border-top: 1px solid var(--ak-line); display: flex; flex-direction: column; gap: 12px; font-size: var(--ak-text-sm); color: var(--ak-muted); }
body.ak-no-scroll { overflow: hidden; }

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */

.ak-usp { background: var(--ak-stone); }
.ak-usp__list {
	list-style: none;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px 32px;
	padding-block: 28px;
	font-size: var(--ak-text-sm);
}
.ak-usp__item { display: flex; gap: 12px; align-items: flex-start; color: var(--ak-muted); }
.ak-usp__item .ak-icon { color: var(--ak-accent); }
.ak-usp__item strong { display: block; color: var(--ak-fg); font-size: 15px; }
@media (max-width: 900px) { .ak-usp__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .ak-usp__list { grid-template-columns: 1fr; } }

.ak-footer { margin-top: 0; background: var(--ak-surface); border-top: 1px solid var(--ak-line); font-size: var(--ak-text-sm); }
.ak-footer__grid {
	display: grid;
	grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
	gap: 32px;
	padding-block: 48px 32px;
}
.ak-footer__brand .ak-logo__img { width: 120px; margin-bottom: 16px; }
.ak-footer__text { color: var(--ak-muted); }
.ak-footer__text a { color: inherit; }
.ak-footer__title { margin: 0 0 12px; font-family: var(--ak-font-body); font-size: 15px; font-weight: 700; letter-spacing: 0; }
.ak-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ak-footer__list a { color: var(--ak-muted); text-decoration: none; }
.ak-footer__list a:hover { color: var(--ak-fg); text-decoration: underline; }
.ak-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px 24px;
	padding-block: 16px 28px;
	border-top: 1px solid var(--ak-line);
	color: var(--ak-subtle);
	font-size: var(--ak-text-xs);
}
@media (max-width: 900px) { .ak-footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ak-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .ak-footer__grid { grid-template-columns: 1fr; } }

.ak-socials { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 4px; }
.ak-socials a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--ak-line); color: var(--ak-fg); }
.ak-socials a:hover { border-color: var(--ak-fg); }

/* --------------------------------------------------------------------------
   Treść (strony, wpisy)
   -------------------------------------------------------------------------- */

.ak-prose { max-width: 72ch; font-size: 17px; }
.ak-prose > * + * { margin-top: 1em; }
.ak-prose h2 { margin-top: 1.6em; }
.ak-prose h3 { margin-top: 1.4em; }
.ak-prose ul,
.ak-prose ol { padding-left: 1.3em; }
.ak-prose li + li { margin-top: 0.35em; }
.ak-prose a { color: var(--ak-accent); }
.ak-prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 20px; border-left: 2px solid var(--ak-accent); font-family: var(--ak-font-display); font-size: 1.2em; }
.ak-prose table { width: 100%; border-collapse: collapse; font-size: var(--ak-text-sm); }
.ak-prose th,
.ak-prose td { padding: 10px 12px; border-bottom: 1px solid var(--ak-line); text-align: left; }
.ak-prose figure { margin: 1.5em 0; }
.ak-prose figcaption { margin-top: 8px; color: var(--ak-subtle); font-size: var(--ak-text-sm); }
.ak-prose img { border-radius: var(--ak-radius); }
.ak-prose .wp-block-table { overflow-x: auto; }
.ak-prose ol ol { list-style: lower-alpha; }

/* Strona Kontakt: dane + formularz obok siebie */
.ak-prose:has(.ak-contact) { max-width: 1040px; }
.ak-contact { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 32px 56px; align-items: start; margin-top: 32px; }
.ak-contact h2 { margin-top: 0; font-size: 1.35em; }
.ak-contact__data > * + * { margin-top: 1em; }
.ak-contact__data h2 + p { margin-top: 0.5em; }
.ak-contact__data h2:not(:first-child) { margin-top: 1.6em; }
.ak-contact__form { padding: 28px; background: var(--ak-surface); border: 1px solid var(--ak-line); border-radius: var(--ak-radius-lg); }
@media (max-width: 860px) { .ak-contact { grid-template-columns: 1fr; } .ak-contact__form { padding: 20px; } }

.ak-article { max-width: 760px; margin-inline: auto; }
.ak-article__header { padding-block: 16px 24px; }
.ak-article__media { margin: 0 0 32px; }
.ak-article__media img { width: 100%; border-radius: var(--ak-radius-lg); }

.ak-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; }
@media (max-width: 900px) { .ak-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ak-posts { grid-template-columns: 1fr; } }
.ak-post-card { display: flex; flex-direction: column; gap: 14px; }
.ak-post-card__media { display: block; aspect-ratio: 16 / 9; background: var(--ak-stone); border-radius: var(--ak-radius); overflow: hidden; }
.ak-post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ak-post-card__title { margin: 0; font-size: var(--ak-h4); }
.ak-post-card__title a { text-decoration: none; }
.ak-post-card__excerpt { margin: 0; color: var(--ak-muted); font-size: 15px; }

.ak-pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 40px 0 0; justify-content: center; }
.ak-pagination a,
.ak-pagination span { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: var(--ak-radius); border: 1px solid var(--ak-line); background: var(--ak-surface); text-decoration: none; font-weight: 600; }
.ak-pagination .current { background: var(--ak-fg); border-color: var(--ak-fg); color: #fff; }

.ak-empty { padding: 48px 24px; text-align: center; background: var(--ak-surface); border: 1px dashed var(--ak-line-strong); border-radius: var(--ak-radius-lg); color: var(--ak-muted); }
.ak-empty .ak-search { max-width: 480px; margin: 16px auto 0; }

.ak-404 { max-width: 640px; text-align: center; padding-block: 64px 96px; }
.ak-404 .ak-page-lede { margin-inline: auto; }
.ak-404 .ak-search { margin-top: 24px; }
.ak-404__actions { margin-top: 24px; }

/* Okruszki (WooCommerce i strony) */
.woocommerce-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; font-size: var(--ak-text-xs); color: var(--ak-subtle); }
.woocommerce-breadcrumb a { color: inherit; text-decoration: none; }
.woocommerce-breadcrumb a:hover { color: var(--ak-fg); text-decoration: underline; }

/* Elementor: sekcje na pełnej szerokości dziedziczą tło i fonty motywu */
.ak-main--elementor .elementor-widget-heading .elementor-heading-title { font-family: var(--ak-font-display); font-weight: 400; }

/* Komentarze */
.ak-comments { margin: 48px auto 0; max-width: 760px; }
.ak-comments__list { padding-left: 0; list-style: none; }
.ak-comments__list .comment-body { padding: 16px 0; border-bottom: 1px solid var(--ak-line); }

/* Komunikat po akcji (np. dodaniu do koszyka) */
.ak-toast {
	position: fixed;
	left: 50%;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 200;
	max-width: calc(100vw - 32px);
	padding: 12px 18px;
	border-radius: var(--ak-radius);
	background: var(--ak-fg);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	box-shadow: var(--ak-shadow);
	transform: translate(-50%, 20px);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s var(--ak-ease), transform 0.2s var(--ak-ease);
}
.ak-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.ak-toast.is-error { background: var(--ak-sale); }
