/**
 * GLASHELD Glaskonfigurator - Frontend Styles
 */

/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Konfigurator-Container */
.glasheld-configurator {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 30px 0;
    overflow: hidden;
}

.glasheld-configurator-header {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.glasheld-configurator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.glasheld-configurator-header .description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.glasheld-configurator-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px;
    width: 100%;
}

/* Linke Seite - Vorschau */
.glasheld-configurator-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glasheld-preview-section {
    width: 100%;
    text-align: center;
}

.glasheld-preview-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #0066cc;
}

.glass-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.glass-shape {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.6) 30%, 
        rgba(240, 248, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.4) 70%, 
        rgba(255, 255, 255, 0.7) 100%);
    border: none;
    border-radius: 0; /* Keine abgerundeten Ecken - das ist eine Zusatzoption */
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 102, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 102, 204, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 auto;
}

/* Glaskante-Effekt */
.glass-shape::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        transparent 30%, 
        transparent 70%, 
        rgba(0, 102, 204, 0.1) 100%);
    pointer-events: none;
}

/* Glaskante-Rand */
.glass-shape::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(0, 102, 204, 0.3) 50%, 
        rgba(255, 255, 255, 0.4) 100%);
    z-index: -1;
    filter: blur(0.5px);
}

.glasheld-format-circle .glass-shape {
    border-radius: 50%;
}

.glasheld-format-oval .glass-shape {
    border-radius: 50%;
    transform: scaleX(1.5);
}

.glasheld-format-rectangle .glass-shape {
    border-radius: 0; /* Keine abgerundeten Ecken - das ist eine Zusatzoption */
}

.glasheld-format-triangle .glass-shape {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

.glasheld-format-triangle .glass-shape::before,
.glasheld-format-triangle .glass-shape::after {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

/* Polierte Kanten Visualisierung - subtiler geschliffener Rand */
.glasheld-polished-edges {
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0, 102, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 102, 204, 0.2),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        0 0 0 6px rgba(255, 255, 255, 0.1);
}

.glasheld-polished-edges::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 75%, 
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: inherit;
    z-index: -1;
}

/* Spezielle Behandlung für Dreieck - verstärkter Effekt */
.glasheld-format-triangle.glasheld-polished-edges::before {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.4) 25%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.4) 75%, 
        rgba(255, 255, 255, 0.6) 100%);
}

/* Dreieck mit polierten Kanten - verstärkte Box-Shadow */
.glasheld-format-triangle.glasheld-polished-edges {
    box-shadow: 
        0 15px 50px rgba(0, 102, 204, 0.5),
        inset 0 3px 0 rgba(255, 255, 255, 0.95),
        inset 0 -3px 0 rgba(0, 102, 204, 0.4),
        0 0 0 6px rgba(255, 255, 255, 0.6),
        0 0 0 10px rgba(255, 255, 255, 0.3),
        0 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Hover-Effekt für mehr Interaktivität */
.glass-shape:hover {
    transform: scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 102, 204, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 102, 204, 0.3);
}

.glasheld-preview-controls {
    margin-top: 20px;
}

.glasheld-preview-btn {
    font-family: var(--theme-button-font-family, var(--theme-font-family));
    font-size: var(--theme-button-font-size);
    font-weight: var(--theme-button-font-weight);
    font-style: var(--theme-button-font-style);
    line-height: var(--theme-button-line-height);
    letter-spacing: var(--theme-button-letter-spacing);
    text-transform: var(--theme-button-text-transform);
    background-color: var(--theme-button-background-initial-color);
    color: var(--theme-button-text-initial-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: none;
}

.glasheld-preview-btn:hover {
    background-color: var(--theme-button-background-hover-color);
    color: var(--theme-button-text-hover-color);
    transform: none;
    box-shadow: none;
}

/* Rechte Seite - Konfigurator */
.glasheld-configurator-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glasheld-section {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.glasheld-section-header {
    background: white;
    padding: 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.glasheld-section-header:hover {
    background: #f1f3f4;
}

.glasheld-section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0066cc;
    font-weight: 600;
}

.glasheld-section-header i {
    transition: transform 0.3s ease;
}

.glasheld-section-content {
    padding: 20px;
    display: none;
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section-content.active {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

/* Maße-Eingaben */
.glasheld-dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.glasheld-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.glasheld-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.glasheld-input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Dimensions-Hinweise */
.glasheld-dimension-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-style: italic;
}

.glasheld-dimension-hint i {
    color: #0066cc;
    font-size: 0.8rem;
}

/* Dimensions-Linien in der Vorschau */
.glasheld-dimension-line {
    position: absolute;
    background: #000;
    z-index: 5;
    pointer-events: none;
}

.glasheld-dimension-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    font-family: Arial, sans-serif;
}


/* Container für Format-Auswahl */
.glasheld-section-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Konfigurator-Sektionen */
.glasheld-configurator-sections {
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section {
    width: 100% !important;
    max-width: 100% !important;
}



/* Format-Grid - EINFACH UND EFFEKTIV */
.glasheld-format-options {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Container-Breite sicherstellen */
.glasheld-configurator-content {
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section-content {
    width: 100% !important;
    max-width: 100% !important;
}


/* Format-Optionen */
.glasheld-format-option {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 15px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: white !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Responsive Anpassung für Format-Auswahl */
@media (max-width: 768px) {
    .glasheld-format-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .glasheld-format-options {
        grid-template-columns: 1fr;
    }
}


.glasheld-format-option:hover {
    border-color: #0066cc;
    background: #f8f9ff;
}

.glasheld-format-option.active {
    border-color: #0066cc !important;
    background: #0066cc !important;
    color: white !important;
}

.glasheld-format-option.active .glasheld-format-icon svg {
    fill: white !important;
    stroke: white !important;
}

/* Sicherstellen, dass aktive Klasse überschreibt */
.glasheld-format-option.active:hover {
    border-color: #0066cc !important;
    background: #0066cc !important;
    color: white !important;
}

.glasheld-format-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glasheld-format-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
}

.glasheld-format-option i {
    font-size: 1.2rem;
}

/* Veredelungs-Auswahl */
.glasheld-finishing-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.glasheld-finishing-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.glasheld-finishing-option:hover {
    border-color: #0066cc;
    background: #f8f9ff;
}

.glasheld-finishing-option.active {
    border-color: #0066cc;
    background: #0066cc;
    color: white;
}

/* Zusatzoptionen */
.glasheld-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.glasheld-option-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.glasheld-option-group h4 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1rem;
}

.glasheld-option-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

/* Preisberechnung */
.glasheld-price-calc {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.glasheld-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.glasheld-price-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0066cc;
}

/* Warenkorb-Bereich */
.glasheld-cart-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.glasheld-calculation-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.glasheld-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.glasheld-summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0066cc;
    border-top: 2px solid #e9ecef;
    padding-top: 15px;
    margin-top: 10px;
}

.glasheld-add-to-cart-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,102,204,0.3);
    width: 100%;
    margin-bottom: 20px;
}

.glasheld-add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,204,0.4);
}

.glasheld-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mengenauswahl */
.glasheld-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.glasheld-quantity-btn {
    background: #e9ecef;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.glasheld-quantity-btn:hover {
    background: #0066cc;
    color: white;
}

.glasheld-quantity-input {
    width: 80px;
    text-align: center;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

/* Nachrichten */
.glasheld-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.glasheld-message.glasheld-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.glasheld-message.glasheld-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Vorschau-Elemente */
.glasheld-preview-element {
    position: absolute;
    border-radius: 50%;
}

.glasheld-drilling {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border: 2px solid white;
}

.glasheld-beveled {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    border-radius: inherit;
}

.glasheld-cutout {
    width: 12px;
    height: 12px;
    background: #ffc107;
    border: 2px solid white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glasheld-configurator-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .glasheld-configurator-header {
        padding: 20px;
    }
    
    .glasheld-configurator-header h2 {
        font-size: 2rem;
    }
    
    .glasheld-dimension-inputs {
        grid-template-columns: 1fr;
    }
    
    .glasheld-format-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .glasheld-options-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-shape {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .glasheld-configurator {
        margin: 15px 0;
    }
    
    .glasheld-configurator-content {
        padding: 15px;
    }
    
    .glasheld-configurator-header {
        padding: 15px;
    }
    
    .glasheld-configurator-header h2 {
        font-size: 1.5rem;
    }
    
    .glass-shape {
        width: 120px;
        height: 120px;
    }
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glasheld-section-content {
    animation: fadeIn 0.3s ease;
}

/* Hover-Effekte */
.glasheld-section-header:hover i {
    transform: rotate(180deg);
}

.glasheld-format-option:hover,
.glasheld-finishing-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,102,204,0.2);
}

/* Fokus-Styles */
.glasheld-input-group input:focus,
.glasheld-option-input:focus,
.glasheld-quantity-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Loading-States */
.glasheld-add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Accessibility */
.glasheld-format-option:focus,
.glasheld-finishing-option:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Bestätigungsbutton */
.glasheld-confirmation-button-container {
    margin-top: 20px;
    text-align: left;
}

.glasheld-confirm-dimensions-btn {
    font-family: var(--theme-button-font-family, var(--theme-font-family));
    font-size: var(--theme-button-font-size);
    font-weight: var(--theme-button-font-weight);
    font-style: var(--theme-button-font-style);
    line-height: var(--theme-button-line-height);
    letter-spacing: var(--theme-button-letter-spacing);
    text-transform: var(--theme-button-text-transform);
    background-color: var(--theme-button-background-initial-color);
    color: var(--theme-button-text-initial-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.glasheld-confirm-dimensions-btn:hover {
    background-color: var(--theme-button-background-hover-color);
    color: var(--theme-button-text-hover-color);
    transform: none;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn:active {
    transform: translateY(0);
}

.glasheld-confirm-dimensions-btn.confirmed {
    background-color: var(--theme-button-background-initial-color, #6c757d);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn.confirmed:hover {
    background-color: var(--theme-button-background-initial-color, #6c757d);
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn i {
    font-size: 1.1rem;
}

/* Print-Styles */
@media print {
    .glasheld-configurator {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .glasheld-add-to-cart-btn,
    .glasheld-preview-controls {
        display: none;
    }
}

/* Modal-Stabilität für Blocksy */
body.glasheld-modal-open .ct-header-cart {
    pointer-events: auto !important;
}

body.glasheld-modal-open .ct-header-cart .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Verhindere das sofortige Schließen des Modals */
.glasheld-modal-open .ct-header-cart.active .ct-cart-content,
.glasheld-modal-open .ct-header-cart.ct-added .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Zusätzliche Modal-Stabilität */
.glasheld-modal-open .ct-header-cart .ct-cart-content {
    transition: none !important;
    animation: none !important;
}

/* Erweiterte Modal-Stabilität für Blocksy */
.ct-cart-panel.ct-active,
.ct-offcanvas-panel.ct-active,
.ct-modal.ct-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Verhindere Animationen die das Modal schließen */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal {
    animation: none !important;
    transition: none !important;
}

/* Zusätzliche Stabilität für Blocksy-Modal */
.ct-cart-panel[data-panel="cart"],
.ct-offcanvas-panel[data-panel="cart"] {
    pointer-events: auto !important;
    z-index: 999999 !important;
}

/* Verhindere Modal-Schließung durch CSS-Animationen */
.ct-cart-panel.ct-active .ct-panel-content,
.ct-offcanvas-panel.ct-active .ct-panel-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
}

/* AGGRESSIVE Modal-Stabilisierung - Überschreibe Blocksy's eigene Styles */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal,
.ct-header-cart .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* Verhindere alle schließenden Klassen */
.ct-cart-panel.ct-closing,
.ct-offcanvas-panel.ct-closing,
.ct-modal.ct-closing,
.ct-cart-panel.ct-closed,
.ct-offcanvas-panel.ct-closed,
.ct-modal.ct-closed {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Überschreibe Blocksy's Animationen */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Zusätzliche Stabilität für alle Modal-Inhalte */
.ct-cart-panel .ct-panel-content,
.ct-offcanvas-panel .ct-panel-content,
.ct-modal .ct-modal-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: block !important;
}

/* Verhindere Overlay-Schließung */
.ct-cart-panel::before,
.ct-offcanvas-panel::before,
.ct-modal::before {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Sticky Vorschau-Fenster */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* WooCommerce Product Gallery für sticky optimieren */
.woocommerce-product-gallery {
    position: relative !important;
    overflow: visible !important;
    height: auto !important;
    /* Stelle sicher, dass es in der linken Spalte bleibt */
    width: 100% !important;
    max-width: 100% !important;
}

/* Parent-Container für sticky optimieren */
.woocommerce div.product .product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.woocommerce div.product .product > * {
    flex: 1 1 50% !important;
    min-width: 300px !important;
    max-width: 50% !important; /* Verhindert Springen */
}

/* Glas-Elemente begrenzen aber nicht überschreiben - nur max-width/max-height */
.glasheld-preview-replacement .glass-preview #glassShape {
    max-width: 90% !important;
    max-height: 90% !important;
    /* width und height werden durch JavaScript gesetzt - nicht überschreiben */
}


/* Einfache Lösung: Maximale Breite für Galerie-Container - höhere Spezifität */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce-product-gallery {
    max-width: 625px !important;
    width: 100% !important;
}

/* Verhindert Springen beim Laden */
.woocommerce div.product .product {
    width: 100% !important;
}

.woocommerce div.product .product > *:first-child {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* Sticky Vorschau-Element */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Sanfte Parent-Container-Optimierung */
.woocommerce-product-gallery {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 2000px !important; /* Viel höher für sticky Test */
}

/* Greenshift Container für sticky optimieren */
.gspb_container,
.gspb_container-gsbp-4a341b1 {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 2000px !important; /* Auch höher für sticky Test */
}

/* Sticky Vorschau-Element */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Sticky Vorschau im Product Gallery Container */
.woocommerce-product-gallery .glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Doppelte CSS-Regel entfernt */

/* Responsive Anpassungen für sticky Vorschau */
@media (max-width: 768px) {
    .glasheld-preview-replacement {
        position: static !important;
        top: auto !important;
    }
}

/* Mengenangabe und Warenkorb-Button Höhe auf normalen Produktseiten */
.woocommerce div.product form.cart .quantity,
.woocommerce div.product form.cart .quantity input[type="number"],
.woocommerce div.product form.cart .quantity .qty,
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button[type="submit"],
.woocommerce div.product form.cart .button {
    height: 55px !important;
    min-height: 55px !important;
    line-height: 55px !important;
}

/* Mengenangabe spezifisch */
.woocommerce div.product form.cart .quantity {
    height: 55px !important;
}

.woocommerce div.product form.cart .quantity input[type="number"],
.woocommerce div.product form.cart .quantity .qty {
    height: 55px !important;
    line-height: 55px !important;
    padding: 0 10px !important;
    text-align: center !important;
}

/* Warenkorb-Button spezifisch */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button[type="submit"],
.woocommerce div.product form.cart .button {
    height: 55px !important;
    line-height: 55px !important;
    padding: 0 20px !important;
}
/**
 * GLASHELD Glaskonfigurator - Frontend Styles
 */

/* Reset und Basis-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Konfigurator-Container */
.glasheld-configurator {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 30px 0;
    overflow: hidden;
}

.glasheld-configurator-header {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.glasheld-configurator-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.glasheld-configurator-header .description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.glasheld-configurator-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding: 40px;
    width: 100%;
}

/* Linke Seite - Vorschau */
.glasheld-configurator-left {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.glasheld-preview-section {
    width: 100%;
    text-align: center;
}

.glasheld-preview-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #0066cc;
}

.glass-preview {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

.glass-shape {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.9) 0%, 
        rgba(255, 255, 255, 0.6) 30%, 
        rgba(240, 248, 255, 0.8) 50%, 
        rgba(255, 255, 255, 0.4) 70%, 
        rgba(255, 255, 255, 0.7) 100%);
    border: none;
    border-radius: 0; /* Keine abgerundeten Ecken - das ist eine Zusatzoption */
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 
        0 8px 32px rgba(0, 102, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 102, 204, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 0 auto;
}

/* Glaskante-Effekt */
.glass-shape::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        transparent 30%, 
        transparent 70%, 
        rgba(0, 102, 204, 0.1) 100%);
    pointer-events: none;
}

/* Glaskante-Rand */
.glass-shape::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.8) 0%, 
        rgba(0, 102, 204, 0.3) 50%, 
        rgba(255, 255, 255, 0.4) 100%);
    z-index: -1;
    filter: blur(0.5px);
}

.glasheld-format-circle .glass-shape {
    border-radius: 50%;
}

.glasheld-format-oval .glass-shape {
    border-radius: 50%;
    transform: scaleX(1.5);
}

.glasheld-format-rectangle .glass-shape {
    border-radius: 0; /* Keine abgerundeten Ecken - das ist eine Zusatzoption */
}

.glasheld-format-triangle .glass-shape {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

.glasheld-format-triangle .glass-shape::before,
.glasheld-format-triangle .glass-shape::after {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    border-radius: 0;
}

/* Polierte Kanten Visualisierung - subtiler geschliffener Rand */
.glasheld-polished-edges {
    position: relative;
    box-shadow: 
        0 8px 32px rgba(0, 102, 204, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 102, 204, 0.2),
        0 0 0 3px rgba(255, 255, 255, 0.3),
        0 0 0 6px rgba(255, 255, 255, 0.1);
}

.glasheld-polished-edges::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.1) 25%, 
        rgba(255, 255, 255, 0.15) 50%, 
        rgba(255, 255, 255, 0.1) 75%, 
        rgba(255, 255, 255, 0.2) 100%);
    border-radius: inherit;
    z-index: -1;
}

/* Spezielle Behandlung für Dreieck - verstärkter Effekt */
.glasheld-format-triangle.glasheld-polished-edges::before {
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.6) 0%, 
        rgba(255, 255, 255, 0.4) 25%, 
        rgba(255, 255, 255, 0.5) 50%, 
        rgba(255, 255, 255, 0.4) 75%, 
        rgba(255, 255, 255, 0.6) 100%);
}

/* Dreieck mit polierten Kanten - verstärkte Box-Shadow */
.glasheld-format-triangle.glasheld-polished-edges {
    box-shadow: 
        0 15px 50px rgba(0, 102, 204, 0.5),
        inset 0 3px 0 rgba(255, 255, 255, 0.95),
        inset 0 -3px 0 rgba(0, 102, 204, 0.4),
        0 0 0 6px rgba(255, 255, 255, 0.6),
        0 0 0 10px rgba(255, 255, 255, 0.3),
        0 0 0 15px rgba(255, 255, 255, 0.1);
}

/* Hover-Effekt für mehr Interaktivität */
.glass-shape:hover {
    transform: scale(1.02);
    box-shadow: 
        0 12px 40px rgba(0, 102, 204, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(0, 102, 204, 0.3);
}

.glasheld-preview-controls {
    margin-top: 20px;
}

.glasheld-preview-btn {
    font-family: var(--theme-button-font-family, var(--theme-font-family));
    font-size: var(--theme-button-font-size);
    font-weight: var(--theme-button-font-weight);
    font-style: var(--theme-button-font-style);
    line-height: var(--theme-button-line-height);
    letter-spacing: var(--theme-button-letter-spacing);
    text-transform: var(--theme-button-text-transform);
    background-color: var(--theme-button-background-initial-color);
    color: var(--theme-button-text-initial-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: none;
}

.glasheld-preview-btn:hover {
    background-color: var(--theme-button-background-hover-color);
    color: var(--theme-button-text-hover-color);
    transform: none;
    box-shadow: none;
}

/* Rechte Seite - Konfigurator */
.glasheld-configurator-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.glasheld-section {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
}

.glasheld-section-header {
    background: white;
    padding: 20px;
    cursor: pointer;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.glasheld-section-header:hover {
    background: #f1f3f4;
}

.glasheld-section-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #0066cc;
    font-weight: 600;
}

.glasheld-section-header i {
    transition: transform 0.3s ease;
}

.glasheld-section-content {
    padding: 20px;
    display: none;
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section-content.active {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
}

/* Maße-Eingaben */
.glasheld-dimension-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.glasheld-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.glasheld-input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.glasheld-input-group input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Dimensions-Hinweise */
.glasheld-dimension-hint {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-style: italic;
}

.glasheld-dimension-hint i {
    color: #0066cc;
    font-size: 0.8rem;
}

/* Dimensions-Linien in der Vorschau */
.glasheld-dimension-line {
    position: absolute;
    background: #000;
    z-index: 5;
    pointer-events: none;
}

.glasheld-dimension-label {
    position: absolute;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 4px;
    border-radius: 2px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
    white-space: nowrap;
    font-family: Arial, sans-serif;
}


/* Container für Format-Auswahl */
.glasheld-section-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Konfigurator-Sektionen */
.glasheld-configurator-sections {
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section {
    width: 100% !important;
    max-width: 100% !important;
}



/* Format-Grid - EINFACH UND EFFEKTIV */
.glasheld-format-options {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 15px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Container-Breite sicherstellen */
.glasheld-configurator-content {
    width: 100% !important;
    max-width: 100% !important;
}

.glasheld-section-content {
    width: 100% !important;
    max-width: 100% !important;
}


/* Format-Optionen */
.glasheld-format-option {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    padding: 15px !important;
    border: 2px solid #e9ecef !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    background: white !important;
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* Responsive Anpassung für Format-Auswahl */
@media (max-width: 768px) {
    .glasheld-format-options {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .glasheld-format-options {
        grid-template-columns: 1fr;
    }
}


.glasheld-format-option:hover {
    border-color: #0066cc;
    background: #f8f9ff;
}

.glasheld-format-option.active {
    border-color: #0066cc !important;
    background: #0066cc !important;
    color: white !important;
}

.glasheld-format-option.active .glasheld-format-icon svg {
    fill: white !important;
    stroke: white !important;
}

/* Sicherstellen, dass aktive Klasse überschreibt */
.glasheld-format-option.active:hover {
    border-color: #0066cc !important;
    background: #0066cc !important;
    color: white !important;
}

.glasheld-format-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.glasheld-format-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    stroke: currentColor;
}

.glasheld-format-option i {
    font-size: 1.2rem;
}

/* Veredelungs-Auswahl */
.glasheld-finishing-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.glasheld-finishing-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.glasheld-finishing-option:hover {
    border-color: #0066cc;
    background: #f8f9ff;
}

.glasheld-finishing-option.active {
    border-color: #0066cc;
    background: #0066cc;
    color: white;
}

/* Zusatzoptionen */
.glasheld-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.glasheld-option-group {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.glasheld-option-group h4 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 1rem;
}

.glasheld-option-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    text-align: center;
}

/* Preisberechnung */
.glasheld-price-calc {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.glasheld-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

.glasheld-price-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: #0066cc;
}

/* Warenkorb-Bereich */
.glasheld-cart-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    text-align: center;
}

.glasheld-calculation-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.glasheld-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.glasheld-summary-row.total {
    font-weight: 700;
    font-size: 1.2rem;
    color: #0066cc;
    border-top: 2px solid #e9ecef;
    padding-top: 15px;
    margin-top: 10px;
}

.glasheld-add-to-cart-btn {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    padding: 18px 36px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,102,204,0.3);
    width: 100%;
    margin-bottom: 20px;
}

.glasheld-add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,204,0.4);
}

.glasheld-add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Mengenauswahl */
.glasheld-quantity-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.glasheld-quantity-btn {
    background: #e9ecef;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.glasheld-quantity-btn:hover {
    background: #0066cc;
    color: white;
}

.glasheld-quantity-input {
    width: 80px;
    text-align: center;
    padding: 10px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

/* Nachrichten */
.glasheld-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.glasheld-message.glasheld-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.glasheld-message.glasheld-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Vorschau-Elemente */
.glasheld-preview-element {
    position: absolute;
    border-radius: 50%;
}

.glasheld-drilling {
    width: 8px;
    height: 8px;
    background: #dc3545;
    border: 2px solid white;
}

.glasheld-beveled {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: none;
    border-radius: inherit;
}

.glasheld-cutout {
    width: 12px;
    height: 12px;
    background: #ffc107;
    border: 2px solid white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .glasheld-configurator-content {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .glasheld-configurator-header {
        padding: 20px;
    }
    
    .glasheld-configurator-header h2 {
        font-size: 2rem;
    }
    
    .glasheld-dimension-inputs {
        grid-template-columns: 1fr;
    }
    
    .glasheld-format-options {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .glasheld-options-grid {
        grid-template-columns: 1fr;
    }
    
    .glass-shape {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .glasheld-configurator {
        margin: 15px 0;
    }
    
    .glasheld-configurator-content {
        padding: 15px;
    }
    
    .glasheld-configurator-header {
        padding: 15px;
    }
    
    .glasheld-configurator-header h2 {
        font-size: 1.5rem;
    }
    
    .glass-shape {
        width: 120px;
        height: 120px;
    }
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.glasheld-section-content {
    animation: fadeIn 0.3s ease;
}

/* Hover-Effekte */
.glasheld-section-header:hover i {
    transform: rotate(180deg);
}

.glasheld-format-option:hover,
.glasheld-finishing-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,102,204,0.2);
}

/* Fokus-Styles */
.glasheld-input-group input:focus,
.glasheld-option-input:focus,
.glasheld-quantity-input:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

/* Loading-States */
.glasheld-add-to-cart-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Accessibility */
.glasheld-format-option:focus,
.glasheld-finishing-option:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Bestätigungsbutton */
.glasheld-confirmation-button-container {
    margin-top: 20px;
    text-align: left;
}

.glasheld-confirm-dimensions-btn {
    font-family: var(--theme-button-font-family, var(--theme-font-family));
    font-size: var(--theme-button-font-size);
    font-weight: var(--theme-button-font-weight);
    font-style: var(--theme-button-font-style);
    line-height: var(--theme-button-line-height);
    letter-spacing: var(--theme-button-letter-spacing);
    text-transform: var(--theme-button-text-transform);
    background-color: var(--theme-button-background-initial-color);
    color: var(--theme-button-text-initial-color);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.glasheld-confirm-dimensions-btn:hover {
    background-color: var(--theme-button-background-hover-color);
    color: var(--theme-button-text-hover-color);
    transform: none;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn:active {
    transform: translateY(0);
}

.glasheld-confirm-dimensions-btn.confirmed {
    background-color: var(--theme-button-background-initial-color, #6c757d);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn.confirmed:hover {
    background-color: var(--theme-button-background-initial-color, #6c757d);
    opacity: 0.6;
    transform: none;
    box-shadow: none;
}

.glasheld-confirm-dimensions-btn i {
    font-size: 1.1rem;
}

/* Print-Styles */
@media print {
    .glasheld-configurator {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .glasheld-add-to-cart-btn,
    .glasheld-preview-controls {
        display: none;
    }
}

/* Modal-Stabilität für Blocksy */
body.glasheld-modal-open .ct-header-cart {
    pointer-events: auto !important;
}

body.glasheld-modal-open .ct-header-cart .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Verhindere das sofortige Schließen des Modals */
.glasheld-modal-open .ct-header-cart.active .ct-cart-content,
.glasheld-modal-open .ct-header-cart.ct-added .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Zusätzliche Modal-Stabilität */
.glasheld-modal-open .ct-header-cart .ct-cart-content {
    transition: none !important;
    animation: none !important;
}

/* Erweiterte Modal-Stabilität für Blocksy */
.ct-cart-panel.ct-active,
.ct-offcanvas-panel.ct-active,
.ct-modal.ct-active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Verhindere Animationen die das Modal schließen */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal {
    animation: none !important;
    transition: none !important;
}

/* Zusätzliche Stabilität für Blocksy-Modal */
.ct-cart-panel[data-panel="cart"],
.ct-offcanvas-panel[data-panel="cart"] {
    pointer-events: auto !important;
    z-index: 999999 !important;
}

/* Verhindere Modal-Schließung durch CSS-Animationen */
.ct-cart-panel.ct-active .ct-panel-content,
.ct-offcanvas-panel.ct-active .ct-panel-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(0) !important;
}

/* AGGRESSIVE Modal-Stabilisierung - Überschreibe Blocksy's eigene Styles */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal,
.ct-header-cart .ct-cart-content {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    pointer-events: auto !important;
}

/* Verhindere alle schließenden Klassen */
.ct-cart-panel.ct-closing,
.ct-offcanvas-panel.ct-closing,
.ct-modal.ct-closing,
.ct-cart-panel.ct-closed,
.ct-offcanvas-panel.ct-closed,
.ct-modal.ct-closed {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

/* Überschreibe Blocksy's Animationen */
.ct-cart-panel,
.ct-offcanvas-panel,
.ct-modal {
    transition: none !important;
    animation: none !important;
    transform: none !important;
}

/* Zusätzliche Stabilität für alle Modal-Inhalte */
.ct-cart-panel .ct-panel-content,
.ct-offcanvas-panel .ct-panel-content,
.ct-modal .ct-modal-content {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    display: block !important;
}

/* Verhindere Overlay-Schließung */
.ct-cart-panel::before,
.ct-offcanvas-panel::before,
.ct-modal::before {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Sticky Vorschau-Fenster */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* WooCommerce Product Gallery für sticky optimieren */
.woocommerce-product-gallery {
    position: relative !important;
    overflow: visible !important;
    height: auto !important;
    /* Stelle sicher, dass es in der linken Spalte bleibt */
    width: 100% !important;
    max-width: 100% !important;
}

/* Parent-Container für sticky optimieren */
.woocommerce div.product .product {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.woocommerce div.product .product > * {
    flex: 1 1 50% !important;
    min-width: 300px !important;
    max-width: 50% !important; /* Verhindert Springen */
}

/* Glas-Elemente begrenzen aber nicht überschreiben - nur max-width/max-height */
.glasheld-preview-replacement .glass-preview #glassShape {
    max-width: 90% !important;
    max-height: 90% !important;
    /* width und height werden durch JavaScript gesetzt - nicht überschreiben */
}


/* Einfache Lösung: Maximale Breite für Galerie-Container - höhere Spezifität */
.woocommerce div.product .woocommerce-product-gallery,
.woocommerce-product-gallery {
    max-width: 625px !important;
    width: 100% !important;
}

/* Verhindert Springen beim Laden */
.woocommerce div.product .product {
    width: 100% !important;
}

.woocommerce div.product .product > *:first-child {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* Sticky Vorschau-Element */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Sanfte Parent-Container-Optimierung */
.woocommerce-product-gallery {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 2000px !important; /* Viel höher für sticky Test */
}

/* Greenshift Container für sticky optimieren */
.gspb_container,
.gspb_container-gsbp-4a341b1 {
    position: static !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 2000px !important; /* Auch höher für sticky Test */
}

/* Sticky Vorschau-Element */
.glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Sticky Vorschau im Product Gallery Container */
.woocommerce-product-gallery .glasheld-preview-replacement {
    position: sticky !important;
    top: 20px !important;
}

/* Doppelte CSS-Regel entfernt */

/* Responsive Anpassungen für sticky Vorschau */
@media (max-width: 768px) {
    .glasheld-preview-replacement {
        position: static !important;
        top: auto !important;
    }
}

/* Mengenangabe und Warenkorb-Button Höhe auf normalen Produktseiten */
.woocommerce div.product form.cart .quantity,
.woocommerce div.product form.cart .quantity input[type="number"],
.woocommerce div.product form.cart .quantity .qty,
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button[type="submit"],
.woocommerce div.product form.cart .button {
    height: 55px !important;
    min-height: 55px !important;
    line-height: 55px !important;
}

/* Mengenangabe spezifisch */
.woocommerce div.product form.cart .quantity {
    height: 55px !important;
}

.woocommerce div.product form.cart .quantity input[type="number"],
.woocommerce div.product form.cart .quantity .qty {
    height: 55px !important;
    line-height: 55px !important;
    padding: 0 10px !important;
    text-align: center !important;
}

/* Warenkorb-Button spezifisch */
.woocommerce div.product form.cart .single_add_to_cart_button,
.woocommerce div.product form.cart button[type="submit"],
.woocommerce div.product form.cart .button {
    height: 55px !important;
    line-height: 55px !important;
    padding: 0 20px !important;
}
