/* Layout opcji konfiguratora */
.configurator-options-grid {
    margin-top: 20px;
}

/* Desktop - pokaż tylko desktop specs */
.desktop-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-left: 120px;
}

.mobile-specs {
    display: none;
}

.config-column {
    font-size: 13px;
    margin-top: 15px;
}
.config-category {
    font-weight: bold;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 8px;
    padding-bottom: 6px;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}
.config-item {
    margin-bottom: 4px;
    line-height: 1.6;
    display: flex;
    gap: 5px;
}

.config-label {
    color: #666;
    font-size: 12px;
    min-width: 80px;
    flex-shrink: 0;
}

.config-value {
    color: #000;
    font-weight: 500;
    font-size: 13px;
}

/* Lupka podglądu wzoru */
.pattern-preview-icon {
    cursor: pointer;
    font-size: 14px;
    margin-left: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
    display: inline-block;
}

.pattern-preview-icon:hover {
    opacity: 1;
}

/* Overlay z podglądem wzoru */
.pattern-preview-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    padding: 20px;
    cursor: pointer;
}

.pattern-preview-overlay.active {
    display: flex;
}

.pattern-preview-image {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    cursor: default;
}

/* Ukryj oryginalną tabelę tylko gdy istnieje nowy kontener (mobile) */
.kudlatyart-cart-container ~ .woocommerce-cart-form__contents,
body:has(.kudlatyart-cart-container) .woocommerce-cart-form__contents {
    display: none;
}

/* Kontener koszyka - bez tabeli */
.kudlatyart-cart-container {
    width: 100%;
    margin-bottom: 20px;
}

/* Każdy produkt jako karta */
.cart-item-card {
    padding: 30px;
    margin-bottom: 15px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
}

/* Przycisk usuń w prawym górnym rogu */
.cart-item-remove {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
}

.cart-item-remove a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    color: #666;
    text-decoration: none;
    font-size: 20px;
    transition: all 0.2s;
}

.cart-item-remove a:hover {
    background: #ff4444;
    color: #fff;
}

/* Górny rząd: miniatura + nazwa i cena */
.cart-item-top-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 15px;
    padding-right: 60px; /* Miejsce na przycisk X */
}

.cart-item-thumbnail {
    flex-shrink: 0;
    width: 100px;
}

.cart-item-thumbnail img {
    border-radius: 6px;
    max-width: 100%;
    height: auto;
}

.cart-item-name-price {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-item-name {
    font-size: 22px;
    font-weight: 700;
    color: #000;
}

.cart-item-name a {
    text-decoration: none;
    color: inherit;
}

.cart-item-price {
    font-size: 18px;
    font-weight: 600;
    color: #666;
}

/* Separator */
.cart-spec-separator {
    height: 1px;
    background: #e5e5e5;
    margin: 15px 0;
}

/* Podstawowe specyfikacje w linii */
.cart-basic-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.basic-spec-item {
    display: flex;
    gap: 5px;
    font-size: 14px;
}

.spec-label {
    font-weight: 600;
    color: #000;
    min-width: 80px;
    flex-shrink: 0;
}

.spec-value {
    color: #666;
}

/* Przycisk rozwijania pełnej specyfikacji */
.toggle-full-specs {
    width: 100%;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #000;
    transition: all 0.2s;
    margin-bottom: 15px;
}

.toggle-full-specs:hover {
    background: #e8e8e8;
}

/* Pełna specyfikacja - ukryta domyślnie */
.full-specs {
    margin-bottom: 15px;
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.full-specs.hidden {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}

/* Opcje konfiguratora */
.cart-item-options {
    margin-bottom: 15px;
}

/* Sekcja ilość + suma */
.cart-item-qty-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding-top: 15px;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.cart-item-quantity input[type="number"] {
    width: 50px;
    text-align: center !important;
    font-size: 16px;
    padding: 8px 5px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    -moz-appearance: textfield;
    appearance: textfield;
}

.cart-item-quantity input[type="number"]::-webkit-outer-spin-button,
.cart-item-quantity input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-btn {
    width: 35px;
    height: 35px;
    border: none;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #333;
}

.qty-btn:hover {
    background: #e0e0e0;
}

.qty-btn:active {
    background: #d0d0d0;
}

.cart-item-total-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-item-total-label {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.cart-item-subtotal {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

/* Akcje koszyka */
.cart-actions {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

/* Responsive - mobile */
@media (max-width: 1024px) {
    .cart-item-card {
        padding: 20px;
    }
    
    .cart-item-top-row {
        padding-right: 50px;
        margin-bottom: 10px;
    }
    
    .cart-item-thumbnail {
        width: 70px;
    }
    
    .cart-item-name {
        font-size: 18px;
    }
    
    .cart-item-price {
        font-size: 16px;
    }
    
    .cart-item-remove {
        top: 20px;
        right: 10px;
        transform: none;
    }
    
    .cart-item-remove a {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .cart-basic-specs {
        gap: 15px;
    }
    
    .basic-spec-item {
        font-size: 13px;
    }
    
    .toggle-full-specs {
        padding: 10px;
        font-size: 13px;
    }
    
    .cart-item-qty-total {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .cart-item-total-wrapper {
        justify-content: space-between;
    }
    
    .cart-item-subtotal {
        font-size: 20px;
    }
    
    .cart-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Mobile - ukryj desktop specs, pokaż mobile specs */
    .desktop-specs {
        display: none;
    }
    
    .mobile-specs {
        display: block;
    }
    
    .configurator-options-grid {
        margin-left: 0;
    }
}

.e-cart__column {
    margin-bottom: 20px;
}