/* Tikit product pages. Mobile first, like the app; from 900px the product page splits into
   photos (left) and details (right). The pages don't use the theme's header, footer or styles:
   templates/layout.php prints the whole document, with the bar and footer styled below. */

body.tikit-productos-page { margin: 0; background: #fff; color: #0f2036; font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; -webkit-text-size-adjust: 100%; }

/* Top bar and footer */
.tk-top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid #e4e8ee; }
.tk-top-in, .tk-foot-in { max-width: 1200px; margin: 0 auto; padding: 0 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.tk-top-in { min-height: 60px; justify-content: space-between; }
.tk-brand { display: inline-flex; align-items: center; gap: 10px; color: #0f2036; font-size: 20px; font-weight: 800; letter-spacing: -.3px; text-decoration: none; }
.tk-brand img { border-radius: 8px; }
.tk-top-nav { display: flex; gap: 16px; }
.tk-top-nav a { color: #0b6b54; font-size: 15px; font-weight: 700; text-decoration: none; }
.tk-top-nav a:hover, .tk-foot a:hover { text-decoration: underline; }
.tk-foot { border-top: 1px solid #e4e8ee; background: #f4f6f9; }
.tk-foot-in { padding-block: 20px; font-size: 13px; color: #5a6878; }
.tk-foot a { color: #5a6878; text-decoration: none; }

.tk-wrap {
	--tk-ink: #0f2036;
	--tk-muted: #5a6878;
	--tk-line: #e4e8ee;
	--tk-soft: #f4f6f9;
	--tk-green: #12a06a;
	--tk-green-dark: #0b6b54;
	--tk-blue: #2b5d8c;
	--tk-red: #c62828;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px 16px 48px;
	color: var(--tk-ink);
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}
.tk-wrap *, .tk-wrap *::before, .tk-wrap *::after { box-sizing: border-box; }
.tk-wrap [hidden] { display: none !important; }
.tk-wrap a { color: var(--tk-green-dark); }
.tk-wrap img { max-width: 100%; height: auto; }
.tk-wrap h1, .tk-wrap h2, .tk-wrap h3 { font-family: inherit; color: var(--tk-ink); }
.tk-wrap .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Breadcrumbs */
.tk-crumbs ol { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 16px; padding: 0; list-style: none; font-size: 13px; color: var(--tk-muted); }
.tk-crumbs li { margin: 0; }
.tk-crumbs li + li::before { content: '›'; margin-right: 4px; }
.tk-crumbs a { color: var(--tk-muted); text-decoration: none; }
.tk-crumbs a:hover { text-decoration: underline; }

/* Buttons */
.tk-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 18px; background: var(--tk-ink); color: #fff !important; font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.tk-btn:hover { background: #1c3352; }
.tk-btn-ghost { background: var(--tk-soft); color: var(--tk-ink) !important; border: 1px solid var(--tk-line); }
.tk-btn-ghost:hover { background: #e9edf2; }

/* ---------- Product page ---------- */
.tk-p-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }

.tk-gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: 20px; background: #fff; border: 1px solid var(--tk-line); aspect-ratio: 1 / 1; }
.tk-gal::-webkit-scrollbar { display: none; }
.tk-gal-item { flex: 0 0 100%; margin: 0; scroll-snap-align: center; display: flex; align-items: center; justify-content: center; padding: 16px; }
.tk-gal-item img { width: 100%; height: 100%; object-fit: contain; }
.tk-gal-empty { background: var(--tk-soft); }
.tk-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.tk-thumb { flex: 0 0 auto; width: 56px; height: 56px; padding: 4px; border: 2px solid var(--tk-line); border-radius: 12px; background: #fff; cursor: pointer; }
.tk-thumb.is-active { border-color: var(--tk-green); }
.tk-thumb img { width: 100%; height: 100%; object-fit: contain; }

.tk-p-title { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 800; letter-spacing: -.3px; }
.tk-p-meta { margin: 6px 0 0; color: var(--tk-muted); font-size: 14px; }
.tk-p-intro { margin: 14px 0 0; font-size: 16px; color: #3d4c60; }

.tk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.tk-share-note { color: var(--tk-green-dark); font-weight: 700; font-size: 14px; }

.tk-sec { margin-top: 28px; }
.tk-sec-title { margin: 0 0 12px; font-size: 14px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--tk-blue); }
.tk-sec-title small { font-size: 12px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--tk-muted); }
.tk-sub { margin: 18px 0 6px; font-size: 16px; font-weight: 700; }
.tk-text { margin: 0; color: #3d4c60; }
.tk-allergens { color: var(--tk-red); font-weight: 600; }

/* Price comparison: one card per supermarket, like the app */
.tk-prices { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.tk-price { position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 0; padding: 14px; border: 1px solid var(--tk-line); border-radius: 16px; background: var(--tk-soft); }
.tk-price.is-cheapest { border: 2px solid var(--tk-blue); background: #fff; padding-top: 22px; }
.tk-price.is-unavailable { opacity: .55; padding-top: 22px; }
.tk-badge-cheap, .tk-badge-na { position: absolute; top: -1px; right: 14px; padding: 2px 10px; border-radius: 0 0 10px 10px; font-size: 11px; font-weight: 800; letter-spacing: .5px; color: #fff; background: var(--tk-blue); }
.tk-badge-na { left: 14px; right: auto; background: #e1e5ea; color: var(--tk-muted); }
.tk-price-logo { width: 48px; height: 48px; border-radius: 12px; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tk-price-logo img { width: 40px; height: 40px; object-fit: contain; }
.tk-price-chain { min-width: 0; }
.tk-price-name { display: block; font-weight: 700; font-size: 17px; }
.tk-price-sub { display: block; color: var(--tk-muted); font-size: 13px; }
.tk-promo { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 6px; background: #ffe9e9; color: var(--tk-red); font-weight: 700; }
.tk-price-value { text-align: right; line-height: 1.2; }
.tk-price-value strong { display: block; font-size: 22px; font-weight: 800; }
.tk-price.is-cheapest .tk-price-value strong { color: var(--tk-blue); }
.tk-price-value s { display: block; font-size: 13px; color: var(--tk-muted); }
.tk-price-value span { display: block; font-size: 13px; color: var(--tk-muted); }
.tk-price-link { grid-column: 2 / -1; font-size: 13px; font-weight: 600; text-decoration: none; }

/* Price history chart */
.tk-chart-box { padding: 12px; border: 1px solid var(--tk-line); border-radius: 16px; background: #fff; }
.tk-chart { width: 100%; height: auto; display: block; }
.tk-chart .tk-grid { stroke: #e4e8ee; stroke-width: 1; }
.tk-chart .tk-axis { fill: #6b7788; font-size: 12px; font-family: inherit; }
.tk-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; list-style: none; font-size: 13px; }
.tk-legend li { display: flex; align-items: center; gap: 6px; margin: 0; }
.tk-legend span { width: 12px; height: 4px; border-radius: 2px; }

/* Product facts */
.tk-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 15px; }
.tk-facts dt { color: var(--tk-muted); font-weight: 600; }
.tk-facts dd { margin: 0; }
.tk-nutrition { display: block; max-width: 420px; border-radius: 12px; border: 1px solid var(--tk-line); }

/* App call to action */
.tk-cta { display: flex; gap: 14px; align-items: flex-start; margin-top: 28px; padding: 18px; border-radius: 20px; background: linear-gradient(158deg, #0b6b54, #12a06a); color: #fff; }
.tk-cta img { flex: none; border-radius: 14px; }
.tk-cta-title { margin: 0; font-size: 18px; font-weight: 800; }
.tk-cta-text { margin: 4px 0 12px; font-size: 14px; opacity: .92; }
.tk-cta-stores { display: flex; flex-wrap: wrap; gap: 8px; }
.tk-cta-stores a { padding: 8px 14px; border-radius: 10px; background: var(--tk-ink); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none; }

/* Product cards (results, popular, related) */
.tk-cards { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.tk-card { margin: 0; }
.tk-card a { display: flex; gap: 12px; align-items: center; height: 100%; padding: 10px; border: 1px solid var(--tk-line); border-radius: 16px; background: #fff; color: var(--tk-ink); text-decoration: none; }
.tk-card a:hover { border-color: var(--tk-green); }
.tk-card-img { flex: none; width: 64px; height: 64px; border-radius: 12px; background: var(--tk-soft); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tk-card-img:not(:has(img)) { display: none; }
.tk-card-img img, .tk-gal-item img, .tk-thumb img { font-size: 0; color: transparent; }
.tk-card-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tk-card-body { min-width: 0; }
.tk-card-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 700; font-size: 15px; line-height: 1.3; }
.tk-card-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--tk-muted); }
.tk-card-meta strong { color: var(--tk-ink); }
.tk-card-chains { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 100px; background: #e2f5ec; color: var(--tk-green-dark); font-weight: 700; font-size: 12px; }

.tk-related { margin-top: 40px; }
.tk-note { margin-top: 32px; font-size: 13px; color: var(--tk-muted); }

/* ---------- Search page ---------- */
.tk-s-title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.5px; }
.tk-s-intro { margin: 10px 0 0; color: #3d4c60; }
.tk-search { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.tk-search-box { flex: 1 1 240px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 100px; background: #eceff3; color: var(--tk-muted); }
.tk-search-box input { flex: 1; min-width: 0; height: 52px; border: 0 !important; background: transparent !important; box-shadow: none !important; font-family: inherit; font-size: 17px; font-weight: 500; color: var(--tk-ink); outline: none; padding: 0 !important; }
.tk-search .tk-btn { border-radius: 100px; padding: 0 22px; height: 52px; }
.tk-chips { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; padding: 0; border: 0; }
.tk-chips legend { width: 100%; margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 14px; }
.tk-chips legend span { font-weight: 500; color: var(--tk-muted); }
.tk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--tk-line); border-radius: 100px; background: #fff; font-size: 14px; font-weight: 600; cursor: pointer; user-select: none; }
.tk-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tk-chip img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.tk-chip:has(input:checked) { border-color: var(--tk-green); background: #e2f5ec; color: var(--tk-green-dark); }
.tk-chip:has(input:focus-visible) { outline: 2px solid var(--tk-green); outline-offset: 2px; }
.tk-status { min-height: 24px; margin: 16px 0 8px; color: var(--tk-muted); font-weight: 600; }
.tk-more { margin-top: 14px; }
.tk-s-faq p { color: #3d4c60; }

/* ---------- Topic pages (precio de…) and links to them ---------- */
.tk-t-date { margin: 6px 0 0; font-size: 13px; color: var(--tk-muted); }
.tk-t .tk-price-sub a { color: var(--tk-muted); }
.tk-topics { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tk-topics li { margin: 0; }
.tk-topics a { display: inline-block; padding: 6px 12px; border: 1px solid var(--tk-line); border-radius: 100px; background: #fff; color: var(--tk-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.tk-topics a:hover { border-color: var(--tk-green); color: var(--tk-green-dark); }
.tk-topic-link { margin: 12px 0 0; font-size: 15px; font-weight: 700; }
.tk-topic-link a { text-decoration: none; }

/* ---------- Supermarket ranking ---------- */
.tk-rank { padding-left: 0; }
.tk-rank .tk-price-logo { font-weight: 800; font-size: 18px; }
.tk-table-wrap { overflow-x: auto; border: 1px solid var(--tk-line); border-radius: 16px; }
.tk-table { width: 100%; border-collapse: collapse; font-size: 14px; white-space: nowrap; }
.tk-table th, .tk-table td { padding: 8px 10px; border-bottom: 1px solid var(--tk-line); text-align: right; }
.tk-table thead th { background: var(--tk-soft); font-size: 12px; font-weight: 800; }
.tk-table thead th:first-child { position: sticky; left: 0; text-align: left; }
.tk-table tbody th { position: sticky; left: 0; background: #fff; text-align: left; font-weight: 700; }
.tk-table tbody th small { color: var(--tk-muted); font-weight: 500; }
.tk-table a { text-decoration: none; }
.tk-table td a { color: var(--tk-ink); }
.tk-table td.is-min { background: #e2f5ec; font-weight: 800; }
.tk-table tr:last-child th, .tk-table tr:last-child td { border-bottom: 0; }

/* ---------- Christmas pages: picture-led product grid ---------- */
.tk-n .tk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tk-n .tk-card a { flex-direction: column; align-items: flex-start; }
.tk-n .tk-card-img { width: 100%; height: 140px; }
.tk-n .tk-card-body { width: 100%; }
.tk-n .tk-card-chains { margin: 4px 0 0; }

@media (min-width: 640px) {
	.tk-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tk-n .tk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
	.tk-wrap { padding: 24px 32px 64px; }
	.tk-top-in, .tk-foot-in { padding-inline: 32px; }
	.tk-p-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; }
	.tk-p-media { position: sticky; top: 84px; }
	.tk-p-title { font-size: 32px; }
	.tk-s-title { font-size: 40px; }
	.tk-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.tk-related .tk-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tk-related .tk-card a { flex-direction: column; align-items: flex-start; }
	.tk-related .tk-card-img { width: 100%; height: 140px; }
	.tk-n .tk-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.tk-n .tk-card-img { height: 170px; }
}
