/**
 * SW Manufacturer Directory Styles
 *
 * @package SW_Manufacturer_Directory
 */

/* ==============================================================================
   Membership Badges
   ============================================================================== */

.sw-badge {
	display: inline-block;
	padding: 4px 12px;
	margin-left: 8px;
	font-size: 0.85em;
	font-weight: bold;
	border-radius: 4px;
	text-transform: uppercase;
	vertical-align: middle;
}

.sw-badge-gold {
	background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
	color: #333;
	box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
	border: 1px solid #FFD700;
}

.sw-badge-silver {
	background: linear-gradient(135deg, #C0C0C0 0%, #999 100%);
	color: #333;
	box-shadow: 0 2px 6px rgba(192, 192, 192, 0.3);
	border: 1px solid #C0C0C0;
}

.sw-badge-bronze {
	background: linear-gradient(135deg, #CD7F32 0%, #A0522D 100%);
	color: #fff;
	box-shadow: 0 2px 6px rgba(205, 127, 50, 0.3);
	border: 1px solid #CD7F32;
}

/* ==============================================================================
   Gold Members Logo Grid
   ============================================================================== */

.sw-gold-members-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	margin: 40px 0;
}

.sw-gold-members-grid[data-columns="2"] {
	grid-template-columns: repeat(2, 1fr);
}

.sw-gold-members-grid[data-columns="3"] {
	grid-template-columns: repeat(3, 1fr);
}

.sw-gold-members-grid[data-columns="5"] {
	grid-template-columns: repeat(5, 1fr);
}

.sw-gold-members-grid[data-columns="6"] {
	grid-template-columns: repeat(6, 1fr);
}

.sw-gold-member-logo {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	text-align: center;
}

.sw-gold-member-logo:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

.sw-gold-member-logo img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

.sw-gold-member-logo a {
	display: block;
}

/* Responsive */
@media (max-width: 992px) {
	.sw-gold-members-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.sw-gold-members-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 15px;
	}
}

@media (max-width: 480px) {
	.sw-gold-members-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}
}

/* ==============================================================================
   Manufacturer Directory Grid
   ============================================================================== */

.sw-manufacturer-directory {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	margin: 40px 0;
}

.sw-manufacturer-directory[data-columns="2"] {
	grid-template-columns: repeat(2, 1fr);
}

.sw-manufacturer-directory[data-columns="4"] {
	grid-template-columns: repeat(4, 1fr);
}

.sw-manufacturer-item {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
	padding: 24px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	position: relative;
}

.sw-manufacturer-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.sw-manufacturer-item.sw-badge-gold {
	border: 2px solid #FFD700;
}

.sw-manufacturer-item.sw-badge-silver {
	border: 2px solid #C0C0C0;
}

.sw-membership-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	padding: 4px 12px;
	font-size: 0.75em;
	font-weight: bold;
	border-radius: 4px;
	text-transform: uppercase;
}

.sw-badge-gold .sw-membership-badge {
	background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
	color: #333;
}

.sw-badge-silver .sw-membership-badge {
	background: linear-gradient(135deg, #C0C0C0 0%, #999 100%);
	color: #333;
}

.sw-manufacturer-logo {
	text-align: center;
	margin-bottom: 20px;
}

.sw-manufacturer-logo img {
	max-width: 100%;
	max-height: 120px;
	width: auto;
	height: auto;
}

.sw-manufacturer-content h3 {
	margin: 0 0 12px;
	font-size: 1.3em;
}

.sw-manufacturer-content h3 a {
	color: #333;
	text-decoration: none;
	transition: color 0.3s ease;
}

.sw-manufacturer-content h3 a:hover {
	color: #007bff;
}

.sw-manufacturer-content p {
	margin: 0 0 16px;
	color: #666;
	line-height: 1.6;
}

.sw-read-more {
	display: inline-block;
	color: #007bff;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s ease;
}

.sw-read-more:hover {
	color: #0056b3;
}

/* ==============================================================================
   Hersteller Artikel — Article card grid [hersteller_artikel]
   ============================================================================== */

.sw-artikel-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: 20px;
	row-gap: 30px;
}

.sw-artikel-card {
	display: flex;
	flex-direction: column;
	border: 1px solid #e0e0e0;
}

.sw-artikel-image {
	display: block;
	aspect-ratio: 4 / 3;
	background-size: cover;
	background-position: center;
	overflow: hidden;
}

.sw-artikel-image--placeholder {
	background-color: #f0f0f0;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ccc;
}

.sw-artikel-image--placeholder svg {
	width: 48px;
	height: 48px;
}

.sw-artikel-content {
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

h3.sw-artikel-title {
	font-size: 20px;
	font-family: "Nunito Sans", sans-serif;
	font-weight: 600;
	margin: 0;
	line-height: 1.3;
}

h3.sw-artikel-title a {
	color: #004494;
	text-decoration: none;
}

h3.sw-artikel-title a:hover {
	text-decoration: underline;
}

.sw-artikel-link {
	font-size: 16px;
	font-family: "Nunito Sans", sans-serif;
	color: #000;
	text-decoration: none;
}

.sw-artikel-link:hover {
	text-decoration: underline;
}

@media (max-width: 992px) {
	.sw-artikel-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.sw-artikel-grid {
		grid-template-columns: 1fr;
	}
}

/* Responsive */
@media (max-width: 992px) {
	.sw-manufacturer-directory {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (max-width: 768px) {
	.sw-manufacturer-directory {
		grid-template-columns: 1fr;
		gap: 20px;
	}
}

/* ==============================================================================
   WooCommerce My Account Enhancements
   ============================================================================== */

.woocommerce-MyAccount-content table.woocommerce-table--order-details {
	border: 1px solid #e0e0e0;
}

.woocommerce-MyAccount-content table.woocommerce-table--order-details th {
	background-color: #f8f8f8;
	font-weight: 600;
	padding: 12px;
}

.woocommerce-MyAccount-content table.woocommerce-table--order-details td {
	padding: 12px;
}

.woocommerce-MyAccount-content .acf-form {
	margin-top: 20px;
}

.woocommerce-MyAccount-content .acf-field {
	margin-bottom: 20px;
}

.woocommerce-MyAccount-content .acf-label {
	font-weight: 600;
	margin-bottom: 8px;
}

/* ACF Form Styling */
.woocommerce-MyAccount-content .acf-form {
	margin-bottom: 60px;
}

.woocommerce-MyAccount-content .acf-input {
	max-width: 100%;
}

.woocommerce-MyAccount-content .acf-input input[type="text"],
.woocommerce-MyAccount-content .acf-input input[type="email"],
.woocommerce-MyAccount-content .acf-input input[type="url"],
.woocommerce-MyAccount-content .acf-input textarea {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.woocommerce-MyAccount-content .acf-input input[type="text"]:focus,
.woocommerce-MyAccount-content .acf-input input[type="email"]:focus,
.woocommerce-MyAccount-content .acf-input input[type="url"]:focus,
.woocommerce-MyAccount-content .acf-input textarea:focus {
	border-color: #007bff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.woocommerce-MyAccount-content .acf-form-submit {
	margin-bottom: 40px;
}

/* URL field: vertically center globe icon and fix text overlap */
.woocommerce-MyAccount-content .acf-icon.-small {
	line-height: 28px;
}

.woocommerce-MyAccount-content .acf-field .acf-url input[type="url"] {
	padding-left: 30px;
}

/* Success/Error Messages */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	padding: 16px 20px;
	margin-bottom: 20px;
	border-radius: 4px;
}

.woocommerce-message {
	background-color: #d4edda;
	border-left: 4px solid #28a745;
	color: #155724;
}

.woocommerce-info {
	background-color: #d1ecf1;
	border-left: 4px solid #17a2b8;
	color: #0c5460;
}

.woocommerce-error {
	background-color: #f8d7da;
	border-left: 4px solid #dc3545;
	color: #721c24;
}

/* ==============================================================================
   Single Manufacturer Page Enhancements
   ============================================================================== */

body.sw-membership-gold .entry-header {
	border-top: 4px solid #FFD700;
}

body.sw-membership-silver .entry-header {
	border-top: 4px solid #C0C0C0;
}

/* Company Banner for Gold Members */
.sw-company-banner {
	width: 100%;
	margin-bottom: 30px;
	border-radius: 8px;
	overflow: hidden;
}

.sw-company-banner img {
	width: 100%;
	height: auto;
	display: block;
}

/* Company Logo */
.sw-company-logo {
	text-align: center;
	margin-bottom: 20px;
}

.sw-company-logo img {
	max-width: 200px;
	height: auto;
}

/* ==============================================================================
   My Account Navigation Tooltips
   ============================================================================== */

.woocommerce-MyAccount-navigation-link a[data-tooltip] {
	position: relative;
}

.woocommerce-MyAccount-navigation-link a[data-tooltip]:hover::after {
	content: attr(data-tooltip);
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	margin-left: 10px;
	padding: 8px 12px;
	background: #333;
	color: #fff;
	font-size: 13px;
	font-weight: 400;
	line-height: 1.4;
	white-space: nowrap;
	border-radius: 4px;
	z-index: 100;
	pointer-events: none;
}

.woocommerce-MyAccount-navigation-link a[data-tooltip]:hover::before {
	content: '';
	position: absolute;
	left: 100%;
	top: 50%;
	transform: translateY(-50%);
	margin-left: 4px;
	border: 5px solid transparent;
	border-right-color: #333;
	z-index: 100;
	pointer-events: none;
}

@media (max-width: 768px) {
	.woocommerce-MyAccount-navigation-link a[data-tooltip]:hover::after,
	.woocommerce-MyAccount-navigation-link a[data-tooltip]:hover::before {
		display: none;
	}
}

/* ==============================================================================
   Utility Classes
   ============================================================================== */

.sw-text-center {
	text-align: center;
}

.sw-mt-20 {
	margin-top: 20px;
}

.sw-mb-20 {
	margin-bottom: 20px;
}

.sw-hidden {
	display: none;
}

/* ==============================================================================
   Firmenverzeichnis (Alphabetical Directory)
   ============================================================================== */

.alphabet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    font-family: sans-serif;
    margin-bottom: 60px;
}

.alphabet-grid span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 35px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid #004494;
    color: #004494;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    user-select: none;
}

.alphabet-grid span:hover {
    background-color: #FCCC06;
    border-color: #FCCC06;
    color: #004494;
}

.alphabet-grid span.active {
    background-color: #FCCC06;
    border-color: #FCCC06;
    color: #004494;
}

.partner-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 40px;
    row-gap: 4px;
    font-family: sans-serif;
}

.partner-grid-container p {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 4px 0;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
}

.badge {
    display: inline-block;
    margin-left: auto;
    padding: 2px 8px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 4px;
    color: #fff;
    line-height: 1.2;
    flex-shrink: 0;
}

.badge-gold   { background-color: #D4AF37; }
.badge-silber { background-color: #A9A9A9; }
.badge-bronze { background-color: #CD7F32; }

.partner-name {
    line-height: 1.3;
    padding-right: 10px;
}

@media (max-width: 767px) {
    .partner-grid-container {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   Produktverzeichnis — Filters
   ============================================================================== */

.filter-section {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 220px;
    flex: 1;
}

.filter-label {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 6px;
    color: #004494;
}

.styled-select {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23666' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.styled-select:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.styled-select:focus {
    border-color: #004494;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 68, 148, 0.1);
}

/* ==============================================================================
   Produktverzeichnis — Gold Logo Grid (small)
   ============================================================================== */

.logo-grid-small {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.logo-item-small {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    padding: 12px;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.logo-item-small:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.logo-image-small {
    max-width: 100%;
    max-height: 60px;
    width: auto;
    height: auto;
    display: block;
}

@media (max-width: 992px) {
    .logo-grid-small {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
    }

    .logo-grid-small {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .logo-grid-small {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==============================================================================
   Produktverzeichnis/Dienstleistungsverzeichnis — Accordions
   ============================================================================== */

.pv-accordion-item, .sv-accordion-item {
    border-bottom: 1px solid #e0e0e0;
}

.pv-accordion-header, .sv-accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    color: #004494;
    user-select: none;
}

.pv-accordion-header:hover, .sv-accordion-header:hover {
    color: #FCCC06;
}

.pv-accordion-icon, .sv-accordion-icon {
    font-size: 18px;
    transition: transform 0.2s;
}

.pv-accordion-item.open .pv-accordion-icon, .sv-accordion-item.open .sv-accordion-icon {
    /* Icon text swapped via JS (+ → −) */
}

.pv-accordion-content, .sv-accordion-content {
    display: none;
    padding-bottom: 16px;
}

.pv-accordion-item.open .pv-accordion-content, .sv-accordion-item.open .sv-accordion-content {
    display: block;
}

.pv-no-results, .sv-no-results {
    padding: 20px 0;
    color: #666;
    font-style: italic;
}

/* ==============================================================================
   Hersteller Produkte — Category & Product Type list
   ============================================================================== */

.sw-hp-wrapper {
    margin: 20px 0;
}

.sw-hp-category {
    padding: 10px 0;
}

h3.sw-hp-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #004494;
    font-weight: 400;
    font-size: 24px;
    font-family: "PT Sans", sans-serif;
    margin: 0 0 8px 0;
    padding: 0 0 0 5px;
    line-height: 1.3;
}

.sw-hp-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    fill: rgb(252, 204, 6);
}

.sw-hp-types {
    color: #004494;
    font-size: 20px;
    font-family: "Nunito Sans", sans-serif;
    line-height: 1.7;
    margin: 0;
}

.sw-hp-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 10px 0;
}

@media (max-width: 768px) {
    h3.sw-hp-heading {
        font-size: 20px;
    }

    .sw-hp-types {
        font-size: 17px;
    }
}

/* ==============================================================================
   Hersteller Events — Event list [hersteller_events]
   ============================================================================== */

.sw-event-row {
    display: flex;
    align-items: stretch;
}

.sw-event-date {
    width: 100px;
    min-width: 100px;
    height: 100px;
    background-color: #004494;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.sw-event-day {
    font-size: 60px;
    font-weight: 600;
    font-family: "PT Sans", sans-serif;
    line-height: 1;
}

.sw-event-month {
    font-size: 18px;
    font-family: "PT Sans", sans-serif;
    white-space: nowrap;
}

.sw-event-info {
    flex: 1;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h3.sw-event-title {
    font-size: 25px;
    color: #004494;
    font-family: "Nunito Sans", sans-serif;
    font-weight: 500;
    margin: 0 0 5px 0;
}

.sw-event-desc {
    font-size: 16px;
    color: #000;
    margin: 0;
    line-height: 1.5;
}

.sw-event-list hr.sw-event-divider {
    border: none;
    border-top: 1px solid #d4d4d4;
    margin: 15px 0;
}

@media (max-width: 480px) {
    .sw-event-day {
        font-size: 40px;
    }

    .sw-event-date {
        width: 80px;
        min-width: 80px;
    }

    h3.sw-event-title {
        font-size: 20px;
    }
}

/* ==============================================================================
   Hersteller Beiträge — Article list [hersteller_beitraege]
   ============================================================================== */

.sw-beitrag-item {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
}

.sw-beitrag-item:first-child {
    padding-top: 0;
}

.sw-beitrag-thumb {
    width: 150px;
    min-width: 150px;
}

.sw-beitrag-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.sw-beitrag-thumb--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #f0f0f0;
    color: #ccc;
}

.sw-beitrag-thumb--placeholder svg {
    width: 40px;
    height: 40px;
}

.sw-beitrag-content {
    flex: 1;
    min-width: 0;
}

h3.sw-beitrag-title {
    margin: 0 0 5px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 1.3;
}

h3.sw-beitrag-title a {
    color: #004494;
    text-decoration: none;
}

h3.sw-beitrag-title a:hover {
    text-decoration: underline;
}

.sw-beitrag-excerpt {
    font-size: 14px;
    font-style: italic;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.sw-beitrag-meta {
    font-size: 13px;
    color: #888;
}

.sw-beitraege-more {
    display: inline-block;
    margin-top: 15px;
    color: #004494;
    font-size: 14px;
    text-decoration: none;
}

.sw-beitraege-more:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .sw-beitrag-thumb {
        width: 100px;
        min-width: 100px;
    }
}

/* ==============================================================================
   Hersteller Meet — Where to meet [hersteller_meet]
   ============================================================================== */

.sw-meet-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.sw-meet-item {
    text-align: center;
}

.sw-meet-image img {
    max-width: 200px;
    height: auto;
    display: block;
    margin-bottom: 8px;
}

.sw-meet-dates {
    font-size: 14px;
    color: #333;
}

/* ==============================================================================
   Inline List — Anwendungsbeispiele [hersteller_anwendungsbeispiele]
   ============================================================================== */

.sw-inline-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
}

.sw-list-item {
    color: #004494;
    text-decoration: none;
    font-size: 16px;
}

a.sw-list-item:hover {
    text-decoration: underline;
}

.sw-list-item + .sw-list-item::before {
    content: "//";
    color: #FCCC06;
    font-weight: 700;
    margin: 0 15px;
}

/* ==============================================================================
   Download Grid — Documents & Flyer [hersteller_dokumente] [hersteller_flyer]
   ============================================================================== */

.dl-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dl-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dl-item .fas.fa-file-pdf {
    font-size: 28px;
    color: #FCCC06;
}

.dl-item a {
    color: #004494;
    text-decoration: none;
    font-size: 16px;
}

.dl-item a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .dl-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .dl-grid-container {
        grid-template-columns: 1fr;
    }
}

/* ==============================================================================
   Gold Members Logo Slider [gold_members_slider] — Swiper carousel
   ============================================================================== */

.logo-carousel-wrapper {
    padding: 20px 0;
    width: 100%;
    position: relative;
}

/* FOUC prevention: before Swiper JS initializes, .swiper-slide has no width
   constraint and .logo-item's aspect-ratio: 1/1 lets each slide expand to
   a full-width square. Clip to a fixed 180px and hide until Swiper adds
   .swiper-initialized to the container. */
.logo-carousel-wrapper .swiper-logo:not(.swiper-initialized) {
    min-height: 180px;
    max-height: 180px;
    visibility: hidden;
}

.logo-carousel-wrapper .swiper-logo {
    width: 100%;
    padding: 15px 5px 35px 5px;
    overflow: hidden;
}

.logo-carousel-wrapper .swiper-logo .logo-item {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background-color: #ffffff;
    border: 1px solid #d4d4d4;
    aspect-ratio: 1 / 1;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-sizing: border-box;
}

.logo-carousel-wrapper .swiper-logo .logo-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px;
    background-origin: content-box;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.4s ease;
}

.logo-carousel-wrapper .swiper-logo .logo-item:hover {
    border-color: #004494;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    z-index: 10;
}

.logo-carousel-wrapper .swiper-logo .logo-item:hover .logo-image {
    filter: grayscale(0%);
    opacity: 1;
}

.logo-carousel-wrapper .swiper-logo .swiper-pagination {
    bottom: 0px;
}

.logo-carousel-wrapper .swiper-logo .swiper-pagination-bullet {
    background: #d4d4d4;
    opacity: 1;
    margin: 0 6px;
}

.logo-carousel-wrapper .swiper-logo .swiper-pagination-bullet-active {
    background: #004494;
    width: 20px;
    border-radius: 5px;
}

/* ==============================================================================
   Event Type Filter [event_type_filter]
   ============================================================================== */

.sw-event-type-filter {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.sw-event-type-filter label {
    font-weight: 600;
    color: #004494;
    font-size: 1rem;
}

.sw-event-type-filter select {
    padding: 8px 32px 8px 12px;
    border: 1px solid #e5e5e5;
    background: #fff;
    font-size: 1rem;
    min-width: 220px;
    cursor: pointer;
    border-radius: 2px;
}

.sw-event-type-filter select:focus {
    outline: 2px solid #FCCC06;
    outline-offset: 2px;
}

.sw-event-type-filter noscript button {
    padding: 8px 16px;
    background: #004494;
    color: #fff;
    border: 0;
    cursor: pointer;
}

/* ==============================================================================
   Hersteller Flyer Grid — Preview-image layout [hersteller_flyer]
   ============================================================================== */

.sw-hersteller-flyer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 20px 0;
}

.sw-hersteller-flyer-grid[data-columns="1"] { grid-template-columns: 1fr; }
.sw-hersteller-flyer-grid[data-columns="3"] { grid-template-columns: repeat(3, 1fr); }
.sw-hersteller-flyer-grid[data-columns="4"] { grid-template-columns: repeat(4, 1fr); }
.sw-hersteller-flyer-grid[data-columns="5"] { grid-template-columns: repeat(5, 1fr); }
.sw-hersteller-flyer-grid[data-columns="6"] { grid-template-columns: repeat(6, 1fr); }

.sw-hersteller-flyer-item {
    text-align: center;
}

.sw-hersteller-flyer-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.sw-hersteller-flyer-thumb {
    background: #f6f6f6;
    border: 1px solid #e5e5e5;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    transition: box-shadow .2s ease, transform .2s ease;
}

.sw-hersteller-flyer-thumb img {
    max-width: 100%;
    max-height: 100%;
    height: auto;
    object-fit: contain;
}

.sw-hersteller-flyer-fallback {
    font-size: 64px;
    color: #FCCC06;
}

.sw-hersteller-flyer-link:hover .sw-hersteller-flyer-thumb {
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    transform: translateY(-2px);
}

.sw-hersteller-flyer-title {
    margin: 12px 0 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #004494;
}

@media (max-width: 992px) {
    .sw-hersteller-flyer-grid,
    .sw-hersteller-flyer-grid[data-columns="3"],
    .sw-hersteller-flyer-grid[data-columns="4"],
    .sw-hersteller-flyer-grid[data-columns="5"],
    .sw-hersteller-flyer-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sw-hersteller-flyer-grid,
    .sw-hersteller-flyer-grid[data-columns="3"],
    .sw-hersteller-flyer-grid[data-columns="4"],
    .sw-hersteller-flyer-grid[data-columns="5"],
    .sw-hersteller-flyer-grid[data-columns="6"] {
        grid-template-columns: 1fr;
    }
}

/* Masonry variant — natural-aspect-ratio thumbnails arranged in CSS columns. */
.sw-hersteller-flyer-grid[data-layout="masonry"] {
    display: block;
    column-gap: 30px;
    column-count: 2;
}

.sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="1"] { column-count: 1; }
.sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="3"] { column-count: 3; }
.sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="4"] { column-count: 4; }
.sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="5"] { column-count: 5; }
.sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="6"] { column-count: 6; }

.sw-hersteller-flyer-grid[data-layout="masonry"] .sw-hersteller-flyer-item {
    display: inline-block;
    width: 100%;
    margin: 0 0 30px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.sw-hersteller-flyer-grid[data-layout="masonry"] .sw-hersteller-flyer-thumb {
    aspect-ratio: auto;
    height: auto;
    padding: 0;
    background: transparent;
    display: block;
}

.sw-hersteller-flyer-grid[data-layout="masonry"] .sw-hersteller-flyer-thumb img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: none;
    display: block;
    object-fit: initial;
}

/* Keep the icon-only fallback visible at a sane size in masonry mode. */
.sw-hersteller-flyer-grid[data-layout="masonry"] .sw-hersteller-flyer-thumb:not(:has(img)) {
    aspect-ratio: 3 / 4;
    display: flex;
    background: #f6f6f6;
    padding: 10px;
}

@media (max-width: 992px) {
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="3"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="4"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="5"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="6"] {
        column-count: 2;
    }
}

@media (max-width: 600px) {
    .sw-hersteller-flyer-grid[data-layout="masonry"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="2"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="3"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="4"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="5"],
    .sw-hersteller-flyer-grid[data-layout="masonry"][data-columns="6"] {
        column-count: 1;
    }
}

/* ==============================================================================
   Address Block (hersteller_adresse shortcode)
   ============================================================================== */

.sw-address-block {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 30px;
}

.sw-address-block .sw-address-content {
    flex: 1 1 300px;
    min-width: 0;
}

.sw-address-block .sw-address-logo-wrap {
    flex: 0 0 300px;
    width: 300px;
    height: 150px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

.sw-address-block .sw-address-logo {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

@media (max-width: 600px) {
    .sw-address-block {
        flex-direction: column-reverse;
    }
    .sw-address-block .sw-address-logo-wrap {
        flex: 0 0 auto;
        width: 200px;
        height: 100px;
    }
}

.sw-address-block .sw-address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sw-address-block .sw-address-list li {
    font-size: 1.1rem;
    color: #333;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 8px;
    line-height: 1.4;
}

.sw-address-block .sw-address-list li.sw-address-separator {
    margin-top: 20px;
}

.sw-address-block .sw-address-list li i {
    flex-shrink: 0;
    color: #fccc06;
    width: 20px;
    text-align: center;
    margin-top: 4px;
    font-size: 1.1rem;
}

.sw-address-block .sw-address-list li a {
    color: #004494;
    text-decoration: none;
    font-weight: 500;
    word-break: break-word;
}

.sw-address-block .sw-address-list li a:hover {
    text-decoration: underline;
}

.sw-address-block a.sw-address-profile-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 24px;
    background-color: #004494;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 8px;
    text-align: center;
}

.sw-address-block a.sw-address-profile-btn:hover {
    background-color: #003370;
    color: #fff;
}

/* ==============================================================================
   wp-link Modal — Refined for the Hersteller frontend ACF form
   Scoped under body.sw-frontend-form so admin / wp-admin is untouched.
   Goal: clean editorial look — Hersteller users only paste external URLs,
   so the internal-post search panel is hidden entirely.
   ============================================================================== */

body.sw-frontend-form #wp-link-backdrop {
    background: rgba(15, 22, 38, .55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100100;
    opacity: 1;
}

body.sw-frontend-form #wp-link-wrap {
    width: min(94vw, 480px);
    max-width: none;
    height: auto;
    max-height: 90vh;
    margin: 0;
    padding: 0;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: none;
    border-radius: 12px;
    box-shadow:
        0 24px 60px rgba(0, 30, 80, .22),
        0 4px 12px rgba(0, 30, 80, .08);
    overflow: hidden;
    z-index: 100105;
    font-family: inherit;
}

body.sw-frontend-form #wp-link-wrap form {
    margin: 0;
    padding: 0;
    display: block;
    height: auto;
}

/* Header */
body.sw-frontend-form #wp-link-wrap #link-modal-title {
    position: relative;
    margin: 0;
    padding: 24px 56px 20px 32px;
    background: #fff;
    color: #003981;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    border-bottom: none;
    line-height: 1.3;
}

body.sw-frontend-form #wp-link-wrap #link-modal-title::after {
    content: "";
    position: absolute;
    left: 32px;
    bottom: 12px;
    width: 36px;
    height: 3px;
    background: #FCCC06;
    border-radius: 2px;
}

/* Close (×) button */
body.sw-frontend-form #wp-link-wrap #wp-link-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

body.sw-frontend-form #wp-link-wrap #wp-link-close::before {
    font-size: 22px;
    line-height: 36px;
    color: inherit;
}

body.sw-frontend-form #wp-link-wrap #wp-link-close:hover {
    background: #f3f4f6;
    color: #003981;
}

/* Body — modal grows with content; no internal scroll.
   Override WP core's absolute positioning so the form fields appear in
   normal flow between the title and the submitbox. */
body.sw-frontend-form #wp-link-wrap #link-selector {
    padding: 8px 32px 24px;
    overflow: visible;
    height: auto;
    border: none;
    background: #fff;
    position: static;
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
    width: auto;
}

/* Defensive: make sure none of WP's other rules hide field rows */
body.sw-frontend-form #wp-link-wrap #link-options,
body.sw-frontend-form #wp-link-wrap #link-options > div,
body.sw-frontend-form #wp-link-wrap #link-options .wp-link-text-field,
body.sw-frontend-form #wp-link-wrap #link-options .link-target {
    display: block;
    height: auto;
}

/* "Gib die Ziel-URL ein" howto + the now-hidden "Oder verlinke…" howto */
body.sw-frontend-form #wp-link-wrap #link-options .howto {
    margin: 0 0 14px;
    padding: 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    border: none;
    background: none;
}

/* Field rows */
body.sw-frontend-form #wp-link-wrap #link-options > div {
    margin: 0 0 14px;
}

/* Stacked label/input layout. Avoids fighting WP's `label span { width: 120px }`
   in grid columns, which was clipping "URL"/"Link-Text" to one letter per line. */
body.sw-frontend-form #wp-link-wrap #link-options label {
    display: block;
    margin: 0;
}

body.sw-frontend-form #wp-link-wrap #link-options label > span:first-child {
    display: block;
    width: auto;
    margin: 0 0 6px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #1a3a6e;
    text-transform: uppercase;
    letter-spacing: .04em;
    text-align: left;
}

/* Inputs */
body.sw-frontend-form #wp-link-wrap input[type="text"],
body.sw-frontend-form #wp-link-wrap input[type="search"] {
    width: 100%;
    margin: 0;
    padding: 11px 14px;
    background: #fff;
    border: 1.5px solid #d4d4d4;
    border-radius: 6px;
    box-shadow: none;
    color: #111827;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.4;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.sw-frontend-form #wp-link-wrap input[type="text"]:focus,
body.sw-frontend-form #wp-link-wrap input[type="search"]:focus {
    border-color: #003981;
    box-shadow: 0 0 0 3px rgba(0, 57, 129, .12);
    outline: none;
}

/* "Link in einem neuen Tab öffnen" — recover the broken inline label layout */
body.sw-frontend-form #wp-link-wrap .link-target {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

body.sw-frontend-form #wp-link-wrap .link-target label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}

body.sw-frontend-form #wp-link-wrap .link-target label > span:first-child {
    display: none;
}

/* Override WP's `width: 120px` on the visible "öffnen" text span so it stays
   inline next to the checkbox instead of wrapping one word per line. */
body.sw-frontend-form #wp-link-wrap .link-target label > span:nth-child(n+2) {
    display: inline;
    width: auto;
}

body.sw-frontend-form #wp-link-wrap .link-target input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: #003981;
}

/* Hide the dead "search internal posts" UI for Hersteller users */
body.sw-frontend-form #wp-link-wrap #wplink-link-existing-content,
body.sw-frontend-form #wp-link-wrap #search-panel {
    display: none;
}

/* Defensive: in case the panel is ever shown again (admins), keep notices hidden */
body.sw-frontend-form #wp-link-wrap .query-notice-default,
body.sw-frontend-form #wp-link-wrap li.no-matches-found em {
    display: none;
}

/* Footer / submit row — overrides WP core's `position: absolute; bottom: 0`
   so the buttons stay in normal flow under the form fields. */
body.sw-frontend-form #wp-link-wrap .submitbox {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 18px 32px;
    background: #fafbfc;
    border-top: 1px solid #ececec;
    position: static;
    bottom: auto;
    left: auto;
    right: auto;
    height: auto;
    z-index: auto;
}

body.sw-frontend-form #wp-link-wrap #wp-link-cancel {
    margin: 0;
    padding: 0;
    line-height: 1;
}

body.sw-frontend-form #wp-link-wrap #wp-link-cancel a,
body.sw-frontend-form #wp-link-wrap #wp-link-cancel button {
    display: inline-block;
    padding: 11px 18px;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: 6px;
    color: #6b7280;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}

body.sw-frontend-form #wp-link-wrap #wp-link-cancel a:hover,
body.sw-frontend-form #wp-link-wrap #wp-link-cancel button:hover {
    color: #003981;
    background: #eef2f7;
}

body.sw-frontend-form #wp-link-wrap #wp-link-update {
    margin: 0;
    padding: 0;
}

body.sw-frontend-form #wp-link-wrap input#wp-link-submit {
    display: inline-block;
    margin: 0;
    padding: 11px 22px;
    background: #003981;
    border: 1.5px solid #003981;
    border-radius: 6px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 57, 129, .25);
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

body.sw-frontend-form #wp-link-wrap input#wp-link-submit:hover {
    background: #002a63;
    border-color: #002a63;
    box-shadow: 0 4px 12px rgba(0, 57, 129, .35);
    transform: translateY(-1px);
}

body.sw-frontend-form #wp-link-wrap input#wp-link-submit:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(252, 204, 6, .55), 0 2px 6px rgba(0, 57, 129, .25);
}

/* Mobile */
@media (max-width: 600px) {
    body.sw-frontend-form #wp-link-wrap #link-modal-title {
        padding: 20px 52px 18px 22px;
        font-size: 17px;
    }

    body.sw-frontend-form #wp-link-wrap #link-modal-title::after {
        left: 22px;
    }

    body.sw-frontend-form #wp-link-wrap #link-selector {
        padding: 6px 22px 18px;
    }

    body.sw-frontend-form #wp-link-wrap #link-options label {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    body.sw-frontend-form #wp-link-wrap #link-options label > span:first-child {
        margin-bottom: 0;
    }

    body.sw-frontend-form #wp-link-wrap .submitbox {
        padding: 14px 22px;
    }
}
