/* Custom Product Wizard - Krok po kroku zamiast YITH */

.custom-product-wizard {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    color: #ffffff;
    display: none; /* Ukryj domyślnie */
}

.custom-product-wizard.show {
    display: block;
}

.wizard-header {
    text-align: center;
    margin-bottom: 30px;
}

.wizard-title {
    font-size: 28px;
    font-weight: 700;
    color: #E8054C;
    margin-bottom: 10px;
}

.wizard-subtitle {
    color: #b0b0b0;
    font-size: 16px;
}

.wizard-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.wizard-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    color: #ffffff;
}

.wizard-step.active {
    background: #E8054C;
    color: white;
    border-color: #E8054C;
}

.wizard-step.completed {
    background: rgba(34, 197, 94, 0.2);
    border-color: #22c55e;
    color: #22c55e;
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 12px;
    margin: 0;
}

.wizard-step.active .step-number,
.wizard-step.completed .step-number {
    background: rgba(255, 255, 255, 0.3);
}

.wizard-content {
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

.wizard-step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.wizard-step-content.active {
    display: block;
}

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

.step-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 15px;
    text-align: center;
}

.step-description {
    color: #b0b0b0;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.6;
}

.wizard-field {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-field label {
    display: block;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 16px;
}

.wizard-field input,
.wizard-field select,
.wizard-field textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(26, 26, 26, 0.7);
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.wizard-field input:focus,
.wizard-field select:focus,
.wizard-field textarea:focus {
    outline: none;
    border-color: #E8054C;
    background: rgba(26, 26, 26, 0.9);
    box-shadow: 0 0 0 3px rgba(232, 5, 76, 0.2);
}

.wizard-field select option {
    background: #2a2a2a;
    color: #ffffff;
    border: none;
}

.wizard-radio-group,
.wizard-checkbox-group {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.wizard-radio-option,
.wizard-checkbox-option {
    position: relative;
    cursor: pointer;
}

.wizard-radio-option input,
.wizard-checkbox-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wizard-option-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    background: rgba(26, 26, 26, 0.6);
    transition: all 0.3s ease;
    color: #ffffff;
    cursor: pointer;
}

.wizard-radio-option input:checked + .wizard-option-card,
.wizard-checkbox-option input:checked + .wizard-option-card {
    border-color: #E8054C;
    background: rgba(232, 5, 76, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 5, 76, 0.3);
}

.wizard-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.option-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #E8054C;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    overflow: hidden;
}

/* Style dla wszystkich ikon w kartach opcji */
.wizard-option-card .option-icon {
    font-size: 2rem;
}

/* Większe zdjęcia dla zasilaczy i sterowników (ale nie dla cable-color-preview) */
.wizard-option-card .option-icon:not(.cable-color-preview) {
    border: none;
    background: transparent !important; /* Usuń tło dla zdjęć */
}

/* Specjalne style dla cable-color-preview - zachowaj domyślne rozmiary i tło */
.wizard-option-card .cable-color-preview {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    margin-right: 15px;
    /* background zostaje z .cable-color-preview[data-color] */
}

.option-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    opacity: 1 !important; /* Nadpisz globalne ustawienie opacity: 0 */
}

.option-content {
    flex: 1;
}

.option-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.option-description {
    color: #b0b0b0;
    font-size: 14px;
    line-height: 1.4;
}

.option-price {
    font-weight: 700;
    color: #E8054C;
    font-size: 16px;
    margin-top: 8px;
}

.option-price.free {
    color: #22c55e;
}

.conditional-field {
    display: none;
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color, #0066cc);
}

.conditional-field.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wizard-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gdy w pierwszym kroku, wyrównaj "Następny" do prawej */
.wizard-navigation.first-step .wizard-btn-next {
    margin-left: auto;
}

.wizard-btn {
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.wizard-btn-primary {
    background: var(--primary-color, #0066cc);
    color: white;
}

.wizard-btn-primary:hover {
    background: #0052a3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.3);
}

.wizard-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.wizard-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.wizard-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.price-summary {
    position: sticky;
    top: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.price-summary h3 {
    color: var(--text-color);
    font-size: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.price-breakdown {
    margin-bottom: 20px;
}

.price-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: var(--text-color-light);
}

#wizard_wymiary {
  padding: 10px;
  border-radius: 8px;
}

.price-total {
    border-top: 2px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color, #0066cc);
}

/* Nowy układ wyboru pozycji kabla */
.cable-position-selector {
    max-width: 300px;
    margin: 20px auto;
    text-align: center;
}

.cable-position-top,
.cable-position-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.cable-position-label {
    font-size: 18px;
    font-weight: bold;
    color: #E8054C;
    margin: 15px 0;
    padding: 10px;
    border: 2px solid #E8054C;
    border-radius: 8px;
    background: rgba(232, 5, 76, 0.1);
}

.cable-position-option {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cable-position-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.cable-position-option.selected {
    border-color: var(--primary-color, #0066cc);
    background: rgba(0, 102, 204, 0.1);
}

/* Wizualizacja kabla - wijący się wąż */
.cable-visual {
    position: absolute;
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

.cable-visual::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #ffffff;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transition: border-left-color 0.3s ease;
}

/* Kierunki kabli - wijący się wąż ze strzałkami */
.cable-top-left { 
    top: 25%; 
    left: 25%;
    transform: rotate(225deg);
    background: #ffffff;
}

.cable-top-center { 
    top: 15%;
    left: 50%;
    transform: translateX(-50%) rotate(270deg);
    background: #ffffff;
}

.cable-top-right { 
    top: 25%; 
    right: 25%;
    transform: rotate(315deg);
    background: #ffffff;
}

.cable-bottom-left { 
    bottom: 25%; 
    left: 25%;
    transform: rotate(135deg);
    background: #ffffff;
}

.cable-bottom-center { 
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
    background: #ffffff;
}

.cable-bottom-right { 
    bottom: 25%; 
    right: 25%;
    transform: rotate(45deg);
    background: #ffffff;
}

/* Animacja falowania kabla */
@keyframes cableWave {
    0%, 100% { transform: scaleY(1) scaleX(1); }
    50% { transform: scaleY(1.1) scaleX(0.9); }
}

/* Kolory kabli */
.cable-position-option[data-cable-color="white"] .cable-visual { 
    background: #ffffff;
}
.cable-position-option[data-cable-color="white"] .cable-visual::before { 
    border-left-color: #ffffff; 
}

.cable-position-option[data-cable-color="black"] .cable-visual { 
    background: #000000;
}
.cable-position-option[data-cable-color="black"] .cable-visual::before { 
    border-left-color: #000000; 
}

.cable-position-option[data-cable-color="clear"] .cable-visual { 
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.5);
}
.cable-position-option[data-cable-color="clear"] .cable-visual::before { 
    border-left-color: rgba(255,255,255,0.5); 
}

.wizard-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-bottom: 30px;
    overflow: hidden;
}

.wizard-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #0066cc), #00a8ff);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 0%;
}

@media (max-width: 480px) { 
    .loop-price-from, .loop-price-with-vat {
        padding: 7px;
    }
}

@media (max-width: 768px) {
    .custom-product-wizard {
        padding: 20px;
        margin-top: 20px;
    }
    
    .wizard-steps {
        gap: 10px;
    }
    
    .wizard-step {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .wizard-radio-group,
    .wizard-checkbox-group {
        grid-template-columns: 1fr;
    }
    
    .cable-position-picker {
        max-width: 300px;
    }
    
    .wizard-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    /* Tabela wymiarów na mobile - jedno pod drugim */
    .wizard-variations-table {
        display: block;
    }
    
    .wizard-variations-table tbody,
    .wizard-variations-table tr {
        display: block;
        width: 100%;
    }
    
    .wizard-label-and-select,
    .wizard-price-column {
        display: block;
        width: 100% !important; /* Nadpisz width: 60% */
        padding: 15px 20px;
    }
    
    .wizard-label-and-select {
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .wizard-price-column {
        padding-top: 20px;
    }
    
    /* Zmniejsz czcionkę ceny w wersji mobilnej */
    .wizard-current-price {
        font-size: 16px !important;
    }
    
    .wizard-dimension-price-info {
        padding: 12px 15px;
    }
}

/* Ukryj elementy YITH gdy wizard jest aktywny */
.custom-product-wizard-active .yith-wapo-container,
.custom-product-wizard-active .yith-wapo-addon,
.custom-product-wizard-active #yith-wapo-container,
.custom-product-wizard-active .yith-wapo-form,
.custom-product-wizard-active .yith-wapo-addon-container {
    display: none !important;
}

/* Ukryj niedzialający formularz wariacji z summary */
.custom-product-wizard-active .summary .variations_form {
    display: none !important;
}

/* Tymczasowo nie ukrywamy form wariacji w summary - skopiujemy je do wizarda */
/* .custom-product-wizard-active .fn-product-variations-section .variations_form,
.custom-product-wizard-active .fn-product-variations-section .single_variation_wrap,
.custom-product-wizard-active .fn-variations-container {
    display: none !important;
} */

/* Ale pokaż formy wewnątrz wizarda */
.custom-product-wizard .variations_form,
.custom-product-wizard .dimensions-selector-wrapper,
.custom-product-wizard .fn-variations-container {
    display: block !important;
}

.custom-product-wizard .fn-variations-container table.variations,
.custom-product-wizard .dimensions-selector-wrapper table.variations {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

/* Wymuś wyświetlanie tabeli wariacji w wizardzie */
.custom-product-wizard table.variations {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ukryj standardowy przycisk add to cart w summary tylko dla produktów z wariantami */
.custom-product-wizard-active .summary .variations_form .single_add_to_cart_button {
    display: none !important;
}

/* Dla produktów bez wariantów - ukryj przycisk tylko gdy wizard nie jest pokazany */
.custom-product-wizard-active .summary .single_add_to_cart_button:not(.wizard-btn-finish) {
    display: none !important;
}

/* Ukryj cały formularz dodawania do koszyka dla produktów bez wariantów gdy wizard jest aktywny */
.custom-product-wizard-active .summary form.cart:not(.wizard-cart-form),
.custom-product-wizard-active form.cart[action*="post"][enctype="multipart/form-data"]:not(.wizard-cart-form) {
    display: none !important;
}

/* Stylizacja tabeli wymiarów */
.dimensions-selector-wrapper {
    background: linear-gradient(135deg, rgba(232, 5, 76, 0.1) 0%, rgba(26, 26, 26, 0.95) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 40px;
    margin-bottom: 40px;
    border: 3px solid rgba(232, 5, 76, 0.4);
    box-shadow: 0 15px 40px rgba(232, 5, 76, 0.2), 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.dimensions-selector-wrapper::before {
    content: '1';
    position: absolute;
    top: -15px;
    left: 30px;
    background: #E8054C;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(232, 5, 76, 0.4);
}

.dimensions-selector-wrapper h4 {
    color: #E8054C;
    font-size: 26px;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.dimensions-description {
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 35px;
    font-size: 18px;
    line-height: 1.7;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Style dla features grid */
.fn-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.fn-product-quick-features {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.fn-product-quick-features h3 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.variations-table-wrapper h4 {
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

/* Nowe style dla tabeli wymiarów z unikalnymi klasami */
.wizard-variations-table {
    width: 100%;
    border: none;
    background: linear-gradient(135deg, rgba(232, 5, 76, 0.08) 0%, rgba(26, 26, 26, 0.95) 100%);
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(232, 5, 76, 0.3);
}

.wizard-variations-table td {
    border: none;
    padding: 25px 30px;
    vertical-align: top;
}

.wizard-label-and-select {
    width: 40%;
    vertical-align: top;
    padding-right: 40px;
}

.wizard-dimension-label {
    display: block;
    color: #ffffff;
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wizard-price-column {
    width: 60%;
    vertical-align: top;
    padding-top: 40px;
}

.wizard-dimension-price-info {
    margin-top: 8px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.wizard-current-price {
    color: #E8054C;
    font-weight: 700;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: block;
    margin-bottom: 5px;
}

.wizard-price-note {
    display: block;
    color: #a0a0a0;
    font-size: 12px;
    font-weight: 400;
    margin-top: 5px;
    opacity: 0.8;
}

.variations table.variations {
    width: 100%;
    border: none;
    background: transparent;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 10px;
}

.variations table.variations td {
    border: none;
    padding: 25px 20px;
    vertical-align: top;
}

.variations table.variations .label-and-select {
    width: 60%;
    vertical-align: top;
    padding-right: 40px;
}

.variations table.variations .label-and-select label {
    display: block;
    color: #ffffff;
    font-weight: 800;
    font-size: 20px;
    margin-bottom: 18px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variations table.variations .price-column {
    width: 40%;
    vertical-align: top;
    padding-top: 35px;
}

.variations table.variations .wizard-dimension-select {
    width: 100%;
    padding: 18px 25px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 18px;
    background: rgba(26, 26, 26, 0.9);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    transition: all 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 20px center;
    background-repeat: no-repeat;
    background-size: 18px;
    padding-right: 55px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.variations table.variations .wizard-dimension-select:hover {
    border-color: rgba(232, 5, 76, 0.6);
    background: rgba(26, 26, 26, 1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(232, 5, 76, 0.1);
}

.variations table.variations .wizard-dimension-select:focus {
    outline: none;
    border-color: #E8054C;
    box-shadow: 0 0 0 4px rgba(232, 5, 76, 0.25);
    transform: translateY(-2px);
}

.variations table.variations .wizard-dimension-select option {
    background: #2a2a2a;
    color: #ffffff;
    padding: 10px;
    font-weight: 600;
}

.variations table.variations .value select option {
    background: #2a2a2a;
    color: #ffffff;
}

/* Style dla ceny obok selecta wymiarów */
.dimension-price-info {
    margin-top: 8px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.dimension-price-info .current-price {
    color: #E8054C;
    font-weight: 700;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    display: block;
    margin-bottom: 3px;
}

.dimension-price-info .price-note {
    display: block;
    color: #a0a0a0;
    font-size: 11px;
    font-weight: 400;
    margin-top: 3px;
    opacity: 0.8;
}

/* Stylizacja sekcji ceny */
.product-price-container {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 20px;
    margin: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.product-price-container .price {
    font-size: 28px;
    font-weight: 700;
    color: #E8054C;
    margin-bottom: 10px;
}

.product-price-container .price-note {
    color: #b0b0b0;
    font-size: 14px;
}

/* Stylizacja WAPO total price table */
#wapo-total-price-table {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

#wapo-total-price-table h4 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

#wapo-total-price-table .wapo-total-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

#wapo-total-price-table .wapo-total-price-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 18px;
    color: #E8054C;
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid rgba(232, 5, 76, 0.3);
}

#wapo-total-price-table .wapo-total-price-row .wapo-total-price-label {
    flex: 1;
}

#wapo-total-price-table .wapo-total-price-row .wapo-total-price-value {
    font-weight: 600;
}


/* Color Options Grid */
.color-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.color-option {
    position: relative;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.color-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 15px 10px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(26, 26, 26, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    min-height: 110px;
}

.color-option input:checked + .color-option-card {
    border-color: #E8054C;
    background: rgba(232, 5, 76, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(232, 5, 76, 0.3);
}

.color-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.color-preview {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 8px;
    object-fit: cover;
}

.color-name {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    padding: 0 5px;
    box-sizing: border-box;
}

/* Poziomy kafelek dla kilka kolorów */
.multi-color-option {
    margin-top: 20px;
}

.multi-color-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.multi-color-card {
    display: flex!important;
    align-items: center;
    gap: 20px;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    background: rgba(26, 26, 26, 0.6);
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.multi-color-option input:checked + .multi-color-card {
    border-color: #E8054C;
    background: rgba(232, 5, 76, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(232, 5, 76, 0.3);
}

.multi-color-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.multi-color-images {
    display: flex;
    gap: 5px;
}

.multi-color-img {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.multi-color-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

/* Additional Options Section */
.additional-options-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-subtitle {
    color: #E8A905;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.option-card-additional {
    border-style: dashed !important;
    opacity: 0.9;
}

.option-card-additional .option-icon {
    background: #E8A905;
}

/* Style dla personalizacji */
.personalization-grid {
    grid-template-columns: 1fr;
    gap: 20px;
}

.personalization-card {
    position: relative;
    min-height: 200px;
}

.personalization-card .wizard-option-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
}

.personalization-card .option-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.personalization-card .option-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.personalization-card .option-header-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.personalization-card .option-title {
    margin-bottom: 4px;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
}

.personalization-card .option-description {
    margin-bottom: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #b0b0b0;
}

.personalization-card .option-content {
    display: flex;
    flex-direction: column;
}

.recommendation-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ffc107;
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
}

.option-features {
    margin: 15px 0;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #b0b0b0;
}

.option-summary {
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.wizard-checkbox-option input:checked + .option-card-additional {
    border-color: #E8A905 !important;
    background: rgba(232, 169, 5, 0.15) !important;
    opacity: 1;
}

/* Ukryj lupkę i wyłącz automatyczny zoom w galerii */
.woocommerce-product-gallery__trigger {
    display: none !important;
}

.flex-viewport {
    pointer-events: none !important;
    border-radius: 20px;
}

/* Podświetlenie błędnych pól */
.field-error {
    animation: fieldErrorPulse 0.5s ease-in-out 3;
    border: 2px solid #ff4444 !important;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.5) !important;
}

@keyframes fieldErrorPulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 68, 68, 0.5);
        border-color: #ff4444;
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 68, 68, 0.8);
        border-color: #ff6666;
    }
}

/* Style dla kolorów przewodu */
.cable-color-preview {
    position: relative;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.cable-color-preview[data-color="white"] {
    background: #ffffff;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.cable-color-preview[data-color="black"] {
    background: #000000;
    box-shadow: inset 0 0 10px rgba(255, 255, 255, 0.1);
}

.cable-color-preview[data-color="clear"] {
    background: #c0c0c0; /* Srebrny kolor dla bezbarwnego oplotu */
    background-image: linear-gradient(45deg, rgba(255,255,255,0.3) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.3) 75%);
    background-size: 6px 6px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .color-options-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .color-preview {
        width: 50px;
        height: 50px;
    }
    
    .color-name {
        font-size: 12px;
    }

    .color-option-card {
        padding: 15px 0px;
    }
}

.color-preview.loaded {
  margin-inline: 7px;
}

.summary.entry-summary {
  margin: 0 !important;
}

/* Style dla elementów personalizacji w podsumowaniu */
.personalization-summary {
    margin-top: 20px;
}

.personalization-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
    color: #e0e0e0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.personalization-item:last-child {
    border-bottom: none;
}

.personalization-item span:first-child {
    font-weight: 500;
    color: #b0b0b0;
}

.personalization-item span:last-child {
    font-weight: 600;
    color: #ffffff;
    text-align: right;
}

.personalization-item.express-item span:last-child {
    color: #E8054C;
}

/* Style dla informacji dodatkowych w quick-info */
.product-additional-info {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.product-additional-info h3 {
    color: #E8054C;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.product-additional-info .info-item {
    color: #ffffff;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.6;
}

.product-additional-info .info-item strong {
    color: #b0b0b0;
    font-weight: 600;
}

.product-additional-info .delivery-info {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.product-additional-info .express-info {
    color: #E8054C;
    font-weight: 600;
    border-radius: 8px;
    margin-top: 10px;
}

.product-additional-info .express-info strong {
    color: #E8054C;
}

/* Ukryj zakładki informacji dodatkowych */
.woocommerce-tabs ul.tabs {
    display: none !important;
}

.woocommerce-Tabs-panel--additional_information {
    display: none !important;
}

/* Style dla przycisku Jak na zdjęciu */
.as-photo-option .as-photo-image {
    display: flex;
    align-items: center;
}

.as-photo-option .multi-color-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
}

/* Style dla wyświetlania ceny z VAT na stronie produktu */
.price-with-vat-display {
    display: block;
    line-height: 1.3;
}

.price-with-vat-display .price-net {
    font-size: 18px;
    font-weight: 700;
    color: #b3af54;
    margin-bottom: 4px;
}

.price-with-vat-display .price-gross {
    font-size: 16px;
    font-weight: 600;
    color: #c8ca90;
}

.product-price-container .price {
    margin-bottom: 15px;
}


.product-price-container .price .price-range-display {
    font-size: 18px;
    font-weight: 700;
    color: #b3af54;
}

/* Wyświetlanie przedziałów cen dla produktów z wariantami */
.price-range-display {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-range-display .price-range-item {
    font-size: 18px;
    font-weight: 600;
}

/* Poprawa wyświetlania cen w różnych miejscach */
.price-item span:last-child,
.price-total .total-amount,
.wizard-current-price,
.option-price {
    line-height: 1.4;
}

/* Ukryj oryginalne ceny WooCommerce w produktach z wizardem */
.products .product:has(.loop-price-with-vat) .price:not(.loop-price-with-vat),
.products .product:has(.loop-price-from) .price:not(.loop-price-from) {
    display: none !important;
}

/* Ukryj suffix i duplikujące się elementy w produktach z wizardem */
.products .product .woocommerce-price-suffix,
.products .product .price.variable-product-bottom {
    display: none !important;
}

.loop-price-net {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.loop-price-gross {
    font-size: 12px;
    font-weight: 500;
    color: #666;
    line-height: 1.2;
}

.loop-price-from, .loop-price-with-vat {
    text-align: center;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    padding: 15px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.loop-price-from .loop-price-net {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.loop-price-from .loop-price-gross {
    font-size: 12px;
    color: #666;
    line-height: 1.2;
}

.attachment-woocommerce_thumbnail.size-woocommerce_thumbnail.loaded {
  border-radius: 12px;
}