 #info-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#info-modal.hidden {
    display: none;
}

#info-modal .modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 35px;
    width: 78%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    text-align: center;
    position: relative;
    height: 72vh;
}

#info-modal .modal-content .close {
    position: absolute;
    top: -25px;
    right: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

/* gallery content modal */
div#modal-data {
    height: 100%;
    font-family: 'Open Sans', sans-serif;
    color: rgb(78, 68, 60);
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.gallery-modal-body.two-columns {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
    overflow: hidden;
    flex: 1;
}
.gallery-modal-preview.hidden {
    display: none;
}
.gallery-modal-body .left-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #F5F5F5;
    padding: 2rem 0 2rem 2rem;
    border-radius: 35px 0 0 35px;
}
.gallery-modal-body .right-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    flex:1;
    padding: 2rem;
}
.gallery-modal-body .right-col-scroll {
    flex: 1;
    overflow-y: auto;
    padding-right: 1rem;
}
.gallery-modal-body .right-col.options {
    overflow-y: visible;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    padding-right: 0;
}
.gallery-modal-body.two-columns.hidden {
    display: none;
}
.gallery-modal-preview .gallery-two-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    min-height: 0;
    height: 100%;
}
.gallery-modal-preview .realization-grid {
    display: flex;
    gap: 1rem;
    overflow-y: scroll;
    flex-wrap: wrap;
    flex: 1;
    overflow-y: auto;
}
.gallery-modal-preview {
  display: grid;
  grid-template-rows: 1fr auto; /* główna część + przyciski */
  gap: 2rem;
  min-height: 0;
  height: 100%;;
}
.gallery-modal-preview .realization-grid a {
    width: 150px;
    height: 150px;
    overflow: hidden;
    border-radius: 10px;
}
.gallery-modal-body .left-col {
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #F5F5F5;
    padding: 2rem 0 2rem 2rem;
    border-radius: 35px 0 0 35px;
}
.gallery-modal-body.is-color .left-col {
  display: none !important;
}
.gallery-modal-body.is-color .right-col {
  width: 100%;
}
.gallery-modal-body.two-columns.is-color {
    grid-template-columns: 1fr;
}

/* Zakładki grup wzorów */
.group-tabs-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4E443C;
    margin-bottom: 2rem;
    padding-right: 2rem;
}

.group-tabs {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    margin-right: 0; /* Domyślnie zakładki kończą się z szarym tłem */
}

.group-tab {
    padding: 1rem 2.5rem 1rem 1.5rem;
    cursor: pointer;
    color: #4E443C;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
    text-align: left;
    background-color: #E8D4DC; /* Jasny różowy kolor */
    border-radius: 25px 0 0 25px; /* Zaokrąglone lewy bok */
    margin-bottom: 0.5rem;
    margin-right: 0; /* Domyślnie kończy się z szarym tłem */
    border: none;
}

.group-tab:hover:not(.active) {
    background-color: #DFC4CE;
    margin-right: -3rem; /* Najechanie rozciąga zakładkę na białe tło */
}

.group-tab.active {
    background-color: #D093AA; /* Intensywniejszy różowy dla aktywnej zakładki */
    color: #FFFFFF;
    margin-right: -3rem; /* Aktywna zakładka nachodzi na białe tło */
}

/* Gdy najechano na nieaktywną zakładkę, aktywna skraca się do szarego tła */
.group-tabs:has(.group-tab:not(.active):hover) .group-tab.active {
    margin-right: 0;
}

.group-tab.active::after {
    display: none; /* Usunięta strzałka */
}

.group-info {
    margin-top: auto;
    padding-right: 2rem;
}

.info-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: #4E443C;
}

select#pattern-group-select {
    border: 1px solid #D1D1D1;
    padding: 0.65rem 1rem;
    border-radius: 35px;
    width: 50%;
    text-align: center;
    color: #D093AA;
    font-weight: 600;
}

.group-chooser {
    display: flex;
    align-items: center;
    gap: 2rem;
    justify-content: center;
}

.pattern-thumb {
    height: 140px;
}

.pattern-thumb.hidden-width {
    display: none !important;
}

.pattern-thumb img {
    border-radius: 0 35px 35px 0;
    object-fit: cover;
    height: 100%;
    cursor: pointer;
    width: 100%;
}

.modal-content .desc {
    text-align: left;
    font-size: 0.85rem;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.modal-content .desc ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin: 0;
}

.modal-content .desc li {
    margin-bottom: 0.3rem;
}

.left-preview-col,
.right-preview-col {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.left-preview-col .preview-image {
    flex: 1;
    min-height: 0;
}

.preview-gallery {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.selected-label,
.realization-label {
    flex-shrink: 0;
    margin: 0 0 1rem 0;
    padding: 0 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #4E443C;
}

.realization-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.preview-actions button,
#modal-close {
    background-color: transparent;
    font-family: "Amatic SC", Sans-serif;
    font-size: 2.25rem;
    font-weight: 400;
    text-decoration: none;
    line-height: 1.25em;
    fill: var(--e-global-color-e9420c8);
    color: var(--e-global-color-e9420c8);
    background-image: radial-gradient(at center center, #D093AA 0%, #DF6392 100%);
    box-shadow: 0px 0px 10px 0px rgba(208, 147, 169.99999999999997, 0.702);
    border-radius: 35px 35px 35px 35px;
    padding: 0.65rem 2.25rem 0.65rem 2.25rem;
}

.preview-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding-top: 1rem;
}
.gallery-modal-preview .realization-grid a img {
    object-fit: cover;
    height: 100%;
    width: 100%;
}
.preview-image {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.preview-image img {
    flex: 1;
    min-height: 0;
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    height: auto;
    width: auto;
}

/* Ukryj mobile bottom sheet na desktopie */
.mobile-bottom-sheet {
    display: none !important;
}

/* Responsywność - Mobile */
@media (max-width: 768px) {
    /* Pokaż mobile bottom sheet tylko na mobile */
    .mobile-bottom-sheet {
        display: flex !important;
    }
    
    /* Ukryj gallery-dots na mobile */
    .gallery-dots {
        display: none !important;
    }

    /* Stwórz klikalne pole z wybranym wzorem */
    .gallery-selected {
        cursor: pointer !important;
        pointer-events: all !important;
        position: relative;
        border: none !important;
        border-radius: 20px !important;
        padding: 1rem !important;
        min-height: 80px !important;
        height: auto !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        background-size: cover !important;
        background-position: center !important;
        transition: all 0.3s !important;
    }

    .gallery-selected:active {
        transform: scale(0.98);
    }

    .gallery-selected-text {
        background-color: rgba(255, 255, 255, 0.95) !important;
        padding: 0.5rem 1rem !important;
        border-radius: 15px !important;
        font-weight: 600 !important;
        color: #4E443C !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
        display: block !important;
    }

    /* Ukryj tekst gdy wzór jest wybrany (input ma wartość) */
    .gallery-picker-container input[type="hidden"]:not([value=""]) ~ .gallery-selected .gallery-selected-text {
        display: none !important;
    }

    /* Ukryj desktop dropdown na mobile */
    .gallery-options {
        display: none !important;
    }

    /* Modal desktop ukryty na mobile */
    #info-modal {
        display: none !important;
    }

    /* Bottom Sheet */
    .mobile-bottom-sheet {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 9999;
        display: flex;
        align-items: flex-end;
        pointer-events: all;
    }

    .mobile-bottom-sheet.hidden {
        display: none !important;
        pointer-events: none;
    }

    .bottom-sheet-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1;
    }

    .bottom-sheet-content {
        position: relative;
        background: white;
        width: 100%;
        max-height: 85vh;
        border-radius: 25px 25px 0 0;
        display: flex;
        flex-direction: column;
        animation: slideUp 0.3s ease-out;
        z-index: 2;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    }

    @keyframes slideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }

    .bottom-sheet-handle {
        width: 40px;
        height: 4px;
        background-color: #D1D1D1;
        border-radius: 2px;
        margin: 10px auto;
    }

    .bottom-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid #F0F0F0;
    }

    .bottom-sheet-header h3 {
        margin: 0;
        font-size: 1.3rem;
        color: #4E443C;
        font-weight: 700;
    }

    .bottom-sheet-close {
        background: none;
        border: none;
        font-size: 1.8rem;
        color: #999;
        cursor: pointer;
        padding: 0;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .bottom-sheet-body {
        flex: 1;
        overflow-y: auto;
        padding: 1rem 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .bottom-sheet-tabs {
        display: flex;
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 0.5rem;
        margin-bottom: 0.5rem;
        border-bottom: 1px solid #F0F0F0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        width: 100%;
        flex-shrink: 0;
    }

    .bottom-sheet-tabs::-webkit-scrollbar {
        display: none;
    }

    .bottom-sheet-tab {
        flex-shrink: 0;
        padding: 0.75rem 1.25rem;
        background-color: #F5F5F5;
        border-radius: 20px;
        font-weight: 600;
        color: #4E443C;
        cursor: pointer;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .bottom-sheet-tab.active {
        background-color: #D093AA;
        color: white;
    }

    .bottom-sheet-group-desc {
        padding: 0.75rem;
        background-color: #F9F9F9;
        border-radius: 10px;
        margin-bottom: 0.5rem;
    }

    .bottom-sheet-group-desc .group-desc-text {
        font-size: 0.9rem;
        line-height: 1.5;
        color: #4E443C;
    }

    .bottom-sheet-options {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .bottom-sheet-option {
        width: 100%;
        height: 150px;
        border-radius: 15px;
        background-size: cover;
        background-position: center;
        position: relative;
        cursor: pointer;
        border: 3px solid transparent;
        transition: all 0.2s;
        display: flex;
        align-items: flex-end;
        padding: 0.5rem;
    }

    .bottom-sheet-option.selected {
        border-color: #D093AA;
        box-shadow: 0 0 15px rgba(209, 147, 170, 0.5);
    }

    .bottom-sheet-gallery-btn {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background-color: rgba(255, 255, 255, 0.95);
        border: none;
        font-size: 1.2rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        transition: all 0.2s;
        z-index: 10;
    }

    .bottom-sheet-gallery-btn:hover {
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    }

    .bottom-sheet-gallery-btn:active {
        transform: scale(0.95);
    }


    .bottom-sheet-option span {
        background-color: rgba(255, 255, 255, 0.95);
        padding: 0.25rem 0.5rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        width: 100%;
        text-align: center;
    }

    /* Reszta mobile styles dla desktop modala (ukryte ale na wszelki wypadek) */
    #info-modal .modal-content {
        width: 95%;
        height: 90vh;
        padding: 15px;
        border-radius: 20px;
    }

    #info-modal .modal-content .close {
        top: -20px;
        right: 20px;
        font-size: 1.2rem;
    }

    .gallery-modal-body.two-columns {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
        gap: 1rem;
    }

    .gallery-modal-body .left-col {
        border-radius: 20px 20px 0 0;
        padding: 1rem;
        max-height: 200px;
        overflow-y: auto;
    }

    .gallery-modal-body .right-col {
        padding: 1rem;
    }

    .group-tabs-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
        padding-right: 0;
    }

    .group-tabs {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
        white-space: nowrap;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
    }

    .group-tab {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        border-radius: 20px;
        background-color: rgba(255, 255, 255, 0.5);
        flex-shrink: 0;
    }

    .group-tab.active {
        background-color: rgba(209, 147, 170, 0.5);
    }

    .group-tab.active::after {
        display: none;
    }

    .group-info {
        display: none;
    }

    .gallery-modal-body .right-col.options {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .pattern-thumb {
        height: 100px;
    }

    .pattern-thumb img {
        border-radius: 20px;
    }

    .right-col-header {
        font-size: 1.1rem;
    }

    .gallery-modal-preview .gallery-two-cols {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .preview-actions button,
    #modal-close {
        font-size: 1.5rem;
        padding: 0.5rem 1.5rem;
        border-radius: 25px;
    }

    .preview-actions {
        gap: 1rem;
        flex-wrap: wrap;
    }

    .gallery-modal-preview .realization-grid a {
        width: calc(50% - 0.5rem);
    }
}

/* Stylowanie strzałek nawigacji w lightboxie Elementora */
.dialog-lightbox-widget .elementor-swiper-button {
    opacity: 0.7 !important;
    transition: opacity 0.3s ease !important;
    animation: arrowPulse 2s ease-in-out infinite !important;
}

.dialog-lightbox-widget .elementor-swiper-button:hover {
    opacity: 1 !important;
    animation: none !important;
}

.dialog-lightbox-widget .elementor-swiper-button-prev,
.dialog-lightbox-widget .elementor-swiper-button-next {
    width: 50px !important;
    height: 50px !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.dialog-lightbox-widget .elementor-swiper-button svg {
    filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.7)) !important;
}

@keyframes arrowPulse {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.9;
    }
}


