:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #000000;
    --accent-red: #d32f2f;
    --font-family: 'Times New Roman', Times, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.site-header {
    text-align: center;
    padding: 2rem 0 1rem;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.separator-line {
    height: 1px;
    background-color: var(--border-color);
    width: 100px;
    margin: 0 auto 0.5rem;
}

.separator-line-small {
    height: 1px;
    background-color: #e0e0e0;
    width: 100%;
    margin: 2rem 0;
}

.subtitle {
    font-size: 1rem;
    letter-spacing: 1px;
    font-weight: bold;
}

.app-container {
    display: flex;
    max-width: 1400px;
    margin: 2rem auto;
    border-top: 1px solid var(--border-color);
}

.sidebar {
    width: 25%;
    padding: 2rem;
}

.sidebar h2 {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.visualizer {
    width: 50%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    position: relative;
}

.product-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 3rem;
    letter-spacing: 1px;
}

.umbrella-container {
    width: 400px;
    height: 400px;
    position: relative;
}

#umbrella-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 15px 25px rgba(0,0,0,0.15));
    user-select: none;
    -webkit-user-select: none;
}

.umbrella-slice {
    stroke: none;
    cursor: pointer;
    transition: fill 0.2s ease, opacity 0.2s ease;
}

.umbrella-slice:hover {
    fill: rgba(255, 255, 255, 0.25) !important;
}

.center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: #222;
    border-radius: 50%;
    z-index: 10;
    border: 2px solid #fff;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Formular & Buttons */
.config-section h3 {
    font-size: 0.95rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
    color: #444;
    text-transform: uppercase;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.btn-group.vertical {
    flex-direction: column;
}

.pill-btn {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 1px;
    text-align: center;
}

.pill-btn:hover {
    background: #f8f8f8;
}

.pill-btn.active {
    background: var(--text-color);
    color: #fff;
}

.custom-select {
    width: 100%;
    padding: 0.7rem;
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: #fff;
    cursor: pointer;
}
.custom-select:focus {
    border-color: var(--accent-red);
}

/* Stoff-Wähler (Popup) */
.fabric-picker {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 2.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    text-align: center;
    z-index: 100;
    width: 340px;
}

.fabric-picker h3 {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.premium-hint {
    font-size: 0.85rem;
    color: var(--accent-red);
    margin-bottom: 1.5rem;
}

.swatches {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #ccc;
    position: relative;
    transition: transform 0.2s;
}

.swatch:hover {
    transform: scale(1.1);
    border-color: #000;
}

.swatch.premium::after {
    content: '+';
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-red);
    color: #fff;
    font-size: 12px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-weight: bold;
}

.action-btn {
    width: 100%;
    padding: 1rem;
    font-weight: bold;
}

.action-btn.primary {
    background: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
    font-size: 1.1rem;
    margin-top: 1rem;
}

.action-btn.primary:hover {
    background: #b71c1c;
    border-color: #b71c1c;
}

/* DISABLED STATE für Checkout Button */
.action-btn.primary:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

/* Zusammenfassung & Preis */
#summary-list {
    list-style: none;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

#summary-list li {
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-bottom: 1px dotted #ccc;
    padding-bottom: 0.5rem;
}

.price-container {
    display: flex;
    justify-content: space-between;
    font-size: 1.4rem;
    font-weight: bold;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.delivery-info {
    font-size: 0.85rem;
    text-align: center;
    margin-top: 1.5rem;
    color: #666;
}

/* Footer & Modals */
.site-footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    font-size: 0.9rem;
}

.site-footer a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 10px;
    font-weight: bold;
}

.site-footer a:hover {
    text-decoration: underline;
    color: var(--accent-red);
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #fff;
    padding: 2.5rem;
    width: 90%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    position: relative;
}

.modal-content h2 {
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.modal-close {
    position: absolute;
    top: 15px; right: 20px;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #000;
}

.checkout-form .form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    font-family: inherit;
    font-size: 1rem;
    margin-top: 0.5rem;
    outline: none;
}

.checkout-form .form-group input:focus {
    border-color: var(--accent-red);
}

.checkout-form .radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Regen Effekt für 100% Fortschritt */
.rain-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.drop {
    position: absolute;
    top: -100px;
    width: 3px;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(0,120,255,0.9));
    box-shadow: 0 0 6px rgba(0, 120, 255, 0.6);
    border-radius: 2px;
    animation: fall linear forwards;
}

@keyframes fall {
    0% { top: -100px; }
    100% { top: 100%; }
}

/* Pfütze und Spritzer */
.puddle-base {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0px;
    background: rgba(0, 120, 255, 0.2);
    box-shadow: 0 -2px 10px rgba(0, 120, 255, 0.4);
    transition: height 5s ease-in-out, opacity 1s;
    pointer-events: none;
}

.splash {
    position: absolute;
    bottom: 0;
    width: 20px;
    height: 8px;
    border: 2px solid rgba(0, 120, 255, 0.8);
    border-radius: 50%;
    transform: translateX(-50%);
    animation: splashAnim 0.3s ease-out forwards;
}

@keyframes splashAnim {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 1;
        border-width: 2px;
    }
    100% {
        transform: translateX(-50%) scale(2);
        opacity: 0;
        border-width: 0px;
    }
}

.splash-drop {
    position: absolute;
    bottom: 0;
    width: 3px;
    height: 10px;
    background: rgba(0, 120, 255, 0.9);
    border-radius: 2px;
    transform-origin: bottom center;
    animation: splashDropAnim 0.4s cubic-bezier(0.1, 0.8, 0.5, 1) forwards;
}
@keyframes splashDropAnim {
    0% {
        transform: translateY(0) scale(1) rotate(var(--angle));
        opacity: 1;
    }
    50% {
        transform: translateY(-25px) scale(1) rotate(var(--angle));
    }
    100% {
        transform: translateY(0) scale(0) rotate(var(--angle));
        opacity: 0;
    }
}

/* ==========================================
   ADMIN PANEL STYLES
   ========================================== */
.drag-drop-zone {
    border: 2px dashed #ccc;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 8px;
    transition: background 0.3s, border-color 0.3s;
    background: #fafafa;
}

.drag-drop-zone:hover {
    background: #f0f0f0;
    border-color: #999;
}

.drag-drop-zone.dragover {
    background: #f0f7ff;
    border-color: var(--accent-red);
}

.admin-item-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.admin-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-item-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f0f0f0;
}

.admin-item-color-preview {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ccc;
}

.admin-item-text {
    font-size: 0.85rem;
    font-family: var(--font-family);
    font-weight: bold;
}

.admin-item-subtext {
    font-size: 0.75rem;
    color: #666;
    margin-top: 2px;
}

.admin-item-delete {
    background: none;
    border: none;
    color: var(--accent-red);
    cursor: pointer;
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1;
    padding: 4px 8px;
    transition: transform 0.2s, color 0.2s;
}

.admin-item-delete:hover {
    color: #b71c1c;
    transform: scale(1.2);
}

.admin-tabs .pill-btn {
    border-color: #ccc;
    background: #f9f9f9;
}

.admin-tabs .pill-btn.active {
    background: var(--text-color);
    color: #fff;
    border-color: var(--text-color);
}

/* ==========================================
   AUSSCHLÜSSE & RESTRIKTIONEN (DISABLED STATE)
   ========================================== */
.pill-btn.disabled {
    opacity: 0.35 !important;
    text-decoration: line-through !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    background: #f0f0f0 !important;
    border-color: #ddd !important;
    color: #888 !important;
}

.icon-box.disabled {
    opacity: 0.3 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    filter: grayscale(100%) !important;
}

.rule-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rule-card h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.95rem;
}

.rule-card p {
    margin: 0;
    font-size: 0.8rem;
    color: #666;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--accent-red);
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* ==========================================
   SITE PASSWORD PROTECTION LOCK OVERLAY
   ========================================== */
.site-lock-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, #2c2c2c 0%, #151515 100%);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.site-lock-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.site-lock-modal {
    background: #ffffff;
    max-width: 440px;
    width: 100%;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.1);
    text-align: center;
    position: relative;
    animation: lockModalAppear 0.4s ease-out;
}

@keyframes lockModalAppear {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.site-lock-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.2rem;
    background: #f4f4f4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    font-size: 1.6rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}

.site-lock-brand {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin-bottom: 0.3rem;
}

.site-lock-tagline {
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 1.2rem;
}

.site-lock-divider {
    width: 40px;
    height: 2px;
    background: #c5a059;
    margin: 0 auto 1.2rem;
}

.site-lock-desc {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.site-lock-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-align: center;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.site-lock-input:focus {
    outline: none;
    border-color: #1a1a1a;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

.site-lock-btn {
    width: 100%;
    padding: 0.85rem;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: bold;
    cursor: pointer;
    background: #1a1a1a;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    transition: background 0.2s, transform 0.1s;
}

.site-lock-btn:hover {
    background: #333333;
}

.site-lock-btn:active {
    transform: scale(0.99);
}

.site-lock-error {
    color: var(--accent-red);
    font-size: 0.8rem;
    font-weight: bold;
    margin-top: 0.8rem;
    display: none;
}

/* =========================================================
   RESPONSIVE DESIGN (TABLETS & SMARTPHONES)
   ========================================================= */

@media (max-width: 992px) {
    .app-container {
        display: flex;
        flex-direction: column;
        margin: 1rem auto;
        border-top: none;
    }

    /* Smarte Reihenfolge auf Mobilgeräten:
       1. Visualizer (Schirm & Video zuerst!)
       2. Konfiguration (Maße, Gestell, Griff etc.)
       3. Zusammenfassung (Preis & Bestellen) */
    .visualizer {
        order: 1;
        width: 100% !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: 1px solid #e0e0e0;
        padding: 1.5rem 1rem !important;
    }

    .config-sidebar {
        order: 2;
        width: 100% !important;
        padding: 1.5rem 1.2rem !important;
        border-bottom: 1px solid #e0e0e0;
    }

    .summary-sidebar {
        order: 3;
        width: 100% !important;
        padding: 1.5rem 1.2rem !important;
    }

    /* Schirm responsiv skalieren, damit er auf keinem Handy übersteht */
    .umbrella-container {
        width: min(85vw, 360px) !important;
        height: min(85vw, 360px) !important;
        margin: 0 auto !important;
    }

    .product-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    /* Feinheiten Icons */
    .feinheiten-icons {
        margin-top: 1.8rem !important;
        gap: 1.2rem !important;
        justify-content: center !important;
    }

    .feinheiten-icons .icon-box svg {
        width: 52px !important;
        height: 52px !important;
    }

    /* Video Sektion auf Smartphones & Tablets komplett ausblenden */
    .craft-video-section {
        display: none !important;
    }

    /* Fabric Picker Popup */
    .fabric-picker {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: 92vw !important;
        max-width: 480px !important;
        max-height: 85vh !important;
        padding: 1.5rem 1rem !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.4) !important;
    }

    /* Admin Bereiche mit 2-Spalten Layouts umbrechen */
    .admin-tab-content > div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 600px) {
    .site-header {
        padding: 1.2rem 1rem 0.8rem;
    }

    .logo {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .subtitle {
        font-size: 0.85rem;
    }

    #btn-admin-open {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .umbrella-container {
        width: min(88vw, 320px) !important;
        height: min(88vw, 320px) !important;
    }

    /* Touch-freundliche Buttons */
    .pill-btn {
        min-height: 42px;
        padding: 0.6rem 0.9rem;
        font-size: 0.88rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .btn-group.option-group:not(.vertical) {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
        gap: 8px;
    }

    .btn-group.option-group:not(.vertical) .pill-btn {
        flex: 1 1 calc(33.333% - 8px);
        min-width: 75px;
        text-align: center;
    }

    .btn-group.option-group.vertical .pill-btn {
        width: 100%;
        text-align: left;
        margin-bottom: 6px;
    }

    /* Modals vollflächig auf Smartphones */
    .modal-content {
        padding: 1.5rem 1rem;
        width: 95%;
        max-height: 94vh;
    }

    .fabric-picker {
        width: 96vw !important;
        max-width: 96vw !important;
        max-height: 90vh !important;
        padding: 1.2rem 0.8rem !important;
    }

    /* Admin Tabs horizontal scrollbar auf Handy */
    .admin-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        display: flex !important;
        flex-wrap: nowrap !important;
    }

    .admin-tabs .pill-btn {
        flex-shrink: 0;
    }

    /* Site Lock Modal auf Handy */
    .site-lock-modal {
        padding: 1.8rem 1.2rem;
    }

    .site-lock-brand {
        font-size: 1.15rem;
    }
}




