/* tarifwahl_detail.css - Modernes Sticky-Layout & Listen-Ansicht */

:root {
    --primary-color: #f6a32d; /* SimDiscount Orange - matched with design1_minimal.css */
    --secondary-color: #333;
    --bg-color: #f9f9f9;
    --card-bg: #ffffff;
    --text-color: #444;
    --border-radius: 8px;
    --spacing: 1rem;
    --sidebar-width: 320px;
}

/* Hero & Layout Wrapper */
.detail-hero {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
}

/* Desktop: Sticky sidebar */
.detail-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
}

@media (max-width: 992px) {
    .detail-layout {
        grid-template-columns: 1fr; /* Stack on mobile/tablet */
        gap: 2rem;
    }

    .detail-sidebar {
        position: static; /* No sticky on mobile */
        max-width: 500px;
        margin: 0 auto;
    }

    .selection-area {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 1.5rem; /* Space between color and storage options */
        justify-content: center; /* Center items horizontally */
        border-top: 1px solid #eee;
        padding-top: 1.5rem;
    }

    .availability-section {
        flex-basis: 100%;
        text-align: center;
        margin-bottom: 0.5rem !important; /* Reduce margin as gap handles spacing */
    }

    .color-options, .storage-options {
        flex: 1 1 auto; /* Allow items to grow/shrink and wrap */
        min-width: 150px; /* Ensure a minimum width before wrapping */
        text-align: center; /* Center labels and selectors */
    }

    .option-label {
        text-align: center;
    }

    .color-selector-wrapper, .storage-selector-wrapper {
        justify-content: center; /* Center the actual selectors */
    }
}

/* Sticky Sidebar (Left) */

.sidebar-inner h1 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
    line-height: 1.3;
    text-align: center;
}

.product-image-stage {
    text-align: center;
    margin-bottom: 1.5rem;
}

.product-image-stage img {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
}

.energy-label-container {
    margin-top: 0.5rem;
}

.energy-label-container img {
    height: 35px;
    width: auto;
}

/* Selection Area inside Sidebar */
.selection-area {
    border-top: 1px solid #eee;
    padding-top: 1rem;
}

.option-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.availability-badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.8rem;
    font-weight: 600;
}

.availability-badge img {
    height: 12px;
    margin-right: 4px;
    vertical-align: middle;
}

.product-details-link {
    color: #888;
    text-decoration: none;
    margin-top: 1.0rem; /* Increased spacing */
    display: block; /* Ensure margin-top is applied correctly */
    font-size: 0.8rem; /* Re-added from inline style */
}

.product-details-link:hover {
    text-decoration: underline;
    color: var(--primary-color);
}

/* Colors & Storage Selectors - Compact */
.color-selector-wrapper, .storage-selector-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-selector input, .storage-selector input { display: none; }

.color-selector label {
    display: block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ddd;
    cursor: pointer;
}

.color-selector label.checked-label {
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--primary-color);
}

.storage-selector label {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s;
    font-weight: 500;
}

.storage-selector label:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.storage-selector label.checked-label {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}


/* Content Area (Right) - Tariff List */
.detail-content {
    min-width: 0; /* Prevent grid blowout */
}

.section-title {
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

/* Tariff List Styles */
.tarife-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tarif-card-row {
    background: white;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1.2fr; /* Name | Features | Preis/Action */
    gap: 1.5rem;
    align-items: center;
    transition: box-shadow 0.2s, transform 0.1s;
}

.tarif-card-row:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border-color: #ddd;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .tarif-card-row {
        grid-template-columns: 1fr; /* Stack on mobile */
        gap: 1rem;
        text-align: center;
        padding: 1.5rem;
    }
}

/* Col 1: Info */
.tarif-col-info {
    border-right: 1px solid #f0f0f0;
    padding-right: 1.5rem;
}

@media (max-width: 768px) { .tarif-col-info { border-right: none; border-bottom: 1px solid #f0f0f0; padding-right: 0; padding-bottom: 1rem; } }

.tarif-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.tarif-features-compact {
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

@media (max-width: 768px) { .tarif-features-compact { justify-content: center; } }

.tarif-features-compact li {
    background: #f4f4f4;
    padding: 2px 8px;
    border-radius: 4px;
}

.tarif-links-row {
    font-size: 0.8rem;
}
.tarif-links-row a {
    color: #888;
    text-decoration: underline;
    margin-right: 10px;
}

/* Col 2: Features */
.tarif-col-features {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
}

.feature-item {
    margin-bottom: 0.2rem;
}

.tooltip-icon {
    color: #aaa;
    cursor: help;
    font-size: 0.8em;
    margin-left: 2px;
}

/* Col 3: Price */
.tarif-col-price {
    text-align: right;
    padding-left: 1rem;
}

@media (max-width: 768px) { .tarif-col-price { text-align: center; padding-left: 0; padding-top: 0.5rem; } }

.main-price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
}

.main-price small {
    font-size: 0.9rem;
    font-weight: 400;
    color: #888;
}

.device-price-small {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0 1rem 0;
}



/* SEO Text */
.seo-text-block {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #666;
    line-height: 1.6;
}

.seo-text-block h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #333;
}

.seo-text-block ul {
    list-style: disc;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.seo-text-block ol {
    list-style: decimal;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
}

.seo-text-block li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* ... previous CSS content ... */

/* Fancybox mit Padding für begrenzte Breite auf Desktop */
.fancybox-slide {
	padding: 10vh 10vw !important;
}

/* Mobile Compact View Optimizations */
@media (max-width: 768px) {
    .detail-hero {
        padding: 1rem 0; /* Reduced padding */
        margin-bottom: 1rem;
    }

    .sidebar-inner h1 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .product-image-stage {
        margin-bottom: 0.5rem;
    }

    .product-image-stage img {
        max-height: 200px; /* Smaller image on mobile */
    }

    .selection-area {
        padding-top: 0.8rem;
        gap: 0.8rem;
    }
    
    .availability-section {
        margin-bottom: 0.2rem !important;
    }

    .option-label {
        font-size: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .color-selector-wrapper, .storage-selector-wrapper {
        margin-bottom: 0.5rem;
    }
}