/*
Theme Name:   Newsup Dealfenster
Description:  Child-Theme von Newsup für dealfenster.de. Enthält die angepassten Templates (content.php, single.php), damit Newsup-Updates sie nicht überschreiben.
Template:     newsup
Version:      1.5.0
Text Domain:  newsup-dealfenster
*/

/* --- DEALFENSTER --- */
.deal-price {
	margin: 6px 0;
	font-size: calc(1.05em + 2px);
}
.deal-price .deal-price-new {
	font-weight: 700;
	color: #c00;
}
.deal-price .deal-price-old {
	text-decoration: line-through;
	opacity: .7;
	margin-left: 4px;
}
.deal-price .deal-price-ref {
	font-size: .75em;
	opacity: .7;
}
.deal-price-note {
	clear: both;
	display: block;
	font-size: .72em;
	line-height: 1.4;
	opacity: .65;
	padding-top: 6px;
}
.deal-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 4px;
}
.dealbox-ad {
	line-height: 36px;
}
/* Badges in der Button-Zeile neben dem Like-Button */
.dealbox-badges .deal-badges {
	margin: 0;
	min-height: 36px;
	align-items: center;
}
.deal-cta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}
.deal-cta-row .deal-badges {
	margin: 0;
}
.deal-badge {
	display: inline-block;
	font-size: .78em;
	font-weight: 600;
	line-height: 1;
	padding: 5px 9px;
	border-radius: 999px;
	background: #eef3ff;
	color: #1a1a40;
}
.deal-badge-bestseller { background: #fff1e6; color: #b3410e; }
.deal-badge-trend      { background: #e9f8ee; color: #136c34; }
.deal-badge-lightning  { background: #fff6cc; color: #7a5a00; }
.deal-badge-new        { background: #eef3ff; color: #1151d3; }
.deal-badge-ad         { background: #f0f0f0; color: #777; font-weight: 500; }
.deal-badge-favorite   { background: #fff8db; color: #8a6400; }
.deal-rating {
	font-size: .85em;
	margin: 2px 0 8px;
	color: #444;
}
.deal-rating .deal-stars {
	color: #f5a623;
	font-size: 1.1em;
}
.deal-ad-label {
	font-size: .8em;
	opacity: .8;
	margin-left: 6px;
}
.dealfenster-affiliate-notice {
	font-size: .8em;
	text-align: center;
	padding: 10px 16px;
	color: rgba(255, 255, 255, .7);
}

.dealfenster-legal-links {
	text-align: center;
	padding: 0 16px 14px;
	font-size: .85em;
}
.dealfenster-legal-links a {
	color: rgba(255, 255, 255, .85);
}

/* PERFORMANCE: newsup-Header-Hintergrundbild (181 KB) liegt unter einer deckenden Overlay-Farbe
   und ist unsichtbar -> nicht laden. Farbe bleibt über das Overlay erhalten. */
.mg-headwidget .mg-nav-widget-area-back {
	background-image: none !important;
	background-color: #1b1e46;
}

/* Kategorie-Intro (SEO-Text) über der Deal-Liste */
.dealfenster-cat-intro {
	background: #fff;
	border-radius: 6px;
	padding: 12px 16px;
	margin-bottom: 14px;
	font-size: 14px;
	line-height: 1.5;
	color: #333;
}
.dealfenster-cat-intro p { margin: 0; }

/* ===== Kompakte Deal-Karten in der Übersicht (mind. 2,5 Deals sichtbar) ===== */
.mg-posts-sec-post {
	display: flex !important;
	align-items: center;
	padding: 10px 14px !important;
	margin-bottom: 14px;
}
.mg-posts-sec-post > .col-12.col-md-6 {
	flex: 0 0 30%;
	max-width: 30%;
	padding: 0 14px 0 0;
}
.mg-posts-sec-post .mg-post-thumb.back-img.md {
	width: 100% !important; /* newsup setzt 300px fest -> ragte in den Text */
	height: 160px !important;
	min-height: 0 !important;
	background-size: contain !important;
	background-repeat: no-repeat;
	background-position: center;
	background-color: #fff;
}
.mg-posts-sec-post .mg-sec-top-post {
	padding-top: 2px !important;
	padding-bottom: 2px !important;
	padding-left: 0;
	min-width: 0;
}
.mg-posts-sec-post .mg-blog-category {
	margin-bottom: 2px;
}
/* Selektor so spezifisch wie newsups ".mg-posts-modul-6 .mg-sec-top-post .title" (22px) */
.mg-posts-modul-6 .mg-posts-sec-post .mg-sec-top-post .entry-title.title {
	font-size: 19px;
	line-height: 1.25;
	margin: 2px 0 4px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
/* Datum/Kommentare/Autor in der Liste weglassen (Datum steht im Preis-Hinweis "Stand: ...") */
.mg-posts-sec-post .mg-blog-meta {
	display: none;
}
.mg-posts-sec-post .mg-content > p {
	font-size: 14px;
	line-height: 1.45;
	margin: 0 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.mg-posts-sec-post .deal-price  { margin: 2px 0 0; }
.mg-posts-sec-post .deal-rating { margin: 0 0 2px; }
.mg-posts-sec-post .dealbox     { padding: 3px 6px 3px 0; }
.mg-posts-sec-post .deal-price-note {
	padding-top: 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

@media (max-width: 767px) {
	/* Deal-App-Layout: kleines Bild links, Inhalt rechts */
	.mg-posts-sec-post {
		padding: 10px !important;
		margin-bottom: 10px;
	}
	.mg-posts-sec-post > .col-12.col-md-6 {
		flex: 0 0 34%;
		max-width: 34%;
		padding-right: 10px;
		align-self: flex-start;
	}
	.mg-posts-sec-post .mg-post-thumb.back-img.md {
		height: 120px !important;
	}
	.mg-posts-sec-post .mg-blog-category,
	.mg-posts-sec-post .mg-blog-meta,
	.mg-posts-sec-post .mg-content > p {
		display: none;
	}
	.mg-posts-modul-6 .mg-posts-sec-post .mg-sec-top-post .entry-title.title {
		font-size: 15px;
		-webkit-line-clamp: 3;
		margin-top: 0;
	}
	.mg-posts-sec-post .mg-sec-top-post { padding-right: 0; }
	.mg-posts-sec-post .deal-rating { line-height: 1.3; }
	.mg-posts-sec-post .deal-price  { font-size: 17px; }
	.mg-posts-sec-post .deal-rating { font-size: 12px; }
	.mg-posts-sec-post .more-link {
		font-size: 14px;
		padding: 5px 10px;
	}
	.mg-posts-sec-post .deal-badge { font-size: .7em; padding: 4px 7px; }
	.mg-posts-sec-post .dealbox-badges .deal-badges { min-height: 0; }
	.mg-posts-sec-post .deal-price-note {
		font-size: 10px;
		white-space: normal;
	}

	/* Header in EINER Zeile: Logo + "dealfenster" links, Burger rechts */
	header.mg-headwidget { position: relative; }
	.mg-headwidget .mg-nav-widget-area-back .inner { padding: 0 !important; }
	.mg-headwidget .mg-nav-widget-area-back .container-fluid {
		padding-top: 8px !important;
		padding-bottom: 8px !important;
	}
	.mg-headwidget .navbar-header {
		display: flex;
		align-items: center;
		text-align: left;
		padding-right: 56px; /* Platz für den Burger */
		min-height: 44px;
	}
	.mg-headwidget .custom-logo {
		max-width: 40px !important;
		max-height: 40px !important;
		margin: 0 10px 0 0 !important;
	}
	.mg-headwidget .site-branding-text {
		text-align: left;
		display: flex;
		align-items: center;
		gap: 8px;
		min-width: 0;
	}
	.mg-headwidget .site-title { margin: 0; line-height: 1; }
	.mg-headwidget .site-title a { font-size: 21px !important; }
	.mg-headwidget .site-description { display: none !important; }
	/* Verkaufsversprechen klein in derselben Zeile */
	.mg-headwidget .site-branding-text::after {
		content: "Garantiert 50% reduziert.";
		flex: 0 1 auto;
		white-space: nowrap;
		font-size: 10.5px;
		font-weight: 700;
		line-height: 1;
		color: #fff;
		background: #ff3b30;
		padding: 4px 7px;
		border-radius: 999px;
	}

	/* Menüleiste über die Logo-Zeile legen; nur Burger und aufgeklapptes Menü sind klickbar */
	.mg-headwidget .mg-menu-full {
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		background: transparent !important;
		pointer-events: none;
		z-index: 1000; /* über dem Ticker (newsup: z-index 50) */
	}
	.mg-headwidget .mg-menu-full .navbar,
	.mg-headwidget .mg-menu-full .container-fluid { background: transparent !important; }
	.mg-headwidget .mg-menu-full .m-header {
		height: 60px;
		justify-content: flex-end;
		padding-right: 4px;
	}
	.mg-headwidget .mg-menu-full .mobilehomebtn,
	.mg-headwidget .mg-menu-full .mg-search-box { display: none !important; }
	.mg-headwidget .mg-menu-full .navbar-toggler {
		margin: 0 !important;
		pointer-events: auto;
	}
	.mg-headwidget .mg-menu-full .navbar-collapse {
		pointer-events: auto;
		background: #1f2a5c;
		border-radius: 0 0 8px 8px;
	}
}

/* Sehr schmale Handys: Header-Zeile etwas kleiner, damit das Versprechen neben den Burger passt */
@media (max-width: 379px) {
	.mg-headwidget .custom-logo {
		max-width: 34px !important;
		max-height: 34px !important;
		margin-right: 8px !important;
	}
	.mg-headwidget .site-branding-text { gap: 6px; }
	.mg-headwidget .site-title a { font-size: 18px !important; }
	.mg-headwidget .site-branding-text::after {
		font-size: 9.5px;
		padding: 3px 6px;
	}
}

/*
 * Zusätzliches CSS (Customizer) enthält ".back-img { width: 300px; }" für die
 * Bild-Kacheln. Der newsup-Footer hat ebenfalls die Klasse back-img und wurde
 * dadurch auf 300px gequetscht -> Footer wieder volle Breite.
 */
footer.footer.back-img {
	width: auto;
}
