/**
 * Frontend Styles - Prometeo Product Configurator
 */



/* Section */
.ppc-section {
    margin-bottom: 30px;
    position: relative;
}

.ppc-section:last-child {
    margin-bottom: 0;
}

.ppc-section-title {
    font-size: 20px;
    margin: 0 0 20px 0;
    color: #333;
}

/* Subsection */
.ppc-subsection {
    margin-bottom: 30px;
}

.ppc-subsection:last-child {
    margin-bottom: 0;
}

.ppc-subsection-title {
    font-size: 16px;
    margin: 0 0 15px 0;
    color: #555;
    font-weight: 600;
}

/* Section Error */
.ppc-section-error {
    background: #f44336;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    animation: ppcErrorSlide 0.3s ease-out;
}

.ppc-section-error:before {
    content: "⚠";
    margin-right: 10px;
    font-size: 18px;
}

.ppc-section.ppc-has-error {
    border: 2px solid #f44336;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 30px;
}

@keyframes ppcErrorSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Content */
.ppc-section-content {
    position: relative;
}

/* Description Box */
.ppc-description-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
}

.ppc-description-box h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #333;
}

.ppc-description-text {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* Desktop: description in first column - OBOK opcji */
.ppc-desktop-column {
    display: block;
}

/* Mobile: description above grid - NAD opcjami */
.ppc-mobile-top {
    display: none;
}

/* Options Grid - Desktop: opis obok opcji w gridzie */
.ppc-options-grid {
    display: grid;
    grid-template-columns: 300px 1fr; /* Opis 300px, opcje reszta */
    gap: 20px;
    align-items: start;
    position: relative;
}

/* Gdy NIE MA opisu - pełna szerokość */
.ppc-options-grid:not(:has(.ppc-desktop-column)) {
    display: block;
    grid-template-columns: none;
}

/* Options Wrapper */
.ppc-options-wrapper {
    position: relative;
    overflow: visible;
}

.ppc-options-wrapper .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Desktop: 5 kolumn dla obrazków */
    gap: 10px; /* Gap spójny z karuzelą */
}

/* Grid dla typu TEXT (nie karuzela na mobile) - ZAWSZE GRID */
.ppc-type-text .ppc-options-wrapper {
    overflow: visible !important; /* Wyłącz overflow dla swipera */
}

.ppc-type-text .ppc-options-wrapper .swiper-wrapper,
.ppc-type-text .ppc-options-wrapper .ppc-grid-wrapper {
    display: grid !important; /* Wymuś grid nawet jeśli Swiper próbuje nadpisać */
    grid-template-columns: repeat(5, 1fr) !important; /* Desktop: 5 kolumn dla tekstu */
    transform: none !important; /* Wyłącz transformacje swipera */
    width: 100% !important;
}

.ppc-type-text .ppc-option {
    width: 100% !important; /* Pełna szerokość kolumny */
    height: auto !important;
}

/* Individual Option */
.ppc-option {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 8px;
   
    cursor: pointer;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.ppc-option:hover {
    border-color: #EB8125;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ppc-option label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    margin: 0;
}

.ppc-option input[type="radio"] {
    display: none;
}

.ppc-option input[type="radio"]:checked ~ .ppc-option-label,
.ppc-option input[type="radio"]:checked ~ .ppc-option-image,
.ppc-option input[type="radio"]:checked ~ .ppc-option-price {
    color: #EB8125;
}

.ppc-option.selected {
    border-color: #EB8125;
    background: #fff9f4;
}

/* Option Image */
.ppc-option-image {
    width: 100%;
    max-width: 200px;
    height: 150px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 5px 5px 0px 0px;
    display: block;
    position: relative;
}

.ppc-option-image img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ppc-option:hover .ppc-option-image img {
    transform: scale(1.05);
}

/* Zoom Icon */
.ppc-zoom-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex !important;
    width: 44px !important;
    height: 44px !important;
    padding: 10px!important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
 
    background: #FCFCFC !important;
    border: none !important;
    border-radius: 999px!important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    z-index: 5 !important;
}


.ppc-zoom-icon:hover svg path {
    fill: #EB8125;
}

/* Option Label */
.ppc-option-label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

/* Option Price */
.ppc-option-price {
    font-size: 13px;
    color: #EB8125;
    font-weight: 600;
    margin-top: auto;
}

/* Type specific */
.ppc-type-text .ppc-option {
    padding: 20px;
}

.ppc-type-text .ppc-option-label {
    font-size: 16px;
}

.ppc-type-image .ppc-option-image {
    margin-bottom: 0;
    max-width: 100%;
    height: 180px;
}

/* Swiper Navigation - UKRYTE NA MOBILE */
.ppc-swiper-prev,
.ppc-swiper-next {
    display: none !important;
}

.ppc-swiper-pagination {
    display: none !important;
}

/* Total Price */
.ppc-total-price {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

.ppc-price-value {
    font-size: 24px;
    color: #EB8125;
    font-weight: bold;
}

/* Lightbox */
.ppc-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 999999;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.ppc-lightbox.active {
    display: flex;
}

.ppc-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    cursor: default;
}

.ppc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 1000000;
}

.ppc-lightbox-close:hover {
    color: #EB8125;
}

/* Responsive - Laptop (1400px) - 4 kolumny */
@media (max-width: 1400px) {
    .ppc-options-wrapper .swiper-wrapper {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Responsive - Tablet (768px) - 3 kolumny KARUZELA */
@media (max-width: 1024px) {
    /* Przełączenie na opis NAD opcjami */
    .ppc-desktop-column {
        display: none;
    }
    
    .ppc-mobile-top {
        display: block;
        margin-bottom: 20px;
    }
    
    /* Grid zmienia się na block - opis już nie jest obok */
    .ppc-options-grid {
        display: block;
        grid-template-columns: none;
    }
    
    /* Karuzela dla opcji OBRAZKOWYCH */
    .ppc-options-wrapper .swiper-wrapper {
        display: flex !important; /* Włączamy karuzelę */
        grid-template-columns: none !important;
        gap: 0; /* Gap obsługuje Swiper przez spaceBetween */
    }
    
    .ppc-option {
        /* Szerokość kontroluje Swiper przez slidesPerView */
        flex-shrink: 0;
    }
    
    .ppc-options-wrapper {
        overflow: hidden;
    }
    
    /* TEKSTOWE opcje - GRID na tablecie (3 kolumny) */
    .ppc-type-text .ppc-options-wrapper {
        overflow: visible !important;
    }
    
    .ppc-type-text .ppc-options-wrapper .swiper-wrapper,
    .ppc-type-text .ppc-options-wrapper .ppc-grid-wrapper {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; /* 3 kolumny na tablecie */
        gap: 10px !important;
        transform: none !important;
        width: 100% !important;
    }
    
    .ppc-type-text .ppc-option {
        width: 100% !important;
        flex-shrink: 1 !important;
    }
}

/* Responsive - Mobile (768px) - 2 opcje + kawałek KARUZELA */
@media (max-width: 768px) {
    .ppc-configurator-container {
        padding: 15px;
    }
    
    /* Szerokość kontroluje Swiper przez slidesPerView: 2.5 */
    
    /* Lepsze obramowanie karuzeli */
    .ppc-options-wrapper {
        overflow: hidden;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .ppc-option-image {
        max-width: 100%;
        height: 120px;
    }
    
    .ppc-type-image .ppc-option-image {
        height: 150px;
    }
    
    .ppc-total-price {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    /* TEKSTOWE opcje - GRID na telefonie (2 kolumny) */
    .ppc-type-text .ppc-options-wrapper {
        overflow: visible !important;
        margin: 0;
        padding: 0;
    }
    
    .ppc-type-text .ppc-options-wrapper .swiper-wrapper,
    .ppc-type-text .ppc-options-wrapper .ppc-grid-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* 2 kolumny na telefonie */
        gap: 10px !important;
    }
}

/* Bardzo małe telefony */
@media (max-width: 480px) {
    .ppc-option {
        padding: 10px;
    }
    
    .ppc-option-image {
        height: 100px;
    }
    
    .ppc-zoom-icon {
        width: 36px;
        height: 36px;
        padding: 8px;
    }
    
    .ppc-zoom-icon svg {
        width: 16px;
        height: 16px;
    }
}

/* ============================================
   STICKY BAR - Fixed bottom bar with selections
   ============================================ */

.ppc-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #EB8125;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.ppc-sticky-bar.visible {
    transform: translateY(0);
}

.ppc-sticky-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

/* Selections - Left Side */
.ppc-sticky-selections-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.ppc-sticky-selections-title {
    color: #FCFCFC;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.ppc-sticky-selections {
    display: grid;
    grid-auto-flow: column; /* Elements flow into columns, not rows */
    grid-template-rows: repeat(3, auto); /* Max 3 items per column */
    grid-auto-columns: minmax(180px, 1fr); /* Each column min 180px, equal width */
    gap: 8px 20px;
    align-items: start;
    color: #FCFCFC;
    font-size: 14px;
    overflow-x: auto; /* Horizontal scroll if too many columns */
}

.ppc-sticky-selection-item {
    display: block;
    white-space: nowrap;
    line-height: 1.4;
}

.ppc-sticky-selection-item strong {
    font-weight: 600;
}

/* Actions - Right Side */
.ppc-sticky-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Price Info */
.ppc-sticky-price-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.ppc-sticky-price-label {
    color: #FCFCFC;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.2;
}

.ppc-sticky-price-value {
    color: #FCFCFC;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
}

/* Add to Cart Button */
.ppc-sticky-add-to-cart {
    display: flex !important;
    width: 246px !important;
    height: 47px !important;
    padding: 12px 32px !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0!important;
    background: #FCFCFC !important;
    border: none!important;
    border-radius: 100px!important;
    cursor: pointer!important;
    transition: all 0.3s ease!important;
}

.ppc-sticky-add-to-cart:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.ppc-sticky-add-to-cart svg {
    flex-shrink: 0;
}

.ppc-sticky-add-to-cart span {
    color: #252525;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    /* Grid dla typu TEXT - 3 kolumny na tablecie */
    .ppc-type-text .ppc-options-wrapper .swiper-wrapper,
    .ppc-type-text .ppc-options-wrapper .ppc-grid-wrapper {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .ppc-sticky-inner {
        padding: 12px 20px;
        gap: 12px;
    }
    
    .ppc-sticky-selections-title {
        font-size: 13px;
    }
    
    .ppc-sticky-selections {
        gap: 6px 15px;
        font-size: 13px;
        grid-auto-columns: minmax(150px, 1fr);
    }
    
    .ppc-sticky-selection-item {
        font-size: 13px;
    }
    
    .ppc-sticky-price-label {
        font-size: 11px;
    }
    
    .ppc-sticky-price-value {
        font-size: 18px;
    }
    
    .ppc-sticky-add-to-cart {
        width: 220px;
        height: 44px;
        padding: 10px 28px;
    }
    
    .ppc-sticky-add-to-cart span {
        font-size: 15px;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    /* Grid dla typu TEXT - 2 kolumny na mobile */
    .ppc-type-text .ppc-options-wrapper .swiper-wrapper,
    .ppc-type-text .ppc-options-wrapper .ppc-grid-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .ppc-sticky-inner {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    /* Ukrywamy listę wybranych opcji na mobile */
    .ppc-sticky-selections-wrapper {
        display: none;
    }
    
    .ppc-sticky-actions {
        width: 100%;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    /* Cena jako wiersz: label po lewej, wartość po prawej */
    .ppc-sticky-price-info {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .ppc-sticky-price-label {
        font-size: 14px;
    }
    
    .ppc-sticky-price-value {
        font-size: 18px;
    }
    
    /* Przycisk 100% szerokości */
    .ppc-sticky-add-to-cart {
        width: 100%;
        height: 50px;
    }
}

/* ===========================
   SUCCESS POPUP
   =========================== */

/* Overlay */
.ppc-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(37, 37, 37, 0.40);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ppc-popup-overlay.active {
    display: flex;
    opacity: 1;
}

/* Container */
.ppc-popup-container {
    background: #fff;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

/* Header - Pomarańczowe tło z białym tekstem */
.ppc-popup-header {
    background: #EB8125;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.ppc-popup-header span {
    color: #FCFCFC;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.ppc-popup-close {
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 0 !important;

    display: flex !important;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.ppc-popup-close svg path {
    fill: #FCFCFC;
}

.ppc-popup-close:hover {
    transform: rotate(90deg);
    background: none !important;
}

/* Content */
.ppc-popup-content {
    padding: 30px;
    display: flex;
    gap: 30px;
    overflow-x: hidden; /* Bez horizontal scroll */
}

/* Left Side */
.ppc-popup-left {
   
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.ppc-popup-product-image {
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    overflow: hidden;
}

.ppc-popup-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 8px;
}

.ppc-popup-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ppc-popup-product-title {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: #252525;
    text-align: left;
}

.ppc-popup-selections {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.ppc-popup-selection-item {
    margin-bottom: 8px;
    font-size: 14px;
    color: #252525;
    text-align: left;
}

.ppc-popup-selection-item:last-child {
    margin-bottom: 0;
}

.ppc-popup-selection-item strong {
    font-weight: 600;
    color: #252525;
}

/* Right Side */
.ppc-popup-right {
  
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ppc-popup-cart-info {
    background: transparent;
    padding: 0;
    border-radius: 0;
}

.ppc-popup-cart-info p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: #252525;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
}

.ppc-popup-cart-info p:last-child {
    margin-bottom: 0;
}

.ppc-popup-label {
    text-align: left;
    flex: 1;
}

.ppc-popup-total {
    padding: 0;
    border-top: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.ppc-popup-total-label {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #252525;
    text-align: right;
}

.ppc-popup-total-value {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 20px;
    font-weight: 300;
    color: #252525;
    text-align: right;
}

/* Actions */
.ppc-popup-actions {
    display: flex;
    gap: 15px;
}

.ppc-popup-btn {
    flex: 1;
    display: flex;
    height: 47px;
    padding: 12px 32px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 100px;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.ppc-popup-continue {
    color: #252525;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    display: flex;
    height: 47px;
    padding: 12px 32px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border-radius: 100px;
    border: 0.5px solid #CBCBCB;
    background: #CBCBCB;
}

.ppc-popup-continue:hover {
    background: #b8b8b8;
    border-color: #b8b8b8;
}

.ppc-popup-checkout {
    color: #FCFCFC;
    background: #EB8125;
    border: none;
}

.ppc-popup-checkout:hover {
    background: #d97420;
    box-shadow: 0 4px 12px rgba(235, 129, 37, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .ppc-popup-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .ppc-popup-header {
        padding: 15px 20px;
    }
    
    .ppc-popup-header span {
        font-size: 16px;
    }
    
    .ppc-popup-content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .ppc-popup-left {
        flex-direction: column;
        width: 100%;
    }
    
    .ppc-popup-product-image {
        width: 100%;
        max-width: 300px;
        height: 250px;
        margin: 0 auto;
    }
    
    .ppc-popup-product-info {
        width: 100%;
    }
    
    .ppc-popup-product-title {
        text-align: center;
    }
    
    .ppc-popup-right {
        width: 100%;
    }
    
    .ppc-popup-actions {
        flex-direction: column;
    }
    
    .ppc-popup-btn {
        width: 100%;
    }
}