 
@media (max-width: 768px) {

 
    #controls {
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        width: 88vw;
        max-width: 340px;
        box-shadow: -20px 0 60px rgba(0,0,0,0.18);
        padding-top: 0;
    }

    #controls.open {
        transform: translateX(0);
    }

     
    #panel-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 9;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s;
    }

    #panel-overlay.visible {
        opacity: 1;
        pointer-events: all;
    }

     #panel-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 24px;
        right: 24px;
        z-index: 20;
        background: #c21f26;
        color: white;
        border: none;
        border-radius: 50px;
        padding: 14px 22px;
        font-size: 14px;
        font-weight: 600;
        font-family: 'Inter', sans-serif;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(194,31,38,0.45);
        transition: opacity 0.2s, transform 0.2s;
    }

    #panel-toggle i {
        font-size: 16px;
    }

    #panel-toggle.hidden {
        opacity: 0;
        pointer-events: none;
        transform: scale(0.85) translateY(8px);
    }

    #panel-close {
        display: flex;
        align-items: center;
        justify-content: center;
        position: sticky;
        top: 0;
        height: 52px;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(8px);
        border: none;
        border-bottom: 1px solid #f0f0f0;
        font-size: 16px;
        color: #5a6c7d;
        cursor: pointer;
        transition: background 0.2s;
        z-index: 5;
        margin: 0 -24px 16px;
        width: calc(100% + 48px);
    }

    #panel-close:hover {
        background: #f8f8f8;
    }

    #logo img {
        width: 140px;
    }

    body.panel-open #logo {
        display: none;
    }

    .price-value {
        font-size: 18px;
    }

     #controls:not(.open) ~ canvas::after {
        content: 'Przeciągnij aby obrócić';
    }
}

 
@media (min-width: 769px) {
    #panel-toggle  { display: none; }
    #panel-close   { display: none; }
    #panel-overlay { display: none !important; }
}
