/* Ázijské potraviny – produktové a receptové karty. Farby z palety témy Kadence. */
:root {
	--ap-accent: var(--global-palette1, #e21e51);
	--ap-accent-2: var(--global-palette2, #ff7c40);
	--ap-ink: var(--global-palette3, #040037);
	--ap-muted: var(--global-palette6, #666699);
	--ap-line: var(--global-palette7, #deddeb);
	--ap-soft: var(--global-palette9, #f8f9fa);
	--ap-white: #fff;
	--ap-radius: 14px;
}

/* ---------- predajca vo výpise ---------- */
.ap-src {
	display: block;
	font-size: 0.78rem;
	color: var(--ap-muted);
	margin: 0.15rem 0 0.5rem;
}

/* ---------- tlačidlo na stránke produktu ---------- */
.ap-buy { margin: 1.25rem 0; }
.ap-buy__btn.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.9rem 1.6rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ap-accent), var(--ap-accent-2));
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}
.ap-buy__btn.button:hover { filter: brightness(1.05); color: #fff; }
.ap-buy__note { font-size: 0.85rem; color: var(--ap-muted); margin: 0.6rem 0 0; }
.ap-buy__status { font-weight: 600; color: var(--global-palette13, #b82105); margin: 0 0 0.5rem; }
.ap-buy--oos .ap-buy__btn.button { background: var(--ap-muted); }

/* ---------- produktové karty ---------- */
.ap-cards-wrap { margin: 2rem 0; }
.ap-cards-title { margin: 0 0 1rem; }
.ap-cards {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(var(--ap-cols, 4), minmax(0, 1fr));
	margin: 1rem 0 1.5rem;
}
.ap-cards--1 { --ap-cols: 1; }
.ap-cards--2 { --ap-cols: 2; }
.ap-cards--3 { --ap-cols: 3; }
.ap-cards--4 { --ap-cols: 4; }
@media (max-width: 900px) { .ap-cards--3, .ap-cards--4 { --ap-cols: 2; } }
@media (max-width: 480px) { .ap-cards { gap: 0.6rem; } }

.ap-card {
	display: flex;
	flex-direction: column;
	background: var(--ap-white);
	border: 1px solid var(--ap-line);
	border-radius: var(--ap-radius);
	overflow: hidden;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ap-card:hover { box-shadow: 0 8px 24px rgba(4, 0, 55, 0.08); transform: translateY(-2px); }
.ap-card__img { display: block; position: relative; overflow: hidden; background: #fff; aspect-ratio: 1 / 1; border-bottom: 1px solid var(--ap-line); }
.ap-card__img img { position: absolute; inset: 0; width: 100% !important; height: 100% !important; object-fit: contain; padding: 0.75rem; margin: 0; }
.ap-card__body { display: flex; flex-direction: column; gap: 0.35rem; padding: 0.8rem 0.9rem 0.95rem; flex: 1; }
.ap-card__brand { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ap-muted); }
.ap-card__title { font-size: 0.95rem; line-height: 1.3; margin: 0; }
.ap-card__title a { color: var(--ap-ink); text-decoration: none; }
.ap-card__title a:hover { color: var(--ap-accent); }
.ap-card__price { font-weight: 700; color: var(--ap-ink); }
.ap-card__btn {
	margin-top: auto;
	display: block;
	text-align: center;
	padding: 0.6rem 0.8rem;
	border-radius: 999px;
	background: var(--ap-accent);
	color: #fff !important;
	font-size: 0.85rem;
	font-weight: 700;
	text-decoration: none !important;
}
.ap-card__btn:hover { background: var(--ap-accent-2); }

.ap-card--wide { flex-direction: row; align-items: stretch; }
.ap-card--wide .ap-card__img { width: 160px; flex: 0 0 160px; aspect-ratio: auto; min-height: 160px; border-bottom: 0; border-right: 1px solid var(--ap-line); }
.ap-card--wide .ap-card__btn { align-self: flex-start; padding-inline: 1.4rem; }
@media (max-width: 480px) {
	.ap-card--wide .ap-card__img { width: 110px; flex-basis: 110px; }
}

/* ---------- receptová karta ---------- */
.ap-recipe {
	border: 1px solid var(--ap-line);
	border-radius: calc(var(--ap-radius) + 4px);
	background: var(--ap-white);
	margin: 2.5rem 0;
	overflow: hidden;
}
.ap-recipe__head {
	padding: 1.5rem 1.5rem 1.25rem;
	background: linear-gradient(135deg, rgba(226, 30, 81, 0.07), rgba(255, 124, 64, 0.09));
	border-bottom: 1px solid var(--ap-line);
}
.ap-recipe__title { margin: 0 0 0.4rem; }
.ap-recipe__desc { margin: 0 0 1rem; color: var(--ap-muted); }
.ap-recipe__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}
.ap-recipe__meta li { display: flex; flex-direction: column; margin: 0; }
.ap-recipe__meta span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ap-muted); }
.ap-recipe__print {
	border: 1px solid var(--ap-accent);
	background: transparent;
	color: var(--ap-accent);
	border-radius: 999px;
	padding: 0.4rem 1rem;
	font-size: 0.85rem;
	cursor: pointer;
}
.ap-recipe__print:hover { background: var(--ap-accent); color: #fff; }
.ap-recipe__cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
@media (max-width: 760px) { .ap-recipe__cols { grid-template-columns: 1fr; } }
.ap-recipe__ingredients, .ap-recipe__steps { padding: 1.25rem 1.5rem; }
.ap-recipe__ingredients { background: var(--ap-soft); }
.ap-recipe__ingredients h3, .ap-recipe__steps h3 { margin-top: 0; }
.ap-recipe__ingredients h4 { margin: 1rem 0 0.4rem; font-size: 0.95rem; }
.ap-recipe__ingredients ul { list-style: none; margin: 0; padding: 0; }
.ap-recipe__ingredients li { padding: 0.4rem 0; border-bottom: 1px dashed var(--ap-line); margin: 0; }
.ap-recipe__ingredients li:last-child { border-bottom: 0; }
.ap-recipe__ingredients a { color: var(--ap-accent); font-weight: 600; }
.ap-ing__qty { font-weight: 700; margin-right: 0.3rem; }
.ap-ing__note { color: var(--ap-muted); font-size: 0.85rem; }
.ap-ing__note::before { content: " – "; }
.ap-recipe__steps ol { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.ap-recipe__steps ol li { counter-increment: step; position: relative; padding: 0 0 1rem 2.6rem; margin: 0; }
.ap-recipe__steps ol li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: 0;
	width: 1.8rem;
	height: 1.8rem;
	border-radius: 50%;
	background: var(--ap-accent);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	display: flex;
	align-items: center;
	justify-content: center;
}
.ap-recipe__tips {
	background: rgba(255, 124, 64, 0.1);
	border-left: 4px solid var(--ap-accent-2);
	border-radius: 8px;
	padding: 0.8rem 1rem;
}
.ap-recipe__tips h4 { margin: 0 0 0.4rem; }
.ap-recipe__tips ul { margin: 0; padding-left: 1.1rem; }
.ap-recipe__shop { padding: 1.25rem 1.5rem 0.5rem; border-top: 1px solid var(--ap-line); }
.ap-recipe__shop h3 { margin-top: 0; }

/* ---------- upozornenie na affiliate odkazy ---------- */
.ap-disclosure {
	font-size: 0.82rem;
	color: var(--ap-muted);
	border-top: 1px solid var(--ap-line);
	padding-top: 0.8rem;
	margin-top: 2rem;
}

@media print {
	header, footer, .site-header, .site-footer, .ap-recipe__print, .ap-recipe__shop, .ap-cards-wrap, .ap-disclosure, .comments-area, aside { display: none !important; }
	.ap-recipe { border: 0; }
}

/* ---------- horná lišta ---------- */
.ap-topbar a { color: inherit; text-decoration: underline; text-underline-offset: 2px; margin-left: 0.25rem; white-space: nowrap; }
.ap-lead { font-size: 1.15rem; }

/* ================= homepage ================= */
.ap-btn {
	display: inline-block;
	padding: 0.85rem 1.6rem;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--ap-accent), var(--ap-accent-2));
	color: #fff !important;
	font-weight: 700;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(226, 30, 81, 0.25);
}
.ap-btn:hover { filter: brightness(1.05); }
.ap-btn--ghost { background: transparent; color: var(--ap-ink) !important; box-shadow: inset 0 0 0 2px var(--ap-line); }
.ap-btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--ap-accent); }
.ap-more { font-weight: 700; color: var(--ap-accent); text-decoration: none; white-space: nowrap; }
.ap-more:hover { text-decoration: underline; }

.ap-hero {
	background:
		radial-gradient(1200px 400px at 85% 10%, rgba(255, 124, 64, 0.16), transparent 60%),
		radial-gradient(900px 500px at 0% 100%, rgba(226, 30, 81, 0.10), transparent 60%),
		var(--ap-white);
	padding: clamp(2rem, 5vw, 4.5rem) 1rem !important;
	margin-top: 0 !important;
}
.ap-hero__cols { gap: clamp(1.5rem, 4vw, 4rem) !important; }
.ap-eyebrow {
	display: inline-block;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ap-accent);
	background: rgba(226, 30, 81, 0.08);
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	margin: 0 0 1rem;
}
.ap-hero__title { font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; margin: 0 0 1rem; }
.ap-hero__lead { font-size: clamp(1.02rem, 1.4vw, 1.2rem); color: var(--ap-muted); max-width: 38em; margin: 0 0 1.6rem; }
.ap-hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 2rem; }
.ap-hero__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem 1.5rem; list-style: none; margin: 0; padding: 0; max-width: 36rem; }
.ap-hero__facts li { display: flex; flex-direction: column; margin: 0; }
.ap-hero__facts strong { font-size: 1.5rem; color: var(--ap-ink); line-height: 1.1; }
.ap-hero__facts span { font-size: 0.85rem; color: var(--ap-muted); }
.ap-hero__img img { border-radius: 28px; aspect-ratio: 4 / 5; object-fit: cover; width: 100%; box-shadow: 0 30px 60px rgba(4, 0, 55, 0.18); }
@media (max-width: 781px) { .ap-hero__img img { aspect-ratio: 16 / 10; } }

.ap-section { padding: clamp(2.5rem, 5vw, 4rem) 1rem !important; margin: 0 !important; }
.ap-section--soft { background: var(--ap-soft); }
.ap-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.ap-section__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); margin: 0 0 1rem; }
.ap-section__lead { color: var(--ap-muted); max-width: 52em; margin: 0 0 1rem; }

.ap-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 900px) { .ap-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ap-tile {
	display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem;
	padding: 1.2rem; border: 1px solid var(--ap-line); border-radius: var(--ap-radius);
	background: var(--ap-white); text-decoration: none; color: var(--ap-ink);
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.ap-tile:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(4, 0, 55, 0.08); border-color: transparent; }
.ap-tile img { width: 52px; height: 52px; margin-bottom: 0.4rem; }
.ap-tile span { font-weight: 700; font-size: 1.05rem; }
.ap-tile small { color: var(--ap-muted); font-size: 0.82rem; line-height: 1.35; }

.ap-recipes .wp-block-post-template { gap: 1.25rem; }
.ap-recipes .wp-block-post { background: var(--ap-white); border-radius: var(--ap-radius); overflow: hidden; border: 1px solid var(--ap-line); }
.ap-recipes__img { margin: 0 !important; }
.ap-recipes__img img { width: 100%; object-fit: cover; }
.ap-recipes__title { font-size: 1.15rem; margin: 0.9rem 1rem 0.4rem !important; }
.ap-recipes__title a { text-decoration: none; color: var(--ap-ink); }
.ap-recipes__excerpt { margin: 0 1rem 1.1rem !important; color: var(--ap-muted); font-size: 0.92rem; }
.ap-recipes__excerpt .wp-block-post-excerpt__more-link { display: none; }

.ap-steps { list-style: none; counter-reset: s; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; margin: 0; padding: 0; }
@media (max-width: 781px) { .ap-steps { grid-template-columns: 1fr; } }
.ap-steps li { counter-increment: s; position: relative; padding: 1.4rem 1.2rem 1.2rem 4.2rem; border-radius: var(--ap-radius); background: var(--ap-soft); margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ap-steps li::before { content: counter(s); position: absolute; left: 1.2rem; top: 1.25rem; width: 2.2rem; height: 2.2rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--ap-accent), var(--ap-accent-2)); }
.ap-steps span { color: var(--ap-muted); font-size: 0.92rem; }

.ap-shops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
@media (max-width: 781px) { .ap-shops { grid-template-columns: 1fr; } }
.ap-shop { background: var(--ap-white); border: 1px solid var(--ap-line); border-radius: var(--ap-radius); padding: 1.4rem; }
.ap-shop h3 { margin-top: 0; }
.ap-note { font-size: 0.88rem; color: var(--ap-muted); margin-top: 1.25rem; }

.ap-faq .wp-block-details { border: 1px solid var(--ap-line); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0 0 0.75rem; background: var(--ap-white); }
.ap-faq summary { font-weight: 700; cursor: pointer; }
.ap-faq .wp-block-details p { margin: 0.75rem 0 0; color: var(--ap-muted); }

/* ---------- výpis produktov: jednotné štvorcové obrázky, tlačidlá v jednej línii ---------- */
.woocommerce ul.products li.product.entry { display: flex !important; flex-direction: column; }
ul.products li.product .woocommerce-loop-image-link {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: #fff;
}
ul.products li.product .woocommerce-loop-image-link img {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	object-fit: contain;
	padding: 14px;
	margin: 0 !important;
}
.woocommerce ul.products li.product .product-details { flex: 1 1 auto; display: flex !important; flex-direction: column; }
.woocommerce ul.products li.product .product-details .product-action-wrap { margin-top: auto !important; padding-top: 0.5rem; }

/* ---------- stránka produktu: hlavná fotka v štvorcovom rámiku ---------- */
.woocommerce div.product div.images .woocommerce-product-gallery__image img,
.woocommerce div.product div.images img.wp-post-image {
	width: 100% !important;
	aspect-ratio: 1 / 1;
	max-height: 480px;
	object-fit: contain;
	background: #fff;
	border-radius: var(--ap-radius);
	padding: 1rem;
}
.woocommerce div.product div.images { max-width: 480px; }
@media (max-width: 767px) { .woocommerce div.product div.images { max-width: 100%; } .woocommerce div.product div.images img { max-height: 340px; } }

/* ================= AI asistent – Kuchársky poradca ================= */
.ap-as { position: fixed; right: 16px; bottom: 16px; z-index: 9990; display: flex; flex-direction: column; align-items: flex-end; font-size: 15px; }
.ap-as__open {
	height: 56px; padding: 0 22px 0 18px; gap: 10px; border-radius: 999px; border: 0; cursor: pointer;
	display: flex; align-items: center; justify-content: center; color: #fff;
	font: inherit; font-size: 15px; font-weight: 700; line-height: 1; white-space: nowrap;
	background: linear-gradient(135deg, var(--ap-accent), var(--ap-accent-2));
	box-shadow: 0 10px 28px rgba(226, 30, 81, 0.35);
	transition: transform 0.15s ease;
}
.ap-as__open svg { flex: 0 0 auto; }
.ap-as__open:hover { transform: scale(1.04); }
.ap-as__open:focus-visible { outline: 3px solid var(--ap-ink); outline-offset: 3px; }
.ap-as.is-open .ap-as__open { display: none; }
.ap-as__panel {
	width: min(92vw, 380px); max-height: min(78vh, 640px); margin-bottom: 0;
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border: 1px solid var(--ap-line); border-radius: 18px;
	box-shadow: 0 24px 60px rgba(4, 0, 55, 0.22);
}
.ap-as__panel[hidden] { display: none; }
.ap-as__head {
	display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
	padding: 0.85rem 1rem; color: #fff;
	background: linear-gradient(135deg, var(--ap-accent), var(--ap-accent-2));
}
.ap-as__title { margin: 0; font-weight: 800; font-size: 1rem; line-height: 1.2; }
.ap-as__sub { margin: 0; font-size: 0.78rem; opacity: 0.9; }
.ap-as__close { background: transparent; border: 0; color: #fff; padding: 6px; border-radius: 8px; cursor: pointer; line-height: 0; }
.ap-as__close:hover { background: rgba(255, 255, 255, 0.18); }
.ap-as__msgs { flex: 1; overflow-y: auto; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.6rem; background: var(--ap-soft); }
.ap-as__msg { max-width: 88%; padding: 0.6rem 0.8rem; border-radius: 14px; line-height: 1.45; word-wrap: break-word; }
.ap-as__msg p { margin: 0 0 0.45rem; }
.ap-as__msg p:last-child { margin-bottom: 0; }
.ap-as__msg ul, .ap-as__msg ol { margin: 0.2rem 0 0.45rem 1.1rem; padding: 0; }
.ap-as__msg li { margin: 0.15rem 0; }
.ap-as__msg a { color: var(--ap-accent); font-weight: 600; }
.ap-as__msg--assistant { align-self: flex-start; background: #fff; border: 1px solid var(--ap-line); border-bottom-left-radius: 4px; color: var(--ap-ink); }
.ap-as__msg--user { align-self: flex-end; background: var(--ap-accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.ap-as__msg.is-typing { color: var(--ap-muted); font-style: italic; }
.ap-as__msg.is-error { border-color: #f3b4c4; background: #fff5f7; }
.ap-as__chips { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0.6rem 1rem 0.2rem; background: var(--ap-soft); }
.ap-as__chips[hidden] { display: none; }
.ap-as__chip {
	border: 1px solid var(--ap-line); background: #fff; color: var(--ap-ink);
	border-radius: 999px; padding: 0.3rem 0.7rem; font-size: 0.8rem; cursor: pointer;
}
.ap-as__chip:hover { border-color: var(--ap-accent); color: var(--ap-accent); }
.ap-as__form { display: flex; align-items: flex-end; gap: 0.5rem; padding: 0.7rem 0.8rem; border-top: 1px solid var(--ap-line); background: #fff; }
.ap-as__form textarea {
	flex: 1; resize: none; min-height: 42px; max-height: 110px;
	border: 1px solid var(--ap-line); border-radius: 12px; padding: 0.55rem 0.75rem;
	font: inherit; font-size: 0.92rem; line-height: 1.35; color: var(--ap-ink); background: #fff;
}
.ap-as__form textarea:focus { outline: none; border-color: var(--ap-accent); box-shadow: 0 0 0 3px rgba(226, 30, 81, 0.12); }
.ap-as__send {
	flex: 0 0 42px; width: 42px; height: 42px; border: 0; border-radius: 12px; cursor: pointer;
	display: flex; align-items: center; justify-content: center; color: #fff;
	background: linear-gradient(135deg, var(--ap-accent), var(--ap-accent-2));
}
.ap-as__send:disabled { opacity: 0.5; cursor: wait; }
.ap-as__note { margin: 0; padding: 0 1rem 0.7rem; font-size: 0.7rem; line-height: 1.35; color: var(--ap-muted); background: #fff; }
@media (max-width: 480px) {
	.ap-as { right: 10px; bottom: 10px; }
	.ap-as__open { height: 50px; padding: 0 18px 0 15px; gap: 8px; font-size: 14px; }
	.ap-as__panel { width: calc(100vw - 20px); max-height: calc(100vh - 90px); }
}
@media print { .ap-as { display: none !important; } }
