/* sellx Sponsored Products - Clean CSS */

.sponsored-products-container {
    margin: 20px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    animation: none;
}

/* Header Section */
.sponsored-header {
    padding: 0 0 16px 0;
    border-bottom: none;
    background: transparent;
}

.sponsored-brand-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.sponsored-logo {
    display: none; /* Logo verstecken für natürlicheren Look */
}

.sponsored-brand-name {
    font-weight: 600;
    font-size: 14px;
    color: #232f3e;
}

.sponsored-headline-cta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.sponsored-headline h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #333;
}

.sponsored-cta-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0066c0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
}

.sponsored-cta-link:hover {
    color: #c7511f;
    text-decoration: underline;
}

.sponsored-cta-link svg {
    width: 5px;
    height: 7px;
    fill: currentColor;
}

/* Content Container */
.sponsored-content-container {
    display: flex;
    position: relative;
    background: transparent;
    min-height: 280px;
    border-radius: 8px;
    overflow: hidden;
}

.sponsored-background-section {
    flex: 0 0 30%;
    min-height: 280px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px 0 0 8px;
}

.sponsored-lifestyle-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.sponsored-lifestyle-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Produkte Section - Carousel */
.sponsored-products-section {
    flex: 1; /* Nimmt den restlichen verfügbaren Platz ein */
    padding: 16px 50px 16px 16px; /* Mehr Platz rechts für Navigation */
    background: #f8f9fa;
    position: relative;
    min-width: 0; /* Verhindert Overflow-Probleme */
    border-radius: 0 8px 8px 0;
}

/* Carousel Container */
.sponsored-products-carousel {
    position: relative;
    width: 100%;
    overflow: visible; /* Navigation Buttons sichtbar machen */
}

.sponsored-carousel-container {
    overflow: hidden;
    width: 100%;
    margin: 0 20px; /* Platz für die Navigation-Buttons */
}

.sponsored-carousel-track {
    display: flex;
    transition: transform 0.3s ease;
    gap: 16px;
}

/* Einzelne Carousel Items */
.sponsored-carousel-item {
    flex: 0 0 calc(33.333% - 11px); /* 3 Items pro Zeile */
    min-width: 140px;
}

/* Bei weniger als 3 Produkten: Normale Anzeige */
.sponsored-products-carousel[data-product-count="1"] .sponsored-carousel-item {
    flex: 0 0 100%;
    max-width: 300px;
    margin: 0 auto;
}

.sponsored-products-carousel[data-product-count="2"] .sponsored-carousel-item {
    flex: 0 0 calc(50% - 8px);
}

.sponsored-products-carousel[data-product-count="3"] .sponsored-carousel-item {
    flex: 0 0 calc(33.333% - 11px);
}

/* Navigation Buttons - Alternative Positionierung */
.sponsored-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.sponsored-nav-btn:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: #0066c0;
}

.sponsored-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.sponsored-nav-prev {
    left: -12px; /* Außerhalb des Carousel-Containers */
}

.sponsored-nav-next {
    right: -12px; /* Außerhalb des Carousel-Containers */
}

.sponsored-nav-btn svg {
    width: 8px;
    height: 14px;
    color: #333;
}

.sponsored-nav-btn:hover svg {
    color: #0066c0;
}

.sponsored-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.sponsored-nav-btn:disabled:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-color: #ddd;
}

.sponsored-nav-btn:disabled svg {
    color: #333;
}

/* Navigation Buttons - Responsive */
@media (max-width: 768px) {
    .sponsored-nav-prev {
        left: -12px;
    }
    
    .sponsored-nav-next {
        right: -12px;
    }
    
    .sponsored-carousel-container {
        margin: 0 16px; /* Weniger Margin auf kleineren Bildschirmen */
    }
}

/* Indicator Dots */
.sponsored-carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 0 16px;
}

.sponsored-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #ddd;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sponsored-indicator.active,
.sponsored-indicator:hover {
    background: #0066c0;
}

/* Touch/Swipe Support */
.sponsored-carousel-container {
    touch-action: pan-y;
    user-select: none;
}

.sponsored-carousel-track {
    cursor: grab;
}

.sponsored-carousel-track:active {
    cursor: grabbing;
}

.sponsored-carousel-track.is-dragging {
    transition: none;
}

/* Einzelne Produkt Items */
.sponsored-item {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e9ecef;
}

.sponsored-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.sponsored-product-link {
    text-decoration: none;
    color: inherit;
}

.sponsored-product-link:focus {
    outline: 2px solid #007185;
    outline-offset: 2px;
}

.sponsored-image-container {
    position: relative;
    aspect-ratio: 1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e7e7e7;
}

.sponsored-product-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.sponsored-product-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: opacity 0.3s ease;
}

.sponsored-product-img[src=""] {
    opacity: 0;
}

.sponsored-no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
    color: #999;
    font-size: 24px;
}

.sponsored-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    transition: background 0.2s ease;
}

.sponsored-item:hover .sponsored-image-overlay {
    background: rgba(0,0,0,0.05);
}

/* Produkt Info */
.sponsored-product-info {
    padding: 12px 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sponsored-product-title {
    flex: 1;
}

.sponsored-title-link {
    text-decoration: none;
    color: #0066c0;
    display: block;
}

.sponsored-title-link:hover {
    color: #c7511f;
    text-decoration: underline;
}

.sponsored-product-name-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.3;
    font-weight: 400;
}

/* Bewertungen */
.sponsored-rating-link {
    text-decoration: none;
    color: inherit;
}

.sponsored-rating-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sponsored-stars {
    display: flex;
    gap: 1px;
}

.sponsored-star {
    width: 12px;
    height: 12px;
    position: relative;
}

.sponsored-star-filled::before {
    content: "★";
    color: #ffa41c;
    font-size: 12px;
}

.sponsored-star-half::before {
    content: "☆";
    color: #ffa41c;
    font-size: 12px;
}

.sponsored-star-empty::before {
    content: "☆";
    color: #ddd;
    font-size: 12px;
}

.sponsored-rating-count {
    font-size: 12px;
    color: #0066c0;
    font-weight: 400;
}

.sponsored-rating-link:hover .sponsored-rating-count {
    color: #c7511f;
    text-decoration: underline;
}

/* Ad Label */
.ad-label-container {
    padding: 8px 0;
    border-top: none;
    background: transparent;
}

.ad-label {
    display: flex;
    justify-content: flex-end;
}

.ad-feedback-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #888;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s ease;
    border: none;
    background: none;
    opacity: 0.7;
}

.ad-feedback-link:hover {
    background: rgba(0,0,0,0.05);
}

.sponsored-text {
    font-weight: 400;
}

.info-icon {
    font-size: 10px;
    opacity: 0.7;
}

/* Sponsored Info Modal */
.sponsored-info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.sponsored-info-modal.show {
    display: flex;
}

.sponsored-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.sponsored-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.sponsored-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e7e7e7;
    background: #f8f9fa;
}

.sponsored-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #232f3e;
}

.sponsored-modal-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.sponsored-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.sponsored-modal-close svg {
    width: 14px;
    height: 14px;
    color: #666;
}

.sponsored-modal-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.sponsored-info-section {
    margin-bottom: 24px;
}

.sponsored-info-section:last-child {
    margin-bottom: 0;
}

.sponsored-info-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
    color: #232f3e;
}

.sponsored-info-section h5 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #0066c0;
}

.sponsored-info-section p {
    margin: 0 0 8px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.sponsored-info-section p:last-child {
    margin-bottom: 0;
}

/* Advertiser Info */
.sponsored-advertiser-info {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e7e7e7;
}

.sponsored-advertiser-logo {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsored-advertiser-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sponsored-advertiser-details {
    flex: 1;
}

.sponsored-advertiser-details a {
    color: #0066c0;
    text-decoration: none;
}

.sponsored-advertiser-details a:hover {
    color: #c7511f;
    text-decoration: underline;
}

.sponsored-advertiser-details small {
    color: #666;
    font-size: 12px;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .sponsored-info-modal {
        padding: 10px;
    }
    
    .sponsored-modal-content {
        max-height: 90vh;
        border-radius: 8px;
    }
    
    .sponsored-modal-header {
        padding: 16px 20px;
    }
    
    .sponsored-modal-header h3 {
        font-size: 16px;
    }
    
    .sponsored-modal-body {
        padding: 20px;
        max-height: calc(90vh - 70px);
    }
    
    .sponsored-advertiser-info {
        flex-direction: column;
        text-align: center;
    }
    
    .sponsored-advertiser-logo {
        align-self: center;
    }
}

/* Positionsspezifische Styles */
.sponsored-products-container[data-position="top"] {
    order: -1;
    margin-bottom: 30px;
}

.sponsored-products-container[data-position="bottom"] {
    order: 999;
    margin-top: 30px;
}

.sponsored-products-container[data-position="middle"] {
    margin: 25px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sponsored-content-container {
        flex-direction: column;
    }
    
    .sponsored-background-section {
        flex: none;
        min-height: 200px;
    }
    
    .sponsored-products-section {
        flex: none;
        padding: 12px 32px 12px 12px; /* Angepasstes Padding für Mobile */
    }
    
    /* Carousel: 2 Items pro Zeile auf Tablets */
    .sponsored-carousel-item {
        flex: 0 0 calc(50% - 8px);
    }
    
    .sponsored-products-carousel[data-product-count="1"] .sponsored-carousel-item {
        flex: 0 0 100%;
    }
    
    .sponsored-brand-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .sponsored-headline-cta {
        align-items: flex-start;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .sponsored-products-container {
        margin: 15px -15px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    /* Carousel: 1 Item pro Zeile auf Mobile */
    .sponsored-carousel-item {
        flex: 0 0 100%;
    }
    
    .sponsored-carousel-track {
        gap: 12px;
    }
    
    .sponsored-header {
        padding: 12px 16px;
    }
    
    .sponsored-products-section {
        padding: 12px 24px 12px 12px; /* Reduziertes Padding für sehr kleine Bildschirme */
    }
    
    /* Navigation Buttons kleiner auf Mobile */
    .sponsored-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .sponsored-nav-btn svg {
        width: 6px;
        height: 12px;
    }
    
    .sponsored-carousel-container {
        margin: 0 12px; /* Noch weniger Margin auf sehr kleinen Bildschirmen */
    }
}

/* Animationen */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .sponsored-item,
    .sponsored-product-img,
    .sponsored-products-container {
        transition: none;
        animation: none;
    }
    
    .sponsored-item:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .sponsored-products-container {
        border-color: #000;
        border-width: 2px;
    }
    
    .sponsored-item {
        border: 1px solid #000;
    }
}