/* ============================================
   Product Configurator — Milanik.pl / ReMarket Theme
   v6.0 — matched to ReMarket OCTemplates palette
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700;800&display=swap');

#pc-configurator * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

#pc-configurator {
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    width: 100%;
    margin: 0 0 80px;
    color: #1a1a1a;
    font-size: 14px;
    line-height: 1.5;
}

/* === TRIGGER BUTTON (injected near cart button) === */
#pc-configurator-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #2c2c2c;
    color: #ffffff;
    border: none;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
    margin-bottom: 12px;
    margin-right: 0;
    width: 100%;
    box-sizing: border-box;
}
#pc-configurator-btn:hover {
    background: #444444;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(44, 44, 44, 0.25);
}
#pc-configurator-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* === HEADER DIVIDER === */
.pc-configurator-divider {
    width: 100%;
    border: none;
    border-top: 2px solid #eaeaea;
    margin: 48px 0 0;
}

.pc-configurator-full {
    background: #fff;
    padding-top: 40px;
}

/* === HEADER SECTION === */
.pc-configurator-header {
    text-align: center;
    margin-bottom: 48px;
    padding-bottom: 28px;
    border-bottom: 1px solid #eaeaea;
}
.pc-configurator-title {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.pc-configurator-subtitle {
    font-size: 14px;
    color: #888;
    font-weight: 400;
}

/* === STEP GROUP === */
.pc-group {
    margin-bottom: 44px;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 36px;
}
.pc-group:last-of-type { border-bottom: none; }

.pc-group-header {
    margin-bottom: 20px;
}
.pc-section-label-big {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.pc-step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: #2c2c2c;
    color: #ffffff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}
.pc-required-badge {
    font-size: 10px;
    font-weight: 600;
    color: #888;
    border: 1px solid #ccc;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}
.pc-group-desc {
    font-size: 13px;
    color: #888;
    margin-top: 6px;
    font-weight: 400;
}
.pc-selected-label {
    font-size: 13px;
    color: #3a8a3a;
    font-weight: 600;
    margin-top: 6px;
    min-height: 18px;
}

/* === PILLS === */
.pc-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.pc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #ffffff;
    border: 1.5px solid #dde0e5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    color: #444;
    transition: all 0.2s ease;
    user-select: none;
}
.pc-pill:hover {
    border-color: #2c2c2c;
    color: #2c2c2c;
    background: #f8f9fa;
}
.pc-pill.selected {
    background: #2c2c2c;
    border-color: #2c2c2c;
    color: #ffffff;
}
.pc-pill-surcharge {
    font-size: 11px;
    font-weight: 600;
    opacity: 0.75;
}

/* === IMAGE CARDS === */
.pc-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: stretch;
}
.pc-card {
    flex: 1 1 calc(25% - 16px);
    width: calc(25% - 16px);
    min-width: 190px;
    border: 1.5px solid #dde0e5;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
	padding-bottom: 7px !important;
}
.pc-card:hover {
    border-color: #2c2c2c;
    box-shadow: 0 6px 18px rgba(44, 44, 44, 0.10);
    transform: translateY(-2px);
}
.pc-card.selected {
    border-color: #2c2c2c;
    box-shadow: 0 4px 14px rgba(44, 44, 44, 0.12);
}
.pc-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 26px;
    height: 26px;
    background: #2c2c2c;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    z-index: 2;
}
.pc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #f5f5f5;
}
.pc-card-img-placeholder {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #f4f4f4 0%, #eaeaea 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
}
.pc-card-img-placeholder svg {
    width: 48px;
    height: 48px;
    stroke: #ccc;
    fill: none;
}
.pc-card-body {
    padding: 14px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pc-card-label {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.3;
}
.pc-card-desc {
    font-size: 12px;
    color: #777;
    margin-bottom: 10px;
    line-height: 1.5;
    word-break: break-word;
}
.pc-card-price {
    font-size: 13px;
    font-weight: 700;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px dashed #eaeaea;
}
.pc-card-price.free { color: #3a8a3a; }
.pc-card-price.paid { color: #c0392b; }

/* === COLOR SWATCHES === */
.pc-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 4px 0;
}
.pc-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: transform 0.18s ease;
}
.pc-swatch:hover { transform: translateY(-3px) scale(1.06); }
.pc-swatch.hidden { display: none !important; }
.pc-card.hidden { display: none !important; }
.pc-swatch-color, .pc-swatch-img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2.5px solid #dde0e5;
    transition: all 0.18s ease;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pc-swatch.selected .pc-swatch-color,
.pc-swatch.selected .pc-swatch-img {
    border-color: #2c2c2c;
    box-shadow: 0 0 0 3px rgba(44, 44, 44, 0.15);
}
.pc-swatch-label {
    font-size: 11px;
    color: #444;
    text-align: center;
    max-width: 72px;
    line-height: 1.3;
    font-weight: 500;
}

/* === DROPDOWN === */
.pc-select {
    width: 100%;
    max-width: 380px;
    padding: 12px 16px;
    border: 1.5px solid #dde0e5;
    border-radius: 4px;
    font-size: 14px;
    font-family: 'Montserrat', inherit;
    color: #1a1a1a;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%232c2c2c' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.pc-select:focus { border-color: #2c2c2c; }

/* === ERROR === */
.pc-error-msg {
    color: #c0392b;
    font-size: 13px;
    font-weight: 500;
    margin-top: 10px;
    display: none;
    align-items: center;
    gap: 6px;
    background: #fdf1f0;
    padding: 9px 14px;
    border-radius: 4px;
    border: 1px solid #f5c6c2;
}
.pc-group.error .pc-error-msg { display: flex; }

/* === CONFIGURATION SUMMARY === */
#pc-config-summary {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px 28px;
    margin: 32px 0;
    border: 1px solid #eaeaea;
    display: none;
}
#pc-config-summary.visible { display: block; }

/* === CTA SECTION === */
#pc-right-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 36px;
    padding: 28px 36px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eaeaea;
}
.pc-cta-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 4px;
}
.pc-cta-price {
    font-size: 36px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
    font-family: 'Montserrat', sans-serif;
}
#pc-add-to-cart-right {
    background: #2c2c2c;
    color: #ffffff;
    border: none;
    padding: 16px 40px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Montserrat', sans-serif;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
#pc-add-to-cart-right:hover {
    background: #444444;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 44, 44, 0.25);
}
#pc-add-to-cart-right:active {
    transform: translateY(0);
}

/* === STICKY PRICE BAR (mobile) === */
#pc-price-bar { display: none; }

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .pc-card {
        flex: 1 1 calc(33.33% - 16px);
        width: calc(33.33% - 16px);
    }
}
@media (max-width: 768px) {
    .pc-card {
        flex: 1 1 calc(50% - 16px);
        width: calc(50% - 16px);
    }
    #pc-right-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 20px;
        gap: 16px;
    }
    .pc-cta-label, .pc-cta-price { text-align: center; }
    .pc-configurator-title { font-size: 22px; }
    #pc-add-to-cart-right {
        width: 100%;
        justify-content: center;
        padding: 14px 24px;
    }
    #pc-price-bar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid #eaeaea;
        padding: 12px 16px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        z-index: 9999;
        box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    }
    .pc-price-label {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.8px;
        color: #888;
    }
    .pc-price-total {
        font-size: 20px;
        font-weight: 800;
        color: #1a1a1a;
        font-family: 'Montserrat', sans-serif;
    }
    .pc-price-breakdown {
        font-size: 11px;
        color: #888;
        margin-top: 2px;
    }
    #pc-add-to-cart {
        background: #2c2c2c;
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 4px;
        font-size: 14px;
        font-weight: 700;
        font-family: 'Montserrat', sans-serif;
        cursor: pointer;
        white-space: nowrap;
        transition: background 0.2s;
    }
    #pc-add-to-cart:hover { background: #444444; }
}
@media (max-width: 480px) {
    .pc-card {
        flex: 1 1 100%;
        width: 100%;
    }
}
