/*
 * Luposan Theme - main stylesheet
 * Design tokens extracted from the original Joomla template
 * (templates/ja_simpli/css/custom-styles/14.css) - see import/data/site_meta.json
 */

:root {
	--luposan-body-bg: #ffffff;
	--luposan-body-text: #101010;
	--luposan-link: #ed7f00;
	--luposan-accent-orange: #ed7f00;
	--luposan-accent-green: #4a9c3e;
	--luposan-accent-blue: #3498db;
	--luposan-accent-darkblue: #004597;
	--luposan-header-bg: #ffffff;
	--luposan-header-border: #e0e0e0;
	--luposan-nav-text: #303030;
	--luposan-nav-hover-bg: #303030;
	--luposan-nav-hover-text: #ffffff;
	--luposan-footer-bg: #ffffff;
	--luposan-footer-text: #909090;
	--luposan-grey-bg: #f7f7f5;
	--luposan-font: 'PT Sans', Helvetica, Arial, sans-serif;
	--luposan-max-width: 1200px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background-color: var(--luposan-body-bg);
	color: var(--luposan-body-text);
	font-family: var(--luposan-font);
	font-size: 16px;
	line-height: 1.5;
}

a { color: var(--luposan-link); text-decoration: none; }
a:hover, a:focus { color: var(--luposan-accent-darkblue); }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5, h6 { font-family: var(--luposan-font); font-weight: 700; line-height: 1.2; }

.container {
	max-width: var(--luposan-max-width);
	margin: 0 auto;
	padding: 0 20px;
}

.accent-orange { color: var(--luposan-accent-orange); }
.accent-green { color: var(--luposan-accent-green); }

/* ---------- Header ---------- */
.header {
	background: var(--luposan-header-bg) url('../images/header-bg.png') center bottom no-repeat;
	background-size: cover;
	border-bottom: 1px solid var(--luposan-header-border);
}

.header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 32px 20px;
	gap: 16px;
}

.header-brand .logo { display: block; }
.header-brand img { max-height: 70px; width: auto; }

.header-lang ul.lang-inline { list-style: none; display: flex; align-items: center; gap: 12px; margin: 0; padding: 0; }
.header-lang ul.lang-inline li a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 30px;
	border-radius: 9px;
	overflow: hidden;
	background: #ffffff;
	border: 3px solid #ffffff;
	box-shadow: 0 1px 4px rgba(0,0,0,0.25);
	transition: transform .15s ease;
}
.header-lang ul.lang-inline li a img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; display: block; }
.header-lang ul.lang-inline li.lang-active a {
	width: 46px;
	height: 36px;
	border-color: #ffffff;
	box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	gap: 4px;
	background: none;
	border: 0;
	cursor: pointer;
	padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--luposan-nav-text); display: block; }

/* ---------- Nav ---------- */
.mainnav { background: var(--luposan-header-bg); border-top: 1px solid var(--luposan-header-border); position: relative; z-index: 50; }
.mainnav .container { display: flex; align-items: center; justify-content: space-between; }

ul.nav {
	list-style: none;
	display: flex;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

ul.nav > li { position: relative; }

ul.nav > li > a {
	display: block;
	padding: 14px 16px;
	color: var(--luposan-nav-text);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: .02em;
	text-transform: uppercase;
}

ul.nav > li:hover > a,
ul.nav > li > a:focus {
	background: var(--luposan-nav-hover-bg);
	color: var(--luposan-nav-hover-text);
}

ul.nav li.menu-item-depth-0.has-dropdown > a::after {
	content: "▾";
	margin-left: 6px;
	font-size: 10px;
}

.sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 260px;
	background: #ffffff;
	border: 1px solid var(--luposan-nav-text);
	display: none;
	box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

ul.nav > li:hover > .sub-menu { display: block; }
/* Nested (3rd-level) flyout submenus, e.g. Productos > Sobre los productos Luposan > Los Lupo-piensos.
   Without this rule only the first dropdown level ever showed. */
.sub-menu li:hover > .sub-menu { display: block; }

.sub-menu .sub-menu { top: 0; left: 100%; }

.sub-menu li a {
	display: block;
	padding: 10px 16px;
	color: #000000;
	font-size: 14px;
	white-space: nowrap;
}
.sub-menu li:hover > a { background: var(--luposan-nav-hover-bg); color: #fff; }

.navbar-form {
	display: flex;
	align-items: center;
	margin-left: 16px;
}
.navbar-form .inputbox {
	background: var(--luposan-grey-bg);
	color: var(--luposan-nav-text);
	border: 1px solid var(--luposan-header-border);
	padding: 8px 14px;
	border-radius: 999px;
	font-family: var(--luposan-font);
	font-size: 14px;
	width: 180px;
}
.navbar-form .inputbox:focus { outline: none; border-color: var(--luposan-accent-orange); }

/* Special: "Tienda Online" style CTA item — targets the last top-level menu item */
ul.nav > li.menu-item-depth-0:last-child > a {
	background: #d0021b;
	color: #fff;
}

/* ---------- Breadcrumbs ---------- */
.luposan-breadcrumbs {
	font-size: 13px;
	color: #808080;
	padding: 14px 0;
}
.luposan-breadcrumbs a { color: #808080; }

/* ---------- Content ---------- */
.mainbody { padding: 24px 0 40px; }
.mainbody-inner { }

.page-title { font-size: 28px; margin: 0 0 20px; color: var(--luposan-accent-orange); text-transform: uppercase; }

.entry-content { max-width: 900px; }
.entry-content h2 { font-size: 22px; margin-top: 32px; }
.entry-content h3 { font-size: 18px; margin-top: 24px; }
.entry-content p { margin: 0 0 16px; }
.entry-content ul, .entry-content ol { margin: 0 0 16px; padding-left: 22px; }
.entry-content img { margin: 16px 0; border-radius: 4px; }
.entry-content strong, .entry-content b { font-weight: 700; }
.entry-content u { text-decoration: underline; }
.entry-content a { text-decoration: underline; }
.entry-content table { border-collapse: collapse; width: 100%; margin: 0 0 20px; font-size: 14px; }
.entry-content table td, .entry-content table th { border: 1px solid #e0e0e0; padding: 8px 10px; text-align: left; }
.entry-content table th { background: var(--luposan-grey-bg); }

/* Original site's Joomla JS tab widgets (e.g. "Descripción" / "Información general")
   don't work without JS, so the importer flattens them into stacked sections instead. */
.luposan-tabs-flattened { margin: 20px 0; }
.luposan-tabs-flattened h3 {
	margin-top: 28px;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--luposan-accent-orange);
}

/* Two-column (and similar) layouts from the original article HTML: the source
   used both Bootstrap 2 (.row > [class*="span"]) and Bootstrap 4/5-ish
   (.row > .col-*, .offset-*) grid markup depending on when the page was
   authored. Approximate both generically with flexbox rather than replicating
   exact column math. */
.entry-content .row,
.entry-content .row-fluid {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 0 0 16px;
}
.entry-content .row > [class*="span"],
.entry-content .row-fluid > [class*="span"],
.entry-content [class*="col-"] {
	flex: 1 1 260px;
	min-width: 0;
}
.entry-content [class*="offset-"] { margin-left: 0; }

.entry-content .luposan-gallery { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.entry-content .luposan-gallery img { width: 180px; height: auto; margin: 0; }

.produkt-terms { margin: -10px 0 20px; }
.tag {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
	margin-right: 6px;
	background: var(--luposan-grey-bg);
	color: var(--luposan-nav-text);
}
.tag-gruppe { background: var(--luposan-accent-darkblue); color: #fff; }

/* ---------- Product grid / cards ---------- */
.produkt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 24px;
	margin: 24px 0 40px;
}

.produkt-card {
	display: block;
	background: #fff;
	border: 1px solid #eee;
	border-radius: 6px;
	overflow: hidden;
	transition: box-shadow .15s ease, transform .15s ease;
}
.produkt-card:hover { box-shadow: 0 10px 24px rgba(0,0,0,0.08); transform: translateY(-2px); }

.produkt-card-thumb { aspect-ratio: 4/3; background: var(--luposan-grey-bg); overflow: hidden; }
.produkt-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.produkt-card-thumb-placeholder { width: 100%; height: 100%; }

.produkt-card-title { font-size: 15px; margin: 12px 14px 4px; color: var(--luposan-body-text); }
.produkt-card-excerpt { font-size: 13px; color: #777; margin: 0 14px 14px; }

/* ---------- Front page: hero title + slider ---------- */
.homepage-title {
	max-width: var(--luposan-max-width);
	margin: 24px auto 0;
	padding: 0 20px;
	font-size: 26px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--luposan-accent-orange);
	text-align: center;
}

.luposan-slider {
	position: relative;
	margin: 0 0 40px;
	height: 420px;
	overflow: hidden;
	background: #101010;
}
.luposan-slider-track { position: relative; width: 100%; height: 100%; }
.luposan-slide {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .6s ease;
}
.luposan-slide.is-active { opacity: 1; visibility: visible; }

/* Positioned to sit inside the blank panel that's baked into each background
   photo (not a box we draw - it's part of the original image), so no card/
   background of our own is needed; the panel itself provides the contrast. */
.luposan-slide-overlay {
	position: absolute;
	top: 6%;
	bottom: 6%;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 20px;
}
.luposan-slide-overlay.overlay-left { left: 4%; width: 40%; }
.luposan-slide-overlay.overlay-right { right: 3%; width: 44%; }

.slide-kicker { font-size: 34px; font-weight: 700; text-transform: uppercase; color: var(--luposan-accent-orange); margin-bottom: 16px; line-height: 1.15; }
.slide-title { font-size: 30px; font-weight: 700; line-height: 1.25; margin-bottom: 16px; }
.slide-body { font-size: 17px; color: #333; line-height: 1.55; }
.slide-body b { color: var(--luposan-accent-orange); }
.slide-readmore {
	display: inline-block;
	margin-top: 18px;
	font-size: 17px;
	font-weight: 700;
	text-decoration: underline;
	color: var(--luposan-accent-orange);
}

/* Entrance animation, replayed each time a slide becomes active (mirrors the
   original: kicker scales in, then the text block slides up from below,
   then the "Leer más" link fades in). */
@keyframes luposanScaleIn {
	from { transform: scale(0); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}
@keyframes luposanSlideUp {
	from { transform: translateY(70px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}
@keyframes luposanFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}
.luposan-slide-overlay .slide-kicker,
.luposan-slide-overlay .slide-title,
.luposan-slide-overlay .slide-body,
.luposan-slide-overlay .slide-readmore {
	opacity: 0;
}
.luposan-slide.is-active .slide-kicker,
.luposan-slide.is-active .slide-title {
	animation: luposanScaleIn .8s ease forwards;
}
.luposan-slide.is-active .slide-body {
	animation: luposanSlideUp .7s ease forwards;
	animation-delay: .5s;
}
.luposan-slide.is-active .slide-readmore {
	animation: luposanFadeIn .6s ease forwards;
	animation-delay: 1.1s;
}

.luposan-slider-prev,
.luposan-slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: rgba(255,255,255,0.8);
	border: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	cursor: pointer;
	font-size: 16px;
	z-index: 2;
}
.luposan-slider-prev { left: 16px; }
.luposan-slider-next { right: 16px; }

.luposan-slider-dots {
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	display: flex;
	gap: 8px;
	z-index: 2;
}
.luposan-slider-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: transparent;
	cursor: pointer;
	padding: 0;
}
.luposan-slider-dot.is-active { background: #fff; }

.recommended-products h2 { color: var(--luposan-accent-orange); text-transform: uppercase; }
.recommended-products { text-align: center; }
.recommended-products .section-lead { max-width: 640px; margin: 0 auto 24px; color: #666; }

.recommended-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 28px;
	text-align: center;
	margin: 0 0 40px;
}
.recommended-card { color: inherit; }
.recommended-thumb {
	width: 110px;
	height: 110px;
	border-radius: 50%;
	object-fit: cover;
	margin: 0 auto 14px;
	border: 3px solid var(--luposan-grey-bg);
}
.recommended-name { display: block; font-size: 16px; margin-bottom: 6px; color: var(--luposan-nav-text); }
.recommended-text { color: #666; font-size: 14px; max-width: 320px; margin: 0 auto; }

/* ---------- Footer USP boxes (bot_2 - shown on every page) ---------- */
.usp-section { background: var(--luposan-grey-bg); padding: 40px 0; }
.usp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 28px;
	align-items: start;
}
.usp-item {
	display: flex;
	flex-direction: column;
	text-align: left;
	color: inherit;
}
.usp-item img { width: 100%; height: auto; display: block; margin: 0 0 16px; border-radius: 2px; }
.usp-item h3 {
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--luposan-nav-text);
	margin: 0 0 10px;
	padding-bottom: 10px;
	border-bottom: 1px solid #d9d9d9;
}
.usp-item p { color: #666; font-size: 14px; margin: 0; flex: 1; }

/* ---------- Footer: address / logistics / social (bot_3, dark "blue-bg" in the original) ---------- */
.address-section { background: #4d5350; padding: 40px 0; }
.address-section h4 { color: #ffffff; margin-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }
.footer-columns { display: flex; flex-wrap: wrap; gap: 32px; }
.footer-columns .span4 { flex: 1 1 280px; }
.footer-columns p { color: #d7dad8; font-size: 14px; }
.footer-columns a { color: #ffffff; text-decoration: underline; }

/* The original icon PNGs are solid white glyphs on a transparent background -
   they're designed to sit directly on this dark footer, not inside a badge. */
.footer-social-links { display: flex; align-items: center; gap: 14px; padding: 0; margin: 0 0 16px; }
.footer-social-links img { width: 28px; height: 28px; display: block; }
.footer-logo { width: 150px; max-width: 100%; height: auto; }

.footer-section { background: var(--luposan-footer-bg); border-top: 1px solid var(--luposan-header-border); padding: 20px 0; text-align: center; }
.footer-section p { color: var(--luposan-footer-text); font-size: 13px; margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.nav-toggle { display: flex; }
	.mainnav .container { flex-wrap: wrap; }
	ul.nav { display: none; flex-direction: column; width: 100%; }
	.mainnav.is-open ul.nav { display: flex; }
	.mainnav.is-open .navbar-form { display: flex; width: 100%; margin: 8px 0 0; }
	ul.nav > li > a { padding: 12px 8px; }
	.sub-menu { position: static; display: block; border: 0; box-shadow: none; padding-left: 12px; }
	.sub-menu .sub-menu { left: 0; }
	.navbar-form { display: none; }
	.navbar-form .inputbox { width: 100%; }

	.luposan-slider { height: 320px; }
	.luposan-slide-overlay.overlay-left,
	.luposan-slide-overlay.overlay-right {
		left: 5%;
		right: 5%;
		width: auto;
		padding: 16px;
	}
	.slide-kicker { font-size: 24px; }
	.slide-title { font-size: 20px; }
	.slide-body { font-size: 15px; }
}
