.image-variants-gallery {
    position: relative;
    display: block;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: none;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.image-variants-gallery:hover {
    box-shadow: none;
}

.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    margin: 0;
    padding: 0;
    border: none;
}

.image-variants-gallery:hover .main-image {
    transform: none;
}

.variant-buttons {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    backdrop-filter: none;
    box-shadow: none;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
    z-index: 10;
    pointer-events: auto;
}

.variant-btn {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: none;
    border-right: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
    color: #000;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    min-width: 150px;
    box-shadow: none;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: -1px;
    height: 30px;
}

.variant-btn:last-child {
    margin-bottom: 0;
}

.variant-btn:hover {
    transform: none;
    box-shadow: none;
    background: transparent;
}

.variant-btn.active {
    box-shadow: none;
    transform: none;
    background: transparent;
    border: 1px solid var(--active-border-color, #000);
    border-bottom: 1px solid var(--active-border-color, #000);
    border-right: 1px solid var(--active-border-color, #000);
    z-index: 2;
    border-radius: 3px;
}

.variant-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 400;
    text-shadow: none;
    color: #000;
    flex-grow: 1;
    margin: 0 10px;
    align-self: center;
    text-align: center;
}

.variant-btn::after {
    content: '';
    width: 30px;
    height: 100%;
    background-color: var(--button-color, #8b4513);
    border: none;
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
    align-self: stretch;
}

.variant-btn.active::after {
    width: 29px;
    margin-left: 1px;
}

/* Responsywność */
@media (max-width: 768px) {
    .image-variants-gallery {
        min-height: 300px;
    }
    
    .variant-buttons {
        right: 10px;
        gap: 0;
    }
    
    .variant-btn {
        padding: 0;
        font-size: 12px;
        min-width: 120px;
        margin-bottom: -1px;
        height: 25px;
    }
    
    .variant-btn:last-child {
        margin-bottom: 0;
    }
    
    .variant-btn::after {
        width: 25px;
        height: 100%;
    }
}

/* Animacja przejścia między zdjęciami */
.main-image {
    animation: fadeIn 0.3s ease-in-out;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0.7;
        transform: scale(1.05);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Efekty przejścia */
.image-variants-gallery[data-transition-effect="slide"] .main-image {
    transition: transform 0.5s ease;
}

.image-variants-gallery[data-transition-effect="zoom"] .main-image {
    transition: transform 0.5s ease;
}

.image-variants-gallery[data-transition-effect="fade"] .main-image {
    transition: opacity 0.5s ease;
} 

/* Nawigacja między galeriami */
.gallery-navigation {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    background: transparent;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 18px;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: none;
}

.nav-arrow:hover {
    background: transparent;
    transform: scale(1.05);
    box-shadow: none;
}

.nav-arrow:active {
    transform: scale(0.95);
}

.nav-arrow.nav-prev {
    margin-right: auto;
}

.nav-arrow.nav-next {
    margin-left: auto;
}

/* Loading state */
.image-variants-gallery.loading {
    opacity: 0.7;
    pointer-events: none;
}

.image-variants-gallery.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 20;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsywność dla nawigacji */
@media (max-width: 768px) {
    .gallery-navigation {
        padding: 0 10px;
    }
    
    .nav-arrow {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
} 

/* Style dla panelu administracyjnego - Apple iOS 17 */
/* Tylko dla stron wtyczki w panelu admin */
body.wp-admin .wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F5F5F5 !important;
    padding: 20px !important;
    margin: 0 !important;
    min-height: 100vh !important;
}

/* Główny kontener wtyczki */
body.wp-admin .wrap > div {
    background: white !important;
    border-radius: 3px !important;
    padding: 24px !important;
    margin-bottom: 20px !important;
    box-shadow: none !important;
    border: none !important;
}

/* Przyciski w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .button, 
body.wp-admin .wrap .button-primary, 
body.wp-admin .wrap .button-secondary,
body.wp-admin .wrap input[type="submit"] {
    background: #007AFF !important;
    border: none !important;
    border-radius: 3px !important;
    color: white !important;
    font-weight: 500 !important;
    padding: 8px 16px !important;
    box-shadow: none !important;
    text-shadow: none !important;
    transition: background-color 0.2s ease !important;
    font-size: 13px !important;
    cursor: pointer !important;
    display: inline-block !important;
    text-align: center !important;
    min-width: 100px !important;
}

body.wp-admin .wrap .button:hover,
body.wp-admin .wrap .button-primary:hover,
body.wp-admin .wrap input[type="submit"]:hover {
    background: #0056CC !important;
    box-shadow: none !important;
}

body.wp-admin .wrap .button-secondary {
    background: #F2F2F7 !important;
    color: #007AFF !important;
}

body.wp-admin .wrap .button-secondary:hover {
    background: #E5E5EA !important;
}

/* Pola formularza w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap input[type="text"],
body.wp-admin .wrap input[type="url"],
body.wp-admin .wrap input[type="number"],
body.wp-admin .wrap input[type="color"],
body.wp-admin .wrap select,
body.wp-admin .wrap textarea {
    border: 1px solid #C7C7CC !important;
    border-radius: 3px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    box-shadow: none !important;
    background: white !important;
    transition: border-color 0.2s ease !important;
    width: 100% !important;
    max-width: 300px !important;
    margin-bottom: 8px !important;
}

/* Pola w tabeli ustawień */
body.wp-admin .wrap .form-table input[type="text"],
body.wp-admin .wrap .form-table input[type="url"],
body.wp-admin .wrap .form-table input[type="number"],
body.wp-admin .wrap .form-table input[type="color"],
body.wp-admin .wrap .form-table select,
body.wp-admin .wrap .form-table textarea {
    max-width: 400px !important;
    margin-bottom: 0 !important;
}

body.wp-admin .wrap input[type="text"]:focus,
body.wp-admin .wrap input[type="url"]:focus,
body.wp-admin .wrap input[type="number"]:focus,
body.wp-admin .wrap input[type="color"]:focus,
body.wp-admin .wrap select:focus,
body.wp-admin .wrap textarea:focus {
    border-color: #007AFF !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Tabele w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .wp-list-table {
    border: none !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    background: white !important;
    width: 100% !important;
    margin: 20px 0 !important;
    overflow: hidden !important;
}

body.wp-admin .wrap .wp-list-table th {
    background: #F2F2F7 !important;
    border-bottom: 1px solid #C7C7CC !important;
    font-weight: 600 !important;
    color: #1D1D1F !important;
    padding: 12px 10px !important;
    text-align: left !important;
    font-size: 13px !important;
}

body.wp-admin .wrap .wp-list-table td {
    border-bottom: 1px solid #E5E5EA !important;
    padding: 12px 10px !important;
    background: white !important;
    font-size: 13px !important;
}

body.wp-admin .wrap .wp-list-table tr:hover {
    background: #F9F9F9 !important;
}

/* Nagłówki w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap h1, 
body.wp-admin .wrap h2, 
body.wp-admin .wrap h3, 
body.wp-admin .wrap h4, 
body.wp-admin .wrap h5, 
body.wp-admin .wrap h6 {
    color: #1D1D1F !important;
    font-weight: 600 !important;
    margin-bottom: 20px !important;
    font-size: 20px !important;
    line-height: 1.3 !important;
}

body.wp-admin .wrap h1 {
    font-size: 24px !important;
    margin-bottom: 24px !important;
}

/* Karty i kontenery w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .image-preview,
body.wp-admin .wrap .variant-images-preview,
body.wp-admin .wrap .variant-image-item {
    border: none !important;
    border-radius: 3px !important;
    background: white !important;
    box-shadow: none !important;
    padding: 20px !important;
    margin: 16px 0 !important;
    border: 1px solid #E5E5EA !important;
}

/* Kolory w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap input[type="color"] {
    border: 1px solid #C7C7CC !important;
    border-radius: 3px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    cursor: pointer !important;
}



/* Etykiety w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap label {
    font-weight: 500 !important;
    color: #1D1D1F !important;
    margin-bottom: 8px !important;
    display: block !important;
    font-size: 16px !important;
}

/* Komunikaty w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .notice {
    border: none !important;
    border-radius: 3px !important;
    box-shadow: none !important;
    padding: 16px 20px !important;
    margin: 20px 0 !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
}

body.wp-admin .wrap .notice-success {
    background: #D4EDDA !important;
    color: #155724 !important;
    border-left: 4px solid #28A745 !important;
}

body.wp-admin .wrap .notice-error {
    background: #F8D7DA !important;
    color: #721C24 !important;
    border-left: 4px solid #DC3545 !important;
}

/* Formularze w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .form-table {
    border: none !important;
    border-radius: 3px !important;
    background: white !important;
    box-shadow: none !important;
    margin: 20px 0 !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

body.wp-admin .wrap .form-table th {
    padding: 20px 16px 20px 0 !important;
    font-weight: 600 !important;
    color: #1D1D1F !important;
    font-size: 13px !important;
    vertical-align: top !important;
    text-align: left !important;
    border-bottom: 1px solid #E5E5EA !important;
    background: white !important;
    width: 200px !important;
}

body.wp-admin .wrap .form-table td {
    padding: 20px 16px !important;
    vertical-align: top !important;
    border-bottom: 1px solid #E5E5EA !important;
    background: white !important;
    font-size: 13px !important;
}

body.wp-admin .wrap .form-table tr:last-child th,
body.wp-admin .wrap .form-table tr:last-child td {
    border-bottom: none !important;
}

body.wp-admin .wrap .form-table tr:hover {
    background: #F9F9F9 !important;
}

/* Sekcje w tabeli ustawień */
body.wp-admin .wrap .form-table th[scope="row"] {
    font-weight: 600 !important;
    color: #1D1D1F !important;
    font-size: 13px !important;
    padding: 20px 16px 20px 0 !important;
    border-bottom: 1px solid #E5E5EA !important;
    background: white !important;
    width: 200px !important;
    vertical-align: top !important;
}

/* Nagłówki sekcji w ustawieniach */
body.wp-admin .wrap h2 {
    color: #1D1D1F !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 28px 0 14px 0 !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #E5E5EA !important;
}

body.wp-admin .wrap h2:first-of-type {
    margin-top: 0 !important;
}

/* Przyciski akcji w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .button[style*="color: #dc3232"] {
    background: #FF3B30 !important;
    color: white !important;
}

body.wp-admin .wrap .button[style*="color: #dc3232"]:hover {
    background: #D70015 !important;
}

/* Nawigacja w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .nav-tab-wrapper {
    border-bottom: 1px solid #C7C7CC !important;
    margin-bottom: 20px !important;
}

body.wp-admin .wrap .nav-tab {
    border: none !important;
    border-radius: 3px 3px 0 0 !important;
    background: #F2F2F7 !important;
    color: #8E8E93 !important;
    padding: 12px 16px !important;
    margin-right: 4px !important;
    box-shadow: none !important;
}

body.wp-admin .wrap .nav-tab-active,
body.wp-admin .wrap .nav-tab:hover {
    background: white !important;
    color: #007AFF !important;
    border-bottom: 2px solid #007AFF !important;
}

/* Kontenery w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .image-upload-container,
body.wp-admin .wrap .variant-images-container {
    border: none !important;
    border-radius: 3px !important;
    background: white !important;
    padding: 24px !important;
    margin: 20px 0 !important;
    box-shadow: none !important;
    border: 1px solid #E5E5EA !important;
}

/* Przyciski małe w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .button.small {
    padding: 6px 12px !important;
    font-size: 14px !important;
}

/* Kontenery przycisków w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap p.submit {
    margin: 24px 0 !important;
    padding: 0 !important;
    text-align: left !important;
}

body.wp-admin .wrap p.submit .button {
    margin-right: 12px !important;
}

/* Przyciski w tabeli ustawień */
body.wp-admin .wrap .form-table .button {
    margin: 8px 12px 8px 0 !important;
}

/* Opisy w tabeli ustawień */
body.wp-admin .wrap .form-table .description {
    margin-top: 8px !important;
    color: #8E8E93 !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    font-style: normal !important;
}

/* Elementy code w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap code {
    background: #F2F2F7 !important;
    color: #007AFF !important;
    padding: 4px 8px !important;
    border-radius: 3px !important;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace !important;
    font-size: 14px !important;
    border: 1px solid #C7C7CC !important;
}

/* Elementy small w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap small {
    color: #8E8E93 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
}

/* Elementy span w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap span[style*="color: #999"] {
    color: #8E8E93 !important;
    font-style: italic !important;
}

/* Elementy p w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap p {
    color: #1D1D1F !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
    font-size: 16px !important;
}

/* Opisy w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .description {
    color: #8E8E93 !important;
    font-size: 14px !important;
    margin-top: 8px !important;
    line-height: 1.4 !important;
}

/* Elementy img w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap img {
    border-radius: 3px !important;
    box-shadow: none !important;
}

/* Elementy a w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap a {
    color: #007AFF !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

body.wp-admin .wrap a:hover {
    color: #0056CC !important;
    text-decoration: none !important;
}

/* Elementy option w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap option {
    background: white !important;
    color: #1D1D1F !important;
    padding: 8px 12px !important;
}

/* Elementy strong w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap strong {
    font-weight: 600 !important;
    color: #1D1D1F !important;
}

/* Grid dla wariantów w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .variant-images-preview {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin: 20px 0 !important;
}

body.wp-admin .wrap .variant-image-item {
    border: 1px solid #E5E5EA !important;
    border-radius: 3px !important;
    background: white !important;
    padding: 20px !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease !important;
}

body.wp-admin .wrap .variant-image-item:hover {
    border-color: #C7C7CC !important;
}

/* Informacje o wariantach w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .variant-info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin: 12px 0 !important;
    gap: 12px !important;
}

body.wp-admin .wrap .variant-title-input {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex: 1 !important;
}

body.wp-admin .wrap .variant-title-field {
    border: 1px solid #C7C7CC !important;
    border-radius: 3px !important;
    padding: 6px 8px !important;
    font-size: 14px !important;
    box-shadow: none !important;
    flex: 1 !important;
}

/* Kolory w stylu iOS 17 - tylko w panelu admin wtyczki */
body.wp-admin .wrap .color-picker-container,
body.wp-admin .wrap .border-color-container,
body.wp-admin .wrap .title-input-container {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 8px 0 !important;
}

body.wp-admin .wrap .main-color-picker,
body.wp-admin .wrap .border-color-container input[type="color"] {
    border: 1px solid #C7C7CC !important;
    border-radius: 3px !important;
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    cursor: pointer !important;
    box-shadow: none !important;
}

/* Style dla kontenerów ikon strzałek */
body.wp-admin .wrap .arrow-icons-container {
    display: flex !important;
    gap: 30px !important;
    margin: 20px 0 !important;
}

body.wp-admin .wrap .arrow-icon-section {
    flex: 1 !important;
    padding: 20px !important;
    border: 1px solid #E5E5EA !important;
    border-radius: 3px !important;
    background: white !important;
}

body.wp-admin .wrap .arrow-icon-section h4 {
    margin: 0 0 15px 0 !important;
    font-size: 14px !important;
    color: #1D1D1F !important;
}

body.wp-admin .wrap .arrow-preview {
    margin: 15px 0 !important;
    padding: 10px !important;
    background: #F9F9F9 !important;
    border-radius: 3px !important;
    text-align: center !important;
}

body.wp-admin .wrap .arrow-preview img {
    border-radius: 3px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
}

/* Responsywność dla panelu admin - tylko w panelu admin wtyczki */
@media (max-width: 768px) {
    body.wp-admin .wrap .variant-images-preview {
        grid-template-columns: 1fr !important;
    }
    
    body.wp-admin .wrap .variant-info {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    body.wp-admin .wrap .color-picker-container,
    body.wp-admin .wrap .border-color-container,
    body.wp-admin .wrap .title-input-container {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    body.wp-admin .wrap .arrow-icons-container {
    flex-direction: column !important;
    gap: 20px !important;
}

body.wp-admin .wrap .offset-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

body.wp-admin .wrap .offset-container input[type="text"] {
    width: 150px;
    height: 30px;
    padding: 0 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
}

body.wp-admin .wrap .offset-container .description {
    color: #666;
    font-size: 12px;
    margin: 0;
}
}

/* Pozycje buttonów wariantów - flex-column, pozycjonowanie całego paska */
.variant-buttons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    z-index: 10;
}

.image-variants-ajax-wrapper[data-button-position="left-top"] .variant-buttons {
    left: 15px;
    top: 15px;
    right: auto;
    bottom: auto;
    transform: none;
}

.image-variants-ajax-wrapper[data-button-position="left-bottom"] .variant-buttons {
    left: 15px;
    bottom: 15px;
    right: auto;
    top: auto;
    transform: none;
}

.image-variants-ajax-wrapper[data-button-position="right-top"] .variant-buttons {
    right: 15px;
    top: 15px;
    left: auto;
    bottom: auto;
    transform: none;
}

.image-variants-ajax-wrapper[data-button-position="right-bottom"] .variant-buttons {
    right: 15px;
    bottom: 15px;
    left: auto;
    top: auto;
    transform: none;
}

.image-variants-ajax-wrapper[data-button-position="center"] .variant-buttons {
    left: 50%;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
}

.image-variants-ajax-wrapper[data-button-position="center-right"] .variant-buttons {
    right: 15px;
    top: 50%;
    left: auto;
    bottom: auto;
    transform: translateY(-50%);
}

.image-variants-ajax-wrapper[data-button-position="center-left"] .variant-buttons {
    left: 15px;
    top: 50%;
    right: auto;
    bottom: auto;
    transform: translateY(-50%);
}

.image-variants-ajax-wrapper[data-button-position="center-top"] .variant-buttons {
    left: 50%;
    top: 15px;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
}

.image-variants-ajax-wrapper[data-button-position="center-bottom"] .variant-buttons {
    left: 50%;
    bottom: 15px;
    right: auto;
    top: auto;
    transform: translateX(-50%);
}

/* Przesunięcie buttonów w poziomie i pionie */
.image-variants-ajax-wrapper[data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]),
.image-variants-ajax-wrapper[data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) {
    --button-offset-x: var(--data-button-offset-x, 0px);
    --button-offset-y: var(--data-button-offset-y, 0px);
}

/* Przesunięcie dla pozycji bez transform - używamy calc() z procentami */
.image-variants-ajax-wrapper[data-button-position="left-top"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="left-top"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    left: calc(15px + var(--button-offset-x, 0px));
    top: calc(15px + var(--button-offset-y, 0px));
}

.image-variants-ajax-wrapper[data-button-position="left-bottom"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="left-bottom"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    left: calc(15px + var(--button-offset-x, 0px));
    bottom: calc(15px + var(--button-offset-y, 0px));
}

.image-variants-ajax-wrapper[data-button-position="right-top"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="right-top"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    right: calc(15px - var(--button-offset-x, 0px));
    top: calc(15px + var(--button-offset-y, 0px));
}

.image-variants-ajax-wrapper[data-button-position="right-bottom"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="right-bottom"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    right: calc(15px - var(--button-offset-x, 0px));
    bottom: calc(15px + var(--button-offset-y, 0px));
}

/* Przesunięcie dla pozycji z transform - używamy calc() z procentami */
.image-variants-ajax-wrapper[data-button-position="center"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="center"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    transform: translate(calc(-50% + var(--button-offset-x, 0px)), calc(-50% + var(--button-offset-y, 0px)));
}

.image-variants-ajax-wrapper[data-button-position="center-right"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="center-right"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    transform: translate(calc(var(--button-offset-x, 0px)), calc(-50% + var(--button-offset-y, 0px)));
}

.image-variants-ajax-wrapper[data-button-position="center-left"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="center-left"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    transform: translate(calc(var(--button-offset-x, 0px)), calc(-50% + var(--button-offset-y, 0px)));
}

.image-variants-ajax-wrapper[data-button-position="center-top"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="center-top"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    transform: translate(calc(-50% + var(--button-offset-x, 0px)), calc(var(--button-offset-y, 0px)));
}

.image-variants-ajax-wrapper[data-button-position="center-bottom"][data-button-offset-x]:not([data-button-offset-x="0px"]):not([data-button-offset-x="0%"]) .variant-buttons,
.image-variants-ajax-wrapper[data-button-position="center-bottom"][data-button-offset-y]:not([data-button-offset-y="0px"]):not([data-button-offset-y="0%"]) .variant-buttons {
    transform: translate(calc(-50% + var(--button-offset-x, 0px)), calc(var(--button-offset-y, 0px)));
} 