/* style.css */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #333;
    padding: 30px;
    text-align: center;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2em;
    opacity: 0.8;
}

.gold-price-section {
    background: #f8f9fa;
    padding: 20px;
    border-bottom: 2px solid #e9ecef;
    text-align: center;
}

.gold-price-display {
    font-size: 1.4em;
    font-weight: bold;
    color: #d4af37;
    margin: 10px 0;
}

.calculator-section {
    padding: 20px;
}

/* Tabs Styling */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 10px 10px 0 0;
    overflow-x: auto;
}

.tab {
    padding: 15px 25px;
    background: #e9ecef;
    border: none;
    cursor: pointer;
    font-size: 1em;
    font-weight: 600;
    color: #6c757d;
    transition: all 0.3s ease;
    white-space: nowrap;
    border-right: 1px solid #dee2e6;
}

.tab:last-child {
    border-right: none;
}

.tab:hover {
    background: #dee2e6;
}

.tab.active {
    background: white;
    color: #007bff;
    border-bottom: 3px solid #007bff;
}

.tab-content {
    display: none;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 0;
}

.tab-content.active {
    display: block;
}

/* Table Styling */
.parts-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.parts-table th {
    background: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
}

.parts-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.parts-table tr:hover {
    background: #f8f9fa;
}

.part-name {
    font-weight: 600;
    color: #2c3e50;
}

.part-description {
    color: #6c757d;
    font-size: 0.9em;
    margin-top: 5px;
}

.gold-content {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    display: inline-block;
}

.price-info {
    background: #e8f5e8;
    color: #28a745;
    padding: 6px 12px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9em;
    display: inline-block;
    cursor: help;
    transition: all 0.3s ease;
}

.price-info:hover {
    background: #d4edda;
    transform: scale(1.05);
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-input {
    width: 80px;
    padding: 8px;
    border: 2px solid #ddd;
    border-radius: 5px;
    text-align: center;
    font-size: 1em;
}

.qty-btn {
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    width: 35px;
    height: 35px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.3s ease;
}

.qty-btn:hover {
    background: #0056b3;
}

.total-price {
    font-weight: 600;
    color: #28a745;
    font-size: 1.1em;
}

.summary-section {
    background: #e8f5e8;
    border: 2px solid #28a745;
    border-radius: 10px;
    padding: 25px;
    margin-top: 30px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.total-row {
    font-size: 1.4em;
    font-weight: bold;
    color: #2c3e50;
    border-top: 2px solid #28a745;
    padding-top: 15px;
    margin-top: 15px;
}

.submit-section {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: #007bff;
}

footer {
    text-align: center;
    padding: 20px;
    background: #2c3e50;
    color: white;
    margin-top: 30px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.error-container {
    text-align: center;
    padding: 50px 20px;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    border-radius: 10px;
    margin: 20px 0;
}

.error-title {
    color: #721c24;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.error-message {
    color: #721c24;
    font-size: 1.1em;
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-info {
    background: white;
    padding: 25px;
    border-radius: 10px;
    display: inline-block;
    text-align: left;
    margin: 0 auto;
}

.contact-info h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.retry-button {
    padding: 12px 25px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 20px;
}

.retry-button:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab {
        flex: 1;
        min-width: 120px;
        text-align: center;
    }
    
    .parts-table {
        display: block;
        overflow-x: auto;
    }
    
    .parts-table th,
    .parts-table td {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .quantity-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .quantity-input {
        width: 60px;
    }
    
    .qty-btn {
        width: 30px;
        height: 30px;
        font-size: 1em;
    }
    
    h1 {
        font-size: 2em;
    }
    
    .container {
        margin: 10px;
        border-radius: 10px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .tab {
        padding: 12px 15px;
        font-size: 0.9em;
    }
    
    .parts-table {
        font-size: 0.8em;
    }
    
    .submit-btn {
        padding: 12px 25px;
        font-size: 1.1em;
        width: 100%;
    }
}
/* Product Images Styling - ZU CSS HINZUFÜGEN */
.product-image-container {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    opacity: 0;
    border-radius: 6px;
}

.product-image:hover {
    transform: scale(1.1);
}

/* Leerer Platzhalter wenn kein Bild */
.no-image {
    width: 60px;
    height: 60px;
    background: transparent;
}

/* Tabellen-Spalten anpassen für Bilder */
.parts-table th:first-child,
.parts-table td:first-child {
    width: 80px;
    text-align: center;
}

/* Responsive Anpassungen für Bilder */
@media (max-width: 768px) {
    .product-image-container {
        width: 50px;
        height: 50px;
    }
    
    .no-image {
        width: 50px;
        height: 50px;
    }
    
    .parts-table th:first-child,
    .parts-table td:first-child {
        width: 60px;
    }
}

@media (max-width: 480px) {
    .product-image-container {
        width: 40px;
        height: 40px;
    }
    
    .no-image {
        width: 40px;
        height: 40px;
    }
    
    .parts-table th:first-child,
    .parts-table td:first-child {
        width: 50px;
    }
}
/* Erweiterte Bild-Styling - ZU CSS HINZUFÜGEN */
.product-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.product-image-container:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.product-picture {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0;
    border-radius: 6px;
}

.product-image.loaded {
    opacity: 1;
}

/* Slideshow Controls */
.image-slider-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 2px 5px;
    font-size: 0.7em;
}

.slider-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0 5px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.image-counter {
    font-size: 0.8em;
    font-weight: bold;
}

/* Leerer Platzhalter wenn kein Bild */
.no-image {
    width: 80px;
    height: 80px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 0.8em;
    text-align: center;
}

/* Tabellen-Spalten anpassen für größere Bilder */
.parts-table th:first-child,
.parts-table td:first-child {
    width: 100px;
    text-align: center;
}

/* Responsive Anpassungen für Bilder */
@media (max-width: 768px) {
    .product-image-container {
        width: 70px;
        height: 70px;
    }
    
    .no-image {
        width: 70px;
        height: 70px;
    }
    
    .parts-table th:first-child,
    .parts-table td:first-child {
        width: 80px;
    }
    
    .image-slider-controls {
        font-size: 0.6em;
        padding: 1px 3px;
    }
}

@media (max-width: 480px) {
    .product-image-container {
        width: 60px;
        height: 60px;
    }
    
    .no-image {
        width: 60px;
        height: 60px;
    }
    
    .parts-table th:first-child,
    .parts-table td:first-child {
        width: 70px;
    }
    
    .image-slider-controls {
        display: none !important; /* Auf Mobile keine Slideshow Controls */
    }
}

/* Hover-Effekt für Bilder mit Slideshow */
.product-image-container.has-slideshow:hover .image-slider-controls {
    display: flex;
}

/* Vereinfachtes Bild-Styling - ZU CSS HINZUFÜGEN */
.product-image-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0;
    border-radius: 6px;
}

.product-image:hover {
    transform: scale(1.05);
}

/* Leerer Platzhalter wenn kein Bild */
.no-image {
    width: 80px;
    height: 80px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 1.5em;
}

/* Tabellen-Spalten anpassen für Bilder */
.parts-table th:first-child,
.parts-table td:first-child {
    width: 100px;
    text-align: center;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .product-image-container {
        width: 60px;
        height: 60px;
    }
    
    .no-image {
        width: 60px;
        height: 60px;
        font-size: 1.2em;
    }
}

@media (max-width: 480px) {
    .product-image-container {
        width: 50px;
        height: 50px;
    }
    
    .no-image {
        width: 50px;
        height: 50px;
        font-size: 1em;
    }
}
/* Lightbox Styling - KORRIGIERT */
.lightbox {
    position: fixed;
    z-index: 10000; /* Höhere z-index */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none; /* Standardmäßig versteckt */
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: lightboxFadeIn 0.3s ease forwards;
}

@keyframes lightboxFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: -15px;
    right: -15px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 107, 107, 0.9);
    transform: scale(1.1);
}

.lightbox-controls {
    position: absolute;
    bottom: -80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    color: white;
}

.lightbox-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: none; /* Standardmäßig versteckt */
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-counter {
    font-size: 18px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 20px;
    border-radius: 25px;
    min-width: 100px;
}

/* Größere Produktbilder */
.product-image-container {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    border: 3px solid #e9ecef;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-image-container:hover {
    border-color: #007bff;
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    opacity: 0;
}

.product-image.loaded {
    opacity: 1;
}

/* Image Overlay mit Zoom-Icon */
.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-image-container:hover .image-overlay {
    opacity: 1;
}

.zoom-icon {
    font-size: 24px;
    color: white;
    background: rgba(0, 123, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.product-image-container:hover .zoom-icon {
    transform: scale(1);
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    .lightbox-content {
        max-width: 95%;
        padding: 15px;
    }
    
    .lightbox-close {
        top: -10px;
        right: -10px;
        width: 40px;
        height: 40px;
        font-size: 28px;
    }
    
    .lightbox-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .lightbox-controls {
        bottom: -60px;
        gap: 20px;
    }
}
/* Lightbox Loading Improvements */
.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    background: rgba(30, 30, 30, 0.9);
    border-radius: 15px;
    padding: 30px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 10px;
    transition: opacity 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* Loading Animation */
.loading-dots {
    display: inline-block;
    color: white;
    font-size: 1.2em;
}

.loading-dots::after {
    content: '';
    animation: dots 1.5s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}

/* No Images Message */
.no-images-message {
    color: white;
    text-align: center;
    padding: 40px 20px;
}

.no-images-message p {
    margin: 0;
    font-size: 1.1em;
    opacity: 0.8;
}